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 01/20] 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 02/20] 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 03/20] 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 04/20] 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 05/20] 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 06/20] 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 07/20] 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 08/20] 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 09/20] 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 10/20] 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 11/20] 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 12/20] 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 13/20] 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 14/20] 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 15/20] 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 16/20] 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 17/20] 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 18/20] 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 19/20] 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 20/20] 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)