From 4410dc8c6b901a828f390721ddee683d9ce099d5 Mon Sep 17 00:00:00 2001 From: Thulasiraj Komminar <39799163+thulasirajkomminar@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:40:03 +0200 Subject: [PATCH] Added generated client --- README.md | 78 + client.gen.go | 20636 ++++++++++++++++++++++++++++++++ cloud-api-openapi-v1.0.0.json | 9532 +++++++++++++++ generate.go | 4 + go.mod | 29 + go.sum | 181 + tools/tools.go | 8 + types.gen.go | 1869 +++ 8 files changed, 32337 insertions(+) create mode 100644 README.md create mode 100644 client.gen.go create mode 100644 cloud-api-openapi-v1.0.0.json create mode 100644 generate.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 tools/tools.go create mode 100644 types.gen.go diff --git a/README.md b/README.md new file mode 100644 index 0000000..6002f22 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# CrateDB Cloud API Client Go Library + +The CrateDB Cloud API client Go library to allow programmatic access to the Cloud products. + +## Generated types and API client + +This library is generated using [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen) from this [OpenAPI spec](https://console.cratedb.cloud/api/cloud-api-openapi-v1.0.0.json) + +### Generate + +```go +go generate ./... +``` + +## Usage + +### Environment variables + +```bash +export CRATEDB_BASE_URL="https://console.cratedb.cloud/" +export CRATEDB_API_KEY="crate_09NZV-SXkpX3feMJWXxnSNY2AAa98RlKkxqvqdQBlfC" +export CRATEDB_API_SECRET="S5ChS_eQHoUxzplSOv11xQrFRD8W_G-I5Z43w56RIqn" +``` + +### Sample code to list database tokens + +```go +package main + +import ( + "context" + "io" + "net/http" + + "github.com/caarlos0/env/v11" + "github.com/komminarlabs/cratedb" +) + +type CratedbConfig struct { + BaseURL string `env:"CRATEDB_BASE_URL"` + ApiKey string `env:"CRATEDB_API_KEY"` + ApiSecret string `env:"CRATEDB_API_SECRET"` +} + +func main() { + cfg := CratedbConfig{} + opts := env.Options{RequiredIfNoDef: true} + + err := env.ParseWithOptions(&cfg, opts) + if err != nil { + panic(err) + } + + ctx := context.Background() + client, err := cratedb.NewClient(cfg.BaseURL, cratedb.WithRequestEditorFn(func(ctx context.Context, req *http.Request) error { + req.SetBasicAuth(cfg.ApiKey, cfg.ApiSecret) + return nil + })) + if err != nil { + panic(err) + } + + resp, err := client.GetApiV2UsersMe(ctx) + if err != nil { + panic(err) + } + defer resp.Body.Close() + + if resp.StatusCode == http.StatusOK { + bodyBytes, err := io.ReadAll(resp.Body) + if err != nil { + panic(err) + } + bodyString := string(bodyBytes) + println(bodyString) + } +} +``` diff --git a/client.gen.go b/client.gen.go new file mode 100644 index 0000000..f79ece4 --- /dev/null +++ b/client.gen.go @@ -0,0 +1,20636 @@ +// Package cratedb provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.0 DO NOT EDIT. +package cratedb + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/oapi-codegen/runtime" +) + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // GetApiV2AwsSubscriptionsSubscriptionId request + GetApiV2AwsSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiV2AwsSubscriptionsSubscriptionIdWithBody request with any body + PatchApiV2AwsSubscriptionsSubscriptionIdWithBody(ctx context.Context, subscriptionId PathSubscriptionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiV2AwsSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, body PatchApiV2AwsSubscriptionsSubscriptionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2AzureSubscriptionsSubscriptionId request + GetApiV2AzureSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Clusters request + GetApiV2Clusters(ctx context.Context, params *GetApiV2ClustersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // HeadApiV2ClustersNameName request + HeadApiV2ClustersNameName(ctx context.Context, name PathName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2ClustersClusterId request + DeleteApiV2ClustersClusterId(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterId request + GetApiV2ClustersClusterId(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiV2ClustersClusterIdWithBody request with any body + PatchApiV2ClustersClusterIdWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiV2ClustersClusterId(ctx context.Context, clusterId PathClusterId, body PatchApiV2ClustersClusterIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdAvailableProducts request + GetApiV2ClustersClusterIdAvailableProducts(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdAvailableUpgrades request + GetApiV2ClustersClusterIdAvailableUpgrades(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2ClustersClusterIdBackupScheduleWithBody request with any body + PutApiV2ClustersClusterIdBackupScheduleWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2ClustersClusterIdBackupSchedule(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdBackupScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2ClustersClusterIdDeletionProtectionWithBody request with any body + PutApiV2ClustersClusterIdDeletionProtectionWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2ClustersClusterIdDeletionProtection(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdDeletionProtectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdExportJobs request + GetApiV2ClustersClusterIdExportJobs(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2ClustersClusterIdExportJobsWithBody request with any body + PostApiV2ClustersClusterIdExportJobsWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2ClustersClusterIdExportJobs(ctx context.Context, clusterId PathClusterId, body PostApiV2ClustersClusterIdExportJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2ClustersClusterIdExportJobsExportJobId request + DeleteApiV2ClustersClusterIdExportJobsExportJobId(ctx context.Context, clusterId PathClusterId, exportJobId PathExportJobId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdExportJobsExportJobId request + GetApiV2ClustersClusterIdExportJobsExportJobId(ctx context.Context, clusterId PathClusterId, exportJobId PathExportJobId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdImportJobs request + GetApiV2ClustersClusterIdImportJobs(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2ClustersClusterIdImportJobsWithBody request with any body + PostApiV2ClustersClusterIdImportJobsWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2ClustersClusterIdImportJobs(ctx context.Context, clusterId PathClusterId, body PostApiV2ClustersClusterIdImportJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2ClustersClusterIdImportJobsImportJobId request + DeleteApiV2ClustersClusterIdImportJobsImportJobId(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdImportJobsImportJobId request + GetApiV2ClustersClusterIdImportJobsImportJobId(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdImportJobsImportJobIdProgress request + GetApiV2ClustersClusterIdImportJobsImportJobIdProgress(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, params *GetApiV2ClustersClusterIdImportJobsImportJobIdProgressParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2ClustersClusterIdIpRestrictionsWithBody request with any body + PutApiV2ClustersClusterIdIpRestrictionsWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2ClustersClusterIdIpRestrictions(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdIpRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdJwt request + GetApiV2ClustersClusterIdJwt(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdMetricsMetricId request + GetApiV2ClustersClusterIdMetricsMetricId(ctx context.Context, clusterId PathClusterId, metricId GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId, params *GetApiV2ClustersClusterIdMetricsMetricIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2ClustersClusterIdNodesOrdinal request + DeleteApiV2ClustersClusterIdNodesOrdinal(ctx context.Context, clusterId PathClusterId, ordinal PathOrdinal, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdOperations request + GetApiV2ClustersClusterIdOperations(ctx context.Context, clusterId PathClusterId, params *GetApiV2ClustersClusterIdOperationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2ClustersClusterIdProductWithBody request with any body + PutApiV2ClustersClusterIdProductWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2ClustersClusterIdProduct(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdProductJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2ClustersClusterIdScaleWithBody request with any body + PutApiV2ClustersClusterIdScaleWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2ClustersClusterIdScale(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdScaleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ClustersClusterIdSnapshots request + GetApiV2ClustersClusterIdSnapshots(ctx context.Context, clusterId PathClusterId, params *GetApiV2ClustersClusterIdSnapshotsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2ClustersClusterIdSnapshotsRestoreWithBody request with any body + PostApiV2ClustersClusterIdSnapshotsRestoreWithBody(ctx context.Context, clusterId PathTargetClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2ClustersClusterIdSnapshotsRestore(ctx context.Context, clusterId PathTargetClusterId, body PostApiV2ClustersClusterIdSnapshotsRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2ClustersClusterIdStorageWithBody request with any body + PutApiV2ClustersClusterIdStorageWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2ClustersClusterIdStorage(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2ClustersClusterIdSuspendWithBody request with any body + PutApiV2ClustersClusterIdSuspendWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2ClustersClusterIdSuspend(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdSuspendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2ClustersClusterIdUpgradeWithBody request with any body + PutApiV2ClustersClusterIdUpgradeWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2ClustersClusterIdUpgrade(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdUpgradeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Configurations request + GetApiV2Configurations(ctx context.Context, params *GetApiV2ConfigurationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ConfigurationsKey request + GetApiV2ConfigurationsKey(ctx context.Context, key PathConfigurationKey, params *GetApiV2ConfigurationsKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2ConfigurationsKeyWithBody request with any body + PutApiV2ConfigurationsKeyWithBody(ctx context.Context, key PathConfigurationKey, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2ConfigurationsKey(ctx context.Context, key PathConfigurationKey, body PutApiV2ConfigurationsKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2FeaturesStatus request + GetApiV2FeaturesStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2GcpSubscriptionsSubscriptionId request + GetApiV2GcpSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2IntegrationsAwsS3Buckets request + GetApiV2IntegrationsAwsS3Buckets(ctx context.Context, params *GetApiV2IntegrationsAwsS3BucketsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2IntegrationsAwsS3Objects request + GetApiV2IntegrationsAwsS3Objects(ctx context.Context, params *GetApiV2IntegrationsAwsS3ObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2IntegrationsAzureBlobStorageContainers request + GetApiV2IntegrationsAzureBlobStorageContainers(ctx context.Context, params *GetApiV2IntegrationsAzureBlobStorageContainersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2IntegrationsAzureBlobs request + GetApiV2IntegrationsAzureBlobs(ctx context.Context, params *GetApiV2IntegrationsAzureBlobsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Meta request + GetApiV2Meta(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2MetaCratedbVersions request + GetApiV2MetaCratedbVersions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2MetaIpAddress request + GetApiV2MetaIpAddress(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2MetaJwk request + GetApiV2MetaJwk(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2MetaJwtRefreshWithBody request with any body + PostApiV2MetaJwtRefreshWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2MetaJwtRefresh(ctx context.Context, body PostApiV2MetaJwtRefreshJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Organizations request + GetApiV2Organizations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2OrganizationsWithBody request with any body + PostApiV2OrganizationsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2Organizations(ctx context.Context, body PostApiV2OrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2OrganizationsOrganizationId request + DeleteApiV2OrganizationsOrganizationId(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationId request + GetApiV2OrganizationsOrganizationId(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2OrganizationsOrganizationIdWithBody request with any body + PutApiV2OrganizationsOrganizationIdWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2OrganizationsOrganizationId(ctx context.Context, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdAuditlogs request + GetApiV2OrganizationsOrganizationIdAuditlogs(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdAuditlogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdClusters request + GetApiV2OrganizationsOrganizationIdClusters(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdClustersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2OrganizationsOrganizationIdClustersWithBody request with any body + PostApiV2OrganizationsOrganizationIdClustersWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2OrganizationsOrganizationIdClusters(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdClustersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonth request + GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonth(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdCredits request + GetApiV2OrganizationsOrganizationIdCredits(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdCreditsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2OrganizationsOrganizationIdCreditsWithBody request with any body + PostApiV2OrganizationsOrganizationIdCreditsWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2OrganizationsOrganizationIdCredits(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdCreditsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2OrganizationsOrganizationIdCreditsCreditId request + DeleteApiV2OrganizationsOrganizationIdCreditsCreditId(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithBody request with any body + PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithBody(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiV2OrganizationsOrganizationIdCreditsCreditId(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, body PatchApiV2OrganizationsOrganizationIdCreditsCreditIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdCustomer request + GetApiV2OrganizationsOrganizationIdCustomer(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2OrganizationsOrganizationIdCustomerWithBody request with any body + PutApiV2OrganizationsOrganizationIdCustomerWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2OrganizationsOrganizationIdCustomer(ctx context.Context, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdFiles request + GetApiV2OrganizationsOrganizationIdFiles(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2OrganizationsOrganizationIdFilesWithBody request with any body + PostApiV2OrganizationsOrganizationIdFilesWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2OrganizationsOrganizationIdFiles(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdFilesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2OrganizationsOrganizationIdFilesFileId request + DeleteApiV2OrganizationsOrganizationIdFilesFileId(ctx context.Context, organizationId PathOrganizationId, fileId PathFileId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdFilesFileId request + GetApiV2OrganizationsOrganizationIdFilesFileId(ctx context.Context, organizationId PathOrganizationId, fileId PathFileId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdInvitations request + GetApiV2OrganizationsOrganizationIdInvitations(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2OrganizationsOrganizationIdInvitationsInviteToken request + DeleteApiV2OrganizationsOrganizationIdInvitationsInviteToken(ctx context.Context, organizationId PathOrganizationId, inviteToken PathInviteToken, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdMetricsPrometheus request + GetApiV2OrganizationsOrganizationIdMetricsPrometheus(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdPaymentMethods request + GetApiV2OrganizationsOrganizationIdPaymentMethods(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdProjects request + GetApiV2OrganizationsOrganizationIdProjects(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdQuotas request + GetApiV2OrganizationsOrganizationIdQuotas(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdRegions request + GetApiV2OrganizationsOrganizationIdRegions(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdRemainingBudget request + GetApiV2OrganizationsOrganizationIdRemainingBudget(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdRemainingBudgetParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdSecrets request + GetApiV2OrganizationsOrganizationIdSecrets(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2OrganizationsOrganizationIdSecretsWithBody request with any body + PostApiV2OrganizationsOrganizationIdSecretsWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2OrganizationsOrganizationIdSecrets(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2OrganizationsOrganizationIdSecretsSecretId request + DeleteApiV2OrganizationsOrganizationIdSecretsSecretId(ctx context.Context, organizationId PathOrganizationId, secretId PathOrganizationSecretId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdSubscriptions request + GetApiV2OrganizationsOrganizationIdSubscriptions(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2OrganizationsOrganizationIdUsers request + GetApiV2OrganizationsOrganizationIdUsers(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2OrganizationsOrganizationIdUsersWithBody request with any body + PostApiV2OrganizationsOrganizationIdUsersWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2OrganizationsOrganizationIdUsers(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmail request + DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmail(ctx context.Context, organizationId PathOrganizationId, userIdOrEmail PathUserIdOrEmail, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Products request + GetApiV2Products(ctx context.Context, params *GetApiV2ProductsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ProductsClustersPrice request + GetApiV2ProductsClustersPrice(ctx context.Context, params *GetApiV2ProductsClustersPriceParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ProductsKind request + GetApiV2ProductsKind(ctx context.Context, kind PathProductKind, params *GetApiV2ProductsKindParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Projects request + GetApiV2Projects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2ProjectsWithBody request with any body + PostApiV2ProjectsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2Projects(ctx context.Context, body PostApiV2ProjectsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2ProjectsProjectId request + DeleteApiV2ProjectsProjectId(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ProjectsProjectId request + GetApiV2ProjectsProjectId(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiV2ProjectsProjectIdWithBody request with any body + PatchApiV2ProjectsProjectIdWithBody(ctx context.Context, projectId PathProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiV2ProjectsProjectId(ctx context.Context, projectId PathProjectId, body PatchApiV2ProjectsProjectIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ProjectsProjectIdClusters request + GetApiV2ProjectsProjectIdClusters(ctx context.Context, projectId PathProjectId, params *GetApiV2ProjectsProjectIdClustersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2ProjectsProjectIdUsers request + GetApiV2ProjectsProjectIdUsers(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2ProjectsProjectIdUsersWithBody request with any body + PostApiV2ProjectsProjectIdUsersWithBody(ctx context.Context, projectId PathProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2ProjectsProjectIdUsers(ctx context.Context, projectId PathProjectId, body PostApiV2ProjectsProjectIdUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2ProjectsProjectIdUsersUserIdOrEmail request + DeleteApiV2ProjectsProjectIdUsersUserIdOrEmail(ctx context.Context, projectId PathProjectId, userIdOrEmail PathUserIdOrEmail, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Regions request + GetApiV2Regions(ctx context.Context, params *GetApiV2RegionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2RegionsWithBody request with any body + PostApiV2RegionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2Regions(ctx context.Context, body PostApiV2RegionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2RegionsRegionName request + DeleteApiV2RegionsRegionName(ctx context.Context, regionName PathRegionName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2RegionsRegionNameInstallToken request + GetApiV2RegionsRegionNameInstallToken(ctx context.Context, regionName PathRegionName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2RegionsRegionNameVerifyBackupLocationWithBody request with any body + PostApiV2RegionsRegionNameVerifyBackupLocationWithBody(ctx context.Context, regionName PathRegionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2RegionsRegionNameVerifyBackupLocation(ctx context.Context, regionName PathRegionName, body PostApiV2RegionsRegionNameVerifyBackupLocationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Roles request + GetApiV2Roles(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2StripeBankTransferOrganizationsOrganizationIdSetup request + PostApiV2StripeBankTransferOrganizationsOrganizationIdSetup(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2StripeCardOrganizationsOrganizationIdSetupPayment request + PostApiV2StripeCardOrganizationsOrganizationIdSetupPayment(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2StripeCardOrganizationsOrganizationIdSetup request + PostApiV2StripeCardOrganizationsOrganizationIdSetup(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2StripeOrganizationsOrganizationIdBillingInformation request + GetApiV2StripeOrganizationsOrganizationIdBillingInformation(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithBody request with any body + PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiV2StripeOrganizationsOrganizationIdBillingInformation(ctx context.Context, organizationId PathOrganizationId, body PatchApiV2StripeOrganizationsOrganizationIdBillingInformationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2StripeOrganizationsOrganizationIdCards request + GetApiV2StripeOrganizationsOrganizationIdCards(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2StripeOrganizationsOrganizationIdCardsCardId request + DeleteApiV2StripeOrganizationsOrganizationIdCardsCardId(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithBody request with any body + PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithBody(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiV2StripeOrganizationsOrganizationIdCardsCardId(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, body PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2StripeOrganizationsOrganizationIdSetupPayment request + PostApiV2StripeOrganizationsOrganizationIdSetupPayment(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2StripeOrganizationsOrganizationIdSetup request + PostApiV2StripeOrganizationsOrganizationIdSetup(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2StripeOrganizationsOrganizationIdValidateCard request + PostApiV2StripeOrganizationsOrganizationIdValidateCard(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2StripePromotions request + GetApiV2StripePromotions(ctx context.Context, params *GetApiV2StripePromotionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2StripeSubscriptionsSubscriptionId request + DeleteApiV2StripeSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2StripeSubscriptionsSubscriptionId request + GetApiV2StripeSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2StripeSubscriptionsSubscriptionIdInvoices request + GetApiV2StripeSubscriptionsSubscriptionIdInvoices(ctx context.Context, subscriptionId PathSubscriptionId, params *GetApiV2StripeSubscriptionsSubscriptionIdInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcoming request + GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcoming(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Subscriptions request + GetApiV2Subscriptions(ctx context.Context, params *GetApiV2SubscriptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2SubscriptionsWithBody request with any body + PostApiV2SubscriptionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2Subscriptions(ctx context.Context, body PostApiV2SubscriptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2SubscriptionsSubscriptionId request + DeleteApiV2SubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2SubscriptionsSubscriptionId request + GetApiV2SubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithBody request with any body + PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithBody(ctx context.Context, subscriptionId PathSubscriptionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiV2SubscriptionsSubscriptionIdAssignOrg(ctx context.Context, subscriptionId PathSubscriptionId, body PatchApiV2SubscriptionsSubscriptionIdAssignOrgJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2SubscriptionsSubscriptionIdWizardRedirect request + GetApiV2SubscriptionsSubscriptionIdWizardRedirect(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2Users request + GetApiV2Users(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2UsersMe request + GetApiV2UsersMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiV2UsersMeWithBody request with any body + PatchApiV2UsersMeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiV2UsersMe(ctx context.Context, body PatchApiV2UsersMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2UsersMeAcceptInviteWithBody request with any body + PostApiV2UsersMeAcceptInviteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV2UsersMeAcceptInvite(ctx context.Context, body PostApiV2UsersMeAcceptInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2UsersMeApiKeys request + GetApiV2UsersMeApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostApiV2UsersMeApiKeys request + PostApiV2UsersMeApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2UsersMeApiKeysApiKey request + DeleteApiV2UsersMeApiKeysApiKey(ctx context.Context, apiKey PathApiKey, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV2UsersMeApiKeysApiKey request + GetApiV2UsersMeApiKeysApiKey(ctx context.Context, apiKey PathApiKey, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiV2UsersMeApiKeysApiKeyWithBody request with any body + PatchApiV2UsersMeApiKeysApiKeyWithBody(ctx context.Context, apiKey PathApiKey, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiV2UsersMeApiKeysApiKey(ctx context.Context, apiKey PathApiKey, body PatchApiV2UsersMeApiKeysApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiV2UsersMeConfirmEmailWithBody request with any body + PutApiV2UsersMeConfirmEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiV2UsersMeConfirmEmail(ctx context.Context, body PutApiV2UsersMeConfirmEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV2UsersUserId request + DeleteApiV2UsersUserId(ctx context.Context, userId PathUserId, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) GetApiV2AwsSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2AwsSubscriptionsSubscriptionIdRequest(c.Server, subscriptionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2AwsSubscriptionsSubscriptionIdWithBody(ctx context.Context, subscriptionId PathSubscriptionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2AwsSubscriptionsSubscriptionIdRequestWithBody(c.Server, subscriptionId, 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) PatchApiV2AwsSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, body PatchApiV2AwsSubscriptionsSubscriptionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2AwsSubscriptionsSubscriptionIdRequest(c.Server, subscriptionId, 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) GetApiV2AzureSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2AzureSubscriptionsSubscriptionIdRequest(c.Server, subscriptionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2Clusters(ctx context.Context, params *GetApiV2ClustersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) HeadApiV2ClustersNameName(ctx context.Context, name PathName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewHeadApiV2ClustersNameNameRequest(c.Server, name) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV2ClustersClusterId(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2ClustersClusterIdRequest(c.Server, clusterId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ClustersClusterId(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdRequest(c.Server, clusterId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2ClustersClusterIdWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2ClustersClusterIdRequestWithBody(c.Server, clusterId, 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) PatchApiV2ClustersClusterId(ctx context.Context, clusterId PathClusterId, body PatchApiV2ClustersClusterIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2ClustersClusterIdRequest(c.Server, clusterId, 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) GetApiV2ClustersClusterIdAvailableProducts(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdAvailableProductsRequest(c.Server, clusterId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ClustersClusterIdAvailableUpgrades(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdAvailableUpgradesRequest(c.Server, clusterId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutApiV2ClustersClusterIdBackupScheduleWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdBackupScheduleRequestWithBody(c.Server, clusterId, 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) PutApiV2ClustersClusterIdBackupSchedule(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdBackupScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdBackupScheduleRequest(c.Server, clusterId, 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) PutApiV2ClustersClusterIdDeletionProtectionWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdDeletionProtectionRequestWithBody(c.Server, clusterId, 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) PutApiV2ClustersClusterIdDeletionProtection(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdDeletionProtectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdDeletionProtectionRequest(c.Server, clusterId, 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) GetApiV2ClustersClusterIdExportJobs(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdExportJobsRequest(c.Server, clusterId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2ClustersClusterIdExportJobsWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ClustersClusterIdExportJobsRequestWithBody(c.Server, clusterId, 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) PostApiV2ClustersClusterIdExportJobs(ctx context.Context, clusterId PathClusterId, body PostApiV2ClustersClusterIdExportJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ClustersClusterIdExportJobsRequest(c.Server, clusterId, 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) DeleteApiV2ClustersClusterIdExportJobsExportJobId(ctx context.Context, clusterId PathClusterId, exportJobId PathExportJobId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2ClustersClusterIdExportJobsExportJobIdRequest(c.Server, clusterId, exportJobId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ClustersClusterIdExportJobsExportJobId(ctx context.Context, clusterId PathClusterId, exportJobId PathExportJobId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdExportJobsExportJobIdRequest(c.Server, clusterId, exportJobId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ClustersClusterIdImportJobs(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdImportJobsRequest(c.Server, clusterId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2ClustersClusterIdImportJobsWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ClustersClusterIdImportJobsRequestWithBody(c.Server, clusterId, 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) PostApiV2ClustersClusterIdImportJobs(ctx context.Context, clusterId PathClusterId, body PostApiV2ClustersClusterIdImportJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ClustersClusterIdImportJobsRequest(c.Server, clusterId, 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) DeleteApiV2ClustersClusterIdImportJobsImportJobId(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2ClustersClusterIdImportJobsImportJobIdRequest(c.Server, clusterId, importJobId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ClustersClusterIdImportJobsImportJobId(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdImportJobsImportJobIdRequest(c.Server, clusterId, importJobId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ClustersClusterIdImportJobsImportJobIdProgress(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, params *GetApiV2ClustersClusterIdImportJobsImportJobIdProgressParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdImportJobsImportJobIdProgressRequest(c.Server, clusterId, importJobId, 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) PutApiV2ClustersClusterIdIpRestrictionsWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdIpRestrictionsRequestWithBody(c.Server, clusterId, 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) PutApiV2ClustersClusterIdIpRestrictions(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdIpRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdIpRestrictionsRequest(c.Server, clusterId, 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) GetApiV2ClustersClusterIdJwt(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdJwtRequest(c.Server, clusterId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ClustersClusterIdMetricsMetricId(ctx context.Context, clusterId PathClusterId, metricId GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId, params *GetApiV2ClustersClusterIdMetricsMetricIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdMetricsMetricIdRequest(c.Server, clusterId, metricId, 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) DeleteApiV2ClustersClusterIdNodesOrdinal(ctx context.Context, clusterId PathClusterId, ordinal PathOrdinal, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2ClustersClusterIdNodesOrdinalRequest(c.Server, clusterId, ordinal) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ClustersClusterIdOperations(ctx context.Context, clusterId PathClusterId, params *GetApiV2ClustersClusterIdOperationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdOperationsRequest(c.Server, clusterId, 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) PutApiV2ClustersClusterIdProductWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdProductRequestWithBody(c.Server, clusterId, 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) PutApiV2ClustersClusterIdProduct(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdProductJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdProductRequest(c.Server, clusterId, 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) PutApiV2ClustersClusterIdScaleWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdScaleRequestWithBody(c.Server, clusterId, 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) PutApiV2ClustersClusterIdScale(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdScaleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdScaleRequest(c.Server, clusterId, 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) GetApiV2ClustersClusterIdSnapshots(ctx context.Context, clusterId PathClusterId, params *GetApiV2ClustersClusterIdSnapshotsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ClustersClusterIdSnapshotsRequest(c.Server, clusterId, 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) PostApiV2ClustersClusterIdSnapshotsRestoreWithBody(ctx context.Context, clusterId PathTargetClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ClustersClusterIdSnapshotsRestoreRequestWithBody(c.Server, clusterId, 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) PostApiV2ClustersClusterIdSnapshotsRestore(ctx context.Context, clusterId PathTargetClusterId, body PostApiV2ClustersClusterIdSnapshotsRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ClustersClusterIdSnapshotsRestoreRequest(c.Server, clusterId, 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) PutApiV2ClustersClusterIdStorageWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdStorageRequestWithBody(c.Server, clusterId, 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) PutApiV2ClustersClusterIdStorage(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdStorageRequest(c.Server, clusterId, 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) PutApiV2ClustersClusterIdSuspendWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdSuspendRequestWithBody(c.Server, clusterId, 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) PutApiV2ClustersClusterIdSuspend(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdSuspendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdSuspendRequest(c.Server, clusterId, 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) PutApiV2ClustersClusterIdUpgradeWithBody(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdUpgradeRequestWithBody(c.Server, clusterId, 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) PutApiV2ClustersClusterIdUpgrade(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdUpgradeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ClustersClusterIdUpgradeRequest(c.Server, clusterId, 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) GetApiV2Configurations(ctx context.Context, params *GetApiV2ConfigurationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ConfigurationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ConfigurationsKey(ctx context.Context, key PathConfigurationKey, params *GetApiV2ConfigurationsKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ConfigurationsKeyRequest(c.Server, key, 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) PutApiV2ConfigurationsKeyWithBody(ctx context.Context, key PathConfigurationKey, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ConfigurationsKeyRequestWithBody(c.Server, key, 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) PutApiV2ConfigurationsKey(ctx context.Context, key PathConfigurationKey, body PutApiV2ConfigurationsKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2ConfigurationsKeyRequest(c.Server, key, 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) GetApiV2FeaturesStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2FeaturesStatusRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2GcpSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2GcpSubscriptionsSubscriptionIdRequest(c.Server, subscriptionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2IntegrationsAwsS3Buckets(ctx context.Context, params *GetApiV2IntegrationsAwsS3BucketsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2IntegrationsAwsS3BucketsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2IntegrationsAwsS3Objects(ctx context.Context, params *GetApiV2IntegrationsAwsS3ObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2IntegrationsAwsS3ObjectsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2IntegrationsAzureBlobStorageContainers(ctx context.Context, params *GetApiV2IntegrationsAzureBlobStorageContainersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2IntegrationsAzureBlobStorageContainersRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2IntegrationsAzureBlobs(ctx context.Context, params *GetApiV2IntegrationsAzureBlobsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2IntegrationsAzureBlobsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2Meta(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2MetaRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2MetaCratedbVersions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2MetaCratedbVersionsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2MetaIpAddress(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2MetaIpAddressRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2MetaJwk(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2MetaJwkRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2MetaJwtRefreshWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2MetaJwtRefreshRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2MetaJwtRefresh(ctx context.Context, body PostApiV2MetaJwtRefreshJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2MetaJwtRefreshRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2Organizations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2OrganizationsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2Organizations(ctx context.Context, body PostApiV2OrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV2OrganizationsOrganizationId(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2OrganizationsOrganizationIdRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationId(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutApiV2OrganizationsOrganizationIdWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2OrganizationsOrganizationIdRequestWithBody(c.Server, organizationId, 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) PutApiV2OrganizationsOrganizationId(ctx context.Context, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2OrganizationsOrganizationIdRequest(c.Server, organizationId, 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) GetApiV2OrganizationsOrganizationIdAuditlogs(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdAuditlogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdAuditlogsRequest(c.Server, organizationId, 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) GetApiV2OrganizationsOrganizationIdClusters(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdClustersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdClustersRequest(c.Server, organizationId, 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) PostApiV2OrganizationsOrganizationIdClustersWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdClustersRequestWithBody(c.Server, organizationId, 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) PostApiV2OrganizationsOrganizationIdClusters(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdClustersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdClustersRequest(c.Server, organizationId, 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) GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonth(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdCredits(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdCreditsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdCreditsRequest(c.Server, organizationId, 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) PostApiV2OrganizationsOrganizationIdCreditsWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdCreditsRequestWithBody(c.Server, organizationId, 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) PostApiV2OrganizationsOrganizationIdCredits(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdCreditsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdCreditsRequest(c.Server, organizationId, 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) DeleteApiV2OrganizationsOrganizationIdCreditsCreditId(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2OrganizationsOrganizationIdCreditsCreditIdRequest(c.Server, organizationId, creditId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithBody(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2OrganizationsOrganizationIdCreditsCreditIdRequestWithBody(c.Server, organizationId, creditId, 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) PatchApiV2OrganizationsOrganizationIdCreditsCreditId(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, body PatchApiV2OrganizationsOrganizationIdCreditsCreditIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2OrganizationsOrganizationIdCreditsCreditIdRequest(c.Server, organizationId, creditId, 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) GetApiV2OrganizationsOrganizationIdCustomer(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdCustomerRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutApiV2OrganizationsOrganizationIdCustomerWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2OrganizationsOrganizationIdCustomerRequestWithBody(c.Server, organizationId, 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) PutApiV2OrganizationsOrganizationIdCustomer(ctx context.Context, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2OrganizationsOrganizationIdCustomerRequest(c.Server, organizationId, 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) GetApiV2OrganizationsOrganizationIdFiles(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdFilesRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2OrganizationsOrganizationIdFilesWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdFilesRequestWithBody(c.Server, organizationId, 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) PostApiV2OrganizationsOrganizationIdFiles(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdFilesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdFilesRequest(c.Server, organizationId, 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) DeleteApiV2OrganizationsOrganizationIdFilesFileId(ctx context.Context, organizationId PathOrganizationId, fileId PathFileId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2OrganizationsOrganizationIdFilesFileIdRequest(c.Server, organizationId, fileId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdFilesFileId(ctx context.Context, organizationId PathOrganizationId, fileId PathFileId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdFilesFileIdRequest(c.Server, organizationId, fileId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdInvitations(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdInvitationsRequest(c.Server, organizationId, 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) DeleteApiV2OrganizationsOrganizationIdInvitationsInviteToken(ctx context.Context, organizationId PathOrganizationId, inviteToken PathInviteToken, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenRequest(c.Server, organizationId, inviteToken) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdMetricsPrometheus(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdMetricsPrometheusRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdPaymentMethods(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdPaymentMethodsRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdProjects(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdProjectsRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdQuotas(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdQuotasRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdRegions(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdRegionsRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdRemainingBudget(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdRemainingBudgetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdRemainingBudgetRequest(c.Server, organizationId, 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) GetApiV2OrganizationsOrganizationIdSecrets(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdSecretsRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2OrganizationsOrganizationIdSecretsWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdSecretsRequestWithBody(c.Server, organizationId, 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) PostApiV2OrganizationsOrganizationIdSecrets(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdSecretsRequest(c.Server, organizationId, 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) DeleteApiV2OrganizationsOrganizationIdSecretsSecretId(ctx context.Context, organizationId PathOrganizationId, secretId PathOrganizationSecretId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2OrganizationsOrganizationIdSecretsSecretIdRequest(c.Server, organizationId, secretId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdSubscriptions(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdSubscriptionsRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2OrganizationsOrganizationIdUsers(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2OrganizationsOrganizationIdUsersRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2OrganizationsOrganizationIdUsersWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdUsersRequestWithBody(c.Server, organizationId, 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) PostApiV2OrganizationsOrganizationIdUsers(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2OrganizationsOrganizationIdUsersRequest(c.Server, organizationId, 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) DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmail(ctx context.Context, organizationId PathOrganizationId, userIdOrEmail PathUserIdOrEmail, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailRequest(c.Server, organizationId, userIdOrEmail) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2Products(ctx context.Context, params *GetApiV2ProductsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ProductsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ProductsClustersPrice(ctx context.Context, params *GetApiV2ProductsClustersPriceParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ProductsClustersPriceRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ProductsKind(ctx context.Context, kind PathProductKind, params *GetApiV2ProductsKindParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ProductsKindRequest(c.Server, kind, 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) GetApiV2Projects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ProjectsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2ProjectsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ProjectsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2Projects(ctx context.Context, body PostApiV2ProjectsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ProjectsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV2ProjectsProjectId(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2ProjectsProjectIdRequest(c.Server, projectId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2ProjectsProjectId(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ProjectsProjectIdRequest(c.Server, projectId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2ProjectsProjectIdWithBody(ctx context.Context, projectId PathProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2ProjectsProjectIdRequestWithBody(c.Server, projectId, 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) PatchApiV2ProjectsProjectId(ctx context.Context, projectId PathProjectId, body PatchApiV2ProjectsProjectIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2ProjectsProjectIdRequest(c.Server, projectId, 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) GetApiV2ProjectsProjectIdClusters(ctx context.Context, projectId PathProjectId, params *GetApiV2ProjectsProjectIdClustersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ProjectsProjectIdClustersRequest(c.Server, projectId, 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) GetApiV2ProjectsProjectIdUsers(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2ProjectsProjectIdUsersRequest(c.Server, projectId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2ProjectsProjectIdUsersWithBody(ctx context.Context, projectId PathProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ProjectsProjectIdUsersRequestWithBody(c.Server, projectId, 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) PostApiV2ProjectsProjectIdUsers(ctx context.Context, projectId PathProjectId, body PostApiV2ProjectsProjectIdUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2ProjectsProjectIdUsersRequest(c.Server, projectId, 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) DeleteApiV2ProjectsProjectIdUsersUserIdOrEmail(ctx context.Context, projectId PathProjectId, userIdOrEmail PathUserIdOrEmail, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2ProjectsProjectIdUsersUserIdOrEmailRequest(c.Server, projectId, userIdOrEmail) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2Regions(ctx context.Context, params *GetApiV2RegionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2RegionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2RegionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2RegionsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2Regions(ctx context.Context, body PostApiV2RegionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2RegionsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV2RegionsRegionName(ctx context.Context, regionName PathRegionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2RegionsRegionNameRequest(c.Server, regionName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2RegionsRegionNameInstallToken(ctx context.Context, regionName PathRegionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2RegionsRegionNameInstallTokenRequest(c.Server, regionName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2RegionsRegionNameVerifyBackupLocationWithBody(ctx context.Context, regionName PathRegionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2RegionsRegionNameVerifyBackupLocationRequestWithBody(c.Server, regionName, 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) PostApiV2RegionsRegionNameVerifyBackupLocation(ctx context.Context, regionName PathRegionName, body PostApiV2RegionsRegionNameVerifyBackupLocationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2RegionsRegionNameVerifyBackupLocationRequest(c.Server, regionName, 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) GetApiV2Roles(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2RolesRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2StripeBankTransferOrganizationsOrganizationIdSetup(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2StripeBankTransferOrganizationsOrganizationIdSetupRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2StripeCardOrganizationsOrganizationIdSetupPayment(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2StripeCardOrganizationsOrganizationIdSetup(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2StripeCardOrganizationsOrganizationIdSetupRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2StripeOrganizationsOrganizationIdBillingInformation(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2StripeOrganizationsOrganizationIdBillingInformationRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithBody(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2StripeOrganizationsOrganizationIdBillingInformationRequestWithBody(c.Server, organizationId, 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) PatchApiV2StripeOrganizationsOrganizationIdBillingInformation(ctx context.Context, organizationId PathOrganizationId, body PatchApiV2StripeOrganizationsOrganizationIdBillingInformationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2StripeOrganizationsOrganizationIdBillingInformationRequest(c.Server, organizationId, 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) GetApiV2StripeOrganizationsOrganizationIdCards(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2StripeOrganizationsOrganizationIdCardsRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV2StripeOrganizationsOrganizationIdCardsCardId(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdRequest(c.Server, organizationId, cardId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithBody(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2StripeOrganizationsOrganizationIdCardsCardIdRequestWithBody(c.Server, organizationId, cardId, 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) PatchApiV2StripeOrganizationsOrganizationIdCardsCardId(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, body PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2StripeOrganizationsOrganizationIdCardsCardIdRequest(c.Server, organizationId, cardId, 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) PostApiV2StripeOrganizationsOrganizationIdSetupPayment(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2StripeOrganizationsOrganizationIdSetupPaymentRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2StripeOrganizationsOrganizationIdSetup(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2StripeOrganizationsOrganizationIdSetupRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2StripeOrganizationsOrganizationIdValidateCard(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2StripeOrganizationsOrganizationIdValidateCardRequest(c.Server, organizationId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2StripePromotions(ctx context.Context, params *GetApiV2StripePromotionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2StripePromotionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV2StripeSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2StripeSubscriptionsSubscriptionIdRequest(c.Server, subscriptionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2StripeSubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2StripeSubscriptionsSubscriptionIdRequest(c.Server, subscriptionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2StripeSubscriptionsSubscriptionIdInvoices(ctx context.Context, subscriptionId PathSubscriptionId, params *GetApiV2StripeSubscriptionsSubscriptionIdInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2StripeSubscriptionsSubscriptionIdInvoicesRequest(c.Server, subscriptionId, 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) GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcoming(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingRequest(c.Server, subscriptionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2Subscriptions(ctx context.Context, params *GetApiV2SubscriptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2SubscriptionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2SubscriptionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2SubscriptionsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2Subscriptions(ctx context.Context, body PostApiV2SubscriptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2SubscriptionsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV2SubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2SubscriptionsSubscriptionIdRequest(c.Server, subscriptionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2SubscriptionsSubscriptionId(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2SubscriptionsSubscriptionIdRequest(c.Server, subscriptionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithBody(ctx context.Context, subscriptionId PathSubscriptionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2SubscriptionsSubscriptionIdAssignOrgRequestWithBody(c.Server, subscriptionId, 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) PatchApiV2SubscriptionsSubscriptionIdAssignOrg(ctx context.Context, subscriptionId PathSubscriptionId, body PatchApiV2SubscriptionsSubscriptionIdAssignOrgJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2SubscriptionsSubscriptionIdAssignOrgRequest(c.Server, subscriptionId, 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) GetApiV2SubscriptionsSubscriptionIdWizardRedirect(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2SubscriptionsSubscriptionIdWizardRedirectRequest(c.Server, subscriptionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2Users(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2UsersRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2UsersMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2UsersMeRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2UsersMeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2UsersMeRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2UsersMe(ctx context.Context, body PatchApiV2UsersMeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2UsersMeRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2UsersMeAcceptInviteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2UsersMeAcceptInviteRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2UsersMeAcceptInvite(ctx context.Context, body PostApiV2UsersMeAcceptInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2UsersMeAcceptInviteRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2UsersMeApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2UsersMeApiKeysRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV2UsersMeApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV2UsersMeApiKeysRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV2UsersMeApiKeysApiKey(ctx context.Context, apiKey PathApiKey, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2UsersMeApiKeysApiKeyRequest(c.Server, apiKey) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV2UsersMeApiKeysApiKey(ctx context.Context, apiKey PathApiKey, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV2UsersMeApiKeysApiKeyRequest(c.Server, apiKey) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchApiV2UsersMeApiKeysApiKeyWithBody(ctx context.Context, apiKey PathApiKey, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2UsersMeApiKeysApiKeyRequestWithBody(c.Server, apiKey, 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) PatchApiV2UsersMeApiKeysApiKey(ctx context.Context, apiKey PathApiKey, body PatchApiV2UsersMeApiKeysApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiV2UsersMeApiKeysApiKeyRequest(c.Server, apiKey, 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) PutApiV2UsersMeConfirmEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2UsersMeConfirmEmailRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutApiV2UsersMeConfirmEmail(ctx context.Context, body PutApiV2UsersMeConfirmEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiV2UsersMeConfirmEmailRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV2UsersUserId(ctx context.Context, userId PathUserId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV2UsersUserIdRequest(c.Server, userId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewGetApiV2AwsSubscriptionsSubscriptionIdRequest generates requests for GetApiV2AwsSubscriptionsSubscriptionId +func NewGetApiV2AwsSubscriptionsSubscriptionIdRequest(server string, subscriptionId PathSubscriptionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/aws/subscriptions/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchApiV2AwsSubscriptionsSubscriptionIdRequest calls the generic PatchApiV2AwsSubscriptionsSubscriptionId builder with application/json body +func NewPatchApiV2AwsSubscriptionsSubscriptionIdRequest(server string, subscriptionId PathSubscriptionId, body PatchApiV2AwsSubscriptionsSubscriptionIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApiV2AwsSubscriptionsSubscriptionIdRequestWithBody(server, subscriptionId, "application/json", bodyReader) +} + +// NewPatchApiV2AwsSubscriptionsSubscriptionIdRequestWithBody generates requests for PatchApiV2AwsSubscriptionsSubscriptionId with any type of body +func NewPatchApiV2AwsSubscriptionsSubscriptionIdRequestWithBody(server string, subscriptionId PathSubscriptionId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/aws/subscriptions/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetApiV2AzureSubscriptionsSubscriptionIdRequest generates requests for GetApiV2AzureSubscriptionsSubscriptionId +func NewGetApiV2AzureSubscriptionsSubscriptionIdRequest(server string, subscriptionId PathSubscriptionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/azure/subscriptions/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2ClustersRequest generates requests for GetApiV2Clusters +func NewGetApiV2ClustersRequest(server string, params *GetApiV2ClustersParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.SubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "subscription_id", runtime.ParamLocationQuery, *params.SubscriptionId); err != nil { + return nil, err + } else if 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.ProjectId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project_id", runtime.ParamLocationQuery, *params.ProjectId); err != nil { + return nil, err + } else if 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.ProductName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "product_name", runtime.ParamLocationQuery, *params.ProductName); err != nil { + return nil, err + } else if 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 +} + +// NewHeadApiV2ClustersNameNameRequest generates requests for HeadApiV2ClustersNameName +func NewHeadApiV2ClustersNameNameRequest(server string, name PathName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/name/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("HEAD", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteApiV2ClustersClusterIdRequest generates requests for DeleteApiV2ClustersClusterId +func NewDeleteApiV2ClustersClusterIdRequest(server string, clusterId PathClusterId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2ClustersClusterIdRequest generates requests for GetApiV2ClustersClusterId +func NewGetApiV2ClustersClusterIdRequest(server string, clusterId PathClusterId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchApiV2ClustersClusterIdRequest calls the generic PatchApiV2ClustersClusterId builder with application/json body +func NewPatchApiV2ClustersClusterIdRequest(server string, clusterId PathClusterId, body PatchApiV2ClustersClusterIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApiV2ClustersClusterIdRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPatchApiV2ClustersClusterIdRequestWithBody generates requests for PatchApiV2ClustersClusterId with any type of body +func NewPatchApiV2ClustersClusterIdRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetApiV2ClustersClusterIdAvailableProductsRequest generates requests for GetApiV2ClustersClusterIdAvailableProducts +func NewGetApiV2ClustersClusterIdAvailableProductsRequest(server string, clusterId PathClusterId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/available-products/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2ClustersClusterIdAvailableUpgradesRequest generates requests for GetApiV2ClustersClusterIdAvailableUpgrades +func NewGetApiV2ClustersClusterIdAvailableUpgradesRequest(server string, clusterId PathClusterId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/available-upgrades/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutApiV2ClustersClusterIdBackupScheduleRequest calls the generic PutApiV2ClustersClusterIdBackupSchedule builder with application/json body +func NewPutApiV2ClustersClusterIdBackupScheduleRequest(server string, clusterId PathClusterId, body PutApiV2ClustersClusterIdBackupScheduleJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2ClustersClusterIdBackupScheduleRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPutApiV2ClustersClusterIdBackupScheduleRequestWithBody generates requests for PutApiV2ClustersClusterIdBackupSchedule with any type of body +func NewPutApiV2ClustersClusterIdBackupScheduleRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/backup-schedule/", 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 +} + +// NewPutApiV2ClustersClusterIdDeletionProtectionRequest calls the generic PutApiV2ClustersClusterIdDeletionProtection builder with application/json body +func NewPutApiV2ClustersClusterIdDeletionProtectionRequest(server string, clusterId PathClusterId, body PutApiV2ClustersClusterIdDeletionProtectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2ClustersClusterIdDeletionProtectionRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPutApiV2ClustersClusterIdDeletionProtectionRequestWithBody generates requests for PutApiV2ClustersClusterIdDeletionProtection with any type of body +func NewPutApiV2ClustersClusterIdDeletionProtectionRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/deletion-protection/", 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 +} + +// NewGetApiV2ClustersClusterIdExportJobsRequest generates requests for GetApiV2ClustersClusterIdExportJobs +func NewGetApiV2ClustersClusterIdExportJobsRequest(server string, clusterId PathClusterId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/export-jobs/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostApiV2ClustersClusterIdExportJobsRequest calls the generic PostApiV2ClustersClusterIdExportJobs builder with application/json body +func NewPostApiV2ClustersClusterIdExportJobsRequest(server string, clusterId PathClusterId, body PostApiV2ClustersClusterIdExportJobsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2ClustersClusterIdExportJobsRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPostApiV2ClustersClusterIdExportJobsRequestWithBody generates requests for PostApiV2ClustersClusterIdExportJobs with any type of body +func NewPostApiV2ClustersClusterIdExportJobsRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/export-jobs/", 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 +} + +// NewDeleteApiV2ClustersClusterIdExportJobsExportJobIdRequest generates requests for DeleteApiV2ClustersClusterIdExportJobsExportJobId +func NewDeleteApiV2ClustersClusterIdExportJobsExportJobIdRequest(server string, clusterId PathClusterId, exportJobId PathExportJobId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "export_job_id", runtime.ParamLocationPath, exportJobId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/export-jobs/%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 +} + +// NewGetApiV2ClustersClusterIdExportJobsExportJobIdRequest generates requests for GetApiV2ClustersClusterIdExportJobsExportJobId +func NewGetApiV2ClustersClusterIdExportJobsExportJobIdRequest(server string, clusterId PathClusterId, exportJobId PathExportJobId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "export_job_id", runtime.ParamLocationPath, exportJobId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/export-jobs/%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 +} + +// NewGetApiV2ClustersClusterIdImportJobsRequest generates requests for GetApiV2ClustersClusterIdImportJobs +func NewGetApiV2ClustersClusterIdImportJobsRequest(server string, clusterId PathClusterId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/import-jobs/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostApiV2ClustersClusterIdImportJobsRequest calls the generic PostApiV2ClustersClusterIdImportJobs builder with application/json body +func NewPostApiV2ClustersClusterIdImportJobsRequest(server string, clusterId PathClusterId, body PostApiV2ClustersClusterIdImportJobsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2ClustersClusterIdImportJobsRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPostApiV2ClustersClusterIdImportJobsRequestWithBody generates requests for PostApiV2ClustersClusterIdImportJobs with any type of body +func NewPostApiV2ClustersClusterIdImportJobsRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/import-jobs/", 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 +} + +// NewDeleteApiV2ClustersClusterIdImportJobsImportJobIdRequest generates requests for DeleteApiV2ClustersClusterIdImportJobsImportJobId +func NewDeleteApiV2ClustersClusterIdImportJobsImportJobIdRequest(server string, clusterId PathClusterId, importJobId PathImportJobId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "import_job_id", runtime.ParamLocationPath, importJobId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/import-jobs/%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 +} + +// NewGetApiV2ClustersClusterIdImportJobsImportJobIdRequest generates requests for GetApiV2ClustersClusterIdImportJobsImportJobId +func NewGetApiV2ClustersClusterIdImportJobsImportJobIdRequest(server string, clusterId PathClusterId, importJobId PathImportJobId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "import_job_id", runtime.ParamLocationPath, importJobId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/import-jobs/%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 +} + +// NewGetApiV2ClustersClusterIdImportJobsImportJobIdProgressRequest generates requests for GetApiV2ClustersClusterIdImportJobsImportJobIdProgress +func NewGetApiV2ClustersClusterIdImportJobsImportJobIdProgressRequest(server string, clusterId PathClusterId, importJobId PathImportJobId, params *GetApiV2ClustersClusterIdImportJobsImportJobIdProgressParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "import_job_id", runtime.ParamLocationPath, importJobId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/import-jobs/%s/progress/", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if 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.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if 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 +} + +// NewPutApiV2ClustersClusterIdIpRestrictionsRequest calls the generic PutApiV2ClustersClusterIdIpRestrictions builder with application/json body +func NewPutApiV2ClustersClusterIdIpRestrictionsRequest(server string, clusterId PathClusterId, body PutApiV2ClustersClusterIdIpRestrictionsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2ClustersClusterIdIpRestrictionsRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPutApiV2ClustersClusterIdIpRestrictionsRequestWithBody generates requests for PutApiV2ClustersClusterIdIpRestrictions with any type of body +func NewPutApiV2ClustersClusterIdIpRestrictionsRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/ip-restrictions/", 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 +} + +// NewGetApiV2ClustersClusterIdJwtRequest generates requests for GetApiV2ClustersClusterIdJwt +func NewGetApiV2ClustersClusterIdJwtRequest(server string, clusterId PathClusterId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/jwt/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2ClustersClusterIdMetricsMetricIdRequest generates requests for GetApiV2ClustersClusterIdMetricsMetricId +func NewGetApiV2ClustersClusterIdMetricsMetricIdRequest(server string, clusterId PathClusterId, metricId GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId, params *GetApiV2ClustersClusterIdMetricsMetricIdParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "metric_id", runtime.ParamLocationPath, metricId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/metrics/%s/", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Start != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.End != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.MinutesAgo != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "minutes_ago", runtime.ParamLocationQuery, *params.MinutesAgo); err != nil { + return nil, err + } else if 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 +} + +// NewDeleteApiV2ClustersClusterIdNodesOrdinalRequest generates requests for DeleteApiV2ClustersClusterIdNodesOrdinal +func NewDeleteApiV2ClustersClusterIdNodesOrdinalRequest(server string, clusterId PathClusterId, ordinal PathOrdinal) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "ordinal", runtime.ParamLocationPath, ordinal) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/nodes/%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 +} + +// NewGetApiV2ClustersClusterIdOperationsRequest generates requests for GetApiV2ClustersClusterIdOperations +func NewGetApiV2ClustersClusterIdOperationsRequest(server string, clusterId PathClusterId, params *GetApiV2ClustersClusterIdOperationsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/operations/", 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.Statuses != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "statuses", runtime.ParamLocationQuery, *params.Statuses); err != nil { + return nil, err + } else if 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) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutApiV2ClustersClusterIdProductRequest calls the generic PutApiV2ClustersClusterIdProduct builder with application/json body +func NewPutApiV2ClustersClusterIdProductRequest(server string, clusterId PathClusterId, body PutApiV2ClustersClusterIdProductJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2ClustersClusterIdProductRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPutApiV2ClustersClusterIdProductRequestWithBody generates requests for PutApiV2ClustersClusterIdProduct with any type of body +func NewPutApiV2ClustersClusterIdProductRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/product/", 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 +} + +// NewPutApiV2ClustersClusterIdScaleRequest calls the generic PutApiV2ClustersClusterIdScale builder with application/json body +func NewPutApiV2ClustersClusterIdScaleRequest(server string, clusterId PathClusterId, body PutApiV2ClustersClusterIdScaleJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2ClustersClusterIdScaleRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPutApiV2ClustersClusterIdScaleRequestWithBody generates requests for PutApiV2ClustersClusterIdScale with any type of body +func NewPutApiV2ClustersClusterIdScaleRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/scale/", 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 +} + +// NewGetApiV2ClustersClusterIdSnapshotsRequest generates requests for GetApiV2ClustersClusterIdSnapshots +func NewGetApiV2ClustersClusterIdSnapshotsRequest(server string, clusterId PathClusterId, params *GetApiV2ClustersClusterIdSnapshotsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/snapshots/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Start != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.End != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostApiV2ClustersClusterIdSnapshotsRestoreRequest calls the generic PostApiV2ClustersClusterIdSnapshotsRestore builder with application/json body +func NewPostApiV2ClustersClusterIdSnapshotsRestoreRequest(server string, clusterId PathTargetClusterId, body PostApiV2ClustersClusterIdSnapshotsRestoreJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2ClustersClusterIdSnapshotsRestoreRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPostApiV2ClustersClusterIdSnapshotsRestoreRequestWithBody generates requests for PostApiV2ClustersClusterIdSnapshotsRestore with any type of body +func NewPostApiV2ClustersClusterIdSnapshotsRestoreRequestWithBody(server string, clusterId PathTargetClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/snapshots/restore/", 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 +} + +// NewPutApiV2ClustersClusterIdStorageRequest calls the generic PutApiV2ClustersClusterIdStorage builder with application/json body +func NewPutApiV2ClustersClusterIdStorageRequest(server string, clusterId PathClusterId, body PutApiV2ClustersClusterIdStorageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2ClustersClusterIdStorageRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPutApiV2ClustersClusterIdStorageRequestWithBody generates requests for PutApiV2ClustersClusterIdStorage with any type of body +func NewPutApiV2ClustersClusterIdStorageRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/storage/", 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 +} + +// NewPutApiV2ClustersClusterIdSuspendRequest calls the generic PutApiV2ClustersClusterIdSuspend builder with application/json body +func NewPutApiV2ClustersClusterIdSuspendRequest(server string, clusterId PathClusterId, body PutApiV2ClustersClusterIdSuspendJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2ClustersClusterIdSuspendRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPutApiV2ClustersClusterIdSuspendRequestWithBody generates requests for PutApiV2ClustersClusterIdSuspend with any type of body +func NewPutApiV2ClustersClusterIdSuspendRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/suspend/", 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 +} + +// NewPutApiV2ClustersClusterIdUpgradeRequest calls the generic PutApiV2ClustersClusterIdUpgrade builder with application/json body +func NewPutApiV2ClustersClusterIdUpgradeRequest(server string, clusterId PathClusterId, body PutApiV2ClustersClusterIdUpgradeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2ClustersClusterIdUpgradeRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewPutApiV2ClustersClusterIdUpgradeRequestWithBody generates requests for PutApiV2ClustersClusterIdUpgrade with any type of body +func NewPutApiV2ClustersClusterIdUpgradeRequestWithBody(server string, clusterId PathClusterId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "cluster_id", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/clusters/%s/upgrade/", 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 +} + +// NewGetApiV2ConfigurationsRequest generates requests for GetApiV2Configurations +func NewGetApiV2ConfigurationsRequest(server string, params *GetApiV2ConfigurationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/configurations/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2ConfigurationsKeyRequest generates requests for GetApiV2ConfigurationsKey +func NewGetApiV2ConfigurationsKeyRequest(server string, key PathConfigurationKey, params *GetApiV2ConfigurationsKeyParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "key", runtime.ParamLocationPath, key) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/configurations/%s/", 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.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if 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 +} + +// NewPutApiV2ConfigurationsKeyRequest calls the generic PutApiV2ConfigurationsKey builder with application/json body +func NewPutApiV2ConfigurationsKeyRequest(server string, key PathConfigurationKey, body PutApiV2ConfigurationsKeyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2ConfigurationsKeyRequestWithBody(server, key, "application/json", bodyReader) +} + +// NewPutApiV2ConfigurationsKeyRequestWithBody generates requests for PutApiV2ConfigurationsKey with any type of body +func NewPutApiV2ConfigurationsKeyRequestWithBody(server string, key PathConfigurationKey, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "key", runtime.ParamLocationPath, key) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/configurations/%s/", 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 +} + +// NewGetApiV2FeaturesStatusRequest generates requests for GetApiV2FeaturesStatus +func NewGetApiV2FeaturesStatusRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/features/status/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2GcpSubscriptionsSubscriptionIdRequest generates requests for GetApiV2GcpSubscriptionsSubscriptionId +func NewGetApiV2GcpSubscriptionsSubscriptionIdRequest(server string, subscriptionId PathSubscriptionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/gcp/subscriptions/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2IntegrationsAwsS3BucketsRequest generates requests for GetApiV2IntegrationsAwsS3Buckets +func NewGetApiV2IntegrationsAwsS3BucketsRequest(server string, params *GetApiV2IntegrationsAwsS3BucketsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/integrations/aws/s3-buckets/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_id", runtime.ParamLocationQuery, params.SecretId); err != nil { + return nil, err + } else if 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.Endpoint != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint", runtime.ParamLocationQuery, *params.Endpoint); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2IntegrationsAwsS3ObjectsRequest generates requests for GetApiV2IntegrationsAwsS3Objects +func NewGetApiV2IntegrationsAwsS3ObjectsRequest(server string, params *GetApiV2IntegrationsAwsS3ObjectsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/integrations/aws/s3-objects/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_id", runtime.ParamLocationQuery, params.SecretId); err != nil { + return nil, err + } else if 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.Endpoint != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endpoint", runtime.ParamLocationQuery, *params.Endpoint); err != nil { + return nil, err + } else if 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 queryFrag, err := runtime.StyleParamWithLocation("form", true, "bucket", runtime.ParamLocationQuery, params.Bucket); err != nil { + return nil, err + } else if 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.Prefix != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "prefix", runtime.ParamLocationQuery, *params.Prefix); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2IntegrationsAzureBlobStorageContainersRequest generates requests for GetApiV2IntegrationsAzureBlobStorageContainers +func NewGetApiV2IntegrationsAzureBlobStorageContainersRequest(server string, params *GetApiV2IntegrationsAzureBlobStorageContainersParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/integrations/azure/blob-storage-containers/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_id", runtime.ParamLocationQuery, params.SecretId); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2IntegrationsAzureBlobsRequest generates requests for GetApiV2IntegrationsAzureBlobs +func NewGetApiV2IntegrationsAzureBlobsRequest(server string, params *GetApiV2IntegrationsAzureBlobsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/integrations/azure/blobs/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "secret_id", runtime.ParamLocationQuery, params.SecretId); err != nil { + return nil, err + } else if 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 queryFrag, err := runtime.StyleParamWithLocation("form", true, "container_name", runtime.ParamLocationQuery, params.ContainerName); err != nil { + return nil, err + } else if 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.Prefix != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "prefix", runtime.ParamLocationQuery, *params.Prefix); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2MetaRequest generates requests for GetApiV2Meta +func NewGetApiV2MetaRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/meta/") + 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 +} + +// NewGetApiV2MetaCratedbVersionsRequest generates requests for GetApiV2MetaCratedbVersions +func NewGetApiV2MetaCratedbVersionsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/meta/cratedb-versions/") + 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 +} + +// NewGetApiV2MetaIpAddressRequest generates requests for GetApiV2MetaIpAddress +func NewGetApiV2MetaIpAddressRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/meta/ip-address/") + 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 +} + +// NewGetApiV2MetaJwkRequest generates requests for GetApiV2MetaJwk +func NewGetApiV2MetaJwkRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/meta/jwk/") + 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 +} + +// NewPostApiV2MetaJwtRefreshRequest calls the generic PostApiV2MetaJwtRefresh builder with application/json body +func NewPostApiV2MetaJwtRefreshRequest(server string, body PostApiV2MetaJwtRefreshJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2MetaJwtRefreshRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostApiV2MetaJwtRefreshRequestWithBody generates requests for PostApiV2MetaJwtRefresh with any type of body +func NewPostApiV2MetaJwtRefreshRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/meta/jwt/refresh/") + 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 +} + +// NewGetApiV2OrganizationsRequest generates requests for GetApiV2Organizations +func NewGetApiV2OrganizationsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/") + 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 +} + +// NewPostApiV2OrganizationsRequest calls the generic PostApiV2Organizations builder with application/json body +func NewPostApiV2OrganizationsRequest(server string, body PostApiV2OrganizationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2OrganizationsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostApiV2OrganizationsRequestWithBody generates requests for PostApiV2Organizations with any type of body +func NewPostApiV2OrganizationsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/") + 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 +} + +// NewDeleteApiV2OrganizationsOrganizationIdRequest generates requests for DeleteApiV2OrganizationsOrganizationId +func NewDeleteApiV2OrganizationsOrganizationIdRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2OrganizationsOrganizationIdRequest generates requests for GetApiV2OrganizationsOrganizationId +func NewGetApiV2OrganizationsOrganizationIdRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutApiV2OrganizationsOrganizationIdRequest calls the generic PutApiV2OrganizationsOrganizationId builder with application/json body +func NewPutApiV2OrganizationsOrganizationIdRequest(server string, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2OrganizationsOrganizationIdRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewPutApiV2OrganizationsOrganizationIdRequestWithBody generates requests for PutApiV2OrganizationsOrganizationId with any type of body +func NewPutApiV2OrganizationsOrganizationIdRequestWithBody(server string, organizationId PathOrganizationId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/", 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 +} + +// NewGetApiV2OrganizationsOrganizationIdAuditlogsRequest generates requests for GetApiV2OrganizationsOrganizationIdAuditlogs +func NewGetApiV2OrganizationsOrganizationIdAuditlogsRequest(server string, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdAuditlogsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/auditlogs/", 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.From != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "from", runtime.ParamLocationQuery, *params.From); err != nil { + return nil, err + } else if 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.To != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "to", runtime.ParamLocationQuery, *params.To); err != nil { + return nil, err + } else if 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.Action != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "action", runtime.ParamLocationQuery, *params.Action); err != nil { + return nil, err + } else if 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.ClusterId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cluster_id", runtime.ParamLocationQuery, *params.ClusterId); err != nil { + return nil, err + } else if 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.Last != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "last", runtime.ParamLocationQuery, *params.Last); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2OrganizationsOrganizationIdClustersRequest generates requests for GetApiV2OrganizationsOrganizationIdClusters +func NewGetApiV2OrganizationsOrganizationIdClustersRequest(server string, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdClustersParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/clusters/", 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.SubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "subscription_id", runtime.ParamLocationQuery, *params.SubscriptionId); err != nil { + return nil, err + } else if 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.ProjectId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project_id", runtime.ParamLocationQuery, *params.ProjectId); err != nil { + return nil, err + } else if 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.ProductName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "product_name", runtime.ParamLocationQuery, *params.ProductName); err != nil { + return nil, err + } else if 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 +} + +// NewPostApiV2OrganizationsOrganizationIdClustersRequest calls the generic PostApiV2OrganizationsOrganizationIdClusters builder with application/json body +func NewPostApiV2OrganizationsOrganizationIdClustersRequest(server string, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdClustersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2OrganizationsOrganizationIdClustersRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewPostApiV2OrganizationsOrganizationIdClustersRequestWithBody generates requests for PostApiV2OrganizationsOrganizationIdClusters with any type of body +func NewPostApiV2OrganizationsOrganizationIdClustersRequestWithBody(server string, organizationId PathOrganizationId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/clusters/", 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 +} + +// NewGetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthRequest generates requests for GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonth +func NewGetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/consumption/current-month/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2OrganizationsOrganizationIdCreditsRequest generates requests for GetApiV2OrganizationsOrganizationIdCredits +func NewGetApiV2OrganizationsOrganizationIdCreditsRequest(server string, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdCreditsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/credits/", 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.Status != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil { + return nil, err + } else if 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 +} + +// NewPostApiV2OrganizationsOrganizationIdCreditsRequest calls the generic PostApiV2OrganizationsOrganizationIdCredits builder with application/json body +func NewPostApiV2OrganizationsOrganizationIdCreditsRequest(server string, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdCreditsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2OrganizationsOrganizationIdCreditsRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewPostApiV2OrganizationsOrganizationIdCreditsRequestWithBody generates requests for PostApiV2OrganizationsOrganizationIdCredits with any type of body +func NewPostApiV2OrganizationsOrganizationIdCreditsRequestWithBody(server string, organizationId PathOrganizationId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/credits/", 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 +} + +// NewDeleteApiV2OrganizationsOrganizationIdCreditsCreditIdRequest generates requests for DeleteApiV2OrganizationsOrganizationIdCreditsCreditId +func NewDeleteApiV2OrganizationsOrganizationIdCreditsCreditIdRequest(server string, organizationId PathOrganizationId, creditId PathCreditId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "credit_id", runtime.ParamLocationPath, creditId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/credits/%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 +} + +// NewPatchApiV2OrganizationsOrganizationIdCreditsCreditIdRequest calls the generic PatchApiV2OrganizationsOrganizationIdCreditsCreditId builder with application/json body +func NewPatchApiV2OrganizationsOrganizationIdCreditsCreditIdRequest(server string, organizationId PathOrganizationId, creditId PathCreditId, body PatchApiV2OrganizationsOrganizationIdCreditsCreditIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApiV2OrganizationsOrganizationIdCreditsCreditIdRequestWithBody(server, organizationId, creditId, "application/json", bodyReader) +} + +// NewPatchApiV2OrganizationsOrganizationIdCreditsCreditIdRequestWithBody generates requests for PatchApiV2OrganizationsOrganizationIdCreditsCreditId with any type of body +func NewPatchApiV2OrganizationsOrganizationIdCreditsCreditIdRequestWithBody(server string, organizationId PathOrganizationId, creditId PathCreditId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "credit_id", runtime.ParamLocationPath, creditId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/credits/%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 +} + +// NewGetApiV2OrganizationsOrganizationIdCustomerRequest generates requests for GetApiV2OrganizationsOrganizationIdCustomer +func NewGetApiV2OrganizationsOrganizationIdCustomerRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/customer/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutApiV2OrganizationsOrganizationIdCustomerRequest calls the generic PutApiV2OrganizationsOrganizationIdCustomer builder with application/json body +func NewPutApiV2OrganizationsOrganizationIdCustomerRequest(server string, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdCustomerJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2OrganizationsOrganizationIdCustomerRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewPutApiV2OrganizationsOrganizationIdCustomerRequestWithBody generates requests for PutApiV2OrganizationsOrganizationIdCustomer with any type of body +func NewPutApiV2OrganizationsOrganizationIdCustomerRequestWithBody(server string, organizationId PathOrganizationId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/customer/", 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 +} + +// NewGetApiV2OrganizationsOrganizationIdFilesRequest generates requests for GetApiV2OrganizationsOrganizationIdFiles +func NewGetApiV2OrganizationsOrganizationIdFilesRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/files/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostApiV2OrganizationsOrganizationIdFilesRequest calls the generic PostApiV2OrganizationsOrganizationIdFiles builder with application/json body +func NewPostApiV2OrganizationsOrganizationIdFilesRequest(server string, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdFilesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2OrganizationsOrganizationIdFilesRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewPostApiV2OrganizationsOrganizationIdFilesRequestWithBody generates requests for PostApiV2OrganizationsOrganizationIdFiles with any type of body +func NewPostApiV2OrganizationsOrganizationIdFilesRequestWithBody(server string, organizationId PathOrganizationId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/files/", 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 +} + +// NewDeleteApiV2OrganizationsOrganizationIdFilesFileIdRequest generates requests for DeleteApiV2OrganizationsOrganizationIdFilesFileId +func NewDeleteApiV2OrganizationsOrganizationIdFilesFileIdRequest(server string, organizationId PathOrganizationId, fileId PathFileId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "file_id", runtime.ParamLocationPath, fileId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/files/%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 +} + +// NewGetApiV2OrganizationsOrganizationIdFilesFileIdRequest generates requests for GetApiV2OrganizationsOrganizationIdFilesFileId +func NewGetApiV2OrganizationsOrganizationIdFilesFileIdRequest(server string, organizationId PathOrganizationId, fileId PathFileId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "file_id", runtime.ParamLocationPath, fileId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/files/%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 +} + +// NewGetApiV2OrganizationsOrganizationIdInvitationsRequest generates requests for GetApiV2OrganizationsOrganizationIdInvitations +func NewGetApiV2OrganizationsOrganizationIdInvitationsRequest(server string, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdInvitationsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/invitations/", 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.Status != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil { + return nil, err + } else if 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 +} + +// NewDeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenRequest generates requests for DeleteApiV2OrganizationsOrganizationIdInvitationsInviteToken +func NewDeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenRequest(server string, organizationId PathOrganizationId, inviteToken PathInviteToken) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "invite_token", runtime.ParamLocationPath, inviteToken) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%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 +} + +// NewGetApiV2OrganizationsOrganizationIdMetricsPrometheusRequest generates requests for GetApiV2OrganizationsOrganizationIdMetricsPrometheus +func NewGetApiV2OrganizationsOrganizationIdMetricsPrometheusRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/metrics/prometheus/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2OrganizationsOrganizationIdPaymentMethodsRequest generates requests for GetApiV2OrganizationsOrganizationIdPaymentMethods +func NewGetApiV2OrganizationsOrganizationIdPaymentMethodsRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/payment-methods/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2OrganizationsOrganizationIdProjectsRequest generates requests for GetApiV2OrganizationsOrganizationIdProjects +func NewGetApiV2OrganizationsOrganizationIdProjectsRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/projects/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2OrganizationsOrganizationIdQuotasRequest generates requests for GetApiV2OrganizationsOrganizationIdQuotas +func NewGetApiV2OrganizationsOrganizationIdQuotasRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/quotas/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2OrganizationsOrganizationIdRegionsRequest generates requests for GetApiV2OrganizationsOrganizationIdRegions +func NewGetApiV2OrganizationsOrganizationIdRegionsRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/regions/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2OrganizationsOrganizationIdRemainingBudgetRequest generates requests for GetApiV2OrganizationsOrganizationIdRemainingBudget +func NewGetApiV2OrganizationsOrganizationIdRemainingBudgetRequest(server string, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdRemainingBudgetParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/remaining-budget/", 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.ExcludeClusterId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "exclude_cluster_id", runtime.ParamLocationQuery, *params.ExcludeClusterId); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2OrganizationsOrganizationIdSecretsRequest generates requests for GetApiV2OrganizationsOrganizationIdSecrets +func NewGetApiV2OrganizationsOrganizationIdSecretsRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/secrets/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostApiV2OrganizationsOrganizationIdSecretsRequest calls the generic PostApiV2OrganizationsOrganizationIdSecrets builder with application/json body +func NewPostApiV2OrganizationsOrganizationIdSecretsRequest(server string, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdSecretsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2OrganizationsOrganizationIdSecretsRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewPostApiV2OrganizationsOrganizationIdSecretsRequestWithBody generates requests for PostApiV2OrganizationsOrganizationIdSecrets with any type of body +func NewPostApiV2OrganizationsOrganizationIdSecretsRequestWithBody(server string, organizationId PathOrganizationId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/secrets/", 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 +} + +// NewDeleteApiV2OrganizationsOrganizationIdSecretsSecretIdRequest generates requests for DeleteApiV2OrganizationsOrganizationIdSecretsSecretId +func NewDeleteApiV2OrganizationsOrganizationIdSecretsSecretIdRequest(server string, organizationId PathOrganizationId, secretId PathOrganizationSecretId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "secret_id", runtime.ParamLocationPath, secretId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/secrets/%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 +} + +// NewGetApiV2OrganizationsOrganizationIdSubscriptionsRequest generates requests for GetApiV2OrganizationsOrganizationIdSubscriptions +func NewGetApiV2OrganizationsOrganizationIdSubscriptionsRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/subscriptions/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2OrganizationsOrganizationIdUsersRequest generates requests for GetApiV2OrganizationsOrganizationIdUsers +func NewGetApiV2OrganizationsOrganizationIdUsersRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/users/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostApiV2OrganizationsOrganizationIdUsersRequest calls the generic PostApiV2OrganizationsOrganizationIdUsers builder with application/json body +func NewPostApiV2OrganizationsOrganizationIdUsersRequest(server string, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdUsersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2OrganizationsOrganizationIdUsersRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewPostApiV2OrganizationsOrganizationIdUsersRequestWithBody generates requests for PostApiV2OrganizationsOrganizationIdUsers with any type of body +func NewPostApiV2OrganizationsOrganizationIdUsersRequestWithBody(server string, organizationId PathOrganizationId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/users/", 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 +} + +// NewDeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailRequest generates requests for DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmail +func NewDeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailRequest(server string, organizationId PathOrganizationId, userIdOrEmail PathUserIdOrEmail) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "user_id_or_email", runtime.ParamLocationPath, userIdOrEmail) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/organizations/%s/users/%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 +} + +// NewGetApiV2ProductsRequest generates requests for GetApiV2Products +func NewGetApiV2ProductsRequest(server string, params *GetApiV2ProductsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/products/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Tier != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tier", runtime.ParamLocationQuery, *params.Tier); err != nil { + return nil, err + } else if 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.Name != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil { + return nil, err + } else if 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.Plan != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan", runtime.ParamLocationQuery, *params.Plan); err != nil { + return nil, err + } else if 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.Offer != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offer", runtime.ParamLocationQuery, *params.Offer); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2ProductsClustersPriceRequest generates requests for GetApiV2ProductsClustersPrice +func NewGetApiV2ProductsClustersPriceRequest(server string, params *GetApiV2ProductsClustersPriceParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/products/clusters/price") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ProductPlan != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "product_plan", runtime.ParamLocationQuery, *params.ProductPlan); err != nil { + return nil, err + } else if 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.ProductOffer != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "product_offer", runtime.ParamLocationQuery, *params.ProductOffer); err != nil { + return nil, err + } else if 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 queryFrag, err := runtime.StyleParamWithLocation("form", true, "product_name", runtime.ParamLocationQuery, params.ProductName); err != nil { + return nil, err + } else if 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 queryFrag, err := runtime.StyleParamWithLocation("form", true, "product_tier", runtime.ParamLocationQuery, params.ProductTier); err != nil { + return nil, err + } else if 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 queryFrag, err := runtime.StyleParamWithLocation("form", true, "product_unit", runtime.ParamLocationQuery, params.ProductUnit); err != nil { + return nil, err + } else if 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 queryFrag, err := runtime.StyleParamWithLocation("form", true, "region", runtime.ParamLocationQuery, params.Region); err != nil { + return nil, err + } else if 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.StorageBytes != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "storage_bytes", runtime.ParamLocationQuery, *params.StorageBytes); err != nil { + return nil, err + } else if 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.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2ProductsKindRequest generates requests for GetApiV2ProductsKind +func NewGetApiV2ProductsKindRequest(server string, kind PathProductKind, params *GetApiV2ProductsKindParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "kind", runtime.ParamLocationPath, kind) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/products/%s/", 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.Tier != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tier", runtime.ParamLocationQuery, *params.Tier); err != nil { + return nil, err + } else if 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.Name != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil { + return nil, err + } else if 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.Plan != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "plan", runtime.ParamLocationQuery, *params.Plan); err != nil { + return nil, err + } else if 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.Offer != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offer", runtime.ParamLocationQuery, *params.Offer); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2ProjectsRequest generates requests for GetApiV2Projects +func NewGetApiV2ProjectsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/projects/") + 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 +} + +// NewPostApiV2ProjectsRequest calls the generic PostApiV2Projects builder with application/json body +func NewPostApiV2ProjectsRequest(server string, body PostApiV2ProjectsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2ProjectsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostApiV2ProjectsRequestWithBody generates requests for PostApiV2Projects with any type of body +func NewPostApiV2ProjectsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/projects/") + 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 +} + +// NewDeleteApiV2ProjectsProjectIdRequest generates requests for DeleteApiV2ProjectsProjectId +func NewDeleteApiV2ProjectsProjectIdRequest(server string, projectId PathProjectId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "project_id", runtime.ParamLocationPath, projectId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/projects/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2ProjectsProjectIdRequest generates requests for GetApiV2ProjectsProjectId +func NewGetApiV2ProjectsProjectIdRequest(server string, projectId PathProjectId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "project_id", runtime.ParamLocationPath, projectId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/projects/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchApiV2ProjectsProjectIdRequest calls the generic PatchApiV2ProjectsProjectId builder with application/json body +func NewPatchApiV2ProjectsProjectIdRequest(server string, projectId PathProjectId, body PatchApiV2ProjectsProjectIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApiV2ProjectsProjectIdRequestWithBody(server, projectId, "application/json", bodyReader) +} + +// NewPatchApiV2ProjectsProjectIdRequestWithBody generates requests for PatchApiV2ProjectsProjectId with any type of body +func NewPatchApiV2ProjectsProjectIdRequestWithBody(server string, projectId PathProjectId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "project_id", runtime.ParamLocationPath, projectId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/projects/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetApiV2ProjectsProjectIdClustersRequest generates requests for GetApiV2ProjectsProjectIdClusters +func NewGetApiV2ProjectsProjectIdClustersRequest(server string, projectId PathProjectId, params *GetApiV2ProjectsProjectIdClustersParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "project_id", runtime.ParamLocationPath, projectId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/projects/%s/clusters/", 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.SubscriptionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "subscription_id", runtime.ParamLocationQuery, *params.SubscriptionId); err != nil { + return nil, err + } else if 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.ProductName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "product_name", runtime.ParamLocationQuery, *params.ProductName); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2ProjectsProjectIdUsersRequest generates requests for GetApiV2ProjectsProjectIdUsers +func NewGetApiV2ProjectsProjectIdUsersRequest(server string, projectId PathProjectId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "project_id", runtime.ParamLocationPath, projectId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/projects/%s/users/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostApiV2ProjectsProjectIdUsersRequest calls the generic PostApiV2ProjectsProjectIdUsers builder with application/json body +func NewPostApiV2ProjectsProjectIdUsersRequest(server string, projectId PathProjectId, body PostApiV2ProjectsProjectIdUsersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2ProjectsProjectIdUsersRequestWithBody(server, projectId, "application/json", bodyReader) +} + +// NewPostApiV2ProjectsProjectIdUsersRequestWithBody generates requests for PostApiV2ProjectsProjectIdUsers with any type of body +func NewPostApiV2ProjectsProjectIdUsersRequestWithBody(server string, projectId PathProjectId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "project_id", runtime.ParamLocationPath, projectId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/projects/%s/users/", 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 +} + +// NewDeleteApiV2ProjectsProjectIdUsersUserIdOrEmailRequest generates requests for DeleteApiV2ProjectsProjectIdUsersUserIdOrEmail +func NewDeleteApiV2ProjectsProjectIdUsersUserIdOrEmailRequest(server string, projectId PathProjectId, userIdOrEmail PathUserIdOrEmail) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "project_id", runtime.ParamLocationPath, projectId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "user_id_or_email", runtime.ParamLocationPath, userIdOrEmail) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/projects/%s/users/%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 +} + +// NewGetApiV2RegionsRequest generates requests for GetApiV2Regions +func NewGetApiV2RegionsRequest(server string, params *GetApiV2RegionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/regions/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if 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 +} + +// NewPostApiV2RegionsRequest calls the generic PostApiV2Regions builder with application/json body +func NewPostApiV2RegionsRequest(server string, body PostApiV2RegionsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2RegionsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostApiV2RegionsRequestWithBody generates requests for PostApiV2Regions with any type of body +func NewPostApiV2RegionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/regions/") + 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 +} + +// NewDeleteApiV2RegionsRegionNameRequest generates requests for DeleteApiV2RegionsRegionName +func NewDeleteApiV2RegionsRegionNameRequest(server string, regionName PathRegionName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "region_name", runtime.ParamLocationPath, regionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/regions/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2RegionsRegionNameInstallTokenRequest generates requests for GetApiV2RegionsRegionNameInstallToken +func NewGetApiV2RegionsRegionNameInstallTokenRequest(server string, regionName PathRegionName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "region_name", runtime.ParamLocationPath, regionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/regions/%s/install-token/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostApiV2RegionsRegionNameVerifyBackupLocationRequest calls the generic PostApiV2RegionsRegionNameVerifyBackupLocation builder with application/json body +func NewPostApiV2RegionsRegionNameVerifyBackupLocationRequest(server string, regionName PathRegionName, body PostApiV2RegionsRegionNameVerifyBackupLocationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2RegionsRegionNameVerifyBackupLocationRequestWithBody(server, regionName, "application/json", bodyReader) +} + +// NewPostApiV2RegionsRegionNameVerifyBackupLocationRequestWithBody generates requests for PostApiV2RegionsRegionNameVerifyBackupLocation with any type of body +func NewPostApiV2RegionsRegionNameVerifyBackupLocationRequestWithBody(server string, regionName PathRegionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "region_name", runtime.ParamLocationPath, regionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/regions/%s/verify-backup-location/", 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 +} + +// NewGetApiV2RolesRequest generates requests for GetApiV2Roles +func NewGetApiV2RolesRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/roles/") + 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 +} + +// NewPostApiV2StripeBankTransferOrganizationsOrganizationIdSetupRequest generates requests for PostApiV2StripeBankTransferOrganizationsOrganizationIdSetup +func NewPostApiV2StripeBankTransferOrganizationsOrganizationIdSetupRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/bank-transfer/organizations/%s/setup/", pathParam0) + 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 +} + +// NewPostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentRequest generates requests for PostApiV2StripeCardOrganizationsOrganizationIdSetupPayment +func NewPostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/card/organizations/%s/setup-payment/", pathParam0) + 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 +} + +// NewPostApiV2StripeCardOrganizationsOrganizationIdSetupRequest generates requests for PostApiV2StripeCardOrganizationsOrganizationIdSetup +func NewPostApiV2StripeCardOrganizationsOrganizationIdSetupRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/card/organizations/%s/setup/", pathParam0) + 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 +} + +// NewGetApiV2StripeOrganizationsOrganizationIdBillingInformationRequest generates requests for GetApiV2StripeOrganizationsOrganizationIdBillingInformation +func NewGetApiV2StripeOrganizationsOrganizationIdBillingInformationRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/organizations/%s/billing-information/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchApiV2StripeOrganizationsOrganizationIdBillingInformationRequest calls the generic PatchApiV2StripeOrganizationsOrganizationIdBillingInformation builder with application/json body +func NewPatchApiV2StripeOrganizationsOrganizationIdBillingInformationRequest(server string, organizationId PathOrganizationId, body PatchApiV2StripeOrganizationsOrganizationIdBillingInformationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApiV2StripeOrganizationsOrganizationIdBillingInformationRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewPatchApiV2StripeOrganizationsOrganizationIdBillingInformationRequestWithBody generates requests for PatchApiV2StripeOrganizationsOrganizationIdBillingInformation with any type of body +func NewPatchApiV2StripeOrganizationsOrganizationIdBillingInformationRequestWithBody(server string, organizationId PathOrganizationId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/organizations/%s/billing-information/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetApiV2StripeOrganizationsOrganizationIdCardsRequest generates requests for GetApiV2StripeOrganizationsOrganizationIdCards +func NewGetApiV2StripeOrganizationsOrganizationIdCardsRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/organizations/%s/cards/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdRequest generates requests for DeleteApiV2StripeOrganizationsOrganizationIdCardsCardId +func NewDeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdRequest(server string, organizationId PathOrganizationId, cardId PathCardId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "card_id", runtime.ParamLocationPath, cardId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/organizations/%s/cards/%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 +} + +// NewPatchApiV2StripeOrganizationsOrganizationIdCardsCardIdRequest calls the generic PatchApiV2StripeOrganizationsOrganizationIdCardsCardId builder with application/json body +func NewPatchApiV2StripeOrganizationsOrganizationIdCardsCardIdRequest(server string, organizationId PathOrganizationId, cardId PathCardId, body PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApiV2StripeOrganizationsOrganizationIdCardsCardIdRequestWithBody(server, organizationId, cardId, "application/json", bodyReader) +} + +// NewPatchApiV2StripeOrganizationsOrganizationIdCardsCardIdRequestWithBody generates requests for PatchApiV2StripeOrganizationsOrganizationIdCardsCardId with any type of body +func NewPatchApiV2StripeOrganizationsOrganizationIdCardsCardIdRequestWithBody(server string, organizationId PathOrganizationId, cardId PathCardId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "card_id", runtime.ParamLocationPath, cardId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/organizations/%s/cards/%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 +} + +// NewPostApiV2StripeOrganizationsOrganizationIdSetupPaymentRequest generates requests for PostApiV2StripeOrganizationsOrganizationIdSetupPayment +func NewPostApiV2StripeOrganizationsOrganizationIdSetupPaymentRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/organizations/%s/setup-payment/", pathParam0) + 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 +} + +// NewPostApiV2StripeOrganizationsOrganizationIdSetupRequest generates requests for PostApiV2StripeOrganizationsOrganizationIdSetup +func NewPostApiV2StripeOrganizationsOrganizationIdSetupRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/organizations/%s/setup/", pathParam0) + 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 +} + +// NewPostApiV2StripeOrganizationsOrganizationIdValidateCardRequest generates requests for PostApiV2StripeOrganizationsOrganizationIdValidateCard +func NewPostApiV2StripeOrganizationsOrganizationIdValidateCardRequest(server string, organizationId PathOrganizationId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organization_id", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/organizations/%s/validate-card/", pathParam0) + 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 +} + +// NewGetApiV2StripePromotionsRequest generates requests for GetApiV2StripePromotions +func NewGetApiV2StripePromotionsRequest(server string, params *GetApiV2StripePromotionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/promotions/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if 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 +} + +// NewDeleteApiV2StripeSubscriptionsSubscriptionIdRequest generates requests for DeleteApiV2StripeSubscriptionsSubscriptionId +func NewDeleteApiV2StripeSubscriptionsSubscriptionIdRequest(server string, subscriptionId PathSubscriptionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/subscriptions/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2StripeSubscriptionsSubscriptionIdRequest generates requests for GetApiV2StripeSubscriptionsSubscriptionId +func NewGetApiV2StripeSubscriptionsSubscriptionIdRequest(server string, subscriptionId PathSubscriptionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/subscriptions/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2StripeSubscriptionsSubscriptionIdInvoicesRequest generates requests for GetApiV2StripeSubscriptionsSubscriptionIdInvoices +func NewGetApiV2StripeSubscriptionsSubscriptionIdInvoicesRequest(server string, subscriptionId PathSubscriptionId, params *GetApiV2StripeSubscriptionsSubscriptionIdInvoicesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/subscriptions/%s/invoices/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if 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 +} + +// NewGetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingRequest generates requests for GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcoming +func NewGetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingRequest(server string, subscriptionId PathSubscriptionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/stripe/subscriptions/%s/invoices/upcoming/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2SubscriptionsRequest generates requests for GetApiV2Subscriptions +func NewGetApiV2SubscriptionsRequest(server string, params *GetApiV2SubscriptionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/subscriptions/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_id", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if 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 +} + +// NewPostApiV2SubscriptionsRequest calls the generic PostApiV2Subscriptions builder with application/json body +func NewPostApiV2SubscriptionsRequest(server string, body PostApiV2SubscriptionsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2SubscriptionsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostApiV2SubscriptionsRequestWithBody generates requests for PostApiV2Subscriptions with any type of body +func NewPostApiV2SubscriptionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/subscriptions/") + 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 +} + +// NewDeleteApiV2SubscriptionsSubscriptionIdRequest generates requests for DeleteApiV2SubscriptionsSubscriptionId +func NewDeleteApiV2SubscriptionsSubscriptionIdRequest(server string, subscriptionId PathSubscriptionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/subscriptions/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2SubscriptionsSubscriptionIdRequest generates requests for GetApiV2SubscriptionsSubscriptionId +func NewGetApiV2SubscriptionsSubscriptionIdRequest(server string, subscriptionId PathSubscriptionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/subscriptions/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchApiV2SubscriptionsSubscriptionIdAssignOrgRequest calls the generic PatchApiV2SubscriptionsSubscriptionIdAssignOrg builder with application/json body +func NewPatchApiV2SubscriptionsSubscriptionIdAssignOrgRequest(server string, subscriptionId PathSubscriptionId, body PatchApiV2SubscriptionsSubscriptionIdAssignOrgJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApiV2SubscriptionsSubscriptionIdAssignOrgRequestWithBody(server, subscriptionId, "application/json", bodyReader) +} + +// NewPatchApiV2SubscriptionsSubscriptionIdAssignOrgRequestWithBody generates requests for PatchApiV2SubscriptionsSubscriptionIdAssignOrg with any type of body +func NewPatchApiV2SubscriptionsSubscriptionIdAssignOrgRequestWithBody(server string, subscriptionId PathSubscriptionId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/subscriptions/%s/assign-org/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetApiV2SubscriptionsSubscriptionIdWizardRedirectRequest generates requests for GetApiV2SubscriptionsSubscriptionIdWizardRedirect +func NewGetApiV2SubscriptionsSubscriptionIdWizardRedirectRequest(server string, subscriptionId PathSubscriptionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "subscription_id", runtime.ParamLocationPath, subscriptionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/subscriptions/%s/wizard-redirect/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2UsersRequest generates requests for GetApiV2Users +func NewGetApiV2UsersRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/") + 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 +} + +// NewGetApiV2UsersMeRequest generates requests for GetApiV2UsersMe +func NewGetApiV2UsersMeRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/me/") + 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 +} + +// NewPatchApiV2UsersMeRequest calls the generic PatchApiV2UsersMe builder with application/json body +func NewPatchApiV2UsersMeRequest(server string, body PatchApiV2UsersMeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApiV2UsersMeRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchApiV2UsersMeRequestWithBody generates requests for PatchApiV2UsersMe with any type of body +func NewPatchApiV2UsersMeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/me/") + 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 +} + +// NewPostApiV2UsersMeAcceptInviteRequest calls the generic PostApiV2UsersMeAcceptInvite builder with application/json body +func NewPostApiV2UsersMeAcceptInviteRequest(server string, body PostApiV2UsersMeAcceptInviteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV2UsersMeAcceptInviteRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostApiV2UsersMeAcceptInviteRequestWithBody generates requests for PostApiV2UsersMeAcceptInvite with any type of body +func NewPostApiV2UsersMeAcceptInviteRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/me/accept-invite/") + 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 +} + +// NewGetApiV2UsersMeApiKeysRequest generates requests for GetApiV2UsersMeApiKeys +func NewGetApiV2UsersMeApiKeysRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/me/api-keys/") + 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 +} + +// NewPostApiV2UsersMeApiKeysRequest generates requests for PostApiV2UsersMeApiKeys +func NewPostApiV2UsersMeApiKeysRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/me/api-keys/") + 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 +} + +// NewDeleteApiV2UsersMeApiKeysApiKeyRequest generates requests for DeleteApiV2UsersMeApiKeysApiKey +func NewDeleteApiV2UsersMeApiKeysApiKeyRequest(server string, apiKey PathApiKey) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "api_key", runtime.ParamLocationPath, apiKey) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/me/api-keys/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV2UsersMeApiKeysApiKeyRequest generates requests for GetApiV2UsersMeApiKeysApiKey +func NewGetApiV2UsersMeApiKeysApiKeyRequest(server string, apiKey PathApiKey) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "api_key", runtime.ParamLocationPath, apiKey) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/me/api-keys/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchApiV2UsersMeApiKeysApiKeyRequest calls the generic PatchApiV2UsersMeApiKeysApiKey builder with application/json body +func NewPatchApiV2UsersMeApiKeysApiKeyRequest(server string, apiKey PathApiKey, body PatchApiV2UsersMeApiKeysApiKeyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchApiV2UsersMeApiKeysApiKeyRequestWithBody(server, apiKey, "application/json", bodyReader) +} + +// NewPatchApiV2UsersMeApiKeysApiKeyRequestWithBody generates requests for PatchApiV2UsersMeApiKeysApiKey with any type of body +func NewPatchApiV2UsersMeApiKeysApiKeyRequestWithBody(server string, apiKey PathApiKey, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "api_key", runtime.ParamLocationPath, apiKey) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/me/api-keys/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPutApiV2UsersMeConfirmEmailRequest calls the generic PutApiV2UsersMeConfirmEmail builder with application/json body +func NewPutApiV2UsersMeConfirmEmailRequest(server string, body PutApiV2UsersMeConfirmEmailJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutApiV2UsersMeConfirmEmailRequestWithBody(server, "application/json", bodyReader) +} + +// NewPutApiV2UsersMeConfirmEmailRequestWithBody generates requests for PutApiV2UsersMeConfirmEmail with any type of body +func NewPutApiV2UsersMeConfirmEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/me/confirm-email/") + 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 +} + +// NewDeleteApiV2UsersUserIdRequest generates requests for DeleteApiV2UsersUserId +func NewDeleteApiV2UsersUserIdRequest(server string, userId PathUserId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v2/users/%s/", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetApiV2AwsSubscriptionsSubscriptionIdWithResponse request + GetApiV2AwsSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2AwsSubscriptionsSubscriptionIdResponse, error) + + // PatchApiV2AwsSubscriptionsSubscriptionIdWithBodyWithResponse request with any body + PatchApiV2AwsSubscriptionsSubscriptionIdWithBodyWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2AwsSubscriptionsSubscriptionIdResponse, error) + + PatchApiV2AwsSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, body PatchApiV2AwsSubscriptionsSubscriptionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2AwsSubscriptionsSubscriptionIdResponse, error) + + // GetApiV2AzureSubscriptionsSubscriptionIdWithResponse request + GetApiV2AzureSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2AzureSubscriptionsSubscriptionIdResponse, error) + + // GetApiV2ClustersWithResponse request + GetApiV2ClustersWithResponse(ctx context.Context, params *GetApiV2ClustersParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersResponse, error) + + // HeadApiV2ClustersNameNameWithResponse request + HeadApiV2ClustersNameNameWithResponse(ctx context.Context, name PathName, reqEditors ...RequestEditorFn) (*HeadApiV2ClustersNameNameResponse, error) + + // DeleteApiV2ClustersClusterIdWithResponse request + DeleteApiV2ClustersClusterIdWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*DeleteApiV2ClustersClusterIdResponse, error) + + // GetApiV2ClustersClusterIdWithResponse request + GetApiV2ClustersClusterIdWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdResponse, error) + + // PatchApiV2ClustersClusterIdWithBodyWithResponse request with any body + PatchApiV2ClustersClusterIdWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2ClustersClusterIdResponse, error) + + PatchApiV2ClustersClusterIdWithResponse(ctx context.Context, clusterId PathClusterId, body PatchApiV2ClustersClusterIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2ClustersClusterIdResponse, error) + + // GetApiV2ClustersClusterIdAvailableProductsWithResponse request + GetApiV2ClustersClusterIdAvailableProductsWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdAvailableProductsResponse, error) + + // GetApiV2ClustersClusterIdAvailableUpgradesWithResponse request + GetApiV2ClustersClusterIdAvailableUpgradesWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdAvailableUpgradesResponse, error) + + // PutApiV2ClustersClusterIdBackupScheduleWithBodyWithResponse request with any body + PutApiV2ClustersClusterIdBackupScheduleWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdBackupScheduleResponse, error) + + PutApiV2ClustersClusterIdBackupScheduleWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdBackupScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdBackupScheduleResponse, error) + + // PutApiV2ClustersClusterIdDeletionProtectionWithBodyWithResponse request with any body + PutApiV2ClustersClusterIdDeletionProtectionWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdDeletionProtectionResponse, error) + + PutApiV2ClustersClusterIdDeletionProtectionWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdDeletionProtectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdDeletionProtectionResponse, error) + + // GetApiV2ClustersClusterIdExportJobsWithResponse request + GetApiV2ClustersClusterIdExportJobsWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdExportJobsResponse, error) + + // PostApiV2ClustersClusterIdExportJobsWithBodyWithResponse request with any body + PostApiV2ClustersClusterIdExportJobsWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdExportJobsResponse, error) + + PostApiV2ClustersClusterIdExportJobsWithResponse(ctx context.Context, clusterId PathClusterId, body PostApiV2ClustersClusterIdExportJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdExportJobsResponse, error) + + // DeleteApiV2ClustersClusterIdExportJobsExportJobIdWithResponse request + DeleteApiV2ClustersClusterIdExportJobsExportJobIdWithResponse(ctx context.Context, clusterId PathClusterId, exportJobId PathExportJobId, reqEditors ...RequestEditorFn) (*DeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse, error) + + // GetApiV2ClustersClusterIdExportJobsExportJobIdWithResponse request + GetApiV2ClustersClusterIdExportJobsExportJobIdWithResponse(ctx context.Context, clusterId PathClusterId, exportJobId PathExportJobId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdExportJobsExportJobIdResponse, error) + + // GetApiV2ClustersClusterIdImportJobsWithResponse request + GetApiV2ClustersClusterIdImportJobsWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdImportJobsResponse, error) + + // PostApiV2ClustersClusterIdImportJobsWithBodyWithResponse request with any body + PostApiV2ClustersClusterIdImportJobsWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdImportJobsResponse, error) + + PostApiV2ClustersClusterIdImportJobsWithResponse(ctx context.Context, clusterId PathClusterId, body PostApiV2ClustersClusterIdImportJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdImportJobsResponse, error) + + // DeleteApiV2ClustersClusterIdImportJobsImportJobIdWithResponse request + DeleteApiV2ClustersClusterIdImportJobsImportJobIdWithResponse(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, reqEditors ...RequestEditorFn) (*DeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse, error) + + // GetApiV2ClustersClusterIdImportJobsImportJobIdWithResponse request + GetApiV2ClustersClusterIdImportJobsImportJobIdWithResponse(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdImportJobsImportJobIdResponse, error) + + // GetApiV2ClustersClusterIdImportJobsImportJobIdProgressWithResponse request + GetApiV2ClustersClusterIdImportJobsImportJobIdProgressWithResponse(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, params *GetApiV2ClustersClusterIdImportJobsImportJobIdProgressParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse, error) + + // PutApiV2ClustersClusterIdIpRestrictionsWithBodyWithResponse request with any body + PutApiV2ClustersClusterIdIpRestrictionsWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdIpRestrictionsResponse, error) + + PutApiV2ClustersClusterIdIpRestrictionsWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdIpRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdIpRestrictionsResponse, error) + + // GetApiV2ClustersClusterIdJwtWithResponse request + GetApiV2ClustersClusterIdJwtWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdJwtResponse, error) + + // GetApiV2ClustersClusterIdMetricsMetricIdWithResponse request + GetApiV2ClustersClusterIdMetricsMetricIdWithResponse(ctx context.Context, clusterId PathClusterId, metricId GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId, params *GetApiV2ClustersClusterIdMetricsMetricIdParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdMetricsMetricIdResponse, error) + + // DeleteApiV2ClustersClusterIdNodesOrdinalWithResponse request + DeleteApiV2ClustersClusterIdNodesOrdinalWithResponse(ctx context.Context, clusterId PathClusterId, ordinal PathOrdinal, reqEditors ...RequestEditorFn) (*DeleteApiV2ClustersClusterIdNodesOrdinalResponse, error) + + // GetApiV2ClustersClusterIdOperationsWithResponse request + GetApiV2ClustersClusterIdOperationsWithResponse(ctx context.Context, clusterId PathClusterId, params *GetApiV2ClustersClusterIdOperationsParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdOperationsResponse, error) + + // PutApiV2ClustersClusterIdProductWithBodyWithResponse request with any body + PutApiV2ClustersClusterIdProductWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdProductResponse, error) + + PutApiV2ClustersClusterIdProductWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdProductJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdProductResponse, error) + + // PutApiV2ClustersClusterIdScaleWithBodyWithResponse request with any body + PutApiV2ClustersClusterIdScaleWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdScaleResponse, error) + + PutApiV2ClustersClusterIdScaleWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdScaleJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdScaleResponse, error) + + // GetApiV2ClustersClusterIdSnapshotsWithResponse request + GetApiV2ClustersClusterIdSnapshotsWithResponse(ctx context.Context, clusterId PathClusterId, params *GetApiV2ClustersClusterIdSnapshotsParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdSnapshotsResponse, error) + + // PostApiV2ClustersClusterIdSnapshotsRestoreWithBodyWithResponse request with any body + PostApiV2ClustersClusterIdSnapshotsRestoreWithBodyWithResponse(ctx context.Context, clusterId PathTargetClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdSnapshotsRestoreResponse, error) + + PostApiV2ClustersClusterIdSnapshotsRestoreWithResponse(ctx context.Context, clusterId PathTargetClusterId, body PostApiV2ClustersClusterIdSnapshotsRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdSnapshotsRestoreResponse, error) + + // PutApiV2ClustersClusterIdStorageWithBodyWithResponse request with any body + PutApiV2ClustersClusterIdStorageWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdStorageResponse, error) + + PutApiV2ClustersClusterIdStorageWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdStorageResponse, error) + + // PutApiV2ClustersClusterIdSuspendWithBodyWithResponse request with any body + PutApiV2ClustersClusterIdSuspendWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdSuspendResponse, error) + + PutApiV2ClustersClusterIdSuspendWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdSuspendJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdSuspendResponse, error) + + // PutApiV2ClustersClusterIdUpgradeWithBodyWithResponse request with any body + PutApiV2ClustersClusterIdUpgradeWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdUpgradeResponse, error) + + PutApiV2ClustersClusterIdUpgradeWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdUpgradeJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdUpgradeResponse, error) + + // GetApiV2ConfigurationsWithResponse request + GetApiV2ConfigurationsWithResponse(ctx context.Context, params *GetApiV2ConfigurationsParams, reqEditors ...RequestEditorFn) (*GetApiV2ConfigurationsResponse, error) + + // GetApiV2ConfigurationsKeyWithResponse request + GetApiV2ConfigurationsKeyWithResponse(ctx context.Context, key PathConfigurationKey, params *GetApiV2ConfigurationsKeyParams, reqEditors ...RequestEditorFn) (*GetApiV2ConfigurationsKeyResponse, error) + + // PutApiV2ConfigurationsKeyWithBodyWithResponse request with any body + PutApiV2ConfigurationsKeyWithBodyWithResponse(ctx context.Context, key PathConfigurationKey, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ConfigurationsKeyResponse, error) + + PutApiV2ConfigurationsKeyWithResponse(ctx context.Context, key PathConfigurationKey, body PutApiV2ConfigurationsKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ConfigurationsKeyResponse, error) + + // GetApiV2FeaturesStatusWithResponse request + GetApiV2FeaturesStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2FeaturesStatusResponse, error) + + // GetApiV2GcpSubscriptionsSubscriptionIdWithResponse request + GetApiV2GcpSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2GcpSubscriptionsSubscriptionIdResponse, error) + + // GetApiV2IntegrationsAwsS3BucketsWithResponse request + GetApiV2IntegrationsAwsS3BucketsWithResponse(ctx context.Context, params *GetApiV2IntegrationsAwsS3BucketsParams, reqEditors ...RequestEditorFn) (*GetApiV2IntegrationsAwsS3BucketsResponse, error) + + // GetApiV2IntegrationsAwsS3ObjectsWithResponse request + GetApiV2IntegrationsAwsS3ObjectsWithResponse(ctx context.Context, params *GetApiV2IntegrationsAwsS3ObjectsParams, reqEditors ...RequestEditorFn) (*GetApiV2IntegrationsAwsS3ObjectsResponse, error) + + // GetApiV2IntegrationsAzureBlobStorageContainersWithResponse request + GetApiV2IntegrationsAzureBlobStorageContainersWithResponse(ctx context.Context, params *GetApiV2IntegrationsAzureBlobStorageContainersParams, reqEditors ...RequestEditorFn) (*GetApiV2IntegrationsAzureBlobStorageContainersResponse, error) + + // GetApiV2IntegrationsAzureBlobsWithResponse request + GetApiV2IntegrationsAzureBlobsWithResponse(ctx context.Context, params *GetApiV2IntegrationsAzureBlobsParams, reqEditors ...RequestEditorFn) (*GetApiV2IntegrationsAzureBlobsResponse, error) + + // GetApiV2MetaWithResponse request + GetApiV2MetaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2MetaResponse, error) + + // GetApiV2MetaCratedbVersionsWithResponse request + GetApiV2MetaCratedbVersionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2MetaCratedbVersionsResponse, error) + + // GetApiV2MetaIpAddressWithResponse request + GetApiV2MetaIpAddressWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2MetaIpAddressResponse, error) + + // GetApiV2MetaJwkWithResponse request + GetApiV2MetaJwkWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2MetaJwkResponse, error) + + // PostApiV2MetaJwtRefreshWithBodyWithResponse request with any body + PostApiV2MetaJwtRefreshWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2MetaJwtRefreshResponse, error) + + PostApiV2MetaJwtRefreshWithResponse(ctx context.Context, body PostApiV2MetaJwtRefreshJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2MetaJwtRefreshResponse, error) + + // GetApiV2OrganizationsWithResponse request + GetApiV2OrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsResponse, error) + + // PostApiV2OrganizationsWithBodyWithResponse request with any body + PostApiV2OrganizationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsResponse, error) + + PostApiV2OrganizationsWithResponse(ctx context.Context, body PostApiV2OrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsResponse, error) + + // DeleteApiV2OrganizationsOrganizationIdWithResponse request + DeleteApiV2OrganizationsOrganizationIdWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdResponse, error) + + // GetApiV2OrganizationsOrganizationIdWithResponse request + GetApiV2OrganizationsOrganizationIdWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdResponse, error) + + // PutApiV2OrganizationsOrganizationIdWithBodyWithResponse request with any body + PutApiV2OrganizationsOrganizationIdWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2OrganizationsOrganizationIdResponse, error) + + PutApiV2OrganizationsOrganizationIdWithResponse(ctx context.Context, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2OrganizationsOrganizationIdResponse, error) + + // GetApiV2OrganizationsOrganizationIdAuditlogsWithResponse request + GetApiV2OrganizationsOrganizationIdAuditlogsWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdAuditlogsParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdAuditlogsResponse, error) + + // GetApiV2OrganizationsOrganizationIdClustersWithResponse request + GetApiV2OrganizationsOrganizationIdClustersWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdClustersParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdClustersResponse, error) + + // PostApiV2OrganizationsOrganizationIdClustersWithBodyWithResponse request with any body + PostApiV2OrganizationsOrganizationIdClustersWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdClustersResponse, error) + + PostApiV2OrganizationsOrganizationIdClustersWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdClustersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdClustersResponse, error) + + // GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthWithResponse request + GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse, error) + + // GetApiV2OrganizationsOrganizationIdCreditsWithResponse request + GetApiV2OrganizationsOrganizationIdCreditsWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdCreditsParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdCreditsResponse, error) + + // PostApiV2OrganizationsOrganizationIdCreditsWithBodyWithResponse request with any body + PostApiV2OrganizationsOrganizationIdCreditsWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdCreditsResponse, error) + + PostApiV2OrganizationsOrganizationIdCreditsWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdCreditsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdCreditsResponse, error) + + // DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdWithResponse request + DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdWithResponse(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse, error) + + // PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithBodyWithResponse request with any body + PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse, error) + + PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithResponse(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, body PatchApiV2OrganizationsOrganizationIdCreditsCreditIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse, error) + + // GetApiV2OrganizationsOrganizationIdCustomerWithResponse request + GetApiV2OrganizationsOrganizationIdCustomerWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdCustomerResponse, error) + + // PutApiV2OrganizationsOrganizationIdCustomerWithBodyWithResponse request with any body + PutApiV2OrganizationsOrganizationIdCustomerWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2OrganizationsOrganizationIdCustomerResponse, error) + + PutApiV2OrganizationsOrganizationIdCustomerWithResponse(ctx context.Context, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2OrganizationsOrganizationIdCustomerResponse, error) + + // GetApiV2OrganizationsOrganizationIdFilesWithResponse request + GetApiV2OrganizationsOrganizationIdFilesWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdFilesResponse, error) + + // PostApiV2OrganizationsOrganizationIdFilesWithBodyWithResponse request with any body + PostApiV2OrganizationsOrganizationIdFilesWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdFilesResponse, error) + + PostApiV2OrganizationsOrganizationIdFilesWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdFilesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdFilesResponse, error) + + // DeleteApiV2OrganizationsOrganizationIdFilesFileIdWithResponse request + DeleteApiV2OrganizationsOrganizationIdFilesFileIdWithResponse(ctx context.Context, organizationId PathOrganizationId, fileId PathFileId, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse, error) + + // GetApiV2OrganizationsOrganizationIdFilesFileIdWithResponse request + GetApiV2OrganizationsOrganizationIdFilesFileIdWithResponse(ctx context.Context, organizationId PathOrganizationId, fileId PathFileId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdFilesFileIdResponse, error) + + // GetApiV2OrganizationsOrganizationIdInvitationsWithResponse request + GetApiV2OrganizationsOrganizationIdInvitationsWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdInvitationsParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdInvitationsResponse, error) + + // DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenWithResponse request + DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenWithResponse(ctx context.Context, organizationId PathOrganizationId, inviteToken PathInviteToken, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse, error) + + // GetApiV2OrganizationsOrganizationIdMetricsPrometheusWithResponse request + GetApiV2OrganizationsOrganizationIdMetricsPrometheusWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse, error) + + // GetApiV2OrganizationsOrganizationIdPaymentMethodsWithResponse request + GetApiV2OrganizationsOrganizationIdPaymentMethodsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdPaymentMethodsResponse, error) + + // GetApiV2OrganizationsOrganizationIdProjectsWithResponse request + GetApiV2OrganizationsOrganizationIdProjectsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdProjectsResponse, error) + + // GetApiV2OrganizationsOrganizationIdQuotasWithResponse request + GetApiV2OrganizationsOrganizationIdQuotasWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdQuotasResponse, error) + + // GetApiV2OrganizationsOrganizationIdRegionsWithResponse request + GetApiV2OrganizationsOrganizationIdRegionsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdRegionsResponse, error) + + // GetApiV2OrganizationsOrganizationIdRemainingBudgetWithResponse request + GetApiV2OrganizationsOrganizationIdRemainingBudgetWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdRemainingBudgetParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdRemainingBudgetResponse, error) + + // GetApiV2OrganizationsOrganizationIdSecretsWithResponse request + GetApiV2OrganizationsOrganizationIdSecretsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdSecretsResponse, error) + + // PostApiV2OrganizationsOrganizationIdSecretsWithBodyWithResponse request with any body + PostApiV2OrganizationsOrganizationIdSecretsWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdSecretsResponse, error) + + PostApiV2OrganizationsOrganizationIdSecretsWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdSecretsResponse, error) + + // DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdWithResponse request + DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdWithResponse(ctx context.Context, organizationId PathOrganizationId, secretId PathOrganizationSecretId, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse, error) + + // GetApiV2OrganizationsOrganizationIdSubscriptionsWithResponse request + GetApiV2OrganizationsOrganizationIdSubscriptionsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdSubscriptionsResponse, error) + + // GetApiV2OrganizationsOrganizationIdUsersWithResponse request + GetApiV2OrganizationsOrganizationIdUsersWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdUsersResponse, error) + + // PostApiV2OrganizationsOrganizationIdUsersWithBodyWithResponse request with any body + PostApiV2OrganizationsOrganizationIdUsersWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdUsersResponse, error) + + PostApiV2OrganizationsOrganizationIdUsersWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdUsersResponse, error) + + // DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailWithResponse request + DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailWithResponse(ctx context.Context, organizationId PathOrganizationId, userIdOrEmail PathUserIdOrEmail, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse, error) + + // GetApiV2ProductsWithResponse request + GetApiV2ProductsWithResponse(ctx context.Context, params *GetApiV2ProductsParams, reqEditors ...RequestEditorFn) (*GetApiV2ProductsResponse, error) + + // GetApiV2ProductsClustersPriceWithResponse request + GetApiV2ProductsClustersPriceWithResponse(ctx context.Context, params *GetApiV2ProductsClustersPriceParams, reqEditors ...RequestEditorFn) (*GetApiV2ProductsClustersPriceResponse, error) + + // GetApiV2ProductsKindWithResponse request + GetApiV2ProductsKindWithResponse(ctx context.Context, kind PathProductKind, params *GetApiV2ProductsKindParams, reqEditors ...RequestEditorFn) (*GetApiV2ProductsKindResponse, error) + + // GetApiV2ProjectsWithResponse request + GetApiV2ProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2ProjectsResponse, error) + + // PostApiV2ProjectsWithBodyWithResponse request with any body + PostApiV2ProjectsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ProjectsResponse, error) + + PostApiV2ProjectsWithResponse(ctx context.Context, body PostApiV2ProjectsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ProjectsResponse, error) + + // DeleteApiV2ProjectsProjectIdWithResponse request + DeleteApiV2ProjectsProjectIdWithResponse(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*DeleteApiV2ProjectsProjectIdResponse, error) + + // GetApiV2ProjectsProjectIdWithResponse request + GetApiV2ProjectsProjectIdWithResponse(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*GetApiV2ProjectsProjectIdResponse, error) + + // PatchApiV2ProjectsProjectIdWithBodyWithResponse request with any body + PatchApiV2ProjectsProjectIdWithBodyWithResponse(ctx context.Context, projectId PathProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2ProjectsProjectIdResponse, error) + + PatchApiV2ProjectsProjectIdWithResponse(ctx context.Context, projectId PathProjectId, body PatchApiV2ProjectsProjectIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2ProjectsProjectIdResponse, error) + + // GetApiV2ProjectsProjectIdClustersWithResponse request + GetApiV2ProjectsProjectIdClustersWithResponse(ctx context.Context, projectId PathProjectId, params *GetApiV2ProjectsProjectIdClustersParams, reqEditors ...RequestEditorFn) (*GetApiV2ProjectsProjectIdClustersResponse, error) + + // GetApiV2ProjectsProjectIdUsersWithResponse request + GetApiV2ProjectsProjectIdUsersWithResponse(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*GetApiV2ProjectsProjectIdUsersResponse, error) + + // PostApiV2ProjectsProjectIdUsersWithBodyWithResponse request with any body + PostApiV2ProjectsProjectIdUsersWithBodyWithResponse(ctx context.Context, projectId PathProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ProjectsProjectIdUsersResponse, error) + + PostApiV2ProjectsProjectIdUsersWithResponse(ctx context.Context, projectId PathProjectId, body PostApiV2ProjectsProjectIdUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ProjectsProjectIdUsersResponse, error) + + // DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailWithResponse request + DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailWithResponse(ctx context.Context, projectId PathProjectId, userIdOrEmail PathUserIdOrEmail, reqEditors ...RequestEditorFn) (*DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse, error) + + // GetApiV2RegionsWithResponse request + GetApiV2RegionsWithResponse(ctx context.Context, params *GetApiV2RegionsParams, reqEditors ...RequestEditorFn) (*GetApiV2RegionsResponse, error) + + // PostApiV2RegionsWithBodyWithResponse request with any body + PostApiV2RegionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2RegionsResponse, error) + + PostApiV2RegionsWithResponse(ctx context.Context, body PostApiV2RegionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2RegionsResponse, error) + + // DeleteApiV2RegionsRegionNameWithResponse request + DeleteApiV2RegionsRegionNameWithResponse(ctx context.Context, regionName PathRegionName, reqEditors ...RequestEditorFn) (*DeleteApiV2RegionsRegionNameResponse, error) + + // GetApiV2RegionsRegionNameInstallTokenWithResponse request + GetApiV2RegionsRegionNameInstallTokenWithResponse(ctx context.Context, regionName PathRegionName, reqEditors ...RequestEditorFn) (*GetApiV2RegionsRegionNameInstallTokenResponse, error) + + // PostApiV2RegionsRegionNameVerifyBackupLocationWithBodyWithResponse request with any body + PostApiV2RegionsRegionNameVerifyBackupLocationWithBodyWithResponse(ctx context.Context, regionName PathRegionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2RegionsRegionNameVerifyBackupLocationResponse, error) + + PostApiV2RegionsRegionNameVerifyBackupLocationWithResponse(ctx context.Context, regionName PathRegionName, body PostApiV2RegionsRegionNameVerifyBackupLocationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2RegionsRegionNameVerifyBackupLocationResponse, error) + + // GetApiV2RolesWithResponse request + GetApiV2RolesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2RolesResponse, error) + + // PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupWithResponse request + PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse, error) + + // PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentWithResponse request + PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse, error) + + // PostApiV2StripeCardOrganizationsOrganizationIdSetupWithResponse request + PostApiV2StripeCardOrganizationsOrganizationIdSetupWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeCardOrganizationsOrganizationIdSetupResponse, error) + + // GetApiV2StripeOrganizationsOrganizationIdBillingInformationWithResponse request + GetApiV2StripeOrganizationsOrganizationIdBillingInformationWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse, error) + + // PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithBodyWithResponse request with any body + PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse, error) + + PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithResponse(ctx context.Context, organizationId PathOrganizationId, body PatchApiV2StripeOrganizationsOrganizationIdBillingInformationJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse, error) + + // GetApiV2StripeOrganizationsOrganizationIdCardsWithResponse request + GetApiV2StripeOrganizationsOrganizationIdCardsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2StripeOrganizationsOrganizationIdCardsResponse, error) + + // DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdWithResponse request + DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdWithResponse(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, reqEditors ...RequestEditorFn) (*DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse, error) + + // PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithBodyWithResponse request with any body + PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse, error) + + PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithResponse(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, body PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse, error) + + // PostApiV2StripeOrganizationsOrganizationIdSetupPaymentWithResponse request + PostApiV2StripeOrganizationsOrganizationIdSetupPaymentWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse, error) + + // PostApiV2StripeOrganizationsOrganizationIdSetupWithResponse request + PostApiV2StripeOrganizationsOrganizationIdSetupWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeOrganizationsOrganizationIdSetupResponse, error) + + // PostApiV2StripeOrganizationsOrganizationIdValidateCardWithResponse request + PostApiV2StripeOrganizationsOrganizationIdValidateCardWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeOrganizationsOrganizationIdValidateCardResponse, error) + + // GetApiV2StripePromotionsWithResponse request + GetApiV2StripePromotionsWithResponse(ctx context.Context, params *GetApiV2StripePromotionsParams, reqEditors ...RequestEditorFn) (*GetApiV2StripePromotionsResponse, error) + + // DeleteApiV2StripeSubscriptionsSubscriptionIdWithResponse request + DeleteApiV2StripeSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*DeleteApiV2StripeSubscriptionsSubscriptionIdResponse, error) + + // GetApiV2StripeSubscriptionsSubscriptionIdWithResponse request + GetApiV2StripeSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2StripeSubscriptionsSubscriptionIdResponse, error) + + // GetApiV2StripeSubscriptionsSubscriptionIdInvoicesWithResponse request + GetApiV2StripeSubscriptionsSubscriptionIdInvoicesWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, params *GetApiV2StripeSubscriptionsSubscriptionIdInvoicesParams, reqEditors ...RequestEditorFn) (*GetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse, error) + + // GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingWithResponse request + GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse, error) + + // GetApiV2SubscriptionsWithResponse request + GetApiV2SubscriptionsWithResponse(ctx context.Context, params *GetApiV2SubscriptionsParams, reqEditors ...RequestEditorFn) (*GetApiV2SubscriptionsResponse, error) + + // PostApiV2SubscriptionsWithBodyWithResponse request with any body + PostApiV2SubscriptionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2SubscriptionsResponse, error) + + PostApiV2SubscriptionsWithResponse(ctx context.Context, body PostApiV2SubscriptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2SubscriptionsResponse, error) + + // DeleteApiV2SubscriptionsSubscriptionIdWithResponse request + DeleteApiV2SubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*DeleteApiV2SubscriptionsSubscriptionIdResponse, error) + + // GetApiV2SubscriptionsSubscriptionIdWithResponse request + GetApiV2SubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2SubscriptionsSubscriptionIdResponse, error) + + // PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithBodyWithResponse request with any body + PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithBodyWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse, error) + + PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, body PatchApiV2SubscriptionsSubscriptionIdAssignOrgJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse, error) + + // GetApiV2SubscriptionsSubscriptionIdWizardRedirectWithResponse request + GetApiV2SubscriptionsSubscriptionIdWizardRedirectWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse, error) + + // GetApiV2UsersWithResponse request + GetApiV2UsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2UsersResponse, error) + + // GetApiV2UsersMeWithResponse request + GetApiV2UsersMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2UsersMeResponse, error) + + // PatchApiV2UsersMeWithBodyWithResponse request with any body + PatchApiV2UsersMeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2UsersMeResponse, error) + + PatchApiV2UsersMeWithResponse(ctx context.Context, body PatchApiV2UsersMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2UsersMeResponse, error) + + // PostApiV2UsersMeAcceptInviteWithBodyWithResponse request with any body + PostApiV2UsersMeAcceptInviteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2UsersMeAcceptInviteResponse, error) + + PostApiV2UsersMeAcceptInviteWithResponse(ctx context.Context, body PostApiV2UsersMeAcceptInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2UsersMeAcceptInviteResponse, error) + + // GetApiV2UsersMeApiKeysWithResponse request + GetApiV2UsersMeApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2UsersMeApiKeysResponse, error) + + // PostApiV2UsersMeApiKeysWithResponse request + PostApiV2UsersMeApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostApiV2UsersMeApiKeysResponse, error) + + // DeleteApiV2UsersMeApiKeysApiKeyWithResponse request + DeleteApiV2UsersMeApiKeysApiKeyWithResponse(ctx context.Context, apiKey PathApiKey, reqEditors ...RequestEditorFn) (*DeleteApiV2UsersMeApiKeysApiKeyResponse, error) + + // GetApiV2UsersMeApiKeysApiKeyWithResponse request + GetApiV2UsersMeApiKeysApiKeyWithResponse(ctx context.Context, apiKey PathApiKey, reqEditors ...RequestEditorFn) (*GetApiV2UsersMeApiKeysApiKeyResponse, error) + + // PatchApiV2UsersMeApiKeysApiKeyWithBodyWithResponse request with any body + PatchApiV2UsersMeApiKeysApiKeyWithBodyWithResponse(ctx context.Context, apiKey PathApiKey, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2UsersMeApiKeysApiKeyResponse, error) + + PatchApiV2UsersMeApiKeysApiKeyWithResponse(ctx context.Context, apiKey PathApiKey, body PatchApiV2UsersMeApiKeysApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2UsersMeApiKeysApiKeyResponse, error) + + // PutApiV2UsersMeConfirmEmailWithBodyWithResponse request with any body + PutApiV2UsersMeConfirmEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2UsersMeConfirmEmailResponse, error) + + PutApiV2UsersMeConfirmEmailWithResponse(ctx context.Context, body PutApiV2UsersMeConfirmEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2UsersMeConfirmEmailResponse, error) + + // DeleteApiV2UsersUserIdWithResponse request + DeleteApiV2UsersUserIdWithResponse(ctx context.Context, userId PathUserId, reqEditors ...RequestEditorFn) (*DeleteApiV2UsersUserIdResponse, error) +} + +type GetApiV2AwsSubscriptionsSubscriptionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2AwsSubscriptionsSubscriptionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2AwsSubscriptionsSubscriptionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiV2AwsSubscriptionsSubscriptionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PatchApiV2AwsSubscriptionsSubscriptionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiV2AwsSubscriptionsSubscriptionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2AzureSubscriptionsSubscriptionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2AzureSubscriptionsSubscriptionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2AzureSubscriptionsSubscriptionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Cluster + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type HeadApiV2ClustersNameNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r HeadApiV2ClustersNameNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r HeadApiV2ClustersNameNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2ClustersClusterIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2ClustersClusterIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2ClustersClusterIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiV2ClustersClusterIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PatchApiV2ClustersClusterIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiV2ClustersClusterIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdAvailableProductsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Product + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdAvailableProductsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdAvailableProductsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdAvailableUpgradesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CrateDBVersions + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdAvailableUpgradesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdAvailableUpgradesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2ClustersClusterIdBackupScheduleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2ClustersClusterIdBackupScheduleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2ClustersClusterIdBackupScheduleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2ClustersClusterIdDeletionProtectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2ClustersClusterIdDeletionProtectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2ClustersClusterIdDeletionProtectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdExportJobsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ClusterExportJob + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdExportJobsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdExportJobsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2ClustersClusterIdExportJobsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ClusterExportJob + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2ClustersClusterIdExportJobsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2ClustersClusterIdExportJobsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdExportJobsExportJobIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ClusterExportJob + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdExportJobsExportJobIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdExportJobsExportJobIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdImportJobsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ClusterImportJob + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdImportJobsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdImportJobsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2ClustersClusterIdImportJobsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ClusterImportJob + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2ClustersClusterIdImportJobsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2ClustersClusterIdImportJobsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdImportJobsImportJobIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ClusterImportJob + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdImportJobsImportJobIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdImportJobsImportJobIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DataJobData + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2ClustersClusterIdIpRestrictionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2ClustersClusterIdIpRestrictionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2ClustersClusterIdIpRestrictionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdJwtResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ClusterJWTToken + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdJwtResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdJwtResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdMetricsMetricIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]interface{} + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdMetricsMetricIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdMetricsMetricIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2ClustersClusterIdNodesOrdinalResponse struct { + Body []byte + HTTPResponse *http.Response + JSON202 *struct { + ApiVersion *string `json:"apiVersion,omitempty"` + Code *int `json:"code,omitempty"` + Kind *string `json:"kind,omitempty"` + Status *string `json:"status,omitempty"` + } + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2ClustersClusterIdNodesOrdinalResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2ClustersClusterIdNodesOrdinalResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdOperationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ClusterAsyncOperationsList + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdOperationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdOperationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2ClustersClusterIdProductResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2ClustersClusterIdProductResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2ClustersClusterIdProductResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2ClustersClusterIdScaleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2ClustersClusterIdScaleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2ClustersClusterIdScaleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ClustersClusterIdSnapshotsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ClusterSnapshot + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ClustersClusterIdSnapshotsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ClustersClusterIdSnapshotsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2ClustersClusterIdSnapshotsRestoreResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ClusterSnapshot + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2ClustersClusterIdSnapshotsRestoreResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2ClustersClusterIdSnapshotsRestoreResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2ClustersClusterIdStorageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2ClustersClusterIdStorageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2ClustersClusterIdStorageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2ClustersClusterIdSuspendResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2ClustersClusterIdSuspendResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2ClustersClusterIdSuspendResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2ClustersClusterIdUpgradeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2ClustersClusterIdUpgradeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2ClustersClusterIdUpgradeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ConfigurationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ConfigurationItem + JSON401 *N401 + JSON403 *N403 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ConfigurationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ConfigurationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ConfigurationsKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ConfigurationItem + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ConfigurationsKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ConfigurationsKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2ConfigurationsKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ConfigurationItem + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2ConfigurationsKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2ConfigurationsKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2FeaturesStatusResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *FeatureFlags + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2FeaturesStatusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2FeaturesStatusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2GcpSubscriptionsSubscriptionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2GcpSubscriptionsSubscriptionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2GcpSubscriptionsSubscriptionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2IntegrationsAwsS3BucketsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *BucketsList + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2IntegrationsAwsS3BucketsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2IntegrationsAwsS3BucketsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2IntegrationsAwsS3ObjectsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ObjectsList + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2IntegrationsAwsS3ObjectsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2IntegrationsAwsS3ObjectsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2IntegrationsAzureBlobStorageContainersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ContainersList + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2IntegrationsAzureBlobStorageContainersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2IntegrationsAzureBlobStorageContainersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2IntegrationsAzureBlobsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *BlobsList + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2IntegrationsAzureBlobsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2IntegrationsAzureBlobsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2MetaResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Meta + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2MetaResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2MetaResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2MetaCratedbVersionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CrateDBVersions + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2MetaCratedbVersionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2MetaCratedbVersionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2MetaIpAddressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IPAddress + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2MetaIpAddressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2MetaIpAddressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2MetaJwkResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *JWK + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2MetaJwkResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2MetaJwkResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2MetaJwtRefreshResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ClusterJWTToken + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2MetaJwtRefreshResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2MetaJwtRefreshResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Organization + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2OrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Organization + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2OrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2OrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2OrganizationsOrganizationIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2OrganizationsOrganizationIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2OrganizationsOrganizationIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Organization + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2OrganizationsOrganizationIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Organization + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2OrganizationsOrganizationIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2OrganizationsOrganizationIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdAuditlogsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]AuditEvent + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdAuditlogsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdAuditlogsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdClustersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Cluster + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdClustersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdClustersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2OrganizationsOrganizationIdClustersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Cluster + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2OrganizationsOrganizationIdClustersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2OrganizationsOrganizationIdClustersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *OrganizationCurrentConsumptionSchema + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdCreditsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Credit + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdCreditsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdCreditsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2OrganizationsOrganizationIdCreditsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Credit + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2OrganizationsOrganizationIdCreditsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2OrganizationsOrganizationIdCreditsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Credit + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdCustomerResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Customer + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdCustomerResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdCustomerResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2OrganizationsOrganizationIdCustomerResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Customer + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2OrganizationsOrganizationIdCustomerResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2OrganizationsOrganizationIdCustomerResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdFilesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]File + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdFilesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdFilesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2OrganizationsOrganizationIdFilesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *File + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2OrganizationsOrganizationIdFilesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2OrganizationsOrganizationIdFilesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdFilesFileIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *File + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdFilesFileIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdFilesFileIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdInvitationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]OrganizationInvitation + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdInvitationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdInvitationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdPaymentMethodsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]PaymentMethod + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdPaymentMethodsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdPaymentMethodsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdProjectsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Project + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdProjectsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdProjectsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdQuotasResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Quota + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdQuotasResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdQuotasResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdRegionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Region + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdRegionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdRegionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdRemainingBudgetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *OrganizationRemainingBudget + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdRemainingBudgetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdRemainingBudgetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdSecretsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Secret + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdSecretsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdSecretsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2OrganizationsOrganizationIdSecretsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Secret + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2OrganizationsOrganizationIdSecretsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2OrganizationsOrganizationIdSecretsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdSubscriptionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Subscription + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdSubscriptionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdSubscriptionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2OrganizationsOrganizationIdUsersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]OrganizationUser + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2OrganizationsOrganizationIdUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2OrganizationsOrganizationIdUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2OrganizationsOrganizationIdUsersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *OrganizationRole + JSON201 *OrganizationRole + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2OrganizationsOrganizationIdUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2OrganizationsOrganizationIdUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ProductsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Product + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ProductsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ProductsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ProductsClustersPriceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ProductPricing + JSON401 *N401 + JSON404 *N401 + JSON500 *N401 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ProductsClustersPriceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ProductsClustersPriceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ProductsKindResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Product + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ProductsKindResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ProductsKindResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ProjectsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Project + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ProjectsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ProjectsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2ProjectsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Project + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2ProjectsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2ProjectsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2ProjectsProjectIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2ProjectsProjectIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2ProjectsProjectIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ProjectsProjectIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Project + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ProjectsProjectIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ProjectsProjectIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiV2ProjectsProjectIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Project + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PatchApiV2ProjectsProjectIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiV2ProjectsProjectIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ProjectsProjectIdClustersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Cluster + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ProjectsProjectIdClustersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ProjectsProjectIdClustersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2ProjectsProjectIdUsersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ProjectUser + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2ProjectsProjectIdUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2ProjectsProjectIdUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2ProjectsProjectIdUsersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ProjectRole + JSON201 *ProjectRole + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2ProjectsProjectIdUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2ProjectsProjectIdUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2RegionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Region + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2RegionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2RegionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2RegionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Region + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2RegionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2RegionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2RegionsRegionNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2RegionsRegionNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2RegionsRegionNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2RegionsRegionNameInstallTokenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *InstallToken + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2RegionsRegionNameInstallTokenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2RegionsRegionNameInstallTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2RegionsRegionNameVerifyBackupLocationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ProjectBackupLocationVerifyResponse + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2RegionsRegionNameVerifyBackupLocationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2RegionsRegionNameVerifyBackupLocationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2RolesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Role + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2RolesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2RolesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SetupPaymentIntent + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2StripeCardOrganizationsOrganizationIdSetupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SetupIntent + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2StripeCardOrganizationsOrganizationIdSetupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2StripeCardOrganizationsOrganizationIdSetupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *BillingInformation + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *BillingInformation + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2StripeOrganizationsOrganizationIdCardsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]CustomerCard + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2StripeOrganizationsOrganizationIdCardsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2StripeOrganizationsOrganizationIdCardsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CustomerCard + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CustomerCard + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SetupPaymentIntent + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2StripeOrganizationsOrganizationIdSetupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SetupIntent + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2StripeOrganizationsOrganizationIdSetupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2StripeOrganizationsOrganizationIdSetupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2StripeOrganizationsOrganizationIdValidateCardResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ValidateCard + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2StripeOrganizationsOrganizationIdValidateCardResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2StripeOrganizationsOrganizationIdValidateCardResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2StripePromotionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Promotion + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2StripePromotionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2StripePromotionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2StripeSubscriptionsSubscriptionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2StripeSubscriptionsSubscriptionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2StripeSubscriptionsSubscriptionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2StripeSubscriptionsSubscriptionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2StripeSubscriptionsSubscriptionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2StripeSubscriptionsSubscriptionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]InvoiceConsumption + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *InvoiceConsumption + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2SubscriptionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]Subscription + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2SubscriptionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2SubscriptionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2SubscriptionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Subscription + JSON400 *N400 + JSON401 *N401 + JSON403 *N403 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2SubscriptionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2SubscriptionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2SubscriptionsSubscriptionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2SubscriptionsSubscriptionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2SubscriptionsSubscriptionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2SubscriptionsSubscriptionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2SubscriptionsSubscriptionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2SubscriptionsSubscriptionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Subscription + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2UsersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]User + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2UsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2UsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2UsersMeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CurrentUser + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2UsersMeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2UsersMeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiV2UsersMeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CurrentUser + JSON202 *struct { + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + Success *bool `json:"success,omitempty"` + } + JSON400 *N400 + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PatchApiV2UsersMeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiV2UsersMeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2UsersMeAcceptInviteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *OrganizationRole + JSON201 *OrganizationRole + JSON400 *N400 + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2UsersMeAcceptInviteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2UsersMeAcceptInviteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2UsersMeApiKeysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]NewApiKeySchema + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2UsersMeApiKeysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2UsersMeApiKeysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostApiV2UsersMeApiKeysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *NewApiKeyResponseSchema + JSON400 *N400 + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PostApiV2UsersMeApiKeysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiV2UsersMeApiKeysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2UsersMeApiKeysApiKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2UsersMeApiKeysApiKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2UsersMeApiKeysApiKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV2UsersMeApiKeysApiKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *NewApiKeySchema + JSON401 *N401 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r GetApiV2UsersMeApiKeysApiKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV2UsersMeApiKeysApiKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchApiV2UsersMeApiKeysApiKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *NewApiKeySchema + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PatchApiV2UsersMeApiKeysApiKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchApiV2UsersMeApiKeysApiKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutApiV2UsersMeConfirmEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CurrentUser + JSON400 *N400 + JSON401 *N401 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r PutApiV2UsersMeConfirmEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutApiV2UsersMeConfirmEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiV2UsersUserIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *N401 + JSON403 *N403 + JSON404 *N404 + JSON500 *N500 +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV2UsersUserIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV2UsersUserIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// GetApiV2AwsSubscriptionsSubscriptionIdWithResponse request returning *GetApiV2AwsSubscriptionsSubscriptionIdResponse +func (c *ClientWithResponses) GetApiV2AwsSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2AwsSubscriptionsSubscriptionIdResponse, error) { + rsp, err := c.GetApiV2AwsSubscriptionsSubscriptionId(ctx, subscriptionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2AwsSubscriptionsSubscriptionIdResponse(rsp) +} + +// PatchApiV2AwsSubscriptionsSubscriptionIdWithBodyWithResponse request with arbitrary body returning *PatchApiV2AwsSubscriptionsSubscriptionIdResponse +func (c *ClientWithResponses) PatchApiV2AwsSubscriptionsSubscriptionIdWithBodyWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2AwsSubscriptionsSubscriptionIdResponse, error) { + rsp, err := c.PatchApiV2AwsSubscriptionsSubscriptionIdWithBody(ctx, subscriptionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2AwsSubscriptionsSubscriptionIdResponse(rsp) +} + +func (c *ClientWithResponses) PatchApiV2AwsSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, body PatchApiV2AwsSubscriptionsSubscriptionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2AwsSubscriptionsSubscriptionIdResponse, error) { + rsp, err := c.PatchApiV2AwsSubscriptionsSubscriptionId(ctx, subscriptionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2AwsSubscriptionsSubscriptionIdResponse(rsp) +} + +// GetApiV2AzureSubscriptionsSubscriptionIdWithResponse request returning *GetApiV2AzureSubscriptionsSubscriptionIdResponse +func (c *ClientWithResponses) GetApiV2AzureSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2AzureSubscriptionsSubscriptionIdResponse, error) { + rsp, err := c.GetApiV2AzureSubscriptionsSubscriptionId(ctx, subscriptionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2AzureSubscriptionsSubscriptionIdResponse(rsp) +} + +// GetApiV2ClustersWithResponse request returning *GetApiV2ClustersResponse +func (c *ClientWithResponses) GetApiV2ClustersWithResponse(ctx context.Context, params *GetApiV2ClustersParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersResponse, error) { + rsp, err := c.GetApiV2Clusters(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersResponse(rsp) +} + +// HeadApiV2ClustersNameNameWithResponse request returning *HeadApiV2ClustersNameNameResponse +func (c *ClientWithResponses) HeadApiV2ClustersNameNameWithResponse(ctx context.Context, name PathName, reqEditors ...RequestEditorFn) (*HeadApiV2ClustersNameNameResponse, error) { + rsp, err := c.HeadApiV2ClustersNameName(ctx, name, reqEditors...) + if err != nil { + return nil, err + } + return ParseHeadApiV2ClustersNameNameResponse(rsp) +} + +// DeleteApiV2ClustersClusterIdWithResponse request returning *DeleteApiV2ClustersClusterIdResponse +func (c *ClientWithResponses) DeleteApiV2ClustersClusterIdWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*DeleteApiV2ClustersClusterIdResponse, error) { + rsp, err := c.DeleteApiV2ClustersClusterId(ctx, clusterId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2ClustersClusterIdResponse(rsp) +} + +// GetApiV2ClustersClusterIdWithResponse request returning *GetApiV2ClustersClusterIdResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdResponse, error) { + rsp, err := c.GetApiV2ClustersClusterId(ctx, clusterId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdResponse(rsp) +} + +// PatchApiV2ClustersClusterIdWithBodyWithResponse request with arbitrary body returning *PatchApiV2ClustersClusterIdResponse +func (c *ClientWithResponses) PatchApiV2ClustersClusterIdWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2ClustersClusterIdResponse, error) { + rsp, err := c.PatchApiV2ClustersClusterIdWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2ClustersClusterIdResponse(rsp) +} + +func (c *ClientWithResponses) PatchApiV2ClustersClusterIdWithResponse(ctx context.Context, clusterId PathClusterId, body PatchApiV2ClustersClusterIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2ClustersClusterIdResponse, error) { + rsp, err := c.PatchApiV2ClustersClusterId(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2ClustersClusterIdResponse(rsp) +} + +// GetApiV2ClustersClusterIdAvailableProductsWithResponse request returning *GetApiV2ClustersClusterIdAvailableProductsResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdAvailableProductsWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdAvailableProductsResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdAvailableProducts(ctx, clusterId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdAvailableProductsResponse(rsp) +} + +// GetApiV2ClustersClusterIdAvailableUpgradesWithResponse request returning *GetApiV2ClustersClusterIdAvailableUpgradesResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdAvailableUpgradesWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdAvailableUpgradesResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdAvailableUpgrades(ctx, clusterId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdAvailableUpgradesResponse(rsp) +} + +// PutApiV2ClustersClusterIdBackupScheduleWithBodyWithResponse request with arbitrary body returning *PutApiV2ClustersClusterIdBackupScheduleResponse +func (c *ClientWithResponses) PutApiV2ClustersClusterIdBackupScheduleWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdBackupScheduleResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdBackupScheduleWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdBackupScheduleResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2ClustersClusterIdBackupScheduleWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdBackupScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdBackupScheduleResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdBackupSchedule(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdBackupScheduleResponse(rsp) +} + +// PutApiV2ClustersClusterIdDeletionProtectionWithBodyWithResponse request with arbitrary body returning *PutApiV2ClustersClusterIdDeletionProtectionResponse +func (c *ClientWithResponses) PutApiV2ClustersClusterIdDeletionProtectionWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdDeletionProtectionResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdDeletionProtectionWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdDeletionProtectionResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2ClustersClusterIdDeletionProtectionWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdDeletionProtectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdDeletionProtectionResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdDeletionProtection(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdDeletionProtectionResponse(rsp) +} + +// GetApiV2ClustersClusterIdExportJobsWithResponse request returning *GetApiV2ClustersClusterIdExportJobsResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdExportJobsWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdExportJobsResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdExportJobs(ctx, clusterId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdExportJobsResponse(rsp) +} + +// PostApiV2ClustersClusterIdExportJobsWithBodyWithResponse request with arbitrary body returning *PostApiV2ClustersClusterIdExportJobsResponse +func (c *ClientWithResponses) PostApiV2ClustersClusterIdExportJobsWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdExportJobsResponse, error) { + rsp, err := c.PostApiV2ClustersClusterIdExportJobsWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ClustersClusterIdExportJobsResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2ClustersClusterIdExportJobsWithResponse(ctx context.Context, clusterId PathClusterId, body PostApiV2ClustersClusterIdExportJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdExportJobsResponse, error) { + rsp, err := c.PostApiV2ClustersClusterIdExportJobs(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ClustersClusterIdExportJobsResponse(rsp) +} + +// DeleteApiV2ClustersClusterIdExportJobsExportJobIdWithResponse request returning *DeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse +func (c *ClientWithResponses) DeleteApiV2ClustersClusterIdExportJobsExportJobIdWithResponse(ctx context.Context, clusterId PathClusterId, exportJobId PathExportJobId, reqEditors ...RequestEditorFn) (*DeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse, error) { + rsp, err := c.DeleteApiV2ClustersClusterIdExportJobsExportJobId(ctx, clusterId, exportJobId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse(rsp) +} + +// GetApiV2ClustersClusterIdExportJobsExportJobIdWithResponse request returning *GetApiV2ClustersClusterIdExportJobsExportJobIdResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdExportJobsExportJobIdWithResponse(ctx context.Context, clusterId PathClusterId, exportJobId PathExportJobId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdExportJobsExportJobIdResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdExportJobsExportJobId(ctx, clusterId, exportJobId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdExportJobsExportJobIdResponse(rsp) +} + +// GetApiV2ClustersClusterIdImportJobsWithResponse request returning *GetApiV2ClustersClusterIdImportJobsResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdImportJobsWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdImportJobsResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdImportJobs(ctx, clusterId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdImportJobsResponse(rsp) +} + +// PostApiV2ClustersClusterIdImportJobsWithBodyWithResponse request with arbitrary body returning *PostApiV2ClustersClusterIdImportJobsResponse +func (c *ClientWithResponses) PostApiV2ClustersClusterIdImportJobsWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdImportJobsResponse, error) { + rsp, err := c.PostApiV2ClustersClusterIdImportJobsWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ClustersClusterIdImportJobsResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2ClustersClusterIdImportJobsWithResponse(ctx context.Context, clusterId PathClusterId, body PostApiV2ClustersClusterIdImportJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdImportJobsResponse, error) { + rsp, err := c.PostApiV2ClustersClusterIdImportJobs(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ClustersClusterIdImportJobsResponse(rsp) +} + +// DeleteApiV2ClustersClusterIdImportJobsImportJobIdWithResponse request returning *DeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse +func (c *ClientWithResponses) DeleteApiV2ClustersClusterIdImportJobsImportJobIdWithResponse(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, reqEditors ...RequestEditorFn) (*DeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse, error) { + rsp, err := c.DeleteApiV2ClustersClusterIdImportJobsImportJobId(ctx, clusterId, importJobId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse(rsp) +} + +// GetApiV2ClustersClusterIdImportJobsImportJobIdWithResponse request returning *GetApiV2ClustersClusterIdImportJobsImportJobIdResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdImportJobsImportJobIdWithResponse(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdImportJobsImportJobIdResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdImportJobsImportJobId(ctx, clusterId, importJobId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdImportJobsImportJobIdResponse(rsp) +} + +// GetApiV2ClustersClusterIdImportJobsImportJobIdProgressWithResponse request returning *GetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdImportJobsImportJobIdProgressWithResponse(ctx context.Context, clusterId PathClusterId, importJobId PathImportJobId, params *GetApiV2ClustersClusterIdImportJobsImportJobIdProgressParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdImportJobsImportJobIdProgress(ctx, clusterId, importJobId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse(rsp) +} + +// PutApiV2ClustersClusterIdIpRestrictionsWithBodyWithResponse request with arbitrary body returning *PutApiV2ClustersClusterIdIpRestrictionsResponse +func (c *ClientWithResponses) PutApiV2ClustersClusterIdIpRestrictionsWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdIpRestrictionsResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdIpRestrictionsWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdIpRestrictionsResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2ClustersClusterIdIpRestrictionsWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdIpRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdIpRestrictionsResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdIpRestrictions(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdIpRestrictionsResponse(rsp) +} + +// GetApiV2ClustersClusterIdJwtWithResponse request returning *GetApiV2ClustersClusterIdJwtResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdJwtWithResponse(ctx context.Context, clusterId PathClusterId, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdJwtResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdJwt(ctx, clusterId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdJwtResponse(rsp) +} + +// GetApiV2ClustersClusterIdMetricsMetricIdWithResponse request returning *GetApiV2ClustersClusterIdMetricsMetricIdResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdMetricsMetricIdWithResponse(ctx context.Context, clusterId PathClusterId, metricId GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId, params *GetApiV2ClustersClusterIdMetricsMetricIdParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdMetricsMetricIdResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdMetricsMetricId(ctx, clusterId, metricId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdMetricsMetricIdResponse(rsp) +} + +// DeleteApiV2ClustersClusterIdNodesOrdinalWithResponse request returning *DeleteApiV2ClustersClusterIdNodesOrdinalResponse +func (c *ClientWithResponses) DeleteApiV2ClustersClusterIdNodesOrdinalWithResponse(ctx context.Context, clusterId PathClusterId, ordinal PathOrdinal, reqEditors ...RequestEditorFn) (*DeleteApiV2ClustersClusterIdNodesOrdinalResponse, error) { + rsp, err := c.DeleteApiV2ClustersClusterIdNodesOrdinal(ctx, clusterId, ordinal, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2ClustersClusterIdNodesOrdinalResponse(rsp) +} + +// GetApiV2ClustersClusterIdOperationsWithResponse request returning *GetApiV2ClustersClusterIdOperationsResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdOperationsWithResponse(ctx context.Context, clusterId PathClusterId, params *GetApiV2ClustersClusterIdOperationsParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdOperationsResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdOperations(ctx, clusterId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdOperationsResponse(rsp) +} + +// PutApiV2ClustersClusterIdProductWithBodyWithResponse request with arbitrary body returning *PutApiV2ClustersClusterIdProductResponse +func (c *ClientWithResponses) PutApiV2ClustersClusterIdProductWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdProductResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdProductWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdProductResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2ClustersClusterIdProductWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdProductJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdProductResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdProduct(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdProductResponse(rsp) +} + +// PutApiV2ClustersClusterIdScaleWithBodyWithResponse request with arbitrary body returning *PutApiV2ClustersClusterIdScaleResponse +func (c *ClientWithResponses) PutApiV2ClustersClusterIdScaleWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdScaleResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdScaleWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdScaleResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2ClustersClusterIdScaleWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdScaleJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdScaleResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdScale(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdScaleResponse(rsp) +} + +// GetApiV2ClustersClusterIdSnapshotsWithResponse request returning *GetApiV2ClustersClusterIdSnapshotsResponse +func (c *ClientWithResponses) GetApiV2ClustersClusterIdSnapshotsWithResponse(ctx context.Context, clusterId PathClusterId, params *GetApiV2ClustersClusterIdSnapshotsParams, reqEditors ...RequestEditorFn) (*GetApiV2ClustersClusterIdSnapshotsResponse, error) { + rsp, err := c.GetApiV2ClustersClusterIdSnapshots(ctx, clusterId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ClustersClusterIdSnapshotsResponse(rsp) +} + +// PostApiV2ClustersClusterIdSnapshotsRestoreWithBodyWithResponse request with arbitrary body returning *PostApiV2ClustersClusterIdSnapshotsRestoreResponse +func (c *ClientWithResponses) PostApiV2ClustersClusterIdSnapshotsRestoreWithBodyWithResponse(ctx context.Context, clusterId PathTargetClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdSnapshotsRestoreResponse, error) { + rsp, err := c.PostApiV2ClustersClusterIdSnapshotsRestoreWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ClustersClusterIdSnapshotsRestoreResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2ClustersClusterIdSnapshotsRestoreWithResponse(ctx context.Context, clusterId PathTargetClusterId, body PostApiV2ClustersClusterIdSnapshotsRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ClustersClusterIdSnapshotsRestoreResponse, error) { + rsp, err := c.PostApiV2ClustersClusterIdSnapshotsRestore(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ClustersClusterIdSnapshotsRestoreResponse(rsp) +} + +// PutApiV2ClustersClusterIdStorageWithBodyWithResponse request with arbitrary body returning *PutApiV2ClustersClusterIdStorageResponse +func (c *ClientWithResponses) PutApiV2ClustersClusterIdStorageWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdStorageResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdStorageWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdStorageResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2ClustersClusterIdStorageWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdStorageResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdStorage(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdStorageResponse(rsp) +} + +// PutApiV2ClustersClusterIdSuspendWithBodyWithResponse request with arbitrary body returning *PutApiV2ClustersClusterIdSuspendResponse +func (c *ClientWithResponses) PutApiV2ClustersClusterIdSuspendWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdSuspendResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdSuspendWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdSuspendResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2ClustersClusterIdSuspendWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdSuspendJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdSuspendResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdSuspend(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdSuspendResponse(rsp) +} + +// PutApiV2ClustersClusterIdUpgradeWithBodyWithResponse request with arbitrary body returning *PutApiV2ClustersClusterIdUpgradeResponse +func (c *ClientWithResponses) PutApiV2ClustersClusterIdUpgradeWithBodyWithResponse(ctx context.Context, clusterId PathClusterId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdUpgradeResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdUpgradeWithBody(ctx, clusterId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdUpgradeResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2ClustersClusterIdUpgradeWithResponse(ctx context.Context, clusterId PathClusterId, body PutApiV2ClustersClusterIdUpgradeJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ClustersClusterIdUpgradeResponse, error) { + rsp, err := c.PutApiV2ClustersClusterIdUpgrade(ctx, clusterId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ClustersClusterIdUpgradeResponse(rsp) +} + +// GetApiV2ConfigurationsWithResponse request returning *GetApiV2ConfigurationsResponse +func (c *ClientWithResponses) GetApiV2ConfigurationsWithResponse(ctx context.Context, params *GetApiV2ConfigurationsParams, reqEditors ...RequestEditorFn) (*GetApiV2ConfigurationsResponse, error) { + rsp, err := c.GetApiV2Configurations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ConfigurationsResponse(rsp) +} + +// GetApiV2ConfigurationsKeyWithResponse request returning *GetApiV2ConfigurationsKeyResponse +func (c *ClientWithResponses) GetApiV2ConfigurationsKeyWithResponse(ctx context.Context, key PathConfigurationKey, params *GetApiV2ConfigurationsKeyParams, reqEditors ...RequestEditorFn) (*GetApiV2ConfigurationsKeyResponse, error) { + rsp, err := c.GetApiV2ConfigurationsKey(ctx, key, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ConfigurationsKeyResponse(rsp) +} + +// PutApiV2ConfigurationsKeyWithBodyWithResponse request with arbitrary body returning *PutApiV2ConfigurationsKeyResponse +func (c *ClientWithResponses) PutApiV2ConfigurationsKeyWithBodyWithResponse(ctx context.Context, key PathConfigurationKey, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2ConfigurationsKeyResponse, error) { + rsp, err := c.PutApiV2ConfigurationsKeyWithBody(ctx, key, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ConfigurationsKeyResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2ConfigurationsKeyWithResponse(ctx context.Context, key PathConfigurationKey, body PutApiV2ConfigurationsKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2ConfigurationsKeyResponse, error) { + rsp, err := c.PutApiV2ConfigurationsKey(ctx, key, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2ConfigurationsKeyResponse(rsp) +} + +// GetApiV2FeaturesStatusWithResponse request returning *GetApiV2FeaturesStatusResponse +func (c *ClientWithResponses) GetApiV2FeaturesStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2FeaturesStatusResponse, error) { + rsp, err := c.GetApiV2FeaturesStatus(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2FeaturesStatusResponse(rsp) +} + +// GetApiV2GcpSubscriptionsSubscriptionIdWithResponse request returning *GetApiV2GcpSubscriptionsSubscriptionIdResponse +func (c *ClientWithResponses) GetApiV2GcpSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2GcpSubscriptionsSubscriptionIdResponse, error) { + rsp, err := c.GetApiV2GcpSubscriptionsSubscriptionId(ctx, subscriptionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2GcpSubscriptionsSubscriptionIdResponse(rsp) +} + +// GetApiV2IntegrationsAwsS3BucketsWithResponse request returning *GetApiV2IntegrationsAwsS3BucketsResponse +func (c *ClientWithResponses) GetApiV2IntegrationsAwsS3BucketsWithResponse(ctx context.Context, params *GetApiV2IntegrationsAwsS3BucketsParams, reqEditors ...RequestEditorFn) (*GetApiV2IntegrationsAwsS3BucketsResponse, error) { + rsp, err := c.GetApiV2IntegrationsAwsS3Buckets(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2IntegrationsAwsS3BucketsResponse(rsp) +} + +// GetApiV2IntegrationsAwsS3ObjectsWithResponse request returning *GetApiV2IntegrationsAwsS3ObjectsResponse +func (c *ClientWithResponses) GetApiV2IntegrationsAwsS3ObjectsWithResponse(ctx context.Context, params *GetApiV2IntegrationsAwsS3ObjectsParams, reqEditors ...RequestEditorFn) (*GetApiV2IntegrationsAwsS3ObjectsResponse, error) { + rsp, err := c.GetApiV2IntegrationsAwsS3Objects(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2IntegrationsAwsS3ObjectsResponse(rsp) +} + +// GetApiV2IntegrationsAzureBlobStorageContainersWithResponse request returning *GetApiV2IntegrationsAzureBlobStorageContainersResponse +func (c *ClientWithResponses) GetApiV2IntegrationsAzureBlobStorageContainersWithResponse(ctx context.Context, params *GetApiV2IntegrationsAzureBlobStorageContainersParams, reqEditors ...RequestEditorFn) (*GetApiV2IntegrationsAzureBlobStorageContainersResponse, error) { + rsp, err := c.GetApiV2IntegrationsAzureBlobStorageContainers(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2IntegrationsAzureBlobStorageContainersResponse(rsp) +} + +// GetApiV2IntegrationsAzureBlobsWithResponse request returning *GetApiV2IntegrationsAzureBlobsResponse +func (c *ClientWithResponses) GetApiV2IntegrationsAzureBlobsWithResponse(ctx context.Context, params *GetApiV2IntegrationsAzureBlobsParams, reqEditors ...RequestEditorFn) (*GetApiV2IntegrationsAzureBlobsResponse, error) { + rsp, err := c.GetApiV2IntegrationsAzureBlobs(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2IntegrationsAzureBlobsResponse(rsp) +} + +// GetApiV2MetaWithResponse request returning *GetApiV2MetaResponse +func (c *ClientWithResponses) GetApiV2MetaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2MetaResponse, error) { + rsp, err := c.GetApiV2Meta(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2MetaResponse(rsp) +} + +// GetApiV2MetaCratedbVersionsWithResponse request returning *GetApiV2MetaCratedbVersionsResponse +func (c *ClientWithResponses) GetApiV2MetaCratedbVersionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2MetaCratedbVersionsResponse, error) { + rsp, err := c.GetApiV2MetaCratedbVersions(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2MetaCratedbVersionsResponse(rsp) +} + +// GetApiV2MetaIpAddressWithResponse request returning *GetApiV2MetaIpAddressResponse +func (c *ClientWithResponses) GetApiV2MetaIpAddressWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2MetaIpAddressResponse, error) { + rsp, err := c.GetApiV2MetaIpAddress(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2MetaIpAddressResponse(rsp) +} + +// GetApiV2MetaJwkWithResponse request returning *GetApiV2MetaJwkResponse +func (c *ClientWithResponses) GetApiV2MetaJwkWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2MetaJwkResponse, error) { + rsp, err := c.GetApiV2MetaJwk(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2MetaJwkResponse(rsp) +} + +// PostApiV2MetaJwtRefreshWithBodyWithResponse request with arbitrary body returning *PostApiV2MetaJwtRefreshResponse +func (c *ClientWithResponses) PostApiV2MetaJwtRefreshWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2MetaJwtRefreshResponse, error) { + rsp, err := c.PostApiV2MetaJwtRefreshWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2MetaJwtRefreshResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2MetaJwtRefreshWithResponse(ctx context.Context, body PostApiV2MetaJwtRefreshJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2MetaJwtRefreshResponse, error) { + rsp, err := c.PostApiV2MetaJwtRefresh(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2MetaJwtRefreshResponse(rsp) +} + +// GetApiV2OrganizationsWithResponse request returning *GetApiV2OrganizationsResponse +func (c *ClientWithResponses) GetApiV2OrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsResponse, error) { + rsp, err := c.GetApiV2Organizations(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsResponse(rsp) +} + +// PostApiV2OrganizationsWithBodyWithResponse request with arbitrary body returning *PostApiV2OrganizationsResponse +func (c *ClientWithResponses) PostApiV2OrganizationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsResponse, error) { + rsp, err := c.PostApiV2OrganizationsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2OrganizationsWithResponse(ctx context.Context, body PostApiV2OrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsResponse, error) { + rsp, err := c.PostApiV2Organizations(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsResponse(rsp) +} + +// DeleteApiV2OrganizationsOrganizationIdWithResponse request returning *DeleteApiV2OrganizationsOrganizationIdResponse +func (c *ClientWithResponses) DeleteApiV2OrganizationsOrganizationIdWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdResponse, error) { + rsp, err := c.DeleteApiV2OrganizationsOrganizationId(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2OrganizationsOrganizationIdResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdWithResponse request returning *GetApiV2OrganizationsOrganizationIdResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationId(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdResponse(rsp) +} + +// PutApiV2OrganizationsOrganizationIdWithBodyWithResponse request with arbitrary body returning *PutApiV2OrganizationsOrganizationIdResponse +func (c *ClientWithResponses) PutApiV2OrganizationsOrganizationIdWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2OrganizationsOrganizationIdResponse, error) { + rsp, err := c.PutApiV2OrganizationsOrganizationIdWithBody(ctx, organizationId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2OrganizationsOrganizationIdResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2OrganizationsOrganizationIdWithResponse(ctx context.Context, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2OrganizationsOrganizationIdResponse, error) { + rsp, err := c.PutApiV2OrganizationsOrganizationId(ctx, organizationId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2OrganizationsOrganizationIdResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdAuditlogsWithResponse request returning *GetApiV2OrganizationsOrganizationIdAuditlogsResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdAuditlogsWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdAuditlogsParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdAuditlogsResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdAuditlogs(ctx, organizationId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdAuditlogsResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdClustersWithResponse request returning *GetApiV2OrganizationsOrganizationIdClustersResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdClustersWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdClustersParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdClustersResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdClusters(ctx, organizationId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdClustersResponse(rsp) +} + +// PostApiV2OrganizationsOrganizationIdClustersWithBodyWithResponse request with arbitrary body returning *PostApiV2OrganizationsOrganizationIdClustersResponse +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdClustersWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdClustersResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdClustersWithBody(ctx, organizationId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdClustersResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdClustersWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdClustersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdClustersResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdClusters(ctx, organizationId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdClustersResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthWithResponse request returning *GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonth(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdCreditsWithResponse request returning *GetApiV2OrganizationsOrganizationIdCreditsResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdCreditsWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdCreditsParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdCreditsResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdCredits(ctx, organizationId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdCreditsResponse(rsp) +} + +// PostApiV2OrganizationsOrganizationIdCreditsWithBodyWithResponse request with arbitrary body returning *PostApiV2OrganizationsOrganizationIdCreditsResponse +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdCreditsWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdCreditsResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdCreditsWithBody(ctx, organizationId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdCreditsResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdCreditsWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdCreditsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdCreditsResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdCredits(ctx, organizationId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdCreditsResponse(rsp) +} + +// DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdWithResponse request returning *DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse +func (c *ClientWithResponses) DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdWithResponse(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse, error) { + rsp, err := c.DeleteApiV2OrganizationsOrganizationIdCreditsCreditId(ctx, organizationId, creditId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse(rsp) +} + +// PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithBodyWithResponse request with arbitrary body returning *PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse +func (c *ClientWithResponses) PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse, error) { + rsp, err := c.PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithBody(ctx, organizationId, creditId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse(rsp) +} + +func (c *ClientWithResponses) PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithResponse(ctx context.Context, organizationId PathOrganizationId, creditId PathCreditId, body PatchApiV2OrganizationsOrganizationIdCreditsCreditIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse, error) { + rsp, err := c.PatchApiV2OrganizationsOrganizationIdCreditsCreditId(ctx, organizationId, creditId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdCustomerWithResponse request returning *GetApiV2OrganizationsOrganizationIdCustomerResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdCustomerWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdCustomerResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdCustomer(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdCustomerResponse(rsp) +} + +// PutApiV2OrganizationsOrganizationIdCustomerWithBodyWithResponse request with arbitrary body returning *PutApiV2OrganizationsOrganizationIdCustomerResponse +func (c *ClientWithResponses) PutApiV2OrganizationsOrganizationIdCustomerWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2OrganizationsOrganizationIdCustomerResponse, error) { + rsp, err := c.PutApiV2OrganizationsOrganizationIdCustomerWithBody(ctx, organizationId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2OrganizationsOrganizationIdCustomerResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2OrganizationsOrganizationIdCustomerWithResponse(ctx context.Context, organizationId PathOrganizationId, body PutApiV2OrganizationsOrganizationIdCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2OrganizationsOrganizationIdCustomerResponse, error) { + rsp, err := c.PutApiV2OrganizationsOrganizationIdCustomer(ctx, organizationId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2OrganizationsOrganizationIdCustomerResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdFilesWithResponse request returning *GetApiV2OrganizationsOrganizationIdFilesResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdFilesWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdFilesResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdFiles(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdFilesResponse(rsp) +} + +// PostApiV2OrganizationsOrganizationIdFilesWithBodyWithResponse request with arbitrary body returning *PostApiV2OrganizationsOrganizationIdFilesResponse +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdFilesWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdFilesResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdFilesWithBody(ctx, organizationId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdFilesResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdFilesWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdFilesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdFilesResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdFiles(ctx, organizationId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdFilesResponse(rsp) +} + +// DeleteApiV2OrganizationsOrganizationIdFilesFileIdWithResponse request returning *DeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse +func (c *ClientWithResponses) DeleteApiV2OrganizationsOrganizationIdFilesFileIdWithResponse(ctx context.Context, organizationId PathOrganizationId, fileId PathFileId, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse, error) { + rsp, err := c.DeleteApiV2OrganizationsOrganizationIdFilesFileId(ctx, organizationId, fileId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdFilesFileIdWithResponse request returning *GetApiV2OrganizationsOrganizationIdFilesFileIdResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdFilesFileIdWithResponse(ctx context.Context, organizationId PathOrganizationId, fileId PathFileId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdFilesFileIdResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdFilesFileId(ctx, organizationId, fileId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdFilesFileIdResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdInvitationsWithResponse request returning *GetApiV2OrganizationsOrganizationIdInvitationsResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdInvitationsWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdInvitationsParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdInvitationsResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdInvitations(ctx, organizationId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdInvitationsResponse(rsp) +} + +// DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenWithResponse request returning *DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse +func (c *ClientWithResponses) DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenWithResponse(ctx context.Context, organizationId PathOrganizationId, inviteToken PathInviteToken, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse, error) { + rsp, err := c.DeleteApiV2OrganizationsOrganizationIdInvitationsInviteToken(ctx, organizationId, inviteToken, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdMetricsPrometheusWithResponse request returning *GetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdMetricsPrometheusWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdMetricsPrometheus(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdPaymentMethodsWithResponse request returning *GetApiV2OrganizationsOrganizationIdPaymentMethodsResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdPaymentMethodsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdPaymentMethodsResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdPaymentMethods(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdPaymentMethodsResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdProjectsWithResponse request returning *GetApiV2OrganizationsOrganizationIdProjectsResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdProjectsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdProjectsResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdProjects(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdProjectsResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdQuotasWithResponse request returning *GetApiV2OrganizationsOrganizationIdQuotasResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdQuotasWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdQuotasResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdQuotas(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdQuotasResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdRegionsWithResponse request returning *GetApiV2OrganizationsOrganizationIdRegionsResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdRegionsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdRegionsResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdRegions(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdRegionsResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdRemainingBudgetWithResponse request returning *GetApiV2OrganizationsOrganizationIdRemainingBudgetResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdRemainingBudgetWithResponse(ctx context.Context, organizationId PathOrganizationId, params *GetApiV2OrganizationsOrganizationIdRemainingBudgetParams, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdRemainingBudgetResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdRemainingBudget(ctx, organizationId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdRemainingBudgetResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdSecretsWithResponse request returning *GetApiV2OrganizationsOrganizationIdSecretsResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdSecretsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdSecretsResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdSecrets(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdSecretsResponse(rsp) +} + +// PostApiV2OrganizationsOrganizationIdSecretsWithBodyWithResponse request with arbitrary body returning *PostApiV2OrganizationsOrganizationIdSecretsResponse +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdSecretsWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdSecretsResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdSecretsWithBody(ctx, organizationId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdSecretsResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdSecretsWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdSecretsResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdSecrets(ctx, organizationId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdSecretsResponse(rsp) +} + +// DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdWithResponse request returning *DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse +func (c *ClientWithResponses) DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdWithResponse(ctx context.Context, organizationId PathOrganizationId, secretId PathOrganizationSecretId, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse, error) { + rsp, err := c.DeleteApiV2OrganizationsOrganizationIdSecretsSecretId(ctx, organizationId, secretId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdSubscriptionsWithResponse request returning *GetApiV2OrganizationsOrganizationIdSubscriptionsResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdSubscriptionsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdSubscriptionsResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdSubscriptions(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdSubscriptionsResponse(rsp) +} + +// GetApiV2OrganizationsOrganizationIdUsersWithResponse request returning *GetApiV2OrganizationsOrganizationIdUsersResponse +func (c *ClientWithResponses) GetApiV2OrganizationsOrganizationIdUsersWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2OrganizationsOrganizationIdUsersResponse, error) { + rsp, err := c.GetApiV2OrganizationsOrganizationIdUsers(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2OrganizationsOrganizationIdUsersResponse(rsp) +} + +// PostApiV2OrganizationsOrganizationIdUsersWithBodyWithResponse request with arbitrary body returning *PostApiV2OrganizationsOrganizationIdUsersResponse +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdUsersWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdUsersResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdUsersWithBody(ctx, organizationId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdUsersResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2OrganizationsOrganizationIdUsersWithResponse(ctx context.Context, organizationId PathOrganizationId, body PostApiV2OrganizationsOrganizationIdUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2OrganizationsOrganizationIdUsersResponse, error) { + rsp, err := c.PostApiV2OrganizationsOrganizationIdUsers(ctx, organizationId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2OrganizationsOrganizationIdUsersResponse(rsp) +} + +// DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailWithResponse request returning *DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse +func (c *ClientWithResponses) DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailWithResponse(ctx context.Context, organizationId PathOrganizationId, userIdOrEmail PathUserIdOrEmail, reqEditors ...RequestEditorFn) (*DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse, error) { + rsp, err := c.DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmail(ctx, organizationId, userIdOrEmail, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse(rsp) +} + +// GetApiV2ProductsWithResponse request returning *GetApiV2ProductsResponse +func (c *ClientWithResponses) GetApiV2ProductsWithResponse(ctx context.Context, params *GetApiV2ProductsParams, reqEditors ...RequestEditorFn) (*GetApiV2ProductsResponse, error) { + rsp, err := c.GetApiV2Products(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ProductsResponse(rsp) +} + +// GetApiV2ProductsClustersPriceWithResponse request returning *GetApiV2ProductsClustersPriceResponse +func (c *ClientWithResponses) GetApiV2ProductsClustersPriceWithResponse(ctx context.Context, params *GetApiV2ProductsClustersPriceParams, reqEditors ...RequestEditorFn) (*GetApiV2ProductsClustersPriceResponse, error) { + rsp, err := c.GetApiV2ProductsClustersPrice(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ProductsClustersPriceResponse(rsp) +} + +// GetApiV2ProductsKindWithResponse request returning *GetApiV2ProductsKindResponse +func (c *ClientWithResponses) GetApiV2ProductsKindWithResponse(ctx context.Context, kind PathProductKind, params *GetApiV2ProductsKindParams, reqEditors ...RequestEditorFn) (*GetApiV2ProductsKindResponse, error) { + rsp, err := c.GetApiV2ProductsKind(ctx, kind, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ProductsKindResponse(rsp) +} + +// GetApiV2ProjectsWithResponse request returning *GetApiV2ProjectsResponse +func (c *ClientWithResponses) GetApiV2ProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2ProjectsResponse, error) { + rsp, err := c.GetApiV2Projects(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ProjectsResponse(rsp) +} + +// PostApiV2ProjectsWithBodyWithResponse request with arbitrary body returning *PostApiV2ProjectsResponse +func (c *ClientWithResponses) PostApiV2ProjectsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ProjectsResponse, error) { + rsp, err := c.PostApiV2ProjectsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ProjectsResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2ProjectsWithResponse(ctx context.Context, body PostApiV2ProjectsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ProjectsResponse, error) { + rsp, err := c.PostApiV2Projects(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ProjectsResponse(rsp) +} + +// DeleteApiV2ProjectsProjectIdWithResponse request returning *DeleteApiV2ProjectsProjectIdResponse +func (c *ClientWithResponses) DeleteApiV2ProjectsProjectIdWithResponse(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*DeleteApiV2ProjectsProjectIdResponse, error) { + rsp, err := c.DeleteApiV2ProjectsProjectId(ctx, projectId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2ProjectsProjectIdResponse(rsp) +} + +// GetApiV2ProjectsProjectIdWithResponse request returning *GetApiV2ProjectsProjectIdResponse +func (c *ClientWithResponses) GetApiV2ProjectsProjectIdWithResponse(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*GetApiV2ProjectsProjectIdResponse, error) { + rsp, err := c.GetApiV2ProjectsProjectId(ctx, projectId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ProjectsProjectIdResponse(rsp) +} + +// PatchApiV2ProjectsProjectIdWithBodyWithResponse request with arbitrary body returning *PatchApiV2ProjectsProjectIdResponse +func (c *ClientWithResponses) PatchApiV2ProjectsProjectIdWithBodyWithResponse(ctx context.Context, projectId PathProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2ProjectsProjectIdResponse, error) { + rsp, err := c.PatchApiV2ProjectsProjectIdWithBody(ctx, projectId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2ProjectsProjectIdResponse(rsp) +} + +func (c *ClientWithResponses) PatchApiV2ProjectsProjectIdWithResponse(ctx context.Context, projectId PathProjectId, body PatchApiV2ProjectsProjectIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2ProjectsProjectIdResponse, error) { + rsp, err := c.PatchApiV2ProjectsProjectId(ctx, projectId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2ProjectsProjectIdResponse(rsp) +} + +// GetApiV2ProjectsProjectIdClustersWithResponse request returning *GetApiV2ProjectsProjectIdClustersResponse +func (c *ClientWithResponses) GetApiV2ProjectsProjectIdClustersWithResponse(ctx context.Context, projectId PathProjectId, params *GetApiV2ProjectsProjectIdClustersParams, reqEditors ...RequestEditorFn) (*GetApiV2ProjectsProjectIdClustersResponse, error) { + rsp, err := c.GetApiV2ProjectsProjectIdClusters(ctx, projectId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ProjectsProjectIdClustersResponse(rsp) +} + +// GetApiV2ProjectsProjectIdUsersWithResponse request returning *GetApiV2ProjectsProjectIdUsersResponse +func (c *ClientWithResponses) GetApiV2ProjectsProjectIdUsersWithResponse(ctx context.Context, projectId PathProjectId, reqEditors ...RequestEditorFn) (*GetApiV2ProjectsProjectIdUsersResponse, error) { + rsp, err := c.GetApiV2ProjectsProjectIdUsers(ctx, projectId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2ProjectsProjectIdUsersResponse(rsp) +} + +// PostApiV2ProjectsProjectIdUsersWithBodyWithResponse request with arbitrary body returning *PostApiV2ProjectsProjectIdUsersResponse +func (c *ClientWithResponses) PostApiV2ProjectsProjectIdUsersWithBodyWithResponse(ctx context.Context, projectId PathProjectId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2ProjectsProjectIdUsersResponse, error) { + rsp, err := c.PostApiV2ProjectsProjectIdUsersWithBody(ctx, projectId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ProjectsProjectIdUsersResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2ProjectsProjectIdUsersWithResponse(ctx context.Context, projectId PathProjectId, body PostApiV2ProjectsProjectIdUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2ProjectsProjectIdUsersResponse, error) { + rsp, err := c.PostApiV2ProjectsProjectIdUsers(ctx, projectId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2ProjectsProjectIdUsersResponse(rsp) +} + +// DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailWithResponse request returning *DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse +func (c *ClientWithResponses) DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailWithResponse(ctx context.Context, projectId PathProjectId, userIdOrEmail PathUserIdOrEmail, reqEditors ...RequestEditorFn) (*DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse, error) { + rsp, err := c.DeleteApiV2ProjectsProjectIdUsersUserIdOrEmail(ctx, projectId, userIdOrEmail, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse(rsp) +} + +// GetApiV2RegionsWithResponse request returning *GetApiV2RegionsResponse +func (c *ClientWithResponses) GetApiV2RegionsWithResponse(ctx context.Context, params *GetApiV2RegionsParams, reqEditors ...RequestEditorFn) (*GetApiV2RegionsResponse, error) { + rsp, err := c.GetApiV2Regions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2RegionsResponse(rsp) +} + +// PostApiV2RegionsWithBodyWithResponse request with arbitrary body returning *PostApiV2RegionsResponse +func (c *ClientWithResponses) PostApiV2RegionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2RegionsResponse, error) { + rsp, err := c.PostApiV2RegionsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2RegionsResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2RegionsWithResponse(ctx context.Context, body PostApiV2RegionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2RegionsResponse, error) { + rsp, err := c.PostApiV2Regions(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2RegionsResponse(rsp) +} + +// DeleteApiV2RegionsRegionNameWithResponse request returning *DeleteApiV2RegionsRegionNameResponse +func (c *ClientWithResponses) DeleteApiV2RegionsRegionNameWithResponse(ctx context.Context, regionName PathRegionName, reqEditors ...RequestEditorFn) (*DeleteApiV2RegionsRegionNameResponse, error) { + rsp, err := c.DeleteApiV2RegionsRegionName(ctx, regionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2RegionsRegionNameResponse(rsp) +} + +// GetApiV2RegionsRegionNameInstallTokenWithResponse request returning *GetApiV2RegionsRegionNameInstallTokenResponse +func (c *ClientWithResponses) GetApiV2RegionsRegionNameInstallTokenWithResponse(ctx context.Context, regionName PathRegionName, reqEditors ...RequestEditorFn) (*GetApiV2RegionsRegionNameInstallTokenResponse, error) { + rsp, err := c.GetApiV2RegionsRegionNameInstallToken(ctx, regionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2RegionsRegionNameInstallTokenResponse(rsp) +} + +// PostApiV2RegionsRegionNameVerifyBackupLocationWithBodyWithResponse request with arbitrary body returning *PostApiV2RegionsRegionNameVerifyBackupLocationResponse +func (c *ClientWithResponses) PostApiV2RegionsRegionNameVerifyBackupLocationWithBodyWithResponse(ctx context.Context, regionName PathRegionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2RegionsRegionNameVerifyBackupLocationResponse, error) { + rsp, err := c.PostApiV2RegionsRegionNameVerifyBackupLocationWithBody(ctx, regionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2RegionsRegionNameVerifyBackupLocationResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2RegionsRegionNameVerifyBackupLocationWithResponse(ctx context.Context, regionName PathRegionName, body PostApiV2RegionsRegionNameVerifyBackupLocationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2RegionsRegionNameVerifyBackupLocationResponse, error) { + rsp, err := c.PostApiV2RegionsRegionNameVerifyBackupLocation(ctx, regionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2RegionsRegionNameVerifyBackupLocationResponse(rsp) +} + +// GetApiV2RolesWithResponse request returning *GetApiV2RolesResponse +func (c *ClientWithResponses) GetApiV2RolesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2RolesResponse, error) { + rsp, err := c.GetApiV2Roles(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2RolesResponse(rsp) +} + +// PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupWithResponse request returning *PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse +func (c *ClientWithResponses) PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse, error) { + rsp, err := c.PostApiV2StripeBankTransferOrganizationsOrganizationIdSetup(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse(rsp) +} + +// PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentWithResponse request returning *PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse +func (c *ClientWithResponses) PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse, error) { + rsp, err := c.PostApiV2StripeCardOrganizationsOrganizationIdSetupPayment(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse(rsp) +} + +// PostApiV2StripeCardOrganizationsOrganizationIdSetupWithResponse request returning *PostApiV2StripeCardOrganizationsOrganizationIdSetupResponse +func (c *ClientWithResponses) PostApiV2StripeCardOrganizationsOrganizationIdSetupWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeCardOrganizationsOrganizationIdSetupResponse, error) { + rsp, err := c.PostApiV2StripeCardOrganizationsOrganizationIdSetup(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2StripeCardOrganizationsOrganizationIdSetupResponse(rsp) +} + +// GetApiV2StripeOrganizationsOrganizationIdBillingInformationWithResponse request returning *GetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse +func (c *ClientWithResponses) GetApiV2StripeOrganizationsOrganizationIdBillingInformationWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse, error) { + rsp, err := c.GetApiV2StripeOrganizationsOrganizationIdBillingInformation(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse(rsp) +} + +// PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithBodyWithResponse request with arbitrary body returning *PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse +func (c *ClientWithResponses) PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse, error) { + rsp, err := c.PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithBody(ctx, organizationId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse(rsp) +} + +func (c *ClientWithResponses) PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithResponse(ctx context.Context, organizationId PathOrganizationId, body PatchApiV2StripeOrganizationsOrganizationIdBillingInformationJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse, error) { + rsp, err := c.PatchApiV2StripeOrganizationsOrganizationIdBillingInformation(ctx, organizationId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse(rsp) +} + +// GetApiV2StripeOrganizationsOrganizationIdCardsWithResponse request returning *GetApiV2StripeOrganizationsOrganizationIdCardsResponse +func (c *ClientWithResponses) GetApiV2StripeOrganizationsOrganizationIdCardsWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*GetApiV2StripeOrganizationsOrganizationIdCardsResponse, error) { + rsp, err := c.GetApiV2StripeOrganizationsOrganizationIdCards(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2StripeOrganizationsOrganizationIdCardsResponse(rsp) +} + +// DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdWithResponse request returning *DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse +func (c *ClientWithResponses) DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdWithResponse(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, reqEditors ...RequestEditorFn) (*DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse, error) { + rsp, err := c.DeleteApiV2StripeOrganizationsOrganizationIdCardsCardId(ctx, organizationId, cardId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse(rsp) +} + +// PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithBodyWithResponse request with arbitrary body returning *PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse +func (c *ClientWithResponses) PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithBodyWithResponse(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse, error) { + rsp, err := c.PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithBody(ctx, organizationId, cardId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse(rsp) +} + +func (c *ClientWithResponses) PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithResponse(ctx context.Context, organizationId PathOrganizationId, cardId PathCardId, body PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse, error) { + rsp, err := c.PatchApiV2StripeOrganizationsOrganizationIdCardsCardId(ctx, organizationId, cardId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse(rsp) +} + +// PostApiV2StripeOrganizationsOrganizationIdSetupPaymentWithResponse request returning *PostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse +func (c *ClientWithResponses) PostApiV2StripeOrganizationsOrganizationIdSetupPaymentWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse, error) { + rsp, err := c.PostApiV2StripeOrganizationsOrganizationIdSetupPayment(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse(rsp) +} + +// PostApiV2StripeOrganizationsOrganizationIdSetupWithResponse request returning *PostApiV2StripeOrganizationsOrganizationIdSetupResponse +func (c *ClientWithResponses) PostApiV2StripeOrganizationsOrganizationIdSetupWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeOrganizationsOrganizationIdSetupResponse, error) { + rsp, err := c.PostApiV2StripeOrganizationsOrganizationIdSetup(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2StripeOrganizationsOrganizationIdSetupResponse(rsp) +} + +// PostApiV2StripeOrganizationsOrganizationIdValidateCardWithResponse request returning *PostApiV2StripeOrganizationsOrganizationIdValidateCardResponse +func (c *ClientWithResponses) PostApiV2StripeOrganizationsOrganizationIdValidateCardWithResponse(ctx context.Context, organizationId PathOrganizationId, reqEditors ...RequestEditorFn) (*PostApiV2StripeOrganizationsOrganizationIdValidateCardResponse, error) { + rsp, err := c.PostApiV2StripeOrganizationsOrganizationIdValidateCard(ctx, organizationId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2StripeOrganizationsOrganizationIdValidateCardResponse(rsp) +} + +// GetApiV2StripePromotionsWithResponse request returning *GetApiV2StripePromotionsResponse +func (c *ClientWithResponses) GetApiV2StripePromotionsWithResponse(ctx context.Context, params *GetApiV2StripePromotionsParams, reqEditors ...RequestEditorFn) (*GetApiV2StripePromotionsResponse, error) { + rsp, err := c.GetApiV2StripePromotions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2StripePromotionsResponse(rsp) +} + +// DeleteApiV2StripeSubscriptionsSubscriptionIdWithResponse request returning *DeleteApiV2StripeSubscriptionsSubscriptionIdResponse +func (c *ClientWithResponses) DeleteApiV2StripeSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*DeleteApiV2StripeSubscriptionsSubscriptionIdResponse, error) { + rsp, err := c.DeleteApiV2StripeSubscriptionsSubscriptionId(ctx, subscriptionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2StripeSubscriptionsSubscriptionIdResponse(rsp) +} + +// GetApiV2StripeSubscriptionsSubscriptionIdWithResponse request returning *GetApiV2StripeSubscriptionsSubscriptionIdResponse +func (c *ClientWithResponses) GetApiV2StripeSubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2StripeSubscriptionsSubscriptionIdResponse, error) { + rsp, err := c.GetApiV2StripeSubscriptionsSubscriptionId(ctx, subscriptionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2StripeSubscriptionsSubscriptionIdResponse(rsp) +} + +// GetApiV2StripeSubscriptionsSubscriptionIdInvoicesWithResponse request returning *GetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse +func (c *ClientWithResponses) GetApiV2StripeSubscriptionsSubscriptionIdInvoicesWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, params *GetApiV2StripeSubscriptionsSubscriptionIdInvoicesParams, reqEditors ...RequestEditorFn) (*GetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse, error) { + rsp, err := c.GetApiV2StripeSubscriptionsSubscriptionIdInvoices(ctx, subscriptionId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse(rsp) +} + +// GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingWithResponse request returning *GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse +func (c *ClientWithResponses) GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse, error) { + rsp, err := c.GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcoming(ctx, subscriptionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse(rsp) +} + +// GetApiV2SubscriptionsWithResponse request returning *GetApiV2SubscriptionsResponse +func (c *ClientWithResponses) GetApiV2SubscriptionsWithResponse(ctx context.Context, params *GetApiV2SubscriptionsParams, reqEditors ...RequestEditorFn) (*GetApiV2SubscriptionsResponse, error) { + rsp, err := c.GetApiV2Subscriptions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2SubscriptionsResponse(rsp) +} + +// PostApiV2SubscriptionsWithBodyWithResponse request with arbitrary body returning *PostApiV2SubscriptionsResponse +func (c *ClientWithResponses) PostApiV2SubscriptionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2SubscriptionsResponse, error) { + rsp, err := c.PostApiV2SubscriptionsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2SubscriptionsResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2SubscriptionsWithResponse(ctx context.Context, body PostApiV2SubscriptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2SubscriptionsResponse, error) { + rsp, err := c.PostApiV2Subscriptions(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2SubscriptionsResponse(rsp) +} + +// DeleteApiV2SubscriptionsSubscriptionIdWithResponse request returning *DeleteApiV2SubscriptionsSubscriptionIdResponse +func (c *ClientWithResponses) DeleteApiV2SubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*DeleteApiV2SubscriptionsSubscriptionIdResponse, error) { + rsp, err := c.DeleteApiV2SubscriptionsSubscriptionId(ctx, subscriptionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2SubscriptionsSubscriptionIdResponse(rsp) +} + +// GetApiV2SubscriptionsSubscriptionIdWithResponse request returning *GetApiV2SubscriptionsSubscriptionIdResponse +func (c *ClientWithResponses) GetApiV2SubscriptionsSubscriptionIdWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2SubscriptionsSubscriptionIdResponse, error) { + rsp, err := c.GetApiV2SubscriptionsSubscriptionId(ctx, subscriptionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2SubscriptionsSubscriptionIdResponse(rsp) +} + +// PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithBodyWithResponse request with arbitrary body returning *PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse +func (c *ClientWithResponses) PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithBodyWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse, error) { + rsp, err := c.PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithBody(ctx, subscriptionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse(rsp) +} + +func (c *ClientWithResponses) PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, body PatchApiV2SubscriptionsSubscriptionIdAssignOrgJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse, error) { + rsp, err := c.PatchApiV2SubscriptionsSubscriptionIdAssignOrg(ctx, subscriptionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse(rsp) +} + +// GetApiV2SubscriptionsSubscriptionIdWizardRedirectWithResponse request returning *GetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse +func (c *ClientWithResponses) GetApiV2SubscriptionsSubscriptionIdWizardRedirectWithResponse(ctx context.Context, subscriptionId PathSubscriptionId, reqEditors ...RequestEditorFn) (*GetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse, error) { + rsp, err := c.GetApiV2SubscriptionsSubscriptionIdWizardRedirect(ctx, subscriptionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse(rsp) +} + +// GetApiV2UsersWithResponse request returning *GetApiV2UsersResponse +func (c *ClientWithResponses) GetApiV2UsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2UsersResponse, error) { + rsp, err := c.GetApiV2Users(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2UsersResponse(rsp) +} + +// GetApiV2UsersMeWithResponse request returning *GetApiV2UsersMeResponse +func (c *ClientWithResponses) GetApiV2UsersMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2UsersMeResponse, error) { + rsp, err := c.GetApiV2UsersMe(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2UsersMeResponse(rsp) +} + +// PatchApiV2UsersMeWithBodyWithResponse request with arbitrary body returning *PatchApiV2UsersMeResponse +func (c *ClientWithResponses) PatchApiV2UsersMeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2UsersMeResponse, error) { + rsp, err := c.PatchApiV2UsersMeWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2UsersMeResponse(rsp) +} + +func (c *ClientWithResponses) PatchApiV2UsersMeWithResponse(ctx context.Context, body PatchApiV2UsersMeJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2UsersMeResponse, error) { + rsp, err := c.PatchApiV2UsersMe(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2UsersMeResponse(rsp) +} + +// PostApiV2UsersMeAcceptInviteWithBodyWithResponse request with arbitrary body returning *PostApiV2UsersMeAcceptInviteResponse +func (c *ClientWithResponses) PostApiV2UsersMeAcceptInviteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV2UsersMeAcceptInviteResponse, error) { + rsp, err := c.PostApiV2UsersMeAcceptInviteWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2UsersMeAcceptInviteResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV2UsersMeAcceptInviteWithResponse(ctx context.Context, body PostApiV2UsersMeAcceptInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV2UsersMeAcceptInviteResponse, error) { + rsp, err := c.PostApiV2UsersMeAcceptInvite(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2UsersMeAcceptInviteResponse(rsp) +} + +// GetApiV2UsersMeApiKeysWithResponse request returning *GetApiV2UsersMeApiKeysResponse +func (c *ClientWithResponses) GetApiV2UsersMeApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiV2UsersMeApiKeysResponse, error) { + rsp, err := c.GetApiV2UsersMeApiKeys(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2UsersMeApiKeysResponse(rsp) +} + +// PostApiV2UsersMeApiKeysWithResponse request returning *PostApiV2UsersMeApiKeysResponse +func (c *ClientWithResponses) PostApiV2UsersMeApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostApiV2UsersMeApiKeysResponse, error) { + rsp, err := c.PostApiV2UsersMeApiKeys(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV2UsersMeApiKeysResponse(rsp) +} + +// DeleteApiV2UsersMeApiKeysApiKeyWithResponse request returning *DeleteApiV2UsersMeApiKeysApiKeyResponse +func (c *ClientWithResponses) DeleteApiV2UsersMeApiKeysApiKeyWithResponse(ctx context.Context, apiKey PathApiKey, reqEditors ...RequestEditorFn) (*DeleteApiV2UsersMeApiKeysApiKeyResponse, error) { + rsp, err := c.DeleteApiV2UsersMeApiKeysApiKey(ctx, apiKey, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2UsersMeApiKeysApiKeyResponse(rsp) +} + +// GetApiV2UsersMeApiKeysApiKeyWithResponse request returning *GetApiV2UsersMeApiKeysApiKeyResponse +func (c *ClientWithResponses) GetApiV2UsersMeApiKeysApiKeyWithResponse(ctx context.Context, apiKey PathApiKey, reqEditors ...RequestEditorFn) (*GetApiV2UsersMeApiKeysApiKeyResponse, error) { + rsp, err := c.GetApiV2UsersMeApiKeysApiKey(ctx, apiKey, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV2UsersMeApiKeysApiKeyResponse(rsp) +} + +// PatchApiV2UsersMeApiKeysApiKeyWithBodyWithResponse request with arbitrary body returning *PatchApiV2UsersMeApiKeysApiKeyResponse +func (c *ClientWithResponses) PatchApiV2UsersMeApiKeysApiKeyWithBodyWithResponse(ctx context.Context, apiKey PathApiKey, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiV2UsersMeApiKeysApiKeyResponse, error) { + rsp, err := c.PatchApiV2UsersMeApiKeysApiKeyWithBody(ctx, apiKey, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2UsersMeApiKeysApiKeyResponse(rsp) +} + +func (c *ClientWithResponses) PatchApiV2UsersMeApiKeysApiKeyWithResponse(ctx context.Context, apiKey PathApiKey, body PatchApiV2UsersMeApiKeysApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiV2UsersMeApiKeysApiKeyResponse, error) { + rsp, err := c.PatchApiV2UsersMeApiKeysApiKey(ctx, apiKey, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchApiV2UsersMeApiKeysApiKeyResponse(rsp) +} + +// PutApiV2UsersMeConfirmEmailWithBodyWithResponse request with arbitrary body returning *PutApiV2UsersMeConfirmEmailResponse +func (c *ClientWithResponses) PutApiV2UsersMeConfirmEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiV2UsersMeConfirmEmailResponse, error) { + rsp, err := c.PutApiV2UsersMeConfirmEmailWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2UsersMeConfirmEmailResponse(rsp) +} + +func (c *ClientWithResponses) PutApiV2UsersMeConfirmEmailWithResponse(ctx context.Context, body PutApiV2UsersMeConfirmEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiV2UsersMeConfirmEmailResponse, error) { + rsp, err := c.PutApiV2UsersMeConfirmEmail(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutApiV2UsersMeConfirmEmailResponse(rsp) +} + +// DeleteApiV2UsersUserIdWithResponse request returning *DeleteApiV2UsersUserIdResponse +func (c *ClientWithResponses) DeleteApiV2UsersUserIdWithResponse(ctx context.Context, userId PathUserId, reqEditors ...RequestEditorFn) (*DeleteApiV2UsersUserIdResponse, error) { + rsp, err := c.DeleteApiV2UsersUserId(ctx, userId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV2UsersUserIdResponse(rsp) +} + +// ParseGetApiV2AwsSubscriptionsSubscriptionIdResponse parses an HTTP response from a GetApiV2AwsSubscriptionsSubscriptionIdWithResponse call +func ParseGetApiV2AwsSubscriptionsSubscriptionIdResponse(rsp *http.Response) (*GetApiV2AwsSubscriptionsSubscriptionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2AwsSubscriptionsSubscriptionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchApiV2AwsSubscriptionsSubscriptionIdResponse parses an HTTP response from a PatchApiV2AwsSubscriptionsSubscriptionIdWithResponse call +func ParsePatchApiV2AwsSubscriptionsSubscriptionIdResponse(rsp *http.Response) (*PatchApiV2AwsSubscriptionsSubscriptionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiV2AwsSubscriptionsSubscriptionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2AzureSubscriptionsSubscriptionIdResponse parses an HTTP response from a GetApiV2AzureSubscriptionsSubscriptionIdWithResponse call +func ParseGetApiV2AzureSubscriptionsSubscriptionIdResponse(rsp *http.Response) (*GetApiV2AzureSubscriptionsSubscriptionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2AzureSubscriptionsSubscriptionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersResponse parses an HTTP response from a GetApiV2ClustersWithResponse call +func ParseGetApiV2ClustersResponse(rsp *http.Response) (*GetApiV2ClustersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Cluster + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseHeadApiV2ClustersNameNameResponse parses an HTTP response from a HeadApiV2ClustersNameNameWithResponse call +func ParseHeadApiV2ClustersNameNameResponse(rsp *http.Response) (*HeadApiV2ClustersNameNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &HeadApiV2ClustersNameNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2ClustersClusterIdResponse parses an HTTP response from a DeleteApiV2ClustersClusterIdWithResponse call +func ParseDeleteApiV2ClustersClusterIdResponse(rsp *http.Response) (*DeleteApiV2ClustersClusterIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2ClustersClusterIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdResponse parses an HTTP response from a GetApiV2ClustersClusterIdWithResponse call +func ParseGetApiV2ClustersClusterIdResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchApiV2ClustersClusterIdResponse parses an HTTP response from a PatchApiV2ClustersClusterIdWithResponse call +func ParsePatchApiV2ClustersClusterIdResponse(rsp *http.Response) (*PatchApiV2ClustersClusterIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiV2ClustersClusterIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdAvailableProductsResponse parses an HTTP response from a GetApiV2ClustersClusterIdAvailableProductsWithResponse call +func ParseGetApiV2ClustersClusterIdAvailableProductsResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdAvailableProductsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdAvailableProductsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Product + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdAvailableUpgradesResponse parses an HTTP response from a GetApiV2ClustersClusterIdAvailableUpgradesWithResponse call +func ParseGetApiV2ClustersClusterIdAvailableUpgradesResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdAvailableUpgradesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdAvailableUpgradesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CrateDBVersions + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2ClustersClusterIdBackupScheduleResponse parses an HTTP response from a PutApiV2ClustersClusterIdBackupScheduleWithResponse call +func ParsePutApiV2ClustersClusterIdBackupScheduleResponse(rsp *http.Response) (*PutApiV2ClustersClusterIdBackupScheduleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2ClustersClusterIdBackupScheduleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2ClustersClusterIdDeletionProtectionResponse parses an HTTP response from a PutApiV2ClustersClusterIdDeletionProtectionWithResponse call +func ParsePutApiV2ClustersClusterIdDeletionProtectionResponse(rsp *http.Response) (*PutApiV2ClustersClusterIdDeletionProtectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2ClustersClusterIdDeletionProtectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdExportJobsResponse parses an HTTP response from a GetApiV2ClustersClusterIdExportJobsWithResponse call +func ParseGetApiV2ClustersClusterIdExportJobsResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdExportJobsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdExportJobsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []ClusterExportJob + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2ClustersClusterIdExportJobsResponse parses an HTTP response from a PostApiV2ClustersClusterIdExportJobsWithResponse call +func ParsePostApiV2ClustersClusterIdExportJobsResponse(rsp *http.Response) (*PostApiV2ClustersClusterIdExportJobsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2ClustersClusterIdExportJobsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ClusterExportJob + 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse parses an HTTP response from a DeleteApiV2ClustersClusterIdExportJobsExportJobIdWithResponse call +func ParseDeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse(rsp *http.Response) (*DeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2ClustersClusterIdExportJobsExportJobIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdExportJobsExportJobIdResponse parses an HTTP response from a GetApiV2ClustersClusterIdExportJobsExportJobIdWithResponse call +func ParseGetApiV2ClustersClusterIdExportJobsExportJobIdResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdExportJobsExportJobIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdExportJobsExportJobIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ClusterExportJob + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdImportJobsResponse parses an HTTP response from a GetApiV2ClustersClusterIdImportJobsWithResponse call +func ParseGetApiV2ClustersClusterIdImportJobsResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdImportJobsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdImportJobsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []ClusterImportJob + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2ClustersClusterIdImportJobsResponse parses an HTTP response from a PostApiV2ClustersClusterIdImportJobsWithResponse call +func ParsePostApiV2ClustersClusterIdImportJobsResponse(rsp *http.Response) (*PostApiV2ClustersClusterIdImportJobsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2ClustersClusterIdImportJobsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ClusterImportJob + 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse parses an HTTP response from a DeleteApiV2ClustersClusterIdImportJobsImportJobIdWithResponse call +func ParseDeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse(rsp *http.Response) (*DeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2ClustersClusterIdImportJobsImportJobIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdImportJobsImportJobIdResponse parses an HTTP response from a GetApiV2ClustersClusterIdImportJobsImportJobIdWithResponse call +func ParseGetApiV2ClustersClusterIdImportJobsImportJobIdResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdImportJobsImportJobIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdImportJobsImportJobIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ClusterImportJob + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse parses an HTTP response from a GetApiV2ClustersClusterIdImportJobsImportJobIdProgressWithResponse call +func ParseGetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdImportJobsImportJobIdProgressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DataJobData + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2ClustersClusterIdIpRestrictionsResponse parses an HTTP response from a PutApiV2ClustersClusterIdIpRestrictionsWithResponse call +func ParsePutApiV2ClustersClusterIdIpRestrictionsResponse(rsp *http.Response) (*PutApiV2ClustersClusterIdIpRestrictionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2ClustersClusterIdIpRestrictionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdJwtResponse parses an HTTP response from a GetApiV2ClustersClusterIdJwtWithResponse call +func ParseGetApiV2ClustersClusterIdJwtResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdJwtResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdJwtResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ClusterJWTToken + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdMetricsMetricIdResponse parses an HTTP response from a GetApiV2ClustersClusterIdMetricsMetricIdWithResponse call +func ParseGetApiV2ClustersClusterIdMetricsMetricIdResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdMetricsMetricIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdMetricsMetricIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]interface{} + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2ClustersClusterIdNodesOrdinalResponse parses an HTTP response from a DeleteApiV2ClustersClusterIdNodesOrdinalWithResponse call +func ParseDeleteApiV2ClustersClusterIdNodesOrdinalResponse(rsp *http.Response) (*DeleteApiV2ClustersClusterIdNodesOrdinalResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2ClustersClusterIdNodesOrdinalResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest struct { + ApiVersion *string `json:"apiVersion,omitempty"` + Code *int `json:"code,omitempty"` + Kind *string `json:"kind,omitempty"` + Status *string `json:"status,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON202 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdOperationsResponse parses an HTTP response from a GetApiV2ClustersClusterIdOperationsWithResponse call +func ParseGetApiV2ClustersClusterIdOperationsResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdOperationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdOperationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ClusterAsyncOperationsList + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2ClustersClusterIdProductResponse parses an HTTP response from a PutApiV2ClustersClusterIdProductWithResponse call +func ParsePutApiV2ClustersClusterIdProductResponse(rsp *http.Response) (*PutApiV2ClustersClusterIdProductResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2ClustersClusterIdProductResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2ClustersClusterIdScaleResponse parses an HTTP response from a PutApiV2ClustersClusterIdScaleWithResponse call +func ParsePutApiV2ClustersClusterIdScaleResponse(rsp *http.Response) (*PutApiV2ClustersClusterIdScaleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2ClustersClusterIdScaleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ClustersClusterIdSnapshotsResponse parses an HTTP response from a GetApiV2ClustersClusterIdSnapshotsWithResponse call +func ParseGetApiV2ClustersClusterIdSnapshotsResponse(rsp *http.Response) (*GetApiV2ClustersClusterIdSnapshotsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ClustersClusterIdSnapshotsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []ClusterSnapshot + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2ClustersClusterIdSnapshotsRestoreResponse parses an HTTP response from a PostApiV2ClustersClusterIdSnapshotsRestoreWithResponse call +func ParsePostApiV2ClustersClusterIdSnapshotsRestoreResponse(rsp *http.Response) (*PostApiV2ClustersClusterIdSnapshotsRestoreResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2ClustersClusterIdSnapshotsRestoreResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ClusterSnapshot + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2ClustersClusterIdStorageResponse parses an HTTP response from a PutApiV2ClustersClusterIdStorageWithResponse call +func ParsePutApiV2ClustersClusterIdStorageResponse(rsp *http.Response) (*PutApiV2ClustersClusterIdStorageResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2ClustersClusterIdStorageResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2ClustersClusterIdSuspendResponse parses an HTTP response from a PutApiV2ClustersClusterIdSuspendWithResponse call +func ParsePutApiV2ClustersClusterIdSuspendResponse(rsp *http.Response) (*PutApiV2ClustersClusterIdSuspendResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2ClustersClusterIdSuspendResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2ClustersClusterIdUpgradeResponse parses an HTTP response from a PutApiV2ClustersClusterIdUpgradeWithResponse call +func ParsePutApiV2ClustersClusterIdUpgradeResponse(rsp *http.Response) (*PutApiV2ClustersClusterIdUpgradeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2ClustersClusterIdUpgradeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Cluster + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ConfigurationsResponse parses an HTTP response from a GetApiV2ConfigurationsWithResponse call +func ParseGetApiV2ConfigurationsResponse(rsp *http.Response) (*GetApiV2ConfigurationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ConfigurationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []ConfigurationItem + if 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 N401 + 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 N403 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ConfigurationsKeyResponse parses an HTTP response from a GetApiV2ConfigurationsKeyWithResponse call +func ParseGetApiV2ConfigurationsKeyResponse(rsp *http.Response) (*GetApiV2ConfigurationsKeyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ConfigurationsKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConfigurationItem + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2ConfigurationsKeyResponse parses an HTTP response from a PutApiV2ConfigurationsKeyWithResponse call +func ParsePutApiV2ConfigurationsKeyResponse(rsp *http.Response) (*PutApiV2ConfigurationsKeyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2ConfigurationsKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConfigurationItem + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2FeaturesStatusResponse parses an HTTP response from a GetApiV2FeaturesStatusWithResponse call +func ParseGetApiV2FeaturesStatusResponse(rsp *http.Response) (*GetApiV2FeaturesStatusResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2FeaturesStatusResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest FeatureFlags + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2GcpSubscriptionsSubscriptionIdResponse parses an HTTP response from a GetApiV2GcpSubscriptionsSubscriptionIdWithResponse call +func ParseGetApiV2GcpSubscriptionsSubscriptionIdResponse(rsp *http.Response) (*GetApiV2GcpSubscriptionsSubscriptionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2GcpSubscriptionsSubscriptionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2IntegrationsAwsS3BucketsResponse parses an HTTP response from a GetApiV2IntegrationsAwsS3BucketsWithResponse call +func ParseGetApiV2IntegrationsAwsS3BucketsResponse(rsp *http.Response) (*GetApiV2IntegrationsAwsS3BucketsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2IntegrationsAwsS3BucketsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest BucketsList + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2IntegrationsAwsS3ObjectsResponse parses an HTTP response from a GetApiV2IntegrationsAwsS3ObjectsWithResponse call +func ParseGetApiV2IntegrationsAwsS3ObjectsResponse(rsp *http.Response) (*GetApiV2IntegrationsAwsS3ObjectsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2IntegrationsAwsS3ObjectsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ObjectsList + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2IntegrationsAzureBlobStorageContainersResponse parses an HTTP response from a GetApiV2IntegrationsAzureBlobStorageContainersWithResponse call +func ParseGetApiV2IntegrationsAzureBlobStorageContainersResponse(rsp *http.Response) (*GetApiV2IntegrationsAzureBlobStorageContainersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2IntegrationsAzureBlobStorageContainersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ContainersList + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2IntegrationsAzureBlobsResponse parses an HTTP response from a GetApiV2IntegrationsAzureBlobsWithResponse call +func ParseGetApiV2IntegrationsAzureBlobsResponse(rsp *http.Response) (*GetApiV2IntegrationsAzureBlobsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2IntegrationsAzureBlobsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest BlobsList + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2MetaResponse parses an HTTP response from a GetApiV2MetaWithResponse call +func ParseGetApiV2MetaResponse(rsp *http.Response) (*GetApiV2MetaResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2MetaResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Meta + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2MetaCratedbVersionsResponse parses an HTTP response from a GetApiV2MetaCratedbVersionsWithResponse call +func ParseGetApiV2MetaCratedbVersionsResponse(rsp *http.Response) (*GetApiV2MetaCratedbVersionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2MetaCratedbVersionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CrateDBVersions + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2MetaIpAddressResponse parses an HTTP response from a GetApiV2MetaIpAddressWithResponse call +func ParseGetApiV2MetaIpAddressResponse(rsp *http.Response) (*GetApiV2MetaIpAddressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2MetaIpAddressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest IPAddress + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2MetaJwkResponse parses an HTTP response from a GetApiV2MetaJwkWithResponse call +func ParseGetApiV2MetaJwkResponse(rsp *http.Response) (*GetApiV2MetaJwkResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2MetaJwkResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest JWK + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2MetaJwtRefreshResponse parses an HTTP response from a PostApiV2MetaJwtRefreshWithResponse call +func ParsePostApiV2MetaJwtRefreshResponse(rsp *http.Response) (*PostApiV2MetaJwtRefreshResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2MetaJwtRefreshResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ClusterJWTToken + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsResponse parses an HTTP response from a GetApiV2OrganizationsWithResponse call +func ParseGetApiV2OrganizationsResponse(rsp *http.Response) (*GetApiV2OrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Organization + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2OrganizationsResponse parses an HTTP response from a PostApiV2OrganizationsWithResponse call +func ParsePostApiV2OrganizationsResponse(rsp *http.Response) (*PostApiV2OrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2OrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Organization + 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2OrganizationsOrganizationIdResponse parses an HTTP response from a DeleteApiV2OrganizationsOrganizationIdWithResponse call +func ParseDeleteApiV2OrganizationsOrganizationIdResponse(rsp *http.Response) (*DeleteApiV2OrganizationsOrganizationIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2OrganizationsOrganizationIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Organization + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2OrganizationsOrganizationIdResponse parses an HTTP response from a PutApiV2OrganizationsOrganizationIdWithResponse call +func ParsePutApiV2OrganizationsOrganizationIdResponse(rsp *http.Response) (*PutApiV2OrganizationsOrganizationIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2OrganizationsOrganizationIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Organization + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdAuditlogsResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdAuditlogsWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdAuditlogsResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdAuditlogsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdAuditlogsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []AuditEvent + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdClustersResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdClustersWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdClustersResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdClustersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdClustersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Cluster + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2OrganizationsOrganizationIdClustersResponse parses an HTTP response from a PostApiV2OrganizationsOrganizationIdClustersWithResponse call +func ParsePostApiV2OrganizationsOrganizationIdClustersResponse(rsp *http.Response) (*PostApiV2OrganizationsOrganizationIdClustersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2OrganizationsOrganizationIdClustersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Cluster + 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdConsumptionCurrentMonthResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OrganizationCurrentConsumptionSchema + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdCreditsResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdCreditsWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdCreditsResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdCreditsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdCreditsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Credit + if 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 N400 + 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 N401 + 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 N403 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2OrganizationsOrganizationIdCreditsResponse parses an HTTP response from a PostApiV2OrganizationsOrganizationIdCreditsWithResponse call +func ParsePostApiV2OrganizationsOrganizationIdCreditsResponse(rsp *http.Response) (*PostApiV2OrganizationsOrganizationIdCreditsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2OrganizationsOrganizationIdCreditsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Credit + 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse parses an HTTP response from a DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdWithResponse call +func ParseDeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse(rsp *http.Response) (*DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2OrganizationsOrganizationIdCreditsCreditIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse parses an HTTP response from a PatchApiV2OrganizationsOrganizationIdCreditsCreditIdWithResponse call +func ParsePatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse(rsp *http.Response) (*PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiV2OrganizationsOrganizationIdCreditsCreditIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Credit + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdCustomerResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdCustomerWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdCustomerResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdCustomerResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdCustomerResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Customer + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2OrganizationsOrganizationIdCustomerResponse parses an HTTP response from a PutApiV2OrganizationsOrganizationIdCustomerWithResponse call +func ParsePutApiV2OrganizationsOrganizationIdCustomerResponse(rsp *http.Response) (*PutApiV2OrganizationsOrganizationIdCustomerResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2OrganizationsOrganizationIdCustomerResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Customer + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdFilesResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdFilesWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdFilesResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdFilesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdFilesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []File + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2OrganizationsOrganizationIdFilesResponse parses an HTTP response from a PostApiV2OrganizationsOrganizationIdFilesWithResponse call +func ParsePostApiV2OrganizationsOrganizationIdFilesResponse(rsp *http.Response) (*PostApiV2OrganizationsOrganizationIdFilesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2OrganizationsOrganizationIdFilesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest File + 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse parses an HTTP response from a DeleteApiV2OrganizationsOrganizationIdFilesFileIdWithResponse call +func ParseDeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse(rsp *http.Response) (*DeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2OrganizationsOrganizationIdFilesFileIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdFilesFileIdResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdFilesFileIdWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdFilesFileIdResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdFilesFileIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdFilesFileIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest File + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdInvitationsResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdInvitationsWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdInvitationsResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdInvitationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdInvitationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []OrganizationInvitation + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse parses an HTTP response from a DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenWithResponse call +func ParseDeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse(rsp *http.Response) (*DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2OrganizationsOrganizationIdInvitationsInviteTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdMetricsPrometheusWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdMetricsPrometheusResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdPaymentMethodsResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdPaymentMethodsWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdPaymentMethodsResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdPaymentMethodsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdPaymentMethodsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []PaymentMethod + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdProjectsResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdProjectsWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdProjectsResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdProjectsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdProjectsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Project + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdQuotasResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdQuotasWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdQuotasResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdQuotasResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdQuotasResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Quota + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdRegionsResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdRegionsWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdRegionsResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdRegionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdRegionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Region + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdRemainingBudgetResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdRemainingBudgetWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdRemainingBudgetResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdRemainingBudgetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdRemainingBudgetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OrganizationRemainingBudget + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdSecretsResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdSecretsWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdSecretsResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdSecretsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdSecretsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Secret + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2OrganizationsOrganizationIdSecretsResponse parses an HTTP response from a PostApiV2OrganizationsOrganizationIdSecretsWithResponse call +func ParsePostApiV2OrganizationsOrganizationIdSecretsResponse(rsp *http.Response) (*PostApiV2OrganizationsOrganizationIdSecretsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2OrganizationsOrganizationIdSecretsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Secret + 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse parses an HTTP response from a DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdWithResponse call +func ParseDeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse(rsp *http.Response) (*DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2OrganizationsOrganizationIdSecretsSecretIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdSubscriptionsResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdSubscriptionsWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdSubscriptionsResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdSubscriptionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdSubscriptionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Subscription + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2OrganizationsOrganizationIdUsersResponse parses an HTTP response from a GetApiV2OrganizationsOrganizationIdUsersWithResponse call +func ParseGetApiV2OrganizationsOrganizationIdUsersResponse(rsp *http.Response) (*GetApiV2OrganizationsOrganizationIdUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2OrganizationsOrganizationIdUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []OrganizationUser + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2OrganizationsOrganizationIdUsersResponse parses an HTTP response from a PostApiV2OrganizationsOrganizationIdUsersWithResponse call +func ParsePostApiV2OrganizationsOrganizationIdUsersResponse(rsp *http.Response) (*PostApiV2OrganizationsOrganizationIdUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2OrganizationsOrganizationIdUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OrganizationRole + if 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 OrganizationRole + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse parses an HTTP response from a DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailWithResponse call +func ParseDeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse(rsp *http.Response) (*DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2OrganizationsOrganizationIdUsersUserIdOrEmailResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ProductsResponse parses an HTTP response from a GetApiV2ProductsWithResponse call +func ParseGetApiV2ProductsResponse(rsp *http.Response) (*GetApiV2ProductsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ProductsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Product + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ProductsClustersPriceResponse parses an HTTP response from a GetApiV2ProductsClustersPriceWithResponse call +func ParseGetApiV2ProductsClustersPriceResponse(rsp *http.Response) (*GetApiV2ProductsClustersPriceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ProductsClustersPriceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProductPricing + if 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 N401 + 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 N401 + if 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 N401 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ProductsKindResponse parses an HTTP response from a GetApiV2ProductsKindWithResponse call +func ParseGetApiV2ProductsKindResponse(rsp *http.Response) (*GetApiV2ProductsKindResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ProductsKindResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Product + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ProjectsResponse parses an HTTP response from a GetApiV2ProjectsWithResponse call +func ParseGetApiV2ProjectsResponse(rsp *http.Response) (*GetApiV2ProjectsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ProjectsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Project + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2ProjectsResponse parses an HTTP response from a PostApiV2ProjectsWithResponse call +func ParsePostApiV2ProjectsResponse(rsp *http.Response) (*PostApiV2ProjectsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2ProjectsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Project + 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2ProjectsProjectIdResponse parses an HTTP response from a DeleteApiV2ProjectsProjectIdWithResponse call +func ParseDeleteApiV2ProjectsProjectIdResponse(rsp *http.Response) (*DeleteApiV2ProjectsProjectIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2ProjectsProjectIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ProjectsProjectIdResponse parses an HTTP response from a GetApiV2ProjectsProjectIdWithResponse call +func ParseGetApiV2ProjectsProjectIdResponse(rsp *http.Response) (*GetApiV2ProjectsProjectIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ProjectsProjectIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Project + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchApiV2ProjectsProjectIdResponse parses an HTTP response from a PatchApiV2ProjectsProjectIdWithResponse call +func ParsePatchApiV2ProjectsProjectIdResponse(rsp *http.Response) (*PatchApiV2ProjectsProjectIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiV2ProjectsProjectIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Project + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ProjectsProjectIdClustersResponse parses an HTTP response from a GetApiV2ProjectsProjectIdClustersWithResponse call +func ParseGetApiV2ProjectsProjectIdClustersResponse(rsp *http.Response) (*GetApiV2ProjectsProjectIdClustersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ProjectsProjectIdClustersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Cluster + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2ProjectsProjectIdUsersResponse parses an HTTP response from a GetApiV2ProjectsProjectIdUsersWithResponse call +func ParseGetApiV2ProjectsProjectIdUsersResponse(rsp *http.Response) (*GetApiV2ProjectsProjectIdUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2ProjectsProjectIdUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []ProjectUser + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2ProjectsProjectIdUsersResponse parses an HTTP response from a PostApiV2ProjectsProjectIdUsersWithResponse call +func ParsePostApiV2ProjectsProjectIdUsersResponse(rsp *http.Response) (*PostApiV2ProjectsProjectIdUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2ProjectsProjectIdUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProjectRole + if 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 ProjectRole + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse parses an HTTP response from a DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailWithResponse call +func ParseDeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse(rsp *http.Response) (*DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2ProjectsProjectIdUsersUserIdOrEmailResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2RegionsResponse parses an HTTP response from a GetApiV2RegionsWithResponse call +func ParseGetApiV2RegionsResponse(rsp *http.Response) (*GetApiV2RegionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2RegionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Region + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2RegionsResponse parses an HTTP response from a PostApiV2RegionsWithResponse call +func ParsePostApiV2RegionsResponse(rsp *http.Response) (*PostApiV2RegionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2RegionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Region + 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2RegionsRegionNameResponse parses an HTTP response from a DeleteApiV2RegionsRegionNameWithResponse call +func ParseDeleteApiV2RegionsRegionNameResponse(rsp *http.Response) (*DeleteApiV2RegionsRegionNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2RegionsRegionNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2RegionsRegionNameInstallTokenResponse parses an HTTP response from a GetApiV2RegionsRegionNameInstallTokenWithResponse call +func ParseGetApiV2RegionsRegionNameInstallTokenResponse(rsp *http.Response) (*GetApiV2RegionsRegionNameInstallTokenResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2RegionsRegionNameInstallTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest InstallToken + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2RegionsRegionNameVerifyBackupLocationResponse parses an HTTP response from a PostApiV2RegionsRegionNameVerifyBackupLocationWithResponse call +func ParsePostApiV2RegionsRegionNameVerifyBackupLocationResponse(rsp *http.Response) (*PostApiV2RegionsRegionNameVerifyBackupLocationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2RegionsRegionNameVerifyBackupLocationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProjectBackupLocationVerifyResponse + if 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 N400 + 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2RolesResponse parses an HTTP response from a GetApiV2RolesWithResponse call +func ParseGetApiV2RolesResponse(rsp *http.Response) (*GetApiV2RolesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2RolesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Role + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse parses an HTTP response from a PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupWithResponse call +func ParsePostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse(rsp *http.Response) (*PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2StripeBankTransferOrganizationsOrganizationIdSetupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse parses an HTTP response from a PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentWithResponse call +func ParsePostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse(rsp *http.Response) (*PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2StripeCardOrganizationsOrganizationIdSetupPaymentResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SetupPaymentIntent + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2StripeCardOrganizationsOrganizationIdSetupResponse parses an HTTP response from a PostApiV2StripeCardOrganizationsOrganizationIdSetupWithResponse call +func ParsePostApiV2StripeCardOrganizationsOrganizationIdSetupResponse(rsp *http.Response) (*PostApiV2StripeCardOrganizationsOrganizationIdSetupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2StripeCardOrganizationsOrganizationIdSetupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SetupIntent + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse parses an HTTP response from a GetApiV2StripeOrganizationsOrganizationIdBillingInformationWithResponse call +func ParseGetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse(rsp *http.Response) (*GetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2StripeOrganizationsOrganizationIdBillingInformationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest BillingInformation + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse parses an HTTP response from a PatchApiV2StripeOrganizationsOrganizationIdBillingInformationWithResponse call +func ParsePatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse(rsp *http.Response) (*PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiV2StripeOrganizationsOrganizationIdBillingInformationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest BillingInformation + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2StripeOrganizationsOrganizationIdCardsResponse parses an HTTP response from a GetApiV2StripeOrganizationsOrganizationIdCardsWithResponse call +func ParseGetApiV2StripeOrganizationsOrganizationIdCardsResponse(rsp *http.Response) (*GetApiV2StripeOrganizationsOrganizationIdCardsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2StripeOrganizationsOrganizationIdCardsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []CustomerCard + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse parses an HTTP response from a DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdWithResponse call +func ParseDeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse(rsp *http.Response) (*DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CustomerCard + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse parses an HTTP response from a PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdWithResponse call +func ParsePatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse(rsp *http.Response) (*PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CustomerCard + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse parses an HTTP response from a PostApiV2StripeOrganizationsOrganizationIdSetupPaymentWithResponse call +func ParsePostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse(rsp *http.Response) (*PostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2StripeOrganizationsOrganizationIdSetupPaymentResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SetupPaymentIntent + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2StripeOrganizationsOrganizationIdSetupResponse parses an HTTP response from a PostApiV2StripeOrganizationsOrganizationIdSetupWithResponse call +func ParsePostApiV2StripeOrganizationsOrganizationIdSetupResponse(rsp *http.Response) (*PostApiV2StripeOrganizationsOrganizationIdSetupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2StripeOrganizationsOrganizationIdSetupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SetupIntent + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2StripeOrganizationsOrganizationIdValidateCardResponse parses an HTTP response from a PostApiV2StripeOrganizationsOrganizationIdValidateCardWithResponse call +func ParsePostApiV2StripeOrganizationsOrganizationIdValidateCardResponse(rsp *http.Response) (*PostApiV2StripeOrganizationsOrganizationIdValidateCardResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2StripeOrganizationsOrganizationIdValidateCardResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ValidateCard + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2StripePromotionsResponse parses an HTTP response from a GetApiV2StripePromotionsWithResponse call +func ParseGetApiV2StripePromotionsResponse(rsp *http.Response) (*GetApiV2StripePromotionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2StripePromotionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Promotion + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2StripeSubscriptionsSubscriptionIdResponse parses an HTTP response from a DeleteApiV2StripeSubscriptionsSubscriptionIdWithResponse call +func ParseDeleteApiV2StripeSubscriptionsSubscriptionIdResponse(rsp *http.Response) (*DeleteApiV2StripeSubscriptionsSubscriptionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2StripeSubscriptionsSubscriptionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2StripeSubscriptionsSubscriptionIdResponse parses an HTTP response from a GetApiV2StripeSubscriptionsSubscriptionIdWithResponse call +func ParseGetApiV2StripeSubscriptionsSubscriptionIdResponse(rsp *http.Response) (*GetApiV2StripeSubscriptionsSubscriptionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2StripeSubscriptionsSubscriptionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse parses an HTTP response from a GetApiV2StripeSubscriptionsSubscriptionIdInvoicesWithResponse call +func ParseGetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse(rsp *http.Response) (*GetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2StripeSubscriptionsSubscriptionIdInvoicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []InvoiceConsumption + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse parses an HTTP response from a GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingWithResponse call +func ParseGetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse(rsp *http.Response) (*GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2StripeSubscriptionsSubscriptionIdInvoicesUpcomingResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest InvoiceConsumption + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2SubscriptionsResponse parses an HTTP response from a GetApiV2SubscriptionsWithResponse call +func ParseGetApiV2SubscriptionsResponse(rsp *http.Response) (*GetApiV2SubscriptionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2SubscriptionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []Subscription + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2SubscriptionsResponse parses an HTTP response from a PostApiV2SubscriptionsWithResponse call +func ParsePostApiV2SubscriptionsResponse(rsp *http.Response) (*PostApiV2SubscriptionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2SubscriptionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Subscription + 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 N400 + 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 N401 + 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 N403 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2SubscriptionsSubscriptionIdResponse parses an HTTP response from a DeleteApiV2SubscriptionsSubscriptionIdWithResponse call +func ParseDeleteApiV2SubscriptionsSubscriptionIdResponse(rsp *http.Response) (*DeleteApiV2SubscriptionsSubscriptionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2SubscriptionsSubscriptionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2SubscriptionsSubscriptionIdResponse parses an HTTP response from a GetApiV2SubscriptionsSubscriptionIdWithResponse call +func ParseGetApiV2SubscriptionsSubscriptionIdResponse(rsp *http.Response) (*GetApiV2SubscriptionsSubscriptionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2SubscriptionsSubscriptionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse parses an HTTP response from a PatchApiV2SubscriptionsSubscriptionIdAssignOrgWithResponse call +func ParsePatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse(rsp *http.Response) (*PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiV2SubscriptionsSubscriptionIdAssignOrgResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Subscription + if 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 N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse parses an HTTP response from a GetApiV2SubscriptionsSubscriptionIdWizardRedirectWithResponse call +func ParseGetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse(rsp *http.Response) (*GetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2SubscriptionsSubscriptionIdWizardRedirectResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2UsersResponse parses an HTTP response from a GetApiV2UsersWithResponse call +func ParseGetApiV2UsersResponse(rsp *http.Response) (*GetApiV2UsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2UsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []User + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2UsersMeResponse parses an HTTP response from a GetApiV2UsersMeWithResponse call +func ParseGetApiV2UsersMeResponse(rsp *http.Response) (*GetApiV2UsersMeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2UsersMeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CurrentUser + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchApiV2UsersMeResponse parses an HTTP response from a PatchApiV2UsersMeWithResponse call +func ParsePatchApiV2UsersMeResponse(rsp *http.Response) (*PatchApiV2UsersMeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiV2UsersMeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CurrentUser + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest struct { + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` + Success *bool `json:"success,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON202 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest N400 + 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2UsersMeAcceptInviteResponse parses an HTTP response from a PostApiV2UsersMeAcceptInviteWithResponse call +func ParsePostApiV2UsersMeAcceptInviteResponse(rsp *http.Response) (*PostApiV2UsersMeAcceptInviteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2UsersMeAcceptInviteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OrganizationRole + if 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 OrganizationRole + 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 N400 + 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2UsersMeApiKeysResponse parses an HTTP response from a GetApiV2UsersMeApiKeysWithResponse call +func ParseGetApiV2UsersMeApiKeysResponse(rsp *http.Response) (*GetApiV2UsersMeApiKeysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2UsersMeApiKeysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []NewApiKeySchema + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePostApiV2UsersMeApiKeysResponse parses an HTTP response from a PostApiV2UsersMeApiKeysWithResponse call +func ParsePostApiV2UsersMeApiKeysResponse(rsp *http.Response) (*PostApiV2UsersMeApiKeysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV2UsersMeApiKeysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest NewApiKeyResponseSchema + if 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 N400 + 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2UsersMeApiKeysApiKeyResponse parses an HTTP response from a DeleteApiV2UsersMeApiKeysApiKeyWithResponse call +func ParseDeleteApiV2UsersMeApiKeysApiKeyResponse(rsp *http.Response) (*DeleteApiV2UsersMeApiKeysApiKeyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2UsersMeApiKeysApiKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV2UsersMeApiKeysApiKeyResponse parses an HTTP response from a GetApiV2UsersMeApiKeysApiKeyWithResponse call +func ParseGetApiV2UsersMeApiKeysApiKeyResponse(rsp *http.Response) (*GetApiV2UsersMeApiKeysApiKeyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV2UsersMeApiKeysApiKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest NewApiKeySchema + if 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 N401 + 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchApiV2UsersMeApiKeysApiKeyResponse parses an HTTP response from a PatchApiV2UsersMeApiKeysApiKeyWithResponse call +func ParsePatchApiV2UsersMeApiKeysApiKeyResponse(rsp *http.Response) (*PatchApiV2UsersMeApiKeysApiKeyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiV2UsersMeApiKeysApiKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest NewApiKeySchema + if 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePutApiV2UsersMeConfirmEmailResponse parses an HTTP response from a PutApiV2UsersMeConfirmEmailWithResponse call +func ParsePutApiV2UsersMeConfirmEmailResponse(rsp *http.Response) (*PutApiV2UsersMeConfirmEmailResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiV2UsersMeConfirmEmailResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CurrentUser + if 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 N400 + 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 N401 + 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV2UsersUserIdResponse parses an HTTP response from a DeleteApiV2UsersUserIdWithResponse call +func ParseDeleteApiV2UsersUserIdResponse(rsp *http.Response) (*DeleteApiV2UsersUserIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV2UsersUserIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest N401 + 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 N403 + if 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 N404 + if 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 N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} diff --git a/cloud-api-openapi-v1.0.0.json b/cloud-api-openapi-v1.0.0.json new file mode 100644 index 0000000..02a8c01 --- /dev/null +++ b/cloud-api-openapi-v1.0.0.json @@ -0,0 +1,9532 @@ +{ + "components": { + "parameters": { + "path_api_key": { + "description": "The key that uniquely identifies an API key for a user", + "in": "path", + "name": "api_key", + "required": true, + "schema": { + "type": "string" + } + }, + "path_card_id": { + "description": "ID of the card", + "in": "path", + "name": "card_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_cluster_id": { + "description": "ID of the cluster", + "in": "path", + "name": "cluster_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_configuration_key": { + "description": "The key of a configuration", + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + }, + "path_credit_id": { + "description": "ID of the credit", + "in": "path", + "name": "credit_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_export_job_id": { + "description": "ID of the export job", + "in": "path", + "name": "export_job_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_file_id": { + "description": "ID of the file", + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_import_job_id": { + "description": "ID of the import job", + "in": "path", + "name": "import_job_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_invite_token": { + "description": "The identifier of a user invite, also known as token", + "in": "path", + "name": "invite_token", + "required": true, + "schema": { + "type": "string" + } + }, + "path_metric_id": { + "description": "ID of the metric", + "in": "path", + "name": "metric_id", + "required": true, + "schema": { + "enum": [ + "crate_query_count", + "crate_query_duration", + "crate_availability", + "crate_cpu_seconds", + "crate_memory_usage", + "crate_disk_usage2", + "crate_cluster_last_user_activity", + "crate_unreplicated_tables" + ], + "type": "string" + } + }, + "path_name": { + "description": "Name of the cluster", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + "path_ordinal": { + "description": "Ordinal index of the cluster", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "type": "integer" + } + }, + "path_organization_id": { + "description": "ID of the organization", + "in": "path", + "name": "organization_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_organization_secret_id": { + "description": "The identifier of a Secret", + "in": "path", + "name": "secret_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_product_kind": { + "description": "Kind of the product", + "in": "path", + "name": "kind", + "required": true, + "schema": { + "type": "string" + } + }, + "path_project_id": { + "description": "ID of the project", + "in": "path", + "name": "project_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_region_name": { + "description": "Name of the region", + "in": "path", + "name": "region_name", + "required": true, + "schema": { + "type": "string" + } + }, + "path_subscription_id": { + "description": "ID of the subscription", + "in": "path", + "name": "subscription_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_target_cluster_id": { + "description": "ID of the target cluster", + "in": "path", + "name": "cluster_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_user_id": { + "description": "ID of the user", + "in": "path", + "name": "user_id", + "required": true, + "schema": { + "type": "string" + } + }, + "path_user_id_or_email": { + "description": "ID or email address of the user", + "in": "path", + "name": "user_id_or_email", + "required": true, + "schema": { + "type": "string" + } + }, + "query_auditlog_action": { + "description": "The logs can be filtered by their action using this query parameter.", + "in": "query", + "name": "action", + "required": false, + "schema": { + "type": "string" + } + }, + "query_auditlog_cluster_id": { + "description": "The logs can be filtered by the cluster involved.", + "in": "query", + "name": "cluster_id", + "required": false, + "schema": { + "type": "string" + } + }, + "query_azure_container_name": { + "description": "", + "in": "query", + "name": "container_name", + "required": true, + "schema": { + "type": "string" + } + }, + "query_azure_prefix": { + "description": "", + "in": "query", + "name": "prefix", + "required": false, + "schema": { + "type": "string" + } + }, + "query_azure_secret_id": { + "description": "The organization secret_id that holds the Azure access key that will be used to try to retrieve the Azure Blob Storage containers and blobs.", + "in": "query", + "name": "secret_id", + "required": true, + "schema": { + "type": "string" + } + }, + "query_bucket": { + "description": "", + "in": "query", + "name": "bucket", + "required": true, + "schema": { + "type": "string" + } + }, + "query_clusters_product_name": { + "description": "Name of the product", + "in": "query", + "name": "product_name", + "schema": { + "type": "string" + } + }, + "query_credit_status": { + "description": "Status the credits will be filtered by.", + "in": "query", + "name": "status", + "schema": { + "type": "string" + } + }, + "query_end": { + "description": "Date used to filter the operations returned. It must adhere to the following format: 2021-11-16T13:00:00Z", + "in": "query", + "name": "end", + "schema": { + "type": "string" + } + }, + "query_end_ts": { + "description": "End Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ]", + "in": "query", + "name": "end", + "required": false, + "schema": { + "type": "string" + } + }, + "query_endpoint": { + "description": "Optional. The S3 compatible endpoint URL that will be used to retrieve the S3 buckets.", + "in": "query", + "name": "endpoint", + "required": false, + "schema": { + "type": "string" + } + }, + "query_exclude_cluster_id": { + "description": "ID of the cluster to exclude", + "in": "query", + "name": "exclude_cluster_id", + "schema": { + "type": "string" + } + }, + "query_files_limit": { + "description": "The number of files returned.Use keywork 'ALL' to have no limit applied.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "string" + } + }, + "query_files_offset": { + "description": "The offset files to skip before beginning to return the files.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + }, + "query_from_ts": { + "description": "From Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ]", + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "string" + } + }, + "query_invite_status": { + "description": "Either PENDING or ACCEPTED", + "in": "query", + "name": "status", + "required": false, + "schema": { + "type": "string" + } + }, + "query_last": { + "description": "For pagination this query parameter can be provided. The value should be the id of the oldest element in the previous result.", + "in": "query", + "name": "last", + "required": false, + "schema": { + "type": "string" + } + }, + "query_limit": { + "description": "Number of items to retrieve", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + "query_minutes_ago": { + "description": "The number of minutes of data to retrieve. Overrides 'start'.", + "in": "query", + "name": "minutes_ago", + "schema": { + "type": "integer" + } + }, + "query_organization_id": { + "description": "ID of the organization", + "in": "query", + "name": "organization_id", + "required": false, + "schema": { + "type": "string" + } + }, + "query_prefix": { + "description": "", + "in": "query", + "name": "prefix", + "required": false, + "schema": { + "type": "string" + } + }, + "query_product_name": { + "description": "The products can be filtered by their name using this query parameter.", + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + "query_product_offer": { + "description": "The products can be filtered by their offer using this query parameter.", + "in": "query", + "name": "offer", + "required": false, + "schema": { + "type": "string" + } + }, + "query_product_plan": { + "description": "The products can be filtered by their plan using this query parameter.", + "in": "query", + "name": "plan", + "required": false, + "schema": { + "type": "string" + } + }, + "query_product_tier": { + "description": "The products can be filtered by their tier using this query parameter.", + "in": "query", + "name": "tier", + "required": false, + "schema": { + "type": "string" + } + }, + "query_project_id": { + "description": "ID of the project", + "in": "query", + "name": "project_id", + "schema": { + "type": "string" + } + }, + "query_region": { + "description": "Specific region of the product to query.", + "in": "query", + "name": "region", + "required": true, + "schema": { + "type": "string" + } + }, + "query_secret_id": { + "description": "The organization secret_id that holds the AWS access key that will be used to try to retrieve the S3 buckets.", + "in": "query", + "name": "secret_id", + "required": true, + "schema": { + "type": "string" + } + }, + "query_specific_product_name": { + "description": "Specific product name of the product to query.", + "in": "query", + "name": "product_name", + "required": true, + "schema": { + "type": "string" + } + }, + "query_specific_product_offer": { + "description": "Specific product offer of the product to query.", + "in": "query", + "name": "product_offer", + "required": false, + "schema": { + "type": "string" + } + }, + "query_specific_product_plan": { + "description": "Specific product plan of the product to query.", + "in": "query", + "name": "product_plan", + "required": false, + "schema": { + "type": "string" + } + }, + "query_specific_product_tier": { + "description": "Specific product tier of the product to query.", + "in": "query", + "name": "product_tier", + "required": true, + "schema": { + "type": "string" + } + }, + "query_specific_product_unit": { + "description": "Specific product unit of the product to query.", + "in": "query", + "name": "product_unit", + "required": true, + "schema": { + "type": "integer" + } + }, + "query_start": { + "description": "Date used to filter the operations returned. It must adhere to the following format: 2021-11-16T13:00:00Z", + "in": "query", + "name": "start", + "schema": { + "type": "string" + } + }, + "query_start_ts": { + "description": "Start Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ]", + "in": "query", + "name": "start", + "required": false, + "schema": { + "type": "string" + } + }, + "query_statuses": { + "description": "Statuses that the operations will be filtered by. It can be specified several times to filter by several statuses.", + "in": "query", + "name": "statuses", + "schema": { + "type": "string" + } + }, + "query_storage_bytes": { + "description": "Storage size in Bytes.", + "in": "query", + "name": "storage_bytes", + "required": false, + "schema": { + "type": "string" + } + }, + "query_subscription_id": { + "description": "ID of the subscription", + "in": "query", + "name": "subscription_id", + "schema": { + "type": "string" + } + }, + "query_to_ts": { + "description": "To Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ]", + "in": "query", + "name": "to", + "required": false, + "schema": { + "type": "string" + } + } + }, + "responses": { + "204": { + "description": "No content" + }, + "400": { + "content": { + "application/json": { + "schema": { + "properties": { + "errors": { + "additionalProperties": true, + "description": "Property names equal to the field names that occured an error.", + "type": "object" + }, + "message": { + "description": "A human readable message explaining the error.", + "example": "Bad request", + "type": "string" + }, + "success": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "description": "Bad request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "description": "A human readable message explaining the error.", + "example": "Authentication required.", + "type": "string" + }, + "success": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "description": "A human readable message explaining the error.", + "example": "Permission denied for user.", + "type": "string" + }, + "success": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "description": "A human readable message explaining the error.", + "example": "Resource not found.", + "type": "string" + }, + "success": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "description": "Not Found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "description": "A human readable message explaining the error.", + "example": "An error occured.", + "type": "string" + }, + "success": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "description": "Internal Server Error" + } + }, + "schemas": { + "Address": { + "properties": { + "city": { + "default": "", + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "country": { + "default": "", + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "line1": { + "default": "", + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "line2": { + "default": "", + "maxLength": 512, + "minLength": 0, + "nullable": true, + "type": "string" + }, + "postal_code": { + "default": "", + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "ApiKey": { + "properties": { + "active": { + "readOnly": true, + "type": "boolean" + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "key": { + "readOnly": true, + "type": "string" + }, + "last_used": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "secret": { + "readOnly": true, + "type": "string" + }, + "user_id": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AuditEvent": { + "properties": { + "action": { + "readOnly": true, + "type": "string" + }, + "actor": { + "allOf": [ + { + "$ref": "#/components/schemas/AuditUser" + } + ], + "readOnly": true + }, + "context": { + "readOnly": true, + "type": "object" + }, + "created": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "id": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AuditUser": { + "properties": { + "email": { + "readOnly": true, + "type": "string" + }, + "id": { + "readOnly": true, + "type": "string" + }, + "name": { + "readOnly": true, + "type": "string" + }, + "picture": { + "readOnly": true, + "type": "string" + }, + "username": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AwsSecret": { + "properties": { + "access_key": { + "type": "string" + }, + "secret_key": { + "type": "string" + } + }, + "type": "object" + }, + "AzureSecret": { + "properties": { + "connection_string": { + "type": "string" + } + }, + "type": "object" + }, + "BillingInformation": { + "properties": { + "address": { + "allOf": [ + { + "$ref": "#/components/schemas/Address" + } + ], + "default": { + "city": "", + "country": "", + "line1": "", + "line2": "", + "postal_code": "" + } + }, + "email": { + "default": "", + "format": "email", + "type": "string" + }, + "name": { + "default": "", + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "tax_id": { + "default": null, + "maxLength": 512, + "minLength": 1, + "nullable": true, + "type": "string" + }, + "tax_id_type": { + "default": null, + "maxLength": 512, + "minLength": 1, + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "BlobsList": { + "properties": { + "blobs": { + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "container_name": { + "maxLength": 512, + "minLength": 1, + "type": "string", + "writeOnly": true + }, + "error": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "prefix": { + "maxLength": 512, + "minLength": 0, + "nullable": true, + "type": "string", + "writeOnly": true + }, + "secret_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string", + "writeOnly": true + } + }, + "required": [ + "blobs", + "container_name", + "error", + "secret_id" + ], + "type": "object" + }, + "Bucket": { + "properties": { + "name": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "BucketsList": { + "properties": { + "buckets": { + "items": { + "$ref": "#/components/schemas/Bucket" + }, + "type": "array" + }, + "error": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "buckets", + "error" + ], + "type": "object" + }, + "CardEdit": { + "additionalProperties": false, + "properties": { + "default": { + "type": "boolean" + } + }, + "required": [ + "default" + ], + "type": "object" + }, + "Cluster": { + "properties": { + "allow_custom_storage": { + "readOnly": true, + "type": "boolean" + }, + "allow_suspend": { + "readOnly": true, + "type": "boolean" + }, + "backup_schedule": { + "maxLength": 512, + "minLength": 1, + "pattern": "^((((\\d+,)+\\d+|(\\d+(\\/|-|#)\\d+)|\\d+L?|\\*(\\/\\d+)?|L(-\\d+)?|\\?|[A-Z]{3}(-[A-Z]{3})?) ?){5,7})$|(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\d+(ns|us|µs|ms|s|m|h))+)$", + "readOnly": true, + "type": "string" + }, + "channel": { + "default": "stable", + "type": "string" + }, + "crate_version": { + "type": "string" + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "deletion_protected": { + "readOnly": true, + "type": "boolean" + }, + "external_ip": { + "readOnly": true, + "type": "string" + }, + "fqdn": { + "description": "Fully Qualified Domain Name. Note the trailing dot.", + "example": "red-r2-d2.aks1.eastus.azure.cratedb-dev.net.", + "readOnly": true, + "type": "string" + }, + "gc_available": { + "readOnly": true, + "type": "boolean" + }, + "hardware_specs": { + "allOf": [ + { + "$ref": "#/components/schemas/HardwareSpecs" + } + ], + "default": null, + "nullable": true + }, + "health": { + "example": { + "last_seen": "2024-09-27T16:59:02.507048", + "running_operation": "ALLOWED_CIDR_UPDATE", + "status": "GREEN" + }, + "properties": { + "last_seen": { + "format": "date-time", + "type": "string" + }, + "running_operation": { + "description": "The type of the currently running operation. Returns an empty string if there is no operation in progress.", + "enum": [ + "UPGRADE", + "SCALE", + "CREATE", + "ALLOWED_CIDR_UPDATE", + "PASSWORD_UPDATE", + "EXPAND_STORAGE", + "SUSPEND", + "CHANGE_COMPUTE", + "BACKUP_SCHEDULE_UPDATE", + "RESTORE_SNAPSHOT" + ], + "type": "string" + }, + "status": { + "enum": [ + "GREEN", + "YELLOW", + "RED", + "UNKNOWN", + "UNREACHABLE", + "SUSPENDED" + ], + "type": "string" + } + }, + "readOnly": true, + "type": "object" + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "ip_whitelist": { + "items": { + "$ref": "#/components/schemas/ClusterIpWhitelist" + }, + "type": "array" + }, + "last_async_operation": { + "allOf": [ + { + "$ref": "#/components/schemas/PartialClusterAsyncOperation" + } + ], + "readOnly": true + }, + "name": { + "type": "string", + "x-maximum": "63", + "x-minimum": "3" + }, + "num_nodes": { + "readOnly": true, + "type": "integer" + }, + "origin": { + "readOnly": true, + "type": "string" + }, + "password": { + "minLength": 24, + "type": "string", + "writeOnly": true + }, + "product_name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\-\\. ]*$", + "type": "string" + }, + "product_tier": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + }, + "product_unit": { + "default": 0, + "type": "integer" + }, + "project_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "subscription_id": { + "maxLength": 512, + "minLength": 1, + "readOnly": true, + "type": "string" + }, + "suspended": { + "readOnly": true, + "type": "boolean" + }, + "url": { + "example": "https://red-r2-d2.aks1.eastus.azure.cratedb-dev.net:4200", + "readOnly": true, + "type": "string" + }, + "username": { + "type": "string" + } + }, + "required": [ + "crate_version", + "name", + "password", + "product_name", + "product_tier", + "project_id", + "username" + ], + "type": "object" + }, + "ClusterAsyncOperation": { + "properties": { + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "entity": { + "type": "string" + }, + "entity_id": { + "type": "string" + }, + "feedback_data": { + "type": "object" + }, + "id": { + "type": "string" + }, + "non_sensitive_data": { + "description": "Depending on the type of the operation, it contains the following data:\n- SCALE: current_product_unit, current_num_nodes, target_product_unit and target_num_nodes\n- UPGRADE: current_version and target_version- ALLOWED_CIDR_UPDATE: current_ip_whitelist and target_ip_whitelist", + "type": "object" + }, + "status": { + "type": "string" + }, + "type": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ClusterAsyncOperationsList": { + "properties": { + "operations": { + "items": { + "$ref": "#/components/schemas/ClusterAsyncOperation" + }, + "readOnly": true, + "type": "array" + } + }, + "required": [ + "operations" + ], + "type": "object" + }, + "ClusterBackupSchedule": { + "properties": { + "backup_hours": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "backup_hours" + ], + "type": "object" + }, + "ClusterDataJobAzureBlob": { + "properties": { + "blob_name": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "container_name": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "secret_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + } + }, + "required": [ + "blob_name", + "container_name", + "secret_id" + ], + "type": "object" + }, + "ClusterDataJobFile": { + "properties": { + "download_url": { + "format": "url", + "readOnly": true, + "type": "string" + }, + "file_size": { + "readOnly": true, + "type": "integer" + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "readOnly": true, + "type": "string" + }, + "status": { + "readOnly": true, + "type": "string" + }, + "upload_url": { + "format": "url", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "ClusterDataJobS3": { + "properties": { + "bucket": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "endpoint": { + "format": "url", + "type": "string" + }, + "file_path": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "secret_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + } + }, + "required": [ + "bucket", + "file_path", + "secret_id" + ], + "type": "object" + }, + "ClusterDeletionProtection": { + "properties": { + "deletion_protected": { + "type": "boolean" + } + }, + "required": [ + "deletion_protected" + ], + "type": "object" + }, + "ClusterEdit": { + "properties": { + "password": { + "maxLength": 128, + "minLength": 24, + "type": "string", + "writeOnly": true + } + }, + "required": [ + "password" + ], + "type": "object" + }, + "ClusterExportJob": { + "properties": { + "cluster_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "compression": { + "maxLength": 512, + "minLength": 0, + "nullable": true, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "destination": { + "$ref": "#/components/schemas/ClusterExportJobDestination" + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "progress": { + "example": { + "bytes": 0, + "details": {}, + "failed_records": 0, + "message": "", + "percent": 0, + "records": 0, + "total_records": 0 + }, + "readOnly": true, + "type": "object" + }, + "source": { + "$ref": "#/components/schemas/ClusterExportJobSource" + }, + "status": { + "enum": [ + "REGISTERED", + "SENT", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED" + ], + "example": "REGISTERED", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "destination", + "source" + ], + "type": "object" + }, + "ClusterExportJobDestination": { + "properties": { + "file": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterDataJobFile" + } + ], + "example": { + "download_url": "string", + "file_size": 0, + "id": "string", + "name": "string", + "status": "string", + "upload_url": "string" + }, + "readOnly": true, + "type": "object" + }, + "format": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + } + }, + "required": [ + "format" + ], + "type": "object" + }, + "ClusterExportJobSource": { + "properties": { + "table": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "table" + ], + "type": "object" + }, + "ClusterImportJob": { + "properties": { + "azureblob": { + "$ref": "#/components/schemas/ClusterDataJobAzureBlob" + }, + "cluster_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "compression": { + "default": "none", + "maxLength": 512, + "minLength": 0, + "nullable": true, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "destination": { + "$ref": "#/components/schemas/ClusterImportJobDestination" + }, + "file": { + "$ref": "#/components/schemas/ClusterDataJobFile" + }, + "format": { + "type": "string" + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "progress": { + "example": { + "bytes": 0, + "details": {}, + "failed_files": 0, + "failed_records": 0, + "message": "", + "percent": 0, + "processed_files": 0, + "records": 0, + "total_files": 0, + "total_records": 0 + }, + "readOnly": true, + "type": "object" + }, + "s3": { + "$ref": "#/components/schemas/ClusterDataJobS3" + }, + "schema": { + "nullable": true, + "type": "object" + }, + "status": { + "enum": [ + "REGISTERED", + "SENT", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED" + ], + "example": "REGISTERED", + "readOnly": true, + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "$ref": "#/components/schemas/ClusterImportJobSourceURL" + } + }, + "required": [ + "destination", + "format", + "type" + ], + "type": "object" + }, + "ClusterImportJobDestination": { + "properties": { + "create_table": { + "default": true, + "type": "boolean" + }, + "table": { + "type": "string" + }, + "table_definition": { + "default": null, + "items": { + "$ref": "#/components/schemas/ClusterImportJobTableDefinition" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "table" + ], + "type": "object" + }, + "ClusterImportJobSourceURL": { + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "ClusterImportJobTableDefinition": { + "properties": { + "extra": { + "default": null, + "nullable": true, + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + "ClusterIpWhitelist": { + "properties": { + "cidr": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "description": { + "default": "", + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "cidr" + ], + "type": "object" + }, + "ClusterIpWhitelistEdit": { + "properties": { + "ip_whitelist": { + "items": { + "$ref": "#/components/schemas/ClusterIpWhitelist" + }, + "type": "array" + } + }, + "required": [ + "ip_whitelist" + ], + "type": "object" + }, + "ClusterJWTToken": { + "properties": { + "expiry": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "refresh": { + "readOnly": true, + "type": "string" + }, + "token": { + "readOnly": true, + "type": "string" + } + }, + "required": [ + "expiry", + "refresh", + "token" + ], + "type": "object" + }, + "ClusterPricing": { + "properties": { + "price_per_hour": { + "readOnly": true, + "type": "number" + }, + "price_per_month": { + "readOnly": true, + "type": "number" + }, + "promotion_price": { + "allOf": [ + { + "$ref": "#/components/schemas/PricingPromotion" + } + ], + "readOnly": true + } + }, + "type": "object" + }, + "ClusterProduct": { + "properties": { + "product_name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\-\\. ]*$", + "type": "string" + } + }, + "required": [ + "product_name" + ], + "type": "object" + }, + "ClusterProvision": { + "properties": { + "cluster": { + "$ref": "#/components/schemas/PartialCluster" + }, + "project": { + "$ref": "#/components/schemas/PartialProject" + }, + "project_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "subscription_id": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "cluster", + "subscription_id" + ], + "type": "object" + }, + "ClusterScale": { + "properties": { + "product_unit": { + "type": "integer" + } + }, + "required": [ + "product_unit" + ], + "type": "object" + }, + "ClusterSnapshot": { + "properties": { + "cluster_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "concrete_indices": { + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "created": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "project_id": { + "readOnly": true, + "type": "string" + }, + "repository": { + "readOnly": true, + "type": "string" + }, + "snapshot": { + "readOnly": true, + "type": "string" + }, + "tables": { + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ClusterSnapshotRestore": { + "properties": { + "repository": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "sections": { + "items": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "type": "array" + }, + "snapshot": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "source_cluster_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "tables": { + "items": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "type": "array" + }, + "type": { + "default": "tables", + "type": "string" + } + }, + "required": [ + "repository", + "snapshot" + ], + "type": "object" + }, + "ClusterStorageExpand": { + "properties": { + "disk_size_per_node_bytes": { + "default": null, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "ClusterSuspend": { + "properties": { + "suspended": { + "type": "boolean" + } + }, + "required": [ + "suspended" + ], + "type": "object" + }, + "ClusterUpgrade": { + "properties": { + "crate_version": { + "type": "string" + } + }, + "required": [ + "crate_version" + ], + "type": "object" + }, + "ConfigurationItem": { + "properties": { + "key": { + "maxLength": 512, + "minLength": 1, + "readOnly": true, + "type": "string" + }, + "organization_id": { + "maxLength": 36, + "minLength": 0, + "nullable": true, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "user_id": { + "maxLength": 36, + "minLength": 0, + "nullable": true, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "value": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value" + ], + "type": "object" + }, + "ConfirmationToken": { + "properties": { + "token": { + "type": "string", + "writeOnly": true + } + }, + "required": [ + "token" + ], + "type": "object" + }, + "Consumption": { + "properties": { + "cost": { + "type": "number" + }, + "credits": { + "type": "number" + }, + "dtuhours": { + "type": "number" + }, + "minutes": { + "type": "integer" + }, + "total": { + "type": "number" + } + }, + "type": "object" + }, + "ConsumptionPerProduct": { + "properties": { + "consumption": { + "$ref": "#/components/schemas/Consumption" + }, + "product_name": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "Container": { + "properties": { + "name": { + "maxLength": 512, + "minLength": 1, + "readOnly": true, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "ContainersList": { + "properties": { + "containers": { + "items": { + "$ref": "#/components/schemas/Container" + }, + "readOnly": true, + "type": "array" + }, + "error": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "secret_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string", + "writeOnly": true + } + }, + "required": [ + "containers", + "error", + "secret_id" + ], + "type": "object" + }, + "CrateDBChannels": { + "properties": { + "nightly": { + "$ref": "#/components/schemas/NightlyCrateDBVersion" + }, + "stable": { + "$ref": "#/components/schemas/CrateDBVersion" + }, + "testing": { + "$ref": "#/components/schemas/CrateDBVersion" + } + }, + "type": "object" + }, + "CrateDBVersion": { + "properties": { + "hotfix": { + "example": 1, + "readOnly": true, + "type": "integer" + }, + "major": { + "example": 4, + "readOnly": true, + "type": "integer" + }, + "minor": { + "example": 8, + "readOnly": true, + "type": "integer" + }, + "version": { + "example": "4.8.1", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CrateDBVersions": { + "properties": { + "crate_versions": { + "$ref": "#/components/schemas/CrateDBChannels" + } + }, + "type": "object" + }, + "Credit": { + "properties": { + "amount": { + "description": "Credit amount in USD cents", + "type": "number", + "writeOnly": true + }, + "comment": { + "nullable": true, + "type": "string" + }, + "expiration_date": { + "format": "date-time", + "type": "string" + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "original_amount": { + "description": "Credit amount in USD cents", + "example": 0, + "readOnly": true, + "type": "integer" + }, + "remaining_amount": { + "description": "Remaining credit amount in USD cents", + "readOnly": true, + "type": "integer" + }, + "start_date": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "status": { + "enum": [ + "ACTIVE", + "EXPIRED" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CurrentEstimatedCost": { + "properties": { + "hourly": { + "additionalProperties": { + "type": "number" + }, + "type": "object" + }, + "monthly": { + "additionalProperties": { + "type": "number" + }, + "type": "object" + } + }, + "type": "object" + }, + "CurrentUser": { + "properties": { + "email": { + "format": "email", + "type": "string" + }, + "hmac": { + "readOnly": true, + "type": "string" + }, + "idp": { + "readOnly": true, + "type": "string" + }, + "is_superuser": { + "readOnly": true, + "type": "boolean" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + }, + "organization_id": { + "deprecated": true, + "readOnly": true, + "type": "string" + }, + "organization_roles": { + "items": { + "$ref": "#/components/schemas/PartialOrganizationRoles" + }, + "readOnly": true, + "type": "array" + }, + "picture": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + }, + "project_roles": { + "items": { + "$ref": "#/components/schemas/PartialProjectRole" + }, + "readOnly": true, + "type": "array" + }, + "status": { + "readOnly": true, + "type": "string" + }, + "uid": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "username": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "email" + ], + "type": "object" + }, + "Customer": { + "properties": { + "address": { + "allOf": [ + { + "$ref": "#/components/schemas/CustomerAddress" + } + ], + "readOnly": true + }, + "city": { + "type": "string", + "writeOnly": true + }, + "country": { + "type": "string", + "writeOnly": true + }, + "email": { + "format": "email", + "type": "string" + }, + "line1": { + "type": "string", + "writeOnly": true + }, + "line2": { + "nullable": true, + "type": "string", + "writeOnly": true + }, + "name": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "organization_id": { + "readOnly": true, + "type": "string" + }, + "phone": { + "type": "string" + }, + "postal_code": { + "type": "string", + "writeOnly": true + }, + "tax": { + "allOf": [ + { + "$ref": "#/components/schemas/CustomerTax" + } + ], + "readOnly": true + }, + "tax_id": { + "nullable": true, + "type": "string", + "writeOnly": true + }, + "tax_id_type": { + "nullable": true, + "type": "string", + "writeOnly": true + } + }, + "required": [ + "city", + "country", + "email", + "line1", + "name", + "phone", + "postal_code" + ], + "type": "object" + }, + "CustomerAddress": { + "properties": { + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "line1": { + "type": "string" + }, + "line2": { + "type": "string" + }, + "postal_code": { + "type": "string" + } + }, + "type": "object" + }, + "CustomerCard": { + "properties": { + "brand": { + "readOnly": true, + "type": "string" + }, + "country": { + "readOnly": true, + "type": "string" + }, + "default": { + "readOnly": true, + "type": "boolean" + }, + "exp_month": { + "readOnly": true, + "type": "integer" + }, + "exp_year": { + "readOnly": true, + "type": "integer" + }, + "id": { + "readOnly": true, + "type": "string" + }, + "last4": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CustomerTax": { + "properties": { + "tax_id": { + "type": "string" + }, + "tax_id_type": { + "type": "string" + } + }, + "type": "object" + }, + "DataJobData": { + "properties": { + "details": { + "nullable": true, + "type": "object" + }, + "job_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "message": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "progress": { + "$ref": "#/components/schemas/Progress" + } + }, + "required": [ + "job_id", + "message", + "progress" + ], + "type": "object" + }, + "Discount": { + "properties": { + "amount": { + "type": "integer" + }, + "label": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "DublinCore": { + "properties": { + "created": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "modified": { + "format": "date-time", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "EditApiKeySchema": { + "properties": { + "active": { + "type": "boolean", + "writeOnly": true + } + }, + "type": "object" + }, + "FeatureFlags": { + "properties": { + "flags": { + "items": { + "$ref": "#/components/schemas/Flag" + }, + "nullable": true, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "File": { + "properties": { + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "download_url": { + "format": "url", + "readOnly": true, + "type": "string" + }, + "file_size": { + "description": "File size in bytes.", + "minimum": 1, + "type": "integer" + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "organization_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "status": { + "enum": [ + "PENDING", + "UPLOADED" + ], + "readOnly": true, + "type": "string" + }, + "upload_url": { + "format": "url", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "FileFeedback": { + "properties": { + "bytes": { + "nullable": true, + "type": "integer" + }, + "failed_records": { + "nullable": true, + "type": "integer" + }, + "message": { + "maxLength": 512, + "minLength": 0, + "nullable": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "percent": { + "nullable": true, + "type": "number" + }, + "records": { + "type": "integer" + }, + "status": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + }, + "total_records": { + "nullable": true, + "type": "integer" + } + }, + "required": [ + "name", + "records", + "status" + ], + "type": "object" + }, + "Flag": { + "properties": { + "is_active": { + "readOnly": true, + "type": "boolean" + }, + "name": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Guarantee": { + "properties": { + "disk_space_bytes": { + "readOnly": true + }, + "inserts_second": { + "readOnly": true, + "type": "integer" + }, + "queries_second": { + "readOnly": true, + "type": "integer" + }, + "storage_bytes": { + "readOnly": true + } + }, + "type": "object" + }, + "HardwareSpecs": { + "properties": { + "cpus_per_node": { + "default": null, + "nullable": true, + "type": "number" + }, + "disk_size_per_node_bytes": { + "default": null, + "nullable": true, + "type": "integer" + }, + "disk_type": { + "default": null, + "maxLength": 512, + "minLength": 1, + "nullable": true, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + }, + "disks_per_node": { + "type": "integer" + }, + "heap_size_bytes": { + "readOnly": true, + "type": "integer" + }, + "memory_per_node_bytes": { + "default": null, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "IPAddress": { + "properties": { + "ip": { + "description": "The IP address of the user", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "InstallToken": { + "properties": { + "token": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "token" + ], + "type": "object" + }, + "InvoiceConsumption": { + "properties": { + "currency": { + "maxLength": 512, + "minLength": 0, + "nullable": true, + "readOnly": true, + "type": "string" + }, + "discounts": { + "items": { + "$ref": "#/components/schemas/Discount" + }, + "type": "array" + }, + "period_end": { + "format": "date-time", + "type": "string" + }, + "period_start": { + "format": "date-time", + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "total": { + "type": "integer" + }, + "total_discount_amount": { + "type": "integer" + } + }, + "type": "object" + }, + "JWK": { + "properties": { + "keys": { + "items": { + "type": "object" + }, + "readOnly": true, + "type": "array" + } + }, + "required": [ + "keys" + ], + "type": "object" + }, + "JWTRefreshToken": { + "properties": { + "refresh_token": { + "type": "string" + } + }, + "required": [ + "refresh_token" + ], + "type": "object" + }, + "LatestCrateVersion": { + "properties": { + "nightly": { + "description": "The latest nightly CrateDB version. This can be deployed if the nightly channel is specified.", + "readOnly": true, + "type": "string" + }, + "stable": { + "description": "The latest stable CrateDB version. This will be used by default in all new deployments.", + "readOnly": true, + "type": "string" + }, + "testing": { + "description": "The latest testing CrateDB version. This can be deployed if the testing channel is specified.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Meta": { + "properties": { + "crate_versions": { + "allOf": [ + { + "$ref": "#/components/schemas/LatestCrateVersion" + } + ], + "readOnly": true + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/Version" + } + ], + "readOnly": true + } + }, + "type": "object" + }, + "NestedSecret": { + "additionalProperties": true, + "properties": { + "aws_secret": { + "allOf": [ + { + "$ref": "#/components/schemas/AwsSecret" + } + ], + "writeOnly": true + }, + "azure_secret": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureSecret" + } + ], + "writeOnly": true + } + }, + "type": "object" + }, + "NewApiKeyResponseSchema": { + "properties": { + "key": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiKey" + } + ], + "readOnly": true + }, + "secret": { + "readOnly": true, + "type": "string" + }, + "success": { + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, + "NewApiKeySchema": { + "properties": { + "active": { + "readOnly": true, + "type": "boolean" + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "key": { + "readOnly": true, + "type": "string" + }, + "last_used": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "secret": { + "readOnly": true, + "type": "string" + }, + "user_id": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "NightlyCrateDBVersion": { + "properties": { + "date": { + "example": "2023-05-24-00-02", + "readOnly": true, + "type": "string" + }, + "hotfix": { + "example": 1, + "readOnly": true, + "type": "integer" + }, + "major": { + "example": 4, + "readOnly": true, + "type": "integer" + }, + "minor": { + "example": 8, + "readOnly": true, + "type": "integer" + }, + "version": { + "example": "4.8.1", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ObjectsList": { + "properties": { + "error": { + "nullable": true, + "type": "string" + }, + "objects": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "error", + "objects" + ], + "type": "object" + }, + "Organization": { + "properties": { + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "email": { + "description": "Notification email to use for the organization.", + "format": "email", + "readOnly": true, + "type": "string" + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "notifications_enabled": { + "readOnly": true, + "type": "boolean" + }, + "plan_type": { + "default": 3, + "description": "The support plan to use for the organization.", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "integer" + }, + "project_count": { + "readOnly": true, + "type": "integer" + }, + "role_fqn": { + "enum": [ + "org_admin", + "org_member", + "project_admin", + "project_member" + ], + "example": "org_admin", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "OrganizationCurrentConsumptionSchema": { + "properties": { + "compute_consumption_this_month": { + "items": { + "$ref": "#/components/schemas/ConsumptionPerProduct" + }, + "type": "array" + }, + "current_cost": { + "$ref": "#/components/schemas/CurrentEstimatedCost" + }, + "storage_consumption_this_month": { + "$ref": "#/components/schemas/StorageConsumption" + } + }, + "type": "object" + }, + "OrganizationEdit": { + "properties": { + "email": { + "description": "Notification email to use for the organization.", + "format": "email", + "nullable": true, + "type": "string" + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 0, + "type": "string" + }, + "notifications_enabled": { + "type": "boolean" + }, + "plan_type": { + "description": "The support plan to use for the organization.", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "integer" + } + }, + "type": "object" + }, + "OrganizationInvitation": { + "properties": { + "email": { + "format": "email", + "type": "string" + }, + "expiration_date": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "organization_roles": { + "items": { + "$ref": "#/components/schemas/PartialOrganizationRoles" + }, + "readOnly": true, + "type": "array" + }, + "status": { + "type": "string" + }, + "uid": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "OrganizationRemainingBudget": { + "properties": { + "exclude_cluster_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string", + "writeOnly": true + }, + "remaining_budget_per_month": { + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "OrganizationRole": { + "properties": { + "added": { + "readOnly": true, + "type": "boolean" + }, + "invited": { + "readOnly": true, + "type": "boolean" + }, + "organization_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "role_fqn": { + "enum": [ + "org_admin", + "org_member" + ], + "type": "string" + }, + "user": { + "type": "string", + "writeOnly": true + }, + "user_id": { + "readOnly": true, + "type": "string" + } + }, + "required": [ + "role_fqn", + "user" + ], + "type": "object" + }, + "OrganizationUser": { + "properties": { + "email": { + "format": "email", + "type": "string" + }, + "idp": { + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + }, + "organization_roles": { + "items": { + "$ref": "#/components/schemas/PartialOrganizationRoles" + }, + "readOnly": true, + "type": "array" + }, + "picture": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + }, + "uid": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "username": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "email" + ], + "type": "object" + }, + "PartialCluster": { + "properties": { + "channel": { + "default": "stable", + "type": "string" + }, + "crate_version": { + "type": "string" + }, + "hardware_specs": { + "allOf": [ + { + "$ref": "#/components/schemas/HardwareSpecs" + } + ], + "default": null, + "nullable": true + }, + "name": { + "type": "string", + "x-maximum": "63", + "x-minimum": "3" + }, + "password": { + "minLength": 24, + "type": "string", + "writeOnly": true + }, + "product_name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\-\\. ]*$", + "type": "string" + }, + "product_tier": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + }, + "product_unit": { + "default": 0, + "type": "integer" + }, + "username": { + "type": "string" + } + }, + "required": [ + "crate_version", + "name", + "password", + "product_name", + "product_tier", + "username" + ], + "type": "object" + }, + "PartialClusterAsyncOperation": { + "properties": { + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PartialOrganizationRoles": { + "properties": { + "organization_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "role_fqn": { + "enum": [ + "org_admin", + "org_member" + ], + "type": "string" + } + }, + "required": [ + "role_fqn" + ], + "type": "object" + }, + "PartialProject": { + "properties": { + "backup_location": { + "allOf": [ + { + "$ref": "#/components/schemas/ProjectBackupLocation" + } + ], + "description": "Specify a custom backup location (custom s3 bucket) for a project. Supported in Edge regions only. ", + "nullable": true + }, + "name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + }, + "region": { + "maxLength": 512, + "minLength": 0, + "type": "string" + } + }, + "type": "object" + }, + "PartialProjectRole": { + "properties": { + "project_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "role_fqn": { + "enum": [ + "project_admin", + "project_member" + ], + "type": "string" + } + }, + "required": [ + "role_fqn" + ], + "type": "object" + }, + "PaymentMethod": { + "properties": { + "card": { + "allOf": [ + { + "$ref": "#/components/schemas/CustomerCard" + } + ], + "readOnly": true + }, + "is_available": { + "readOnly": true, + "type": "boolean" + }, + "is_setup": { + "readOnly": true, + "type": "boolean" + }, + "subscription": { + "allOf": [ + { + "$ref": "#/components/schemas/Subscription" + } + ], + "readOnly": true + }, + "subscription_id": { + "maxLength": 512, + "minLength": 1, + "readOnly": true, + "type": "string" + }, + "type": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PricingPromotion": { + "properties": { + "price_per_hour": { + "readOnly": true, + "type": "number" + }, + "price_per_month": { + "readOnly": true, + "type": "number" + }, + "promotion_duration": { + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "Product": { + "properties": { + "deprecated": { + "readOnly": true, + "type": "boolean" + }, + "description": { + "readOnly": true, + "type": "string" + }, + "guarantees_per_dtu": { + "allOf": [ + { + "$ref": "#/components/schemas/Guarantee" + } + ], + "readOnly": true + }, + "kind": { + "readOnly": true, + "type": "string" + }, + "label": { + "readOnly": true, + "type": "string" + }, + "name": { + "readOnly": true, + "type": "string" + }, + "offer": { + "readOnly": true, + "type": "string" + }, + "plan": { + "readOnly": true, + "type": "string" + }, + "price_per_dtu_minute": { + "readOnly": true, + "type": "integer" + }, + "region": { + "readOnly": true, + "type": "string" + }, + "scale_summary": { + "readOnly": true, + "type": "string" + }, + "scaling": { + "items": { + "$ref": "#/components/schemas/ScaleOption" + }, + "readOnly": true, + "type": "array" + }, + "specs": { + "allOf": [ + { + "$ref": "#/components/schemas/Spec" + } + ], + "readOnly": true + }, + "tags": { + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "tier": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ProductPricing": { + "properties": { + "cluster_price": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterPricing" + } + ], + "readOnly": true + }, + "storage_price": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterPricing" + } + ], + "readOnly": true + }, + "total_price": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterPricing" + } + ], + "readOnly": true + } + }, + "type": "object" + }, + "Progress": { + "properties": { + "bytes": { + "nullable": true, + "type": "integer" + }, + "failed_files": { + "type": "integer" + }, + "failed_records": { + "nullable": true, + "type": "integer" + }, + "files": { + "items": { + "$ref": "#/components/schemas/FileFeedback" + }, + "type": "array" + }, + "percent": { + "nullable": true, + "type": "number" + }, + "processed_files": { + "type": "integer" + }, + "records": { + "type": "integer" + }, + "total_files": { + "type": "integer" + }, + "total_records": { + "nullable": true, + "type": "integer" + } + }, + "required": [ + "records" + ], + "type": "object" + }, + "Project": { + "properties": { + "backup_location": { + "allOf": [ + { + "$ref": "#/components/schemas/ProjectBackupLocation" + } + ], + "description": "Specify a custom backup location (custom s3 bucket) for a project. Supported in Edge regions only. ", + "nullable": true + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + }, + "organization_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "region": { + "maxLength": 512, + "minLength": 0, + "type": "string" + } + }, + "required": [ + "name", + "organization_id" + ], + "type": "object" + }, + "ProjectBackupLocation": { + "properties": { + "additional_config": { + "example": { + "endpoint_url": "https://fra1.digitaloceanspaces.com" + }, + "type": "object" + }, + "credentials": { + "example": { + "access_key_id": "key", + "secret_access_key": "secret" + }, + "type": "object", + "writeOnly": true + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "location": { + "example": "some-bucket-name", + "maxLength": 512, + "minLength": 1 + }, + "location_type": { + "enum": [ + "s3" + ], + "type": "string" + } + }, + "required": [ + "credentials", + "location", + "location_type" + ], + "type": "object" + }, + "ProjectBackupLocationVerifyResponse": { + "properties": { + "message": { + "readOnly": true, + "type": "string" + }, + "s3_location_valid": { + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, + "ProjectEdit": { + "properties": { + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "ProjectRole": { + "properties": { + "added": { + "readOnly": true, + "type": "boolean" + }, + "project_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "role_fqn": { + "enum": [ + "project_admin", + "project_member" + ], + "type": "string" + }, + "user": { + "type": "string", + "writeOnly": true + }, + "user_id": { + "readOnly": true, + "type": "string" + } + }, + "required": [ + "role_fqn", + "user" + ], + "type": "object" + }, + "ProjectUser": { + "properties": { + "email": { + "format": "email", + "type": "string" + }, + "idp": { + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + }, + "picture": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + }, + "project_roles": { + "items": { + "$ref": "#/components/schemas/PartialProjectRole" + }, + "readOnly": true, + "type": "array" + }, + "uid": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "username": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "email" + ], + "type": "object" + }, + "Promotion": { + "properties": { + "description": { + "readOnly": true, + "type": "string" + }, + "discount_percent": { + "readOnly": true, + "type": "integer" + }, + "duration_months": { + "readOnly": true, + "type": "integer" + }, + "id": { + "readOnly": true, + "type": "string" + }, + "plan_name": { + "readOnly": true, + "type": "string" + }, + "plan_tier": { + "readOnly": true, + "type": "string" + }, + "scale_unit": { + "readOnly": true, + "type": "integer" + }, + "valid_to": { + "format": "date-time", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Quota": { + "properties": { + "code": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "current_value": { + "type": "number" + }, + "quota": { + "type": "number" + } + }, + "type": "object" + }, + "Region": { + "properties": { + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "deprecated": { + "readOnly": true, + "type": "boolean" + }, + "description": { + "readOnly": true, + "type": "string" + }, + "is_edge_region": { + "readOnly": true, + "type": "boolean" + }, + "last_seen": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "name": { + "readOnly": true, + "type": "string" + }, + "organization_id": { + "readOnly": true, + "type": "string" + }, + "status": { + "enum": [ + "UP", + "DOWN", + "UNKNOWN" + ], + "readOnly": true, + "type": "string" + }, + "upgrade_available": { + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, + "RegionCreate": { + "properties": { + "aws_bucket": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "aws_region": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\-\\. ]*$", + "type": "string" + }, + "description": { + "maxLength": 512, + "minLength": 0, + "type": "string" + }, + "organization_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "provider": { + "deprecated": true, + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + } + }, + "required": [ + "description", + "organization_id" + ], + "type": "object" + }, + "Role": { + "properties": { + "id": { + "readOnly": true, + "type": "string" + }, + "name": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ScaleOption": { + "properties": { + "description": { + "readOnly": true, + "type": "string" + }, + "disk_space_bytes": { + "readOnly": true + }, + "dtus": { + "readOnly": true, + "type": "integer" + }, + "inserts_second": { + "readOnly": true, + "type": "integer" + }, + "nodes": { + "readOnly": true, + "type": "integer" + }, + "price_per_minute": { + "readOnly": true, + "type": "integer" + }, + "queries_second": { + "readOnly": true, + "type": "integer" + }, + "storage_bytes": { + "readOnly": true + }, + "value": { + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "Secret": { + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedSecret" + } + ], + "writeOnly": true + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "description": { + "maxLength": 512, + "minLength": 0, + "readOnly": true, + "type": "string" + }, + "id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "SetupIntent": { + "properties": { + "client_secret": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SetupPaymentIntent": { + "properties": { + "client_secret": { + "readOnly": true, + "type": "string" + }, + "payment_intent": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Spec": { + "properties": { + "cpu_cores": { + "readOnly": true, + "type": "number" + }, + "ram_bytes": { + "readOnly": true, + "type": "integer" + }, + "storage_bytes": { + "readOnly": true, + "type": "integer" + }, + "storage_maximum_bytes": { + "readOnly": true, + "type": "integer" + }, + "storage_minimum_bytes": { + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "StorageConsumption": { + "properties": { + "cost": { + "type": "number" + }, + "credits": { + "type": "number" + }, + "dtuhours": { + "type": "number" + }, + "gibhours": { + "type": "integer" + }, + "minutes": { + "type": "integer" + }, + "total": { + "type": "number" + } + }, + "type": "object" + }, + "Subscription": { + "properties": { + "active": { + "readOnly": true, + "type": "boolean" + }, + "billing_model": { + "readOnly": true, + "type": "string" + }, + "dc": { + "allOf": [ + { + "$ref": "#/components/schemas/DublinCore" + } + ], + "readOnly": true + }, + "id": { + "readOnly": true, + "type": "string" + }, + "name": { + "readOnly": true, + "type": "string" + }, + "offer": { + "readOnly": true, + "type": "string" + }, + "offer_id": { + "readOnly": true, + "type": "string" + }, + "organization_id": { + "readOnly": true, + "type": "string" + }, + "plan": { + "readOnly": true, + "type": "string" + }, + "plan_id": { + "readOnly": true, + "type": "string" + }, + "promotion": { + "example": { + "description": "Free CR0 Clusters", + "discount_percent": 100, + "duration_months": 3, + "id": "free-cr0-cluster", + "plan_name": "cr0", + "plan_tier": "default", + "scale_unit": 0, + "valid_to": null + }, + "readOnly": true, + "type": "object" + }, + "provider": { + "readOnly": true, + "type": "string" + }, + "provisioned": { + "readOnly": true, + "type": "boolean" + }, + "purchaser": { + "readOnly": true, + "type": "string" + }, + "reference": { + "readOnly": true, + "type": "string" + }, + "state": { + "readOnly": true, + "type": "string" + }, + "subscription_id": { + "readOnly": true, + "type": "string" + }, + "subscription_provider": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SubscriptionAssignOrg": { + "properties": { + "organization_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + } + }, + "required": [ + "organization_id" + ], + "type": "object" + }, + "SubscriptionCreate": { + "properties": { + "organization_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + }, + "type": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "type": "string" + } + }, + "required": [ + "organization_id", + "type" + ], + "type": "object" + }, + "SubscriptionEdit": { + "properties": { + "plan": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "plan_id": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "type": "object" + }, + "SubscriptionProvision": { + "properties": { + "cluster": { + "$ref": "#/components/schemas/PartialCluster" + }, + "project": { + "$ref": "#/components/schemas/PartialProject" + }, + "project_id": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "type": "string" + } + }, + "required": [ + "cluster" + ], + "type": "object" + }, + "User": { + "properties": { + "email": { + "format": "email", + "type": "string" + }, + "idp": { + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + }, + "organization_roles": { + "items": { + "$ref": "#/components/schemas/PartialOrganizationRoles" + }, + "readOnly": true, + "type": "array" + }, + "picture": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + }, + "project_roles": { + "items": { + "$ref": "#/components/schemas/PartialProjectRole" + }, + "readOnly": true, + "type": "array" + }, + "uid": { + "maxLength": 36, + "minLength": 36, + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "readOnly": true, + "type": "string" + }, + "username": { + "maxLength": 512, + "minLength": 1, + "pattern": "^\\w[\\w\\- ]*$", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "email" + ], + "type": "object" + }, + "ValidateCard": { + "additionalProperties": false, + "properties": { + "payment_intent": { + "type": "string" + } + }, + "required": [ + "payment_intent" + ], + "type": "object" + }, + "Version": { + "properties": { + "prerelease": { + "readOnly": true, + "type": "boolean" + }, + "release": { + "readOnly": true, + "type": "string" + } + }, + "type": "object" + } + } + }, + "info": { + "title": "CrateDB Cloud API", + "version": "1.0.0" + }, + "openapi": "3.0.3", + "paths": { + "/api/v2/aws/subscriptions/{subscription_id}/": { + "get": { + "description": "This API has overrides for each of the billing providers. They are all the same.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return given subscription" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Retrieves subscription details", + "tags": [ + "Subscriptions" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionEdit" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return updated subscription" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Modify a subscription. Allows changing the plan.", + "tags": [ + "SaaS - AWS" + ] + } + }, + "/api/v2/azure/subscriptions/{subscription_id}/": { + "get": { + "description": "This API has overrides for each of the billing providers. They are all the same.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return given subscription" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Retrieves subscription details", + "tags": [ + "Subscriptions" + ] + } + }, + "/api/v2/clusters/": { + "get": { + "description": "Superusers can use this to view all clusters. For regular users, what is returned depends on their permissions.\n", + "parameters": [ + { + "$ref": "#/components/parameters/query_subscription_id" + }, + { + "$ref": "#/components/parameters/query_project_id" + }, + { + "$ref": "#/components/parameters/query_clusters_product_name" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Cluster" + }, + "type": "array" + } + } + }, + "description": "Return list of clusters" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists all clusters visible to the current user", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/name/{name}/": { + "head": { + "description": "Helper endpoint to validate the availability and correctness of a cluster name.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_name" + } + ], + "responses": { + "200": { + "description": "Name is already taken." + }, + "400": { + "description": "Invalid name. Name doesn't seem to be URL safe." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "description": "Name is available." + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Checks for availability of the given cluster name", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/": { + "delete": { + "description": "Subscription behavior depends on the provider. For Azure subscriptions, it will also cancel the subscription. Will always send the final usage reports as part of the deletion operation.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Deletes a cluster", + "tags": [ + "Clusters" + ] + }, + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the given cluster" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns information about a cluster", + "tags": [ + "Clusters" + ] + }, + "patch": { + "description": "Only changing the password is supported.", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterEdit" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the updated cluster" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Allows changing some cluster details", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/available-products/": { + "get": { + "description": "Lists all the products that the specified cluster can be updated to.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + }, + "description": "Returns a list of available products" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List all the products a cluster can be updated to.", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/available-upgrades/": { + "get": { + "description": "Lists all the available CrateDB versions considered stable that the specified cluster\ncan be upgraded to.\nDowngrades are not supported.\nMajor version upgrades are not supported.\nMinor version upgrades are only supported to the immediately next minor version.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CrateDBVersions" + } + } + }, + "description": "Return updated cluster" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List all the possible CrateDB versions a cluster can be directly upgraded to.", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/backup-schedule/": { + "put": { + "description": "Triggers a update backup schedule operation on the given cluster.\n\nCan change the backup hours of the clusters backup schedule. The payload needs to\ncontain new backup hours the cluster backup schedule should have.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterBackupSchedule" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the cluster.\n" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Change the backup hours of the cluster backup schedule.", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/deletion-protection/": { + "put": { + "description": "Allows to enable/disable deletion protection for a cluster. This is an additional safety feature. If deletion protection is enabled, the cluster cannot be deleted until it is disabled.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterDeletionProtection" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the updated cluster" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Controls a clusters deletion protection status", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/export-jobs/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ClusterExportJob" + }, + "type": "array" + } + } + }, + "description": "Returns the list of export jobs" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists export jobs for the given cluster", + "tags": [ + "Clusters - Data jobs" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterExportJob" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterExportJob" + } + } + }, + "description": "Returns the created export job" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Creates a new export job", + "tags": [ + "Clusters - Data jobs" + ] + } + }, + "/api/v2/clusters/{cluster_id}/export-jobs/{export_job_id}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + }, + { + "$ref": "#/components/parameters/path_export_job_id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Cancels an export job", + "tags": [ + "Clusters - Data jobs" + ] + }, + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + }, + { + "$ref": "#/components/parameters/path_export_job_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterExportJob" + } + } + }, + "description": "Returns the given export job" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns information about an export job", + "tags": [ + "Clusters - Data jobs" + ] + } + }, + "/api/v2/clusters/{cluster_id}/import-jobs/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ClusterImportJob" + }, + "type": "array" + } + } + }, + "description": "Returns the list of import jobs" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists import jobs for the given cluster", + "tags": [ + "Clusters - Data jobs" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterImportJob" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterImportJob" + } + } + }, + "description": "Returns the created import job" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Creates a new import job", + "tags": [ + "Clusters - Data jobs" + ] + } + }, + "/api/v2/clusters/{cluster_id}/import-jobs/{import_job_id}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + }, + { + "$ref": "#/components/parameters/path_import_job_id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Cancels an import job", + "tags": [ + "Clusters - Data jobs" + ] + }, + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + }, + { + "$ref": "#/components/parameters/path_import_job_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterImportJob" + } + } + }, + "description": "Returns the given import job" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns information about an import job", + "tags": [ + "Clusters - Data jobs" + ] + } + }, + "/api/v2/clusters/{cluster_id}/import-jobs/{import_job_id}/progress/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + }, + { + "$ref": "#/components/parameters/path_import_job_id" + }, + { + "$ref": "#/components/parameters/query_files_limit" + }, + { + "$ref": "#/components/parameters/query_files_offset" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataJobData" + } + } + }, + "description": "Returns the import job's progress" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Shows progress of the given import job", + "tags": [ + "Clusters - Data jobs" + ] + } + }, + "/api/v2/clusters/{cluster_id}/ip-restrictions/": { + "put": { + "description": "Allows adding an array of CIDRs which are allowed to access the cluster. Any CIDR not included in one of the ranges provided will be prevented from accessing the cluster. Each time the API is called the old CIDR are overwritten with the CIDRs passed in the new payload.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterIpWhitelistEdit" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the updated cluster" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Updates the clusters IP whitelist with the payload provided in the request", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/jwt/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterJWTToken" + } + } + }, + "description": "Returns the JWT access and refresh token for this cluster" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Generate a JWT for cluster access (Grand Central)", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/metrics/{metric_id}/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + }, + { + "$ref": "#/components/parameters/path_metric_id" + }, + { + "$ref": "#/components/parameters/query_start_ts" + }, + { + "$ref": "#/components/parameters/query_end_ts" + }, + { + "$ref": "#/components/parameters/query_minutes_ago" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "description": "Property names depend on the type of metrics.", + "type": "object" + } + } + }, + "description": "Returns metric data of a cluster for a given metric id" + }, + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns metrics for a cluster", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/nodes/{ordinal}": { + "delete": { + "description": "In some cases, it might be required to bounce a CrateDB node, for example if there are stuck queries.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + }, + { + "$ref": "#/components/parameters/path_ordinal" + } + ], + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "properties": { + "apiVersion": { + "example": "v1", + "type": "string" + }, + "code": { + "example": 200, + "type": "integer" + }, + "kind": { + "example": "Pod", + "type": "string" + }, + "status": { + "example": "Success", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Returns the status of node deletion" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Restarts the given node in the cluster", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/operations/": { + "get": { + "description": "Returns a list of operations that belong to the specified cluster.\nCluster operations provide their state so they can be used, for instance, to determine\nif a cluster upgrade has been finished.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + }, + { + "$ref": "#/components/parameters/query_statuses" + }, + { + "$ref": "#/components/parameters/query_start" + }, + { + "$ref": "#/components/parameters/query_end" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterAsyncOperationsList" + } + } + }, + "description": "Returns a list of cluster operations." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List all the operations that belong to the specified cluster.", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/product/": { + "put": { + "description": "Triggers a change product operation on the given cluster.\n\nCan change the product of the cluster. The payload needs to contain the product\nname the cluster should changed to.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterProduct" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the cluster.\n" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Change the clusters product", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/scale/": { + "put": { + "description": "Triggers a scaling operation on the given cluster.\n\nCan scale the cluster up or down. The cluster's product type must support the given\nscale unit. Supported scale units can be retrieved from the Products API.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterScale" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the cluster. Note the product_unit and num_nodes fields will not\nbe updated until the cluster has successfully completed the scaling operation.\nTo monitor the progress of a scaling operation please use the operations cluster\nsubresource.\n" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Scales the cluster", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/snapshots/": { + "get": { + "description": "Allows listing the backups for the given cluster. This will list all historic snapshots, however only the last 2 weeks are kept by default in the actual backup location. Snapshots are returned in descending order (latest first).\nSnapshots are not rotated while a cluster is suspended.\nPlease note that while arbitrary time intervals can be passed to this API, it will only ever return a window of snapshots that is 2 weeks wide going back from the latest snapshot in the given time range.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + }, + { + "$ref": "#/components/parameters/query_start_ts" + }, + { + "$ref": "#/components/parameters/query_end_ts" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ClusterSnapshot" + }, + "type": "array" + } + } + }, + "description": "Returns the list of snapshots taken on the cluster in descending order." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists snapshots (backups)", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/snapshots/restore/": { + "post": { + "description": "The repository and snapshot names can be retrieved from the Snapshots API.\n\nNote that for a snapshot restore operation to work, the table to be restored\nmust not exist (i.e. must be dropped first).\n\nThis will return immediately, but the restore operation might take some time,\ndepending on the size of the table being restored.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_target_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterSnapshotRestore" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterSnapshot" + } + } + }, + "description": "Return restored snapshot" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Restores the given snapshot", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/storage/": { + "put": { + "description": "Triggers a storage expansion operation on the given cluster.\n\nThe cluster's product type must support custom storage.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterStorageExpand" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the cluster. Note `disk_size_per_node_bytes` from hardware-specs fields will not\nbe updated until the cluster has successfully completed the operation.\nTo monitor the progress of an operation please use the operations cluster\nsubresource.\n" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Expands the cluster's storage", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/suspend/": { + "put": { + "description": "Triggers a suspend operation on the given cluster.\n\nCan suspend the cluster or reinstate it. The payload needs to contain the boolean if\nthe cluster should be suspended or reinstated. Only clusters with the products `cr1-4`\ncan be suspended.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterSuspend" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the cluster.\n" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Suspends the cluster", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/clusters/{cluster_id}/upgrade/": { + "put": { + "description": "Triggers an upgrade operation on the given cluster.\n\nThe given crate_version must be available in the same channel: i.e. it is not\npossible to upgrade from a stable version to a testing/nightly version.\n\nOnly minor and hotfix version upgrades are currently allowed.\n\nDowngrades are only supported to earlier hotfix releases.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterUpgrade" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the cluster. Note the crate_version field will not be updated until the cluster has successfully completed the upgrade operation. To monitor the progress of an upgrade operation please use the operations cluster subresource." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Upgrades a cluster", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/configurations/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/query_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ConfigurationItem" + }, + "type": "array" + } + } + }, + "description": "Returns the configurations" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns a list of available configurations", + "tags": [ + "Configurations" + ] + } + }, + "/api/v2/configurations/{key}/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_configuration_key" + }, + { + "$ref": "#/components/parameters/query_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigurationItem" + } + } + }, + "description": "Returns the configuration" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns the value of a configuration key", + "tags": [ + "Configurations" + ] + }, + "put": { + "parameters": [ + { + "$ref": "#/components/parameters/path_configuration_key" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigurationItem" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigurationItem" + } + } + }, + "description": "Returns the configuration" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Set the value of a configuration key", + "tags": [ + "Configurations" + ] + } + }, + "/api/v2/features/status/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeatureFlags" + } + } + }, + "description": "Returns the feature flags" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns the feature flags", + "tags": [ + "Feature flags" + ] + } + }, + "/api/v2/gcp/subscriptions/{subscription_id}/": { + "get": { + "description": "This API has overrides for each of the billing providers. They are all the same.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return given subscription" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Retrieves subscription details", + "tags": [ + "Subscriptions" + ] + } + }, + "/api/v2/integrations/aws/s3-buckets/": { + "get": { + "description": "Lists all the S3 buckets the given organization secret_id has access to.\n", + "parameters": [ + { + "$ref": "#/components/parameters/query_secret_id" + }, + { + "$ref": "#/components/parameters/query_endpoint" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BucketsList" + } + } + }, + "description": "Returns a list of S3 buckets that can be used to import data. If the attempt to gather the bucket names failed, an error message is provided describing the reason." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List all the S3 buckets the given organization secret_id has access to.", + "tags": [ + "Integrations" + ] + } + }, + "/api/v2/integrations/aws/s3-objects/": { + "get": { + "description": "List all the S3 objects in a specific bucket.", + "parameters": [ + { + "$ref": "#/components/parameters/query_secret_id" + }, + { + "$ref": "#/components/parameters/query_endpoint" + }, + { + "$ref": "#/components/parameters/query_bucket" + }, + { + "$ref": "#/components/parameters/query_prefix" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjectsList" + } + } + }, + "description": "List all the S3 objects in a specific bucket. If the attempt to gather the objects names failed, an error message is provided describing the reason. The results can be filtered by prefix. Returns maximum 1000 files." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List all the S3 objects in a specific bucket.", + "tags": [ + "Integrations" + ] + } + }, + "/api/v2/integrations/azure/blob-storage-containers/": { + "get": { + "description": "Lists all the Azure Blob Storage containers the given organization secret_id has\naccess to.\n", + "parameters": [ + { + "$ref": "#/components/parameters/query_azure_secret_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContainersList" + } + } + }, + "description": "Returns a list of Azure Blob Storage containers that can be used to import data. If the attempt to gather the container names failed, an error message is provided describing the reason." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List all the Azure Blob Storage containers the given organization secret_id has access to.", + "tags": [ + "Integrations" + ] + } + }, + "/api/v2/integrations/azure/blobs/": { + "get": { + "description": "List all the Azure Blob Storage blobs in a specific container.", + "parameters": [ + { + "$ref": "#/components/parameters/query_azure_secret_id" + }, + { + "$ref": "#/components/parameters/query_azure_container_name" + }, + { + "$ref": "#/components/parameters/query_azure_prefix" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlobsList" + } + } + }, + "description": "Returns a list of Azure Blob Storage blobs in a specific container. If the attempt to gather the blobs names failed, an error message is provided describing the reason. Returns maximum 5000 files." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List all the Azure Blob Storage blobs in a specific container.", + "tags": [ + "Integrations" + ] + } + }, + "/api/v2/meta/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Meta" + } + } + }, + "description": "Returns metadata indicating available CrateDB versions and the currently running API version." + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get version metadata", + "tags": [ + "Metadata" + ] + } + }, + "/api/v2/meta/cratedb-versions/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CrateDBVersions" + } + } + }, + "description": "Returns the list of available CrateDB versions usable in CrateDB Cloud." + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get all stable CrateDB versions.", + "tags": [ + "Metadata" + ] + } + }, + "/api/v2/meta/ip-address/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IPAddress" + } + } + }, + "description": "Returns the visitor's IP address" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get IP address of visitor", + "tags": [ + "Metadata" + ] + } + }, + "/api/v2/meta/jwk/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JWK" + } + } + }, + "description": "Returns the list of JWK public keys used for verifying JWT tokens signed by CrateDB Cloud." + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get JWKS for CrateDB Cloud", + "tags": [ + "Metadata" + ] + } + }, + "/api/v2/meta/jwt/refresh/": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JWTRefreshToken" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterJWTToken" + } + } + }, + "description": "Returns the created access token." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Generate a new JWT access token for a given refresh token (Grand Central)", + "tags": [ + "Metadata" + ] + } + }, + "/api/v2/organizations/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Organization" + }, + "type": "array" + } + } + }, + "description": "Returns a list of organizations." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get a list of organizations the user is a member of", + "tags": [ + "Organizations" + ] + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + }, + "description": "Returns the created organization." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Create an organization", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Delete an organization", + "tags": [ + "Organizations" + ] + }, + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + }, + "description": "Returns details of given organization" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get organization details", + "tags": [ + "Organizations" + ] + }, + "put": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationEdit" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + }, + "description": "Returns details of updated organization" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Update organization", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/auditlogs/": { + "get": { + "description": "Expose the audit logs for an organization in descending order of their date.", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/query_from_ts" + }, + { + "$ref": "#/components/parameters/query_to_ts" + }, + { + "$ref": "#/components/parameters/query_auditlog_action" + }, + { + "$ref": "#/components/parameters/query_auditlog_cluster_id" + }, + { + "$ref": "#/components/parameters/query_last" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AuditEvent" + }, + "type": "array" + } + } + }, + "description": "Returns the list of audit logs" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists the audit logs for an organization", + "tags": [ + "Audit" + ] + } + }, + "/api/v2/organizations/{organization_id}/clusters/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/query_subscription_id" + }, + { + "$ref": "#/components/parameters/query_project_id" + }, + { + "$ref": "#/components/parameters/query_clusters_product_name" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Cluster" + }, + "type": "array" + } + } + }, + "description": "Returns the list of clusters" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists clusters in the given Organization", + "tags": [ + "Clusters" + ] + }, + "post": { + "description": "Provision a new cluster, optionally creating a project as well. A valid subscription must be provided, or a cluster can be provisioned by a superuser w/o a subscription.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterProvision" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "Returns the created cluster" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Provisions a cluster", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/organizations/{organization_id}/consumption/current-month/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationCurrentConsumptionSchema" + } + } + }, + "description": "Get the organization's current month consumption and cost, as well as a cost estimation." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get information on the current natural month cost and usage, as well as cost estimations.", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/credits/": { + "get": { + "description": "List of credits per organization.", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/query_credit_status" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Credit" + }, + "type": "array" + } + } + }, + "description": "Return organization's credits" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List of credits.", + "tags": [ + "Organizations - Credits" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Credit" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Credit" + } + } + }, + "description": "Returns the created credit." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Create a credit", + "tags": [ + "Organizations - Credits" + ] + } + }, + "/api/v2/organizations/{organization_id}/credits/{credit_id}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/path_credit_id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Delete a credit", + "tags": [ + "Organizations - Credits" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/path_credit_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Credit" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Credit" + } + } + }, + "description": "Returns details of updated credit" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Update credit", + "tags": [ + "Organizations - Credits" + ] + } + }, + "/api/v2/organizations/{organization_id}/customer/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + }, + "description": "Returns the organization's billing informations." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Retrieve organization's billing informations", + "tags": [ + "Organizations" + ] + }, + "put": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + }, + "description": "Returns the organization's billing informations." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Edit organization's billing informations", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/files/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/File" + }, + "type": "array" + } + } + }, + "description": "Returns a list of the organization's files." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get a list of files uploaded into the organization", + "tags": [ + "Organizations - Files" + ] + }, + "post": { + "description": "This creates a pre-signed URL to be used to upload files into CrateDB Cloud.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/File" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/File" + } + } + }, + "description": "Returns the file placeholder with the pre-signed URL for upload." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Sets up a file upload", + "tags": [ + "Organizations - Files" + ] + } + }, + "/api/v2/organizations/{organization_id}/files/{file_id}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/path_file_id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Delete a file", + "tags": [ + "Organizations - Files" + ] + }, + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/path_file_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/File" + } + } + }, + "description": "Returns details of given file" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get file details", + "tags": [ + "Organizations - Files" + ] + } + }, + "/api/v2/organizations/{organization_id}/invitations/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/query_invite_status" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OrganizationInvitation" + }, + "type": "array" + } + } + }, + "description": "Returns a list of organization invitations. A status filter can be used. Note expired and non-expired invitations will be returned when filtering by PENDING status." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get a list of user invitations related to the organization", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/invitations/{invite_token}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/path_invite_token" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Delete a user invite to the organization", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/metrics/prometheus/": { + "get": { + "description": "This exposes a Prometheus-compatible endpoint that can be configured as a scrape target in a Prometheus instance. Please note that this API is rate-limited to one request per minute. You may configure a higher scrape interval, but will not receive updated data more than once a minute.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "plain/text": { + "schema": { + "additionalProperties": true, + "description": "Prometheus metrics.", + "type": "string" + } + } + }, + "description": "Returns cluster metric data of an organization" + }, + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns prometheus metrics for the clusters of an organization", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/payment-methods/": { + "get": { + "description": "A payment method is a way of paying for your CrateDB Cloud cluster. It is sometimes used interchangeably to refer to a subscription, but that is not entirely true. In the case of Stripe, you're actually paying with a specific credit card.\nThis encapsulates all the business logic around what payment methods are available and shown to the user.\nWhen deploying clusters, a specific subscription still needs to be specified.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaymentMethod" + }, + "type": "array" + } + } + }, + "description": "Return list of payment methods." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists payment methods belonging to this Organization", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/projects/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Project" + }, + "type": "array" + } + } + }, + "description": "Returns list of projects" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get a list of projects the user is a member of filtered by organization", + "tags": [ + "Projects" + ] + } + }, + "/api/v2/organizations/{organization_id}/quotas/": { + "get": { + "description": "Quotas provide limits to some actions. This endpoint returns a list of the quotas that apply to the given organization, with the current value and the quota value for each.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Quota" + }, + "type": "array" + } + } + }, + "description": "Return list of quotas" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists all quotas for the given organization", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/regions/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Region" + }, + "type": "array" + } + } + }, + "description": "Return list of regions" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists all regions visible to the current user by organization", + "tags": [ + "Regions" + ] + } + }, + "/api/v2/organizations/{organization_id}/remaining-budget/": { + "get": { + "description": "Returns the remaining monthly budget an organization can spend for deploying new clusters or scaling up existing clusters.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/query_exclude_cluster_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationRemainingBudget" + } + } + }, + "description": "Returns the remaining budget" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns the remaining budget of an organization.", + "tags": [ + "Organizations" + ] + } + }, + "/api/v2/organizations/{organization_id}/secrets/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Secret" + }, + "type": "array" + } + } + }, + "description": "Returns a list of secrets that belong to an organization." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get a list of secrets stored within an organization.", + "tags": [ + "Organizations - Secrets" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Secret" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Secret" + } + } + }, + "description": "Returns the created secret." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Create a secret within an organization", + "tags": [ + "Organizations - Secrets" + ] + } + }, + "/api/v2/organizations/{organization_id}/secrets/{secret_id}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/path_organization_secret_id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Delete a secret", + "tags": [ + "Organizations - Secrets" + ] + } + }, + "/api/v2/organizations/{organization_id}/subscriptions/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Subscription" + }, + "type": "array" + } + } + }, + "description": "Return list of subscriptions" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists subscriptions belonging to an organization", + "tags": [ + "Subscriptions" + ] + } + }, + "/api/v2/organizations/{organization_id}/users/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OrganizationUser" + }, + "type": "array" + } + } + }, + "description": "Returns a list of organization users" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get a list of users assigned to the organization", + "tags": [ + "Users" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationRole" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "added": false, + "organization_id": "7bbcf777-7755-41e0-a0b9-5df748b81c0a", + "role_fqn": "org_admin", + "user_id": "c4953d0d-f360-4820-9c43-0b8889fe769a" + }, + "schema": { + "$ref": "#/components/schemas/OrganizationRole" + } + } + }, + "description": "User role has been updated successfully" + }, + "201": { + "content": { + "application/json": { + "example": { + "added": true, + "organization_id": "7bbcf777-7755-41e0-a0b9-5df748b81c0a", + "role_fqn": "org_admin", + "user_id": "c4953d0d-f360-4820-9c43-0b8889fe769a" + }, + "schema": { + "$ref": "#/components/schemas/OrganizationRole" + } + } + }, + "description": "User role has been added successfully" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Add or update organization roles of a user", + "tags": [ + "Users" + ] + } + }, + "/api/v2/organizations/{organization_id}/users/{user_id_or_email}/": { + "delete": { + "description": "The last organization admin cannot be removed from an organization.", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/path_user_id_or_email" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Remove a user by id or email from an organization", + "tags": [ + "Users" + ] + } + }, + "/api/v2/products/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/query_product_tier" + }, + { + "$ref": "#/components/parameters/query_product_name" + }, + { + "$ref": "#/components/parameters/query_product_plan" + }, + { + "$ref": "#/components/parameters/query_product_offer" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Product" + }, + "type": "array" + } + } + }, + "description": "Return list of products" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Return a list of available products", + "tags": [ + "Products" + ] + } + }, + "/api/v2/products/clusters/price": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/query_specific_product_plan" + }, + { + "$ref": "#/components/parameters/query_specific_product_offer" + }, + { + "$ref": "#/components/parameters/query_specific_product_name" + }, + { + "$ref": "#/components/parameters/query_specific_product_tier" + }, + { + "$ref": "#/components/parameters/query_specific_product_unit" + }, + { + "$ref": "#/components/parameters/query_region" + }, + { + "$ref": "#/components/parameters/query_storage_bytes" + }, + { + "$ref": "#/components/parameters/query_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductPricing" + } + } + }, + "description": "Returns the price of a specific product" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/401" + } + }, + "summary": "Returns the price of the given product specification.", + "tags": [ + "Products" + ] + } + }, + "/api/v2/products/{kind}/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_product_kind" + }, + { + "$ref": "#/components/parameters/query_product_tier" + }, + { + "$ref": "#/components/parameters/query_product_name" + }, + { + "$ref": "#/components/parameters/query_product_plan" + }, + { + "$ref": "#/components/parameters/query_product_offer" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Product" + }, + "type": "array" + } + } + }, + "description": "Return list of products" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Return a list of available products, filtering by kind", + "tags": [ + "Products" + ] + } + }, + "/api/v2/projects/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Project" + }, + "type": "array" + } + } + }, + "description": "Returns list of projects" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get a list of projects the user is a member of", + "tags": [ + "Projects" + ] + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + }, + "description": "Returns created project" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Create a project", + "tags": [ + "Projects" + ] + } + }, + "/api/v2/projects/{project_id}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_project_id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Delete a project", + "tags": [ + "Projects" + ] + }, + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_project_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + }, + "description": "Returns details of given project" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get project details", + "tags": [ + "Projects" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/path_project_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectEdit" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + }, + "description": "Returns details of updated project" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Update the name of a project", + "tags": [ + "Projects" + ] + } + }, + "/api/v2/projects/{project_id}/clusters/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_project_id" + }, + { + "$ref": "#/components/parameters/query_subscription_id" + }, + { + "$ref": "#/components/parameters/query_clusters_product_name" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Cluster" + }, + "type": "array" + } + } + }, + "description": "Returns the list of clusters" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists clusters in the given Project", + "tags": [ + "Clusters" + ] + } + }, + "/api/v2/projects/{project_id}/users/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_project_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ProjectUser" + }, + "type": "array" + } + } + }, + "description": "Returns list of project users" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get a list of users assigned to the project", + "tags": [ + "Users" + ] + }, + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/path_project_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectRole" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "added": false, + "project_id": "8a6a2a85-911e-423c-9f0a-a042acb22cf0", + "role_fqn": "project_admin", + "user_id": "c4953d0d-f360-4820-9c43-0b8889fe769a" + }, + "schema": { + "$ref": "#/components/schemas/ProjectRole" + } + } + }, + "description": "User role has been updated successfully" + }, + "201": { + "content": { + "application/json": { + "example": { + "added": true, + "project_id": "8a6a2a85-911e-423c-9f0a-a042acb22cf0", + "role_fqn": "project_admin", + "user_id": "c4953d0d-f360-4820-9c43-0b8889fe769a" + }, + "schema": { + "$ref": "#/components/schemas/ProjectRole" + } + } + }, + "description": "User role has been added successfully" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Add or update project roles of a user", + "tags": [ + "Users" + ] + } + }, + "/api/v2/projects/{project_id}/users/{user_id_or_email}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_project_id" + }, + { + "$ref": "#/components/parameters/path_user_id_or_email" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Remove a user by id or email from a project", + "tags": [ + "Users" + ] + } + }, + "/api/v2/regions/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/query_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Region" + }, + "type": "array" + } + } + }, + "description": "Return list of regions" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists all regions visible to the current user by organization", + "tags": [ + "Regions" + ] + }, + "post": { + "description": "Regular users can only create Edge regions within their organization.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegionCreate" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Region" + } + } + }, + "description": "Returns the created region" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Creates a region", + "tags": [ + "Regions" + ] + } + }, + "/api/v2/regions/{region_name}/": { + "delete": { + "description": "Deletion is only possible for Edge regions that are not connected to CrateDB Cloud and have no resources deployed (projects or clusters).\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_region_name" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Deletes an Edge region", + "tags": [ + "Regions" + ] + } + }, + "/api/v2/regions/{region_name}/install-token/": { + "get": { + "description": "An installation token is used to authenticate with CrateDB Cloud from the command line when installing an edge region. They are valid for 24 hours.", + "parameters": [ + { + "$ref": "#/components/parameters/path_region_name" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstallToken" + } + } + }, + "description": "Returns the generated install token" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Generates an install token for an Edge region", + "tags": [ + "Regions" + ] + } + }, + "/api/v2/regions/{region_name}/verify-backup-location/": { + "post": { + "parameters": [ + { + "$ref": "#/components/parameters/path_region_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectBackupLocation" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectBackupLocationVerifyResponse" + } + } + }, + "description": "Returns the result of the verification" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Verifies backup location details. Supported in Edge regions only.", + "tags": [ + "Regions" + ] + } + }, + "/api/v2/roles/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Role" + }, + "type": "array" + } + } + }, + "description": "Returns list of roles" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Get a list of roles which can be assigned to a user", + "tags": [ + "Roles" + ] + } + }, + "/api/v2/stripe/bank-transfer/organizations/{organization_id}/setup/": { + "post": { + "description": "Setup Stripe subscription to pay by bank transfer\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return subscription" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Setup Stripe bank transfer subscription", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/card/organizations/{organization_id}/setup-payment/": { + "post": { + "description": "This is used by the UI when showing the \"Add CC\" form. The client secret returned\nby this API is used by the Stripe JS library to request that a card be added\nto this customer's account as well as a test $1 charge to make sure the card is valid.\nOnce the UI marks the PaymentIntent as completed it must call /validate-card/ endpoint\nto refund the charge and mark the card as valid.\n\nWe do not store any card details.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetupPaymentIntent" + } + } + }, + "description": "Return created setup payment intent" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Create a Stripe PaymentIntent", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/card/organizations/{organization_id}/setup/": { + "post": { + "description": "This is used by the UI when showing the \"Add CC\" form. The client secret returned\nby this API is used by the Stripe JS library to request that a card be added\nto this customer's account.\n\nWe do not store any card details.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetupIntent" + } + } + }, + "description": "Return created setup intent" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Create a Stripe SetupIntent", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/organizations/{organization_id}/billing-information/": { + "get": { + "deprecated": true, + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInformation" + } + } + }, + "description": "Return billing information details" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Retrieve billing info", + "tags": [ + "SaaS - Stripe" + ] + }, + "patch": { + "deprecated": true, + "description": "Allows editing the customers billing info (address etc.).", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInformation" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInformation" + } + } + }, + "description": "Return updated billing information" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Edit billing information", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/organizations/{organization_id}/cards/": { + "get": { + "description": "We do not store any card info ourselves, this API always goes direct to Stripe.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/CustomerCard" + }, + "type": "array" + } + } + }, + "description": "Return list of customer cards" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List customers cards on file with Stripe", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/organizations/{organization_id}/cards/{card_id}/": { + "delete": { + "description": "You cannot delete the last card on file.", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/path_card_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerCard" + } + } + }, + "description": "Return deleted customer card" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Delete a previously registered card", + "tags": [ + "SaaS - Stripe" + ] + }, + "patch": { + "description": "This only allows setting the card as default. It is not possible to update any other card details (CVV, expiry date...). A new card must be added instead.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + }, + { + "$ref": "#/components/parameters/path_card_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CardEdit" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerCard" + } + } + }, + "description": "Return updated customer card" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Update a card on file with Stripe", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/organizations/{organization_id}/setup-payment/": { + "post": { + "deprecated": true, + "description": "Please use /api/v2/stripe/card/organizations/{organization_id}/setup-payment/ instead.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetupPaymentIntent" + } + } + }, + "description": "Return created setup payment intent" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Create a Stripe PaymentIntent", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/organizations/{organization_id}/setup/": { + "post": { + "deprecated": true, + "description": "Please use /api/v2/stripe/card/organizations/{organization_id}/setup/ instead.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetupIntent" + } + } + }, + "description": "Return created setup intent" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Create a Stripe SetupIntent", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/organizations/{organization_id}/validate-card/": { + "post": { + "description": "This is used by the UI when submitting the \"Add CC\" form. If the PaymentIntent\nwas successfully completed this endpoint refunds the PaymentIntent and marks the card\nas validated so that it can be used with subscriptions.\n\nWe do not store any card details.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateCard" + } + } + }, + "description": "Card validated. Returns all the Stripe cards associated to the customer." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Validates a Stripe card that has been charged with a Setup PaymentIntent.", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/promotions/": { + "get": { + "description": "If any promotions are applicable, they will be returned here. Note that only one promotion can be active per organization, and if one already is - this API will return nothing.\n", + "parameters": [ + { + "$ref": "#/components/parameters/query_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Promotion" + }, + "type": "array" + } + } + }, + "description": "Return list of stripe promotions" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "List promotions applicable to this organization", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/subscriptions/{subscription_id}/": { + "delete": { + "description": "BE CAREFUL! This will delete any clusters that the customer has running in this Subscription. Will also send the final usage reports.\nCancelling the subscription will mean that the outstanding amount due will be collected immediately.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return deleted subscription" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Cancel a Stripe subscription", + "tags": [ + "SaaS - Stripe" + ] + }, + "get": { + "description": "This API has overrides for each of the billing providers. They are all the same.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return given subscription" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Retrieves subscription details", + "tags": [ + "Subscriptions" + ] + } + }, + "/api/v2/stripe/subscriptions/{subscription_id}/invoices/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + }, + { + "$ref": "#/components/parameters/query_limit" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/InvoiceConsumption" + }, + "type": "array" + } + } + }, + "description": "Returns past invoices, including consumption information." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Retrieve invoices", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/stripe/subscriptions/{subscription_id}/invoices/upcoming/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvoiceConsumption" + } + } + }, + "description": "Returns consumption details for the upcoming invoice" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Retrieve upcoming invoice details", + "tags": [ + "SaaS - Stripe" + ] + } + }, + "/api/v2/subscriptions/": { + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/query_organization_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Subscription" + }, + "type": "array" + } + } + }, + "description": "Return list of subscriptions" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists subscriptions belonging to an organization", + "tags": [ + "Subscriptions" + ] + }, + "post": { + "description": "Must be called before attempting to deploy a cluster or adding credit card details.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionCreate" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return created subscription" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Creates a pending Stripe-based subscription.", + "tags": [ + "Subscriptions" + ] + } + }, + "/api/v2/subscriptions/{subscription_id}/": { + "delete": { + "description": "BE CAREFUL! This will delete any clusters that the customer has running in this Subscription. For Stripe it will also send the final usage reports.\nCancelling the subscription will mean that the outstanding amount due will be collected immediately.\nThis works only for subscriptions of type 'contract' or 'stripe'.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return deleted subscription" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Cancel a subscription", + "tags": [ + "Subscriptions" + ] + }, + "get": { + "description": "This API has overrides for each of the billing providers. They are all the same.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return given subscription" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Retrieves subscription details", + "tags": [ + "Subscriptions" + ] + } + }, + "/api/v2/subscriptions/{subscription_id}/assign-org/": { + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionAssignOrg" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Return updated subscription with the assigned organization" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Allows setting an org for a Subscription (only used by Azure)", + "tags": [ + "Subscriptions" + ] + } + }, + "/api/v2/subscriptions/{subscription_id}/wizard-redirect/": { + "get": { + "description": "This may be unused as there's no obvious usages, and it doesn't seem to be configured in either Azure or AWS marketplaces.\n", + "parameters": [ + { + "$ref": "#/components/parameters/path_subscription_id" + } + ], + "responses": { + "302": { + "content": { + "text/html": { + "example": " Redirecting...

Redirecting...

You should be redirected automatically to target URL: {location}. If not click the link." + } + }, + "description": "Redirect to wizard page", + "headers": { + "Location": { + "description": "Location of redirect page", + "schema": { + "type": "string" + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Performs a redirect to the deployment wizard", + "tags": [ + "Subscriptions" + ] + } + }, + "/api/v2/users/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array" + } + } + }, + "description": "Returns a list of users" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "[Superusers only] Returns the list of users in the system", + "tags": [ + "Users" + ] + } + }, + "/api/v2/users/me/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CurrentUser" + } + } + }, + "description": "Returns the details of the current user" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns details of the current user", + "tags": [ + "Users" + ] + }, + "patch": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CurrentUser" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CurrentUser" + } + } + }, + "description": "Returns the details of the updated user" + }, + "202": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "example": "A confirmation email was sent. Please follow its instructions to verify your new email address.", + "type": "string" + }, + "status": { + "example": "pending", + "type": "string" + }, + "success": { + "default": true, + "type": "boolean" + } + }, + "type": "object" + } + } + }, + "description": "Accepted" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Updates email address of the current user", + "tags": [ + "Users" + ] + } + }, + "/api/v2/users/me/accept-invite/": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfirmationToken" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "added": false, + "organization_id": "7bbcf777-7755-41e0-a0b9-5df748b81c0a", + "role_fqn": "org_admin", + "user_id": "c4953d0d-f360-4820-9c43-0b8889fe769a" + }, + "schema": { + "$ref": "#/components/schemas/OrganizationRole" + } + } + }, + "description": "User role has been updated successfully" + }, + "201": { + "content": { + "application/json": { + "example": { + "added": true, + "organization_id": "7bbcf777-7755-41e0-a0b9-5df748b81c0a", + "role_fqn": "org_admin", + "user_id": "c4953d0d-f360-4820-9c43-0b8889fe769a" + }, + "schema": { + "$ref": "#/components/schemas/OrganizationRole" + } + } + }, + "description": "User role has been added successfully" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Accept an invitation to an organization received via email, validated via an expirable token", + "tags": [ + "Users" + ] + } + }, + "/api/v2/users/me/api-keys/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NewApiKeySchema" + }, + "type": "array" + } + } + }, + "description": "Lists the Api keys belonging to the current user. It never displays the secret." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Lists the Api keys belonging to the current user", + "tags": [ + "Users" + ] + }, + "post": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewApiKeyResponseSchema" + } + } + }, + "description": "Creates a new API key for the current user and returns it along with its secret." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Creates a new API key for the current user", + "tags": [ + "Users" + ] + } + }, + "/api/v2/users/me/api-keys/{api_key}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_api_key" + } + ], + "responses": { + "204": { + "description": "Deletes an API key belonging to the current user, specified by its key." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Deletes an API key belonging to the current user, specified by its key.", + "tags": [ + "Users" + ] + }, + "get": { + "parameters": [ + { + "$ref": "#/components/parameters/path_api_key" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewApiKeySchema" + } + } + }, + "description": "Returns a specific API key belonging to the current user, identified by its key. It never displays the secret." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Returns a specific API key belonging to the current user, identified by its key.", + "tags": [ + "Users" + ] + }, + "patch": { + "parameters": [ + { + "$ref": "#/components/parameters/path_api_key" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditApiKeySchema" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewApiKeySchema" + } + } + }, + "description": "Allows switching the `active` flag of the specified API key for the current user." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Allows switching the `active` flag of the specified API key for the current user", + "tags": [ + "Users" + ] + } + }, + "/api/v2/users/me/confirm-email/": { + "put": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfirmationToken" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CurrentUser" + } + } + }, + "description": "Returns the details of the updated user" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "Confirm new email address by sending validation token", + "tags": [ + "Users" + ] + } + }, + "/api/v2/users/{user_id}/": { + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/path_user_id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "summary": "[Superusers only] Delete a user", + "tags": [ + "Users" + ] + } + } + }, + "tags": [ + { + "description": "APIs for interacting with Organizations.", + "name": "Organizations" + }, + { + "description": "APIs listing usage Credits.", + "name": "Organizations - Credits" + }, + { + "description": "APIs listing uploaded files to import in the DB.", + "name": "Organizations - Files" + }, + { + "description": "APIs listing organization's secrets.", + "name": "Organizations - Secrets" + }, + { + "description": "APIs for interacting with Regions.", + "name": "Regions" + }, + { + "description": "APIs for interacting with Projects.", + "name": "Projects" + }, + { + "description": "APIs for cluster operations.", + "name": "Clusters" + }, + { + "description": "APIs for import and export jobs operations.", + "name": "Clusters - Data jobs" + }, + { + "description": "APIs for listing Products.", + "name": "Products" + }, + { + "description": "APIs for interacting with Users.", + "name": "Users" + }, + { + "description": "APIs for interacting with User Roles.", + "name": "Roles" + }, + { + "description": "APIs for interacting with subscriptions.", + "name": "Subscriptions" + }, + { + "description": "APIs for interacting with Stripe.", + "name": "SaaS - Stripe" + }, + { + "description": "APIs for interacting with Azure.", + "name": "SaaS - Azure" + }, + { + "description": "APIs for interacting with AWS.", + "name": "SaaS - AWS" + }, + { + "description": "APIs for viewing Audit Logs.", + "name": "Audit" + }, + { + "description": "APIs for CrateDB Cloud Metadata.", + "name": "Metadata" + }, + { + "description": "APIs for CrateDB Cloud Configurations.", + "name": "Configurations" + } + ] +} diff --git a/generate.go b/generate.go new file mode 100644 index 0000000..25e68aa --- /dev/null +++ b/generate.go @@ -0,0 +1,4 @@ +package cratedb + +//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -generate types -o types.gen.go -package cratedb cloud-api-openapi-v1.0.0.json +//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -generate client -o client.gen.go -package cratedb cloud-api-openapi-v1.0.0.json diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..f86097a --- /dev/null +++ b/go.mod @@ -0,0 +1,29 @@ +module github.com/komminarlabs/cratedb + +go 1.22.2 + +require ( + github.com/oapi-codegen/oapi-codegen/v2 v2.4.0 + github.com/oapi-codegen/runtime v1.1.1 +) + +require ( + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect + github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect + github.com/getkin/kin-openapi v0.127.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/google/uuid v1.5.0 // indirect + github.com/invopop/yaml v0.3.1 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect + github.com/speakeasy-api/openapi-overlay v0.9.0 // indirect + github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..8d5489d --- /dev/null +++ b/go.sum @@ -0,0 +1,181 @@ +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +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/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58= +github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 h1:PRxIJD8XjimM5aTknUK9w6DHLDox2r2M3DI4i2pnd3w= +github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936/go.mod h1:ttYvX5qlB+mlV1okblJqcSMtR4c52UKxDiX9GRBS8+Q= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/getkin/kin-openapi v0.127.0 h1:Mghqi3Dhryf3F8vR370nN67pAERW+3a95vomb3MAREY= +github.com/getkin/kin-openapi v0.127.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +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/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= +github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA= +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/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oapi-codegen/oapi-codegen/v2 v2.4.0 h1:ewncaynfMEu6CgvhxUFsMx7y/9aXFtGVXC3eJx/lwxY= +github.com/oapi-codegen/oapi-codegen/v2 v2.4.0/go.mod h1:zerrXS/bF5RsHAGFUjfEtq5OyMjuLAeMZCb84orpd7g= +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/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= +github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +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/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/speakeasy-api/openapi-overlay v0.9.0 h1:Wrz6NO02cNlLzx1fB093lBlYxSI54VRhy1aSutx0PQg= +github.com/speakeasy-api/openapi-overlay v0.9.0/go.mod h1:f5FloQrHA7MsxYg9djzMD5h6dxrHjVVByWKh7an8TRc= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= +github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +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.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +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.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +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.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +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-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/tools/tools.go b/tools/tools.go new file mode 100644 index 0000000..8615cb4 --- /dev/null +++ b/tools/tools.go @@ -0,0 +1,8 @@ +//go:build tools +// +build tools + +package tools + +import ( + _ "github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen" +) diff --git a/types.gen.go b/types.gen.go new file mode 100644 index 0000000..5c72389 --- /dev/null +++ b/types.gen.go @@ -0,0 +1,1869 @@ +// Package cratedb provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.0 DO NOT EDIT. +package cratedb + +import ( + "encoding/json" + "fmt" + "time" + + openapi_types "github.com/oapi-codegen/runtime/types" +) + +// Defines values for ClusterHealthRunningOperation. +const ( + ALLOWEDCIDRUPDATE ClusterHealthRunningOperation = "ALLOWED_CIDR_UPDATE" + BACKUPSCHEDULEUPDATE ClusterHealthRunningOperation = "BACKUP_SCHEDULE_UPDATE" + CHANGECOMPUTE ClusterHealthRunningOperation = "CHANGE_COMPUTE" + CREATE ClusterHealthRunningOperation = "CREATE" + EXPANDSTORAGE ClusterHealthRunningOperation = "EXPAND_STORAGE" + PASSWORDUPDATE ClusterHealthRunningOperation = "PASSWORD_UPDATE" + RESTORESNAPSHOT ClusterHealthRunningOperation = "RESTORE_SNAPSHOT" + SCALE ClusterHealthRunningOperation = "SCALE" + SUSPEND ClusterHealthRunningOperation = "SUSPEND" + UPGRADE ClusterHealthRunningOperation = "UPGRADE" +) + +// Defines values for ClusterHealthStatus. +const ( + ClusterHealthStatusGREEN ClusterHealthStatus = "GREEN" + ClusterHealthStatusRED ClusterHealthStatus = "RED" + ClusterHealthStatusSUSPENDED ClusterHealthStatus = "SUSPENDED" + ClusterHealthStatusUNKNOWN ClusterHealthStatus = "UNKNOWN" + ClusterHealthStatusUNREACHABLE ClusterHealthStatus = "UNREACHABLE" + ClusterHealthStatusYELLOW ClusterHealthStatus = "YELLOW" +) + +// Defines values for ClusterExportJobStatus. +const ( + ClusterExportJobStatusFAILED ClusterExportJobStatus = "FAILED" + ClusterExportJobStatusINPROGRESS ClusterExportJobStatus = "IN_PROGRESS" + ClusterExportJobStatusREGISTERED ClusterExportJobStatus = "REGISTERED" + ClusterExportJobStatusSENT ClusterExportJobStatus = "SENT" + ClusterExportJobStatusSUCCEEDED ClusterExportJobStatus = "SUCCEEDED" +) + +// Defines values for ClusterImportJobStatus. +const ( + ClusterImportJobStatusFAILED ClusterImportJobStatus = "FAILED" + ClusterImportJobStatusINPROGRESS ClusterImportJobStatus = "IN_PROGRESS" + ClusterImportJobStatusREGISTERED ClusterImportJobStatus = "REGISTERED" + ClusterImportJobStatusSENT ClusterImportJobStatus = "SENT" + ClusterImportJobStatusSUCCEEDED ClusterImportJobStatus = "SUCCEEDED" +) + +// Defines values for CreditStatus. +const ( + ACTIVE CreditStatus = "ACTIVE" + EXPIRED CreditStatus = "EXPIRED" +) + +// Defines values for FileStatus. +const ( + PENDING FileStatus = "PENDING" + UPLOADED FileStatus = "UPLOADED" +) + +// Defines values for OrganizationPlanType. +const ( + OrganizationPlanTypeN1 OrganizationPlanType = 1 + OrganizationPlanTypeN2 OrganizationPlanType = 2 + OrganizationPlanTypeN3 OrganizationPlanType = 3 + OrganizationPlanTypeN4 OrganizationPlanType = 4 + OrganizationPlanTypeN5 OrganizationPlanType = 5 + OrganizationPlanTypeN6 OrganizationPlanType = 6 +) + +// Defines values for OrganizationRoleFqn. +const ( + OrganizationRoleFqnOrgAdmin OrganizationRoleFqn = "org_admin" + OrganizationRoleFqnOrgMember OrganizationRoleFqn = "org_member" + OrganizationRoleFqnProjectAdmin OrganizationRoleFqn = "project_admin" + OrganizationRoleFqnProjectMember OrganizationRoleFqn = "project_member" +) + +// Defines values for OrganizationEditPlanType. +const ( + OrganizationEditPlanTypeN1 OrganizationEditPlanType = 1 + OrganizationEditPlanTypeN2 OrganizationEditPlanType = 2 + OrganizationEditPlanTypeN3 OrganizationEditPlanType = 3 + OrganizationEditPlanTypeN4 OrganizationEditPlanType = 4 + OrganizationEditPlanTypeN5 OrganizationEditPlanType = 5 + OrganizationEditPlanTypeN6 OrganizationEditPlanType = 6 +) + +// Defines values for OrganizationRoleRoleFqn. +const ( + OrganizationRoleRoleFqnOrgAdmin OrganizationRoleRoleFqn = "org_admin" + OrganizationRoleRoleFqnOrgMember OrganizationRoleRoleFqn = "org_member" +) + +// Defines values for PartialOrganizationRolesRoleFqn. +const ( + OrgAdmin PartialOrganizationRolesRoleFqn = "org_admin" + OrgMember PartialOrganizationRolesRoleFqn = "org_member" +) + +// Defines values for PartialProjectRoleRoleFqn. +const ( + PartialProjectRoleRoleFqnProjectAdmin PartialProjectRoleRoleFqn = "project_admin" + PartialProjectRoleRoleFqnProjectMember PartialProjectRoleRoleFqn = "project_member" +) + +// Defines values for ProjectBackupLocationLocationType. +const ( + S3 ProjectBackupLocationLocationType = "s3" +) + +// Defines values for ProjectRoleRoleFqn. +const ( + ProjectRoleRoleFqnProjectAdmin ProjectRoleRoleFqn = "project_admin" + ProjectRoleRoleFqnProjectMember ProjectRoleRoleFqn = "project_member" +) + +// Defines values for RegionStatus. +const ( + RegionStatusDOWN RegionStatus = "DOWN" + RegionStatusUNKNOWN RegionStatus = "UNKNOWN" + RegionStatusUP RegionStatus = "UP" +) + +// Defines values for PathMetricId. +const ( + PathMetricIdCrateAvailability PathMetricId = "crate_availability" + PathMetricIdCrateClusterLastUserActivity PathMetricId = "crate_cluster_last_user_activity" + PathMetricIdCrateCpuSeconds PathMetricId = "crate_cpu_seconds" + PathMetricIdCrateDiskUsage2 PathMetricId = "crate_disk_usage2" + PathMetricIdCrateMemoryUsage PathMetricId = "crate_memory_usage" + PathMetricIdCrateQueryCount PathMetricId = "crate_query_count" + PathMetricIdCrateQueryDuration PathMetricId = "crate_query_duration" + PathMetricIdCrateUnreplicatedTables PathMetricId = "crate_unreplicated_tables" +) + +// Defines values for GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId. +const ( + GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricIdCrateAvailability GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId = "crate_availability" + GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricIdCrateClusterLastUserActivity GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId = "crate_cluster_last_user_activity" + GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricIdCrateCpuSeconds GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId = "crate_cpu_seconds" + GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricIdCrateDiskUsage2 GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId = "crate_disk_usage2" + GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricIdCrateMemoryUsage GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId = "crate_memory_usage" + GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricIdCrateQueryCount GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId = "crate_query_count" + GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricIdCrateQueryDuration GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId = "crate_query_duration" + GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricIdCrateUnreplicatedTables GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId = "crate_unreplicated_tables" +) + +// Address defines model for Address. +type Address struct { + City *string `json:"city,omitempty"` + Country *string `json:"country,omitempty"` + Line1 *string `json:"line1,omitempty"` + Line2 *string `json:"line2"` + PostalCode *string `json:"postal_code,omitempty"` +} + +// ApiKey defines model for ApiKey. +type ApiKey struct { + Active *bool `json:"active,omitempty"` + Dc *DublinCore `json:"dc,omitempty"` + Key *string `json:"key,omitempty"` + LastUsed *time.Time `json:"last_used,omitempty"` + Secret *string `json:"secret,omitempty"` + UserId *string `json:"user_id,omitempty"` +} + +// AuditEvent defines model for AuditEvent. +type AuditEvent struct { + Action *string `json:"action,omitempty"` + Actor *AuditUser `json:"actor,omitempty"` + Context *map[string]interface{} `json:"context,omitempty"` + Created *time.Time `json:"created,omitempty"` + Id *string `json:"id,omitempty"` +} + +// AuditUser defines model for AuditUser. +type AuditUser struct { + Email *string `json:"email,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Picture *string `json:"picture,omitempty"` + Username *string `json:"username,omitempty"` +} + +// AwsSecret defines model for AwsSecret. +type AwsSecret struct { + AccessKey *string `json:"access_key,omitempty"` + SecretKey *string `json:"secret_key,omitempty"` +} + +// AzureSecret defines model for AzureSecret. +type AzureSecret struct { + ConnectionString *string `json:"connection_string,omitempty"` +} + +// BillingInformation defines model for BillingInformation. +type BillingInformation struct { + Address *Address `json:"address,omitempty"` + Email *openapi_types.Email `json:"email,omitempty"` + Name *string `json:"name,omitempty"` + TaxId *string `json:"tax_id"` + TaxIdType *string `json:"tax_id_type"` +} + +// BlobsList defines model for BlobsList. +type BlobsList struct { + Blobs *[]string `json:"blobs,omitempty"` + ContainerName *string `json:"container_name,omitempty"` + Error *string `json:"error"` + Prefix *string `json:"prefix"` + SecretId *string `json:"secret_id,omitempty"` +} + +// Bucket defines model for Bucket. +type Bucket struct { + Name string `json:"name"` +} + +// BucketsList defines model for BucketsList. +type BucketsList struct { + Buckets []Bucket `json:"buckets"` + Error *string `json:"error"` +} + +// CardEdit defines model for CardEdit. +type CardEdit struct { + Default bool `json:"default"` +} + +// Cluster defines model for Cluster. +type Cluster struct { + AllowCustomStorage *bool `json:"allow_custom_storage,omitempty"` + AllowSuspend *bool `json:"allow_suspend,omitempty"` + BackupSchedule *string `json:"backup_schedule,omitempty"` + Channel *string `json:"channel,omitempty"` + CrateVersion string `json:"crate_version"` + Dc *DublinCore `json:"dc,omitempty"` + DeletionProtected *bool `json:"deletion_protected,omitempty"` + ExternalIp *string `json:"external_ip,omitempty"` + + // Fqdn Fully Qualified Domain Name. Note the trailing dot. + Fqdn *string `json:"fqdn,omitempty"` + GcAvailable *bool `json:"gc_available,omitempty"` + HardwareSpecs *HardwareSpecs `json:"hardware_specs"` + Health *struct { + LastSeen *time.Time `json:"last_seen,omitempty"` + + // RunningOperation The type of the currently running operation. Returns an empty string if there is no operation in progress. + RunningOperation *ClusterHealthRunningOperation `json:"running_operation,omitempty"` + Status *ClusterHealthStatus `json:"status,omitempty"` + } `json:"health,omitempty"` + Id *string `json:"id,omitempty"` + IpWhitelist *[]ClusterIpWhitelist `json:"ip_whitelist,omitempty"` + LastAsyncOperation *PartialClusterAsyncOperation `json:"last_async_operation,omitempty"` + Name string `json:"name"` + NumNodes *int `json:"num_nodes,omitempty"` + Origin *string `json:"origin,omitempty"` + Password *string `json:"password,omitempty"` + ProductName string `json:"product_name"` + ProductTier string `json:"product_tier"` + ProductUnit *int `json:"product_unit,omitempty"` + ProjectId string `json:"project_id"` + SubscriptionId *string `json:"subscription_id,omitempty"` + Suspended *bool `json:"suspended,omitempty"` + Url *string `json:"url,omitempty"` + Username string `json:"username"` +} + +// ClusterHealthRunningOperation The type of the currently running operation. Returns an empty string if there is no operation in progress. +type ClusterHealthRunningOperation string + +// ClusterHealthStatus defines model for Cluster.Health.Status. +type ClusterHealthStatus string + +// ClusterAsyncOperation defines model for ClusterAsyncOperation. +type ClusterAsyncOperation struct { + Dc *DublinCore `json:"dc,omitempty"` + Entity *string `json:"entity,omitempty"` + EntityId *string `json:"entity_id,omitempty"` + FeedbackData *map[string]interface{} `json:"feedback_data,omitempty"` + Id *string `json:"id,omitempty"` + + // NonSensitiveData Depending on the type of the operation, it contains the following data: + // - SCALE: current_product_unit, current_num_nodes, target_product_unit and target_num_nodes + // - UPGRADE: current_version and target_version- ALLOWED_CIDR_UPDATE: current_ip_whitelist and target_ip_whitelist + NonSensitiveData *map[string]interface{} `json:"non_sensitive_data,omitempty"` + Status *string `json:"status,omitempty"` + Type *string `json:"type,omitempty"` +} + +// ClusterAsyncOperationsList defines model for ClusterAsyncOperationsList. +type ClusterAsyncOperationsList struct { + Operations *[]ClusterAsyncOperation `json:"operations,omitempty"` +} + +// ClusterBackupSchedule defines model for ClusterBackupSchedule. +type ClusterBackupSchedule struct { + BackupHours string `json:"backup_hours"` +} + +// ClusterDataJobAzureBlob defines model for ClusterDataJobAzureBlob. +type ClusterDataJobAzureBlob struct { + BlobName string `json:"blob_name"` + ContainerName string `json:"container_name"` + SecretId string `json:"secret_id"` +} + +// ClusterDataJobFile defines model for ClusterDataJobFile. +type ClusterDataJobFile struct { + DownloadUrl *string `json:"download_url,omitempty"` + FileSize *int `json:"file_size,omitempty"` + Id string `json:"id"` + Name *string `json:"name,omitempty"` + Status *string `json:"status,omitempty"` + UploadUrl *string `json:"upload_url,omitempty"` +} + +// ClusterDataJobS3 defines model for ClusterDataJobS3. +type ClusterDataJobS3 struct { + Bucket string `json:"bucket"` + Endpoint *string `json:"endpoint,omitempty"` + FilePath string `json:"file_path"` + SecretId string `json:"secret_id"` +} + +// ClusterDeletionProtection defines model for ClusterDeletionProtection. +type ClusterDeletionProtection struct { + DeletionProtected bool `json:"deletion_protected"` +} + +// ClusterEdit defines model for ClusterEdit. +type ClusterEdit struct { + Password *string `json:"password,omitempty"` +} + +// ClusterExportJob defines model for ClusterExportJob. +type ClusterExportJob struct { + ClusterId *string `json:"cluster_id,omitempty"` + Compression *string `json:"compression"` + Dc *DublinCore `json:"dc,omitempty"` + Destination ClusterExportJobDestination `json:"destination"` + Id *string `json:"id,omitempty"` + Progress *map[string]interface{} `json:"progress,omitempty"` + Source ClusterExportJobSource `json:"source"` + Status *ClusterExportJobStatus `json:"status,omitempty"` +} + +// ClusterExportJobStatus defines model for ClusterExportJob.Status. +type ClusterExportJobStatus string + +// ClusterExportJobDestination defines model for ClusterExportJobDestination. +type ClusterExportJobDestination struct { + File *ClusterDataJobFile `json:"file,omitempty"` + Format string `json:"format"` +} + +// ClusterExportJobSource defines model for ClusterExportJobSource. +type ClusterExportJobSource struct { + Table string `json:"table"` +} + +// ClusterImportJob defines model for ClusterImportJob. +type ClusterImportJob struct { + Azureblob *ClusterDataJobAzureBlob `json:"azureblob,omitempty"` + ClusterId *string `json:"cluster_id,omitempty"` + Compression *string `json:"compression"` + Dc *DublinCore `json:"dc,omitempty"` + Destination ClusterImportJobDestination `json:"destination"` + File *ClusterDataJobFile `json:"file,omitempty"` + Format string `json:"format"` + Id *string `json:"id,omitempty"` + Progress *map[string]interface{} `json:"progress,omitempty"` + S3 *ClusterDataJobS3 `json:"s3,omitempty"` + Schema *map[string]interface{} `json:"schema"` + Status *ClusterImportJobStatus `json:"status,omitempty"` + Type string `json:"type"` + Url *ClusterImportJobSourceURL `json:"url,omitempty"` +} + +// ClusterImportJobStatus defines model for ClusterImportJob.Status. +type ClusterImportJobStatus string + +// ClusterImportJobDestination defines model for ClusterImportJobDestination. +type ClusterImportJobDestination struct { + CreateTable *bool `json:"create_table,omitempty"` + Table string `json:"table"` + TableDefinition *[]ClusterImportJobTableDefinition `json:"table_definition"` +} + +// ClusterImportJobSourceURL defines model for ClusterImportJobSourceURL. +type ClusterImportJobSourceURL struct { + Url string `json:"url"` +} + +// ClusterImportJobTableDefinition defines model for ClusterImportJobTableDefinition. +type ClusterImportJobTableDefinition struct { + Extra *string `json:"extra"` + Name string `json:"name"` + Type string `json:"type"` +} + +// ClusterIpWhitelist defines model for ClusterIpWhitelist. +type ClusterIpWhitelist struct { + Cidr string `json:"cidr"` + Description *string `json:"description,omitempty"` +} + +// ClusterIpWhitelistEdit defines model for ClusterIpWhitelistEdit. +type ClusterIpWhitelistEdit struct { + IpWhitelist []ClusterIpWhitelist `json:"ip_whitelist"` +} + +// ClusterJWTToken defines model for ClusterJWTToken. +type ClusterJWTToken struct { + Expiry *time.Time `json:"expiry,omitempty"` + Refresh *string `json:"refresh,omitempty"` + Token *string `json:"token,omitempty"` +} + +// ClusterPricing defines model for ClusterPricing. +type ClusterPricing struct { + PricePerHour *float32 `json:"price_per_hour,omitempty"` + PricePerMonth *float32 `json:"price_per_month,omitempty"` + PromotionPrice *PricingPromotion `json:"promotion_price,omitempty"` +} + +// ClusterProduct defines model for ClusterProduct. +type ClusterProduct struct { + ProductName string `json:"product_name"` +} + +// ClusterProvision defines model for ClusterProvision. +type ClusterProvision struct { + Cluster PartialCluster `json:"cluster"` + Project *PartialProject `json:"project,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + SubscriptionId string `json:"subscription_id"` +} + +// ClusterScale defines model for ClusterScale. +type ClusterScale struct { + ProductUnit int `json:"product_unit"` +} + +// ClusterSnapshot defines model for ClusterSnapshot. +type ClusterSnapshot struct { + ClusterId *string `json:"cluster_id,omitempty"` + ConcreteIndices *[]string `json:"concrete_indices,omitempty"` + Created *time.Time `json:"created,omitempty"` + Dc *DublinCore `json:"dc,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + Repository *string `json:"repository,omitempty"` + Snapshot *string `json:"snapshot,omitempty"` + Tables *[]string `json:"tables,omitempty"` +} + +// ClusterSnapshotRestore defines model for ClusterSnapshotRestore. +type ClusterSnapshotRestore struct { + Repository string `json:"repository"` + Sections *[]string `json:"sections,omitempty"` + Snapshot string `json:"snapshot"` + SourceClusterId *string `json:"source_cluster_id,omitempty"` + Tables *[]string `json:"tables,omitempty"` + Type *string `json:"type,omitempty"` +} + +// ClusterStorageExpand defines model for ClusterStorageExpand. +type ClusterStorageExpand struct { + DiskSizePerNodeBytes *int `json:"disk_size_per_node_bytes"` +} + +// ClusterSuspend defines model for ClusterSuspend. +type ClusterSuspend struct { + Suspended bool `json:"suspended"` +} + +// ClusterUpgrade defines model for ClusterUpgrade. +type ClusterUpgrade struct { + CrateVersion string `json:"crate_version"` +} + +// ConfigurationItem defines model for ConfigurationItem. +type ConfigurationItem struct { + Key *string `json:"key,omitempty"` + OrganizationId *string `json:"organization_id"` + UserId *string `json:"user_id"` + Value string `json:"value"` +} + +// ConfirmationToken defines model for ConfirmationToken. +type ConfirmationToken struct { + Token *string `json:"token,omitempty"` +} + +// Consumption defines model for Consumption. +type Consumption struct { + Cost *float32 `json:"cost,omitempty"` + Credits *float32 `json:"credits,omitempty"` + Dtuhours *float32 `json:"dtuhours,omitempty"` + Minutes *int `json:"minutes,omitempty"` + Total *float32 `json:"total,omitempty"` +} + +// ConsumptionPerProduct defines model for ConsumptionPerProduct. +type ConsumptionPerProduct struct { + Consumption *Consumption `json:"consumption,omitempty"` + ProductName *string `json:"product_name,omitempty"` +} + +// Container defines model for Container. +type Container struct { + Name *string `json:"name,omitempty"` +} + +// ContainersList defines model for ContainersList. +type ContainersList struct { + Containers *[]Container `json:"containers,omitempty"` + Error *string `json:"error"` + SecretId *string `json:"secret_id,omitempty"` +} + +// CrateDBChannels defines model for CrateDBChannels. +type CrateDBChannels struct { + Nightly *NightlyCrateDBVersion `json:"nightly,omitempty"` + Stable *CrateDBVersion `json:"stable,omitempty"` + Testing *CrateDBVersion `json:"testing,omitempty"` +} + +// CrateDBVersion defines model for CrateDBVersion. +type CrateDBVersion struct { + Hotfix *int `json:"hotfix,omitempty"` + Major *int `json:"major,omitempty"` + Minor *int `json:"minor,omitempty"` + Version *string `json:"version,omitempty"` +} + +// CrateDBVersions defines model for CrateDBVersions. +type CrateDBVersions struct { + CrateVersions *CrateDBChannels `json:"crate_versions,omitempty"` +} + +// Credit defines model for Credit. +type Credit struct { + // Amount Credit amount in USD cents + Amount *float32 `json:"amount,omitempty"` + Comment *string `json:"comment"` + ExpirationDate *time.Time `json:"expiration_date,omitempty"` + Id *string `json:"id,omitempty"` + + // OriginalAmount Credit amount in USD cents + OriginalAmount *int `json:"original_amount,omitempty"` + + // RemainingAmount Remaining credit amount in USD cents + RemainingAmount *int `json:"remaining_amount,omitempty"` + StartDate *time.Time `json:"start_date,omitempty"` + Status *CreditStatus `json:"status,omitempty"` +} + +// CreditStatus defines model for Credit.Status. +type CreditStatus string + +// CurrentEstimatedCost defines model for CurrentEstimatedCost. +type CurrentEstimatedCost struct { + Hourly *map[string]float32 `json:"hourly,omitempty"` + Monthly *map[string]float32 `json:"monthly,omitempty"` +} + +// CurrentUser defines model for CurrentUser. +type CurrentUser struct { + Email openapi_types.Email `json:"email"` + Hmac *string `json:"hmac,omitempty"` + Idp *string `json:"idp,omitempty"` + IsSuperuser *bool `json:"is_superuser,omitempty"` + Name *string `json:"name,omitempty"` + // Deprecated: + OrganizationId *string `json:"organization_id,omitempty"` + OrganizationRoles *[]PartialOrganizationRoles `json:"organization_roles,omitempty"` + Picture *string `json:"picture,omitempty"` + ProjectRoles *[]PartialProjectRole `json:"project_roles,omitempty"` + Status *string `json:"status,omitempty"` + Uid *string `json:"uid,omitempty"` + Username *string `json:"username,omitempty"` +} + +// Customer defines model for Customer. +type Customer struct { + Address *CustomerAddress `json:"address,omitempty"` + City *string `json:"city,omitempty"` + Country *string `json:"country,omitempty"` + Email openapi_types.Email `json:"email"` + Line1 *string `json:"line1,omitempty"` + Line2 *string `json:"line2"` + Name string `json:"name"` + OrganizationId *string `json:"organization_id,omitempty"` + Phone string `json:"phone"` + PostalCode *string `json:"postal_code,omitempty"` + Tax *CustomerTax `json:"tax,omitempty"` + TaxId *string `json:"tax_id"` + TaxIdType *string `json:"tax_id_type"` +} + +// CustomerAddress defines model for CustomerAddress. +type CustomerAddress struct { + City *string `json:"city,omitempty"` + Country *string `json:"country,omitempty"` + Line1 *string `json:"line1,omitempty"` + Line2 *string `json:"line2,omitempty"` + PostalCode *string `json:"postal_code,omitempty"` +} + +// CustomerCard defines model for CustomerCard. +type CustomerCard struct { + Brand *string `json:"brand,omitempty"` + Country *string `json:"country,omitempty"` + Default *bool `json:"default,omitempty"` + ExpMonth *int `json:"exp_month,omitempty"` + ExpYear *int `json:"exp_year,omitempty"` + Id *string `json:"id,omitempty"` + Last4 *string `json:"last4,omitempty"` +} + +// CustomerTax defines model for CustomerTax. +type CustomerTax struct { + TaxId *string `json:"tax_id,omitempty"` + TaxIdType *string `json:"tax_id_type,omitempty"` +} + +// DataJobData defines model for DataJobData. +type DataJobData struct { + Details *map[string]interface{} `json:"details"` + JobId string `json:"job_id"` + Message string `json:"message"` + Progress Progress `json:"progress"` +} + +// Discount defines model for Discount. +type Discount struct { + Amount *int `json:"amount,omitempty"` + Label *string `json:"label,omitempty"` +} + +// DublinCore defines model for DublinCore. +type DublinCore struct { + Created *time.Time `json:"created,omitempty"` + Modified *time.Time `json:"modified,omitempty"` +} + +// EditApiKeySchema defines model for EditApiKeySchema. +type EditApiKeySchema struct { + Active *bool `json:"active,omitempty"` +} + +// FeatureFlags defines model for FeatureFlags. +type FeatureFlags struct { + Flags *[]Flag `json:"flags"` +} + +// File defines model for File. +type File struct { + Dc *DublinCore `json:"dc,omitempty"` + DownloadUrl *string `json:"download_url,omitempty"` + + // FileSize File size in bytes. + FileSize *int `json:"file_size,omitempty"` + Id *string `json:"id,omitempty"` + Name string `json:"name"` + OrganizationId *string `json:"organization_id,omitempty"` + Status *FileStatus `json:"status,omitempty"` + UploadUrl *string `json:"upload_url,omitempty"` +} + +// FileStatus defines model for File.Status. +type FileStatus string + +// FileFeedback defines model for FileFeedback. +type FileFeedback struct { + Bytes *int `json:"bytes"` + FailedRecords *int `json:"failed_records"` + Message *string `json:"message"` + Name string `json:"name"` + Percent *float32 `json:"percent"` + Records int `json:"records"` + Status string `json:"status"` + TotalRecords *int `json:"total_records"` +} + +// Flag defines model for Flag. +type Flag struct { + IsActive *bool `json:"is_active,omitempty"` + Name *string `json:"name,omitempty"` +} + +// Guarantee defines model for Guarantee. +type Guarantee struct { + DiskSpaceBytes *interface{} `json:"disk_space_bytes,omitempty"` + InsertsSecond *int `json:"inserts_second,omitempty"` + QueriesSecond *int `json:"queries_second,omitempty"` + StorageBytes *interface{} `json:"storage_bytes,omitempty"` +} + +// HardwareSpecs defines model for HardwareSpecs. +type HardwareSpecs struct { + CpusPerNode *float32 `json:"cpus_per_node"` + DiskSizePerNodeBytes *int `json:"disk_size_per_node_bytes"` + DiskType *string `json:"disk_type"` + DisksPerNode *int `json:"disks_per_node,omitempty"` + HeapSizeBytes *int `json:"heap_size_bytes,omitempty"` + MemoryPerNodeBytes *int `json:"memory_per_node_bytes"` +} + +// IPAddress defines model for IPAddress. +type IPAddress struct { + // Ip The IP address of the user + Ip *string `json:"ip,omitempty"` +} + +// InstallToken defines model for InstallToken. +type InstallToken struct { + Token string `json:"token"` +} + +// InvoiceConsumption defines model for InvoiceConsumption. +type InvoiceConsumption struct { + Currency *string `json:"currency"` + Discounts *[]Discount `json:"discounts,omitempty"` + PeriodEnd *time.Time `json:"period_end,omitempty"` + PeriodStart *time.Time `json:"period_start,omitempty"` + Subtotal *int `json:"subtotal,omitempty"` + Total *int `json:"total,omitempty"` + TotalDiscountAmount *int `json:"total_discount_amount,omitempty"` +} + +// JWK defines model for JWK. +type JWK struct { + Keys *[]map[string]interface{} `json:"keys,omitempty"` +} + +// JWTRefreshToken defines model for JWTRefreshToken. +type JWTRefreshToken struct { + RefreshToken string `json:"refresh_token"` +} + +// LatestCrateVersion defines model for LatestCrateVersion. +type LatestCrateVersion struct { + // Nightly The latest nightly CrateDB version. This can be deployed if the nightly channel is specified. + Nightly *string `json:"nightly,omitempty"` + + // Stable The latest stable CrateDB version. This will be used by default in all new deployments. + Stable *string `json:"stable,omitempty"` + + // Testing The latest testing CrateDB version. This can be deployed if the testing channel is specified. + Testing *string `json:"testing,omitempty"` +} + +// Meta defines model for Meta. +type Meta struct { + CrateVersions *LatestCrateVersion `json:"crate_versions,omitempty"` + Version *Version `json:"version,omitempty"` +} + +// NestedSecret defines model for NestedSecret. +type NestedSecret struct { + AwsSecret *AwsSecret `json:"aws_secret,omitempty"` + AzureSecret *AzureSecret `json:"azure_secret,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewApiKeyResponseSchema defines model for NewApiKeyResponseSchema. +type NewApiKeyResponseSchema struct { + Key *ApiKey `json:"key,omitempty"` + Secret *string `json:"secret,omitempty"` + Success *bool `json:"success,omitempty"` +} + +// NewApiKeySchema defines model for NewApiKeySchema. +type NewApiKeySchema struct { + Active *bool `json:"active,omitempty"` + Dc *DublinCore `json:"dc,omitempty"` + Key *string `json:"key,omitempty"` + LastUsed *time.Time `json:"last_used,omitempty"` + Secret *string `json:"secret,omitempty"` + UserId *string `json:"user_id,omitempty"` +} + +// NightlyCrateDBVersion defines model for NightlyCrateDBVersion. +type NightlyCrateDBVersion struct { + Date *string `json:"date,omitempty"` + Hotfix *int `json:"hotfix,omitempty"` + Major *int `json:"major,omitempty"` + Minor *int `json:"minor,omitempty"` + Version *string `json:"version,omitempty"` +} + +// ObjectsList defines model for ObjectsList. +type ObjectsList struct { + Error *string `json:"error"` + Objects []string `json:"objects"` +} + +// Organization defines model for Organization. +type Organization struct { + Dc *DublinCore `json:"dc,omitempty"` + + // Email Notification email to use for the organization. + Email *openapi_types.Email `json:"email,omitempty"` + Id *string `json:"id,omitempty"` + Name string `json:"name"` + NotificationsEnabled *bool `json:"notifications_enabled,omitempty"` + + // PlanType The support plan to use for the organization. + PlanType *OrganizationPlanType `json:"plan_type,omitempty"` + ProjectCount *int `json:"project_count,omitempty"` + RoleFqn *OrganizationRoleFqn `json:"role_fqn,omitempty"` +} + +// OrganizationPlanType The support plan to use for the organization. +type OrganizationPlanType int + +// OrganizationRoleFqn defines model for Organization.RoleFqn. +type OrganizationRoleFqn string + +// OrganizationCurrentConsumptionSchema defines model for OrganizationCurrentConsumptionSchema. +type OrganizationCurrentConsumptionSchema struct { + ComputeConsumptionThisMonth *[]ConsumptionPerProduct `json:"compute_consumption_this_month,omitempty"` + CurrentCost *CurrentEstimatedCost `json:"current_cost,omitempty"` + StorageConsumptionThisMonth *StorageConsumption `json:"storage_consumption_this_month,omitempty"` +} + +// OrganizationEdit defines model for OrganizationEdit. +type OrganizationEdit struct { + // Email Notification email to use for the organization. + Email *openapi_types.Email `json:"email"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + NotificationsEnabled *bool `json:"notifications_enabled,omitempty"` + + // PlanType The support plan to use for the organization. + PlanType *OrganizationEditPlanType `json:"plan_type,omitempty"` +} + +// OrganizationEditPlanType The support plan to use for the organization. +type OrganizationEditPlanType int + +// OrganizationInvitation defines model for OrganizationInvitation. +type OrganizationInvitation struct { + Email *openapi_types.Email `json:"email,omitempty"` + ExpirationDate *time.Time `json:"expiration_date,omitempty"` + OrganizationRoles *[]PartialOrganizationRoles `json:"organization_roles,omitempty"` + Status *string `json:"status,omitempty"` + Uid *string `json:"uid,omitempty"` +} + +// OrganizationRemainingBudget defines model for OrganizationRemainingBudget. +type OrganizationRemainingBudget struct { + ExcludeClusterId *string `json:"exclude_cluster_id,omitempty"` + RemainingBudgetPerMonth *float32 `json:"remaining_budget_per_month,omitempty"` +} + +// OrganizationRole defines model for OrganizationRole. +type OrganizationRole struct { + Added *bool `json:"added,omitempty"` + Invited *bool `json:"invited,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + RoleFqn OrganizationRoleRoleFqn `json:"role_fqn"` + User *string `json:"user,omitempty"` + UserId *string `json:"user_id,omitempty"` +} + +// OrganizationRoleRoleFqn defines model for OrganizationRole.RoleFqn. +type OrganizationRoleRoleFqn string + +// OrganizationUser defines model for OrganizationUser. +type OrganizationUser struct { + Email openapi_types.Email `json:"email"` + Idp *string `json:"idp,omitempty"` + Name *string `json:"name,omitempty"` + OrganizationRoles *[]PartialOrganizationRoles `json:"organization_roles,omitempty"` + Picture *string `json:"picture,omitempty"` + Uid *string `json:"uid,omitempty"` + Username *string `json:"username,omitempty"` +} + +// PartialCluster defines model for PartialCluster. +type PartialCluster struct { + Channel *string `json:"channel,omitempty"` + CrateVersion string `json:"crate_version"` + HardwareSpecs *HardwareSpecs `json:"hardware_specs"` + Name string `json:"name"` + Password *string `json:"password,omitempty"` + ProductName string `json:"product_name"` + ProductTier string `json:"product_tier"` + ProductUnit *int `json:"product_unit,omitempty"` + Username string `json:"username"` +} + +// PartialClusterAsyncOperation defines model for PartialClusterAsyncOperation. +type PartialClusterAsyncOperation struct { + Dc *DublinCore `json:"dc,omitempty"` + Id *string `json:"id,omitempty"` + Status *string `json:"status,omitempty"` + Type *string `json:"type,omitempty"` +} + +// PartialOrganizationRoles defines model for PartialOrganizationRoles. +type PartialOrganizationRoles struct { + OrganizationId *string `json:"organization_id,omitempty"` + RoleFqn PartialOrganizationRolesRoleFqn `json:"role_fqn"` +} + +// PartialOrganizationRolesRoleFqn defines model for PartialOrganizationRoles.RoleFqn. +type PartialOrganizationRolesRoleFqn string + +// PartialProject defines model for PartialProject. +type PartialProject struct { + // BackupLocation Specify a custom backup location (custom s3 bucket) for a project. Supported in Edge regions only. + BackupLocation *ProjectBackupLocation `json:"backup_location"` + Name *string `json:"name,omitempty"` + Region *string `json:"region,omitempty"` +} + +// PartialProjectRole defines model for PartialProjectRole. +type PartialProjectRole struct { + ProjectId *string `json:"project_id,omitempty"` + RoleFqn PartialProjectRoleRoleFqn `json:"role_fqn"` +} + +// PartialProjectRoleRoleFqn defines model for PartialProjectRole.RoleFqn. +type PartialProjectRoleRoleFqn string + +// PaymentMethod defines model for PaymentMethod. +type PaymentMethod struct { + Card *CustomerCard `json:"card,omitempty"` + IsAvailable *bool `json:"is_available,omitempty"` + IsSetup *bool `json:"is_setup,omitempty"` + Subscription *Subscription `json:"subscription,omitempty"` + SubscriptionId *string `json:"subscription_id,omitempty"` + Type *string `json:"type,omitempty"` +} + +// PricingPromotion defines model for PricingPromotion. +type PricingPromotion struct { + PricePerHour *float32 `json:"price_per_hour,omitempty"` + PricePerMonth *float32 `json:"price_per_month,omitempty"` + PromotionDuration *int `json:"promotion_duration,omitempty"` +} + +// Product defines model for Product. +type Product struct { + Deprecated *bool `json:"deprecated,omitempty"` + Description *string `json:"description,omitempty"` + GuaranteesPerDtu *Guarantee `json:"guarantees_per_dtu,omitempty"` + Kind *string `json:"kind,omitempty"` + Label *string `json:"label,omitempty"` + Name *string `json:"name,omitempty"` + Offer *string `json:"offer,omitempty"` + Plan *string `json:"plan,omitempty"` + PricePerDtuMinute *int `json:"price_per_dtu_minute,omitempty"` + Region *string `json:"region,omitempty"` + ScaleSummary *string `json:"scale_summary,omitempty"` + Scaling *[]ScaleOption `json:"scaling,omitempty"` + Specs *Spec `json:"specs,omitempty"` + Tags *[]string `json:"tags,omitempty"` + Tier *string `json:"tier,omitempty"` +} + +// ProductPricing defines model for ProductPricing. +type ProductPricing struct { + ClusterPrice *ClusterPricing `json:"cluster_price,omitempty"` + StoragePrice *ClusterPricing `json:"storage_price,omitempty"` + TotalPrice *ClusterPricing `json:"total_price,omitempty"` +} + +// Progress defines model for Progress. +type Progress struct { + Bytes *int `json:"bytes"` + FailedFiles *int `json:"failed_files,omitempty"` + FailedRecords *int `json:"failed_records"` + Files *[]FileFeedback `json:"files,omitempty"` + Percent *float32 `json:"percent"` + ProcessedFiles *int `json:"processed_files,omitempty"` + Records int `json:"records"` + TotalFiles *int `json:"total_files,omitempty"` + TotalRecords *int `json:"total_records"` +} + +// Project defines model for Project. +type Project struct { + // BackupLocation Specify a custom backup location (custom s3 bucket) for a project. Supported in Edge regions only. + BackupLocation *ProjectBackupLocation `json:"backup_location"` + Dc *DublinCore `json:"dc,omitempty"` + Id *string `json:"id,omitempty"` + Name string `json:"name"` + OrganizationId string `json:"organization_id"` + Region *string `json:"region,omitempty"` +} + +// ProjectBackupLocation defines model for ProjectBackupLocation. +type ProjectBackupLocation struct { + AdditionalConfig *map[string]interface{} `json:"additional_config,omitempty"` + Credentials *map[string]interface{} `json:"credentials,omitempty"` + Dc *DublinCore `json:"dc,omitempty"` + Location interface{} `json:"location"` + LocationType ProjectBackupLocationLocationType `json:"location_type"` +} + +// ProjectBackupLocationLocationType defines model for ProjectBackupLocation.LocationType. +type ProjectBackupLocationLocationType string + +// ProjectBackupLocationVerifyResponse defines model for ProjectBackupLocationVerifyResponse. +type ProjectBackupLocationVerifyResponse struct { + Message *string `json:"message,omitempty"` + S3LocationValid *bool `json:"s3_location_valid,omitempty"` +} + +// ProjectEdit defines model for ProjectEdit. +type ProjectEdit struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` +} + +// ProjectRole defines model for ProjectRole. +type ProjectRole struct { + Added *bool `json:"added,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + RoleFqn ProjectRoleRoleFqn `json:"role_fqn"` + User *string `json:"user,omitempty"` + UserId *string `json:"user_id,omitempty"` +} + +// ProjectRoleRoleFqn defines model for ProjectRole.RoleFqn. +type ProjectRoleRoleFqn string + +// ProjectUser defines model for ProjectUser. +type ProjectUser struct { + Email openapi_types.Email `json:"email"` + Idp *string `json:"idp,omitempty"` + Name *string `json:"name,omitempty"` + Picture *string `json:"picture,omitempty"` + ProjectRoles *[]PartialProjectRole `json:"project_roles,omitempty"` + Uid *string `json:"uid,omitempty"` + Username *string `json:"username,omitempty"` +} + +// Promotion defines model for Promotion. +type Promotion struct { + Description *string `json:"description,omitempty"` + DiscountPercent *int `json:"discount_percent,omitempty"` + DurationMonths *int `json:"duration_months,omitempty"` + Id *string `json:"id,omitempty"` + PlanName *string `json:"plan_name,omitempty"` + PlanTier *string `json:"plan_tier,omitempty"` + ScaleUnit *int `json:"scale_unit,omitempty"` + ValidTo *time.Time `json:"valid_to,omitempty"` +} + +// Quota defines model for Quota. +type Quota struct { + Code *string `json:"code,omitempty"` + CurrentValue *float32 `json:"current_value,omitempty"` + Quota *float32 `json:"quota,omitempty"` +} + +// Region defines model for Region. +type Region struct { + Dc *DublinCore `json:"dc,omitempty"` + Deprecated *bool `json:"deprecated,omitempty"` + Description *string `json:"description,omitempty"` + IsEdgeRegion *bool `json:"is_edge_region,omitempty"` + LastSeen *time.Time `json:"last_seen,omitempty"` + Name *string `json:"name,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + Status *RegionStatus `json:"status,omitempty"` + UpgradeAvailable *bool `json:"upgrade_available,omitempty"` +} + +// RegionStatus defines model for Region.Status. +type RegionStatus string + +// RegionCreate defines model for RegionCreate. +type RegionCreate struct { + AwsBucket *string `json:"aws_bucket,omitempty"` + AwsRegion *string `json:"aws_region,omitempty"` + Description string `json:"description"` + OrganizationId string `json:"organization_id"` + // Deprecated: + Provider *string `json:"provider,omitempty"` +} + +// Role defines model for Role. +type Role struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// ScaleOption defines model for ScaleOption. +type ScaleOption struct { + Description *string `json:"description,omitempty"` + DiskSpaceBytes *interface{} `json:"disk_space_bytes,omitempty"` + Dtus *int `json:"dtus,omitempty"` + InsertsSecond *int `json:"inserts_second,omitempty"` + Nodes *int `json:"nodes,omitempty"` + PricePerMinute *int `json:"price_per_minute,omitempty"` + QueriesSecond *int `json:"queries_second,omitempty"` + StorageBytes *interface{} `json:"storage_bytes,omitempty"` + Value *int `json:"value,omitempty"` +} + +// Secret defines model for Secret. +type Secret struct { + Data *NestedSecret `json:"data,omitempty"` + Dc *DublinCore `json:"dc,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +// SetupIntent defines model for SetupIntent. +type SetupIntent struct { + ClientSecret *string `json:"client_secret,omitempty"` +} + +// SetupPaymentIntent defines model for SetupPaymentIntent. +type SetupPaymentIntent struct { + ClientSecret *string `json:"client_secret,omitempty"` + PaymentIntent *string `json:"payment_intent,omitempty"` +} + +// Spec defines model for Spec. +type Spec struct { + CpuCores *float32 `json:"cpu_cores,omitempty"` + RamBytes *int `json:"ram_bytes,omitempty"` + StorageBytes *int `json:"storage_bytes,omitempty"` + StorageMaximumBytes *int `json:"storage_maximum_bytes,omitempty"` + StorageMinimumBytes *int `json:"storage_minimum_bytes,omitempty"` +} + +// StorageConsumption defines model for StorageConsumption. +type StorageConsumption struct { + Cost *float32 `json:"cost,omitempty"` + Credits *float32 `json:"credits,omitempty"` + Dtuhours *float32 `json:"dtuhours,omitempty"` + Gibhours *int `json:"gibhours,omitempty"` + Minutes *int `json:"minutes,omitempty"` + Total *float32 `json:"total,omitempty"` +} + +// Subscription defines model for Subscription. +type Subscription struct { + Active *bool `json:"active,omitempty"` + BillingModel *string `json:"billing_model,omitempty"` + Dc *DublinCore `json:"dc,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Offer *string `json:"offer,omitempty"` + OfferId *string `json:"offer_id,omitempty"` + OrganizationId *string `json:"organization_id,omitempty"` + Plan *string `json:"plan,omitempty"` + PlanId *string `json:"plan_id,omitempty"` + Promotion *map[string]interface{} `json:"promotion,omitempty"` + Provider *string `json:"provider,omitempty"` + Provisioned *bool `json:"provisioned,omitempty"` + Purchaser *string `json:"purchaser,omitempty"` + Reference *string `json:"reference,omitempty"` + State *string `json:"state,omitempty"` + SubscriptionId *string `json:"subscription_id,omitempty"` + SubscriptionProvider *string `json:"subscription_provider,omitempty"` +} + +// SubscriptionAssignOrg defines model for SubscriptionAssignOrg. +type SubscriptionAssignOrg struct { + OrganizationId string `json:"organization_id"` +} + +// SubscriptionCreate defines model for SubscriptionCreate. +type SubscriptionCreate struct { + OrganizationId string `json:"organization_id"` + Type string `json:"type"` +} + +// SubscriptionEdit defines model for SubscriptionEdit. +type SubscriptionEdit struct { + Plan *string `json:"plan,omitempty"` + PlanId *string `json:"plan_id,omitempty"` +} + +// User defines model for User. +type User struct { + Email openapi_types.Email `json:"email"` + Idp *string `json:"idp,omitempty"` + Name *string `json:"name,omitempty"` + OrganizationRoles *[]PartialOrganizationRoles `json:"organization_roles,omitempty"` + Picture *string `json:"picture,omitempty"` + ProjectRoles *[]PartialProjectRole `json:"project_roles,omitempty"` + Uid *string `json:"uid,omitempty"` + Username *string `json:"username,omitempty"` +} + +// ValidateCard defines model for ValidateCard. +type ValidateCard struct { + PaymentIntent string `json:"payment_intent"` +} + +// Version defines model for Version. +type Version struct { + Prerelease *bool `json:"prerelease,omitempty"` + Release *string `json:"release,omitempty"` +} + +// PathApiKey defines model for path_api_key. +type PathApiKey = string + +// PathCardId defines model for path_card_id. +type PathCardId = string + +// PathClusterId defines model for path_cluster_id. +type PathClusterId = string + +// PathConfigurationKey defines model for path_configuration_key. +type PathConfigurationKey = string + +// PathCreditId defines model for path_credit_id. +type PathCreditId = string + +// PathExportJobId defines model for path_export_job_id. +type PathExportJobId = string + +// PathFileId defines model for path_file_id. +type PathFileId = string + +// PathImportJobId defines model for path_import_job_id. +type PathImportJobId = string + +// PathInviteToken defines model for path_invite_token. +type PathInviteToken = string + +// PathMetricId defines model for path_metric_id. +type PathMetricId string + +// PathName defines model for path_name. +type PathName = string + +// PathOrdinal defines model for path_ordinal. +type PathOrdinal = int + +// PathOrganizationId defines model for path_organization_id. +type PathOrganizationId = string + +// PathOrganizationSecretId defines model for path_organization_secret_id. +type PathOrganizationSecretId = string + +// PathProductKind defines model for path_product_kind. +type PathProductKind = string + +// PathProjectId defines model for path_project_id. +type PathProjectId = string + +// PathRegionName defines model for path_region_name. +type PathRegionName = string + +// PathSubscriptionId defines model for path_subscription_id. +type PathSubscriptionId = string + +// PathTargetClusterId defines model for path_target_cluster_id. +type PathTargetClusterId = string + +// PathUserId defines model for path_user_id. +type PathUserId = string + +// PathUserIdOrEmail defines model for path_user_id_or_email. +type PathUserIdOrEmail = string + +// QueryAuditlogAction defines model for query_auditlog_action. +type QueryAuditlogAction = string + +// QueryAuditlogClusterId defines model for query_auditlog_cluster_id. +type QueryAuditlogClusterId = string + +// QueryAzureContainerName defines model for query_azure_container_name. +type QueryAzureContainerName = string + +// QueryAzurePrefix defines model for query_azure_prefix. +type QueryAzurePrefix = string + +// QueryAzureSecretId defines model for query_azure_secret_id. +type QueryAzureSecretId = string + +// QueryBucket defines model for query_bucket. +type QueryBucket = string + +// QueryClustersProductName defines model for query_clusters_product_name. +type QueryClustersProductName = string + +// QueryCreditStatus defines model for query_credit_status. +type QueryCreditStatus = string + +// QueryEnd defines model for query_end. +type QueryEnd = string + +// QueryEndTs defines model for query_end_ts. +type QueryEndTs = string + +// QueryEndpoint defines model for query_endpoint. +type QueryEndpoint = string + +// QueryExcludeClusterId defines model for query_exclude_cluster_id. +type QueryExcludeClusterId = string + +// QueryFilesLimit defines model for query_files_limit. +type QueryFilesLimit = string + +// QueryFilesOffset defines model for query_files_offset. +type QueryFilesOffset = int + +// QueryFromTs defines model for query_from_ts. +type QueryFromTs = string + +// QueryInviteStatus defines model for query_invite_status. +type QueryInviteStatus = string + +// QueryLast defines model for query_last. +type QueryLast = string + +// QueryLimit defines model for query_limit. +type QueryLimit = int + +// QueryMinutesAgo defines model for query_minutes_ago. +type QueryMinutesAgo = int + +// QueryOrganizationId defines model for query_organization_id. +type QueryOrganizationId = string + +// QueryPrefix defines model for query_prefix. +type QueryPrefix = string + +// QueryProductName defines model for query_product_name. +type QueryProductName = string + +// QueryProductOffer defines model for query_product_offer. +type QueryProductOffer = string + +// QueryProductPlan defines model for query_product_plan. +type QueryProductPlan = string + +// QueryProductTier defines model for query_product_tier. +type QueryProductTier = string + +// QueryProjectId defines model for query_project_id. +type QueryProjectId = string + +// QueryRegion defines model for query_region. +type QueryRegion = string + +// QuerySecretId defines model for query_secret_id. +type QuerySecretId = string + +// QuerySpecificProductName defines model for query_specific_product_name. +type QuerySpecificProductName = string + +// QuerySpecificProductOffer defines model for query_specific_product_offer. +type QuerySpecificProductOffer = string + +// QuerySpecificProductPlan defines model for query_specific_product_plan. +type QuerySpecificProductPlan = string + +// QuerySpecificProductTier defines model for query_specific_product_tier. +type QuerySpecificProductTier = string + +// QuerySpecificProductUnit defines model for query_specific_product_unit. +type QuerySpecificProductUnit = int + +// QueryStart defines model for query_start. +type QueryStart = string + +// QueryStartTs defines model for query_start_ts. +type QueryStartTs = string + +// QueryStatuses defines model for query_statuses. +type QueryStatuses = string + +// QueryStorageBytes defines model for query_storage_bytes. +type QueryStorageBytes = string + +// QuerySubscriptionId defines model for query_subscription_id. +type QuerySubscriptionId = string + +// QueryToTs defines model for query_to_ts. +type QueryToTs = string + +// N400 defines model for 400. +type N400 struct { + // Errors Property names equal to the field names that occured an error. + Errors *map[string]interface{} `json:"errors,omitempty"` + + // Message A human readable message explaining the error. + Message *string `json:"message,omitempty"` + Success *bool `json:"success,omitempty"` +} + +// N401 defines model for 401. +type N401 struct { + // Message A human readable message explaining the error. + Message *string `json:"message,omitempty"` + Success *bool `json:"success,omitempty"` +} + +// N403 defines model for 403. +type N403 struct { + // Message A human readable message explaining the error. + Message *string `json:"message,omitempty"` + Success *bool `json:"success,omitempty"` +} + +// N404 defines model for 404. +type N404 struct { + // Message A human readable message explaining the error. + Message *string `json:"message,omitempty"` + Success *bool `json:"success,omitempty"` +} + +// N500 defines model for 500. +type N500 struct { + // Message A human readable message explaining the error. + Message *string `json:"message,omitempty"` + Success *bool `json:"success,omitempty"` +} + +// GetApiV2ClustersParams defines parameters for GetApiV2Clusters. +type GetApiV2ClustersParams struct { + // SubscriptionId ID of the subscription + SubscriptionId *QuerySubscriptionId `form:"subscription_id,omitempty" json:"subscription_id,omitempty"` + + // ProjectId ID of the project + ProjectId *QueryProjectId `form:"project_id,omitempty" json:"project_id,omitempty"` + + // ProductName Name of the product + ProductName *QueryClustersProductName `form:"product_name,omitempty" json:"product_name,omitempty"` +} + +// GetApiV2ClustersClusterIdImportJobsImportJobIdProgressParams defines parameters for GetApiV2ClustersClusterIdImportJobsImportJobIdProgress. +type GetApiV2ClustersClusterIdImportJobsImportJobIdProgressParams struct { + // Limit The number of files returned.Use keywork 'ALL' to have no limit applied. + Limit *QueryFilesLimit `form:"limit,omitempty" json:"limit,omitempty"` + + // Offset The offset files to skip before beginning to return the files. + Offset *QueryFilesOffset `form:"offset,omitempty" json:"offset,omitempty"` +} + +// GetApiV2ClustersClusterIdMetricsMetricIdParams defines parameters for GetApiV2ClustersClusterIdMetricsMetricId. +type GetApiV2ClustersClusterIdMetricsMetricIdParams struct { + // Start Start Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ] + Start *QueryStartTs `form:"start,omitempty" json:"start,omitempty"` + + // End End Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ] + End *QueryEndTs `form:"end,omitempty" json:"end,omitempty"` + + // MinutesAgo The number of minutes of data to retrieve. Overrides 'start'. + MinutesAgo *QueryMinutesAgo `form:"minutes_ago,omitempty" json:"minutes_ago,omitempty"` +} + +// GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId defines parameters for GetApiV2ClustersClusterIdMetricsMetricId. +type GetApiV2ClustersClusterIdMetricsMetricIdParamsMetricId string + +// GetApiV2ClustersClusterIdOperationsParams defines parameters for GetApiV2ClustersClusterIdOperations. +type GetApiV2ClustersClusterIdOperationsParams struct { + // Statuses Statuses that the operations will be filtered by. It can be specified several times to filter by several statuses. + Statuses *QueryStatuses `form:"statuses,omitempty" json:"statuses,omitempty"` + + // Start Date used to filter the operations returned. It must adhere to the following format: 2021-11-16T13:00:00Z + Start *QueryStart `form:"start,omitempty" json:"start,omitempty"` + + // End Date used to filter the operations returned. It must adhere to the following format: 2021-11-16T13:00:00Z + End *QueryEnd `form:"end,omitempty" json:"end,omitempty"` +} + +// GetApiV2ClustersClusterIdSnapshotsParams defines parameters for GetApiV2ClustersClusterIdSnapshots. +type GetApiV2ClustersClusterIdSnapshotsParams struct { + // Start Start Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ] + Start *QueryStartTs `form:"start,omitempty" json:"start,omitempty"` + + // End End Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ] + End *QueryEndTs `form:"end,omitempty" json:"end,omitempty"` +} + +// GetApiV2ConfigurationsParams defines parameters for GetApiV2Configurations. +type GetApiV2ConfigurationsParams struct { + // OrganizationId ID of the organization + OrganizationId *QueryOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` +} + +// GetApiV2ConfigurationsKeyParams defines parameters for GetApiV2ConfigurationsKey. +type GetApiV2ConfigurationsKeyParams struct { + // OrganizationId ID of the organization + OrganizationId *QueryOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` +} + +// GetApiV2IntegrationsAwsS3BucketsParams defines parameters for GetApiV2IntegrationsAwsS3Buckets. +type GetApiV2IntegrationsAwsS3BucketsParams struct { + // SecretId The organization secret_id that holds the AWS access key that will be used to try to retrieve the S3 buckets. + SecretId QuerySecretId `form:"secret_id" json:"secret_id"` + + // Endpoint Optional. The S3 compatible endpoint URL that will be used to retrieve the S3 buckets. + Endpoint *QueryEndpoint `form:"endpoint,omitempty" json:"endpoint,omitempty"` +} + +// GetApiV2IntegrationsAwsS3ObjectsParams defines parameters for GetApiV2IntegrationsAwsS3Objects. +type GetApiV2IntegrationsAwsS3ObjectsParams struct { + // SecretId The organization secret_id that holds the AWS access key that will be used to try to retrieve the S3 buckets. + SecretId QuerySecretId `form:"secret_id" json:"secret_id"` + + // Endpoint Optional. The S3 compatible endpoint URL that will be used to retrieve the S3 buckets. + Endpoint *QueryEndpoint `form:"endpoint,omitempty" json:"endpoint,omitempty"` + Bucket QueryBucket `form:"bucket" json:"bucket"` + Prefix *QueryPrefix `form:"prefix,omitempty" json:"prefix,omitempty"` +} + +// GetApiV2IntegrationsAzureBlobStorageContainersParams defines parameters for GetApiV2IntegrationsAzureBlobStorageContainers. +type GetApiV2IntegrationsAzureBlobStorageContainersParams struct { + // SecretId The organization secret_id that holds the Azure access key that will be used to try to retrieve the Azure Blob Storage containers and blobs. + SecretId QueryAzureSecretId `form:"secret_id" json:"secret_id"` +} + +// GetApiV2IntegrationsAzureBlobsParams defines parameters for GetApiV2IntegrationsAzureBlobs. +type GetApiV2IntegrationsAzureBlobsParams struct { + // SecretId The organization secret_id that holds the Azure access key that will be used to try to retrieve the Azure Blob Storage containers and blobs. + SecretId QueryAzureSecretId `form:"secret_id" json:"secret_id"` + ContainerName QueryAzureContainerName `form:"container_name" json:"container_name"` + Prefix *QueryAzurePrefix `form:"prefix,omitempty" json:"prefix,omitempty"` +} + +// GetApiV2OrganizationsOrganizationIdAuditlogsParams defines parameters for GetApiV2OrganizationsOrganizationIdAuditlogs. +type GetApiV2OrganizationsOrganizationIdAuditlogsParams struct { + // From From Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ] + From *QueryFromTs `form:"from,omitempty" json:"from,omitempty"` + + // To To Timestamp Filter. Format ISO 8601. YYYY-MM-DD[Thh:mm:ssZ] + To *QueryToTs `form:"to,omitempty" json:"to,omitempty"` + + // Action The logs can be filtered by their action using this query parameter. + Action *QueryAuditlogAction `form:"action,omitempty" json:"action,omitempty"` + + // ClusterId The logs can be filtered by the cluster involved. + ClusterId *QueryAuditlogClusterId `form:"cluster_id,omitempty" json:"cluster_id,omitempty"` + + // Last For pagination this query parameter can be provided. The value should be the id of the oldest element in the previous result. + Last *QueryLast `form:"last,omitempty" json:"last,omitempty"` +} + +// GetApiV2OrganizationsOrganizationIdClustersParams defines parameters for GetApiV2OrganizationsOrganizationIdClusters. +type GetApiV2OrganizationsOrganizationIdClustersParams struct { + // SubscriptionId ID of the subscription + SubscriptionId *QuerySubscriptionId `form:"subscription_id,omitempty" json:"subscription_id,omitempty"` + + // ProjectId ID of the project + ProjectId *QueryProjectId `form:"project_id,omitempty" json:"project_id,omitempty"` + + // ProductName Name of the product + ProductName *QueryClustersProductName `form:"product_name,omitempty" json:"product_name,omitempty"` +} + +// GetApiV2OrganizationsOrganizationIdCreditsParams defines parameters for GetApiV2OrganizationsOrganizationIdCredits. +type GetApiV2OrganizationsOrganizationIdCreditsParams struct { + // Status Status the credits will be filtered by. + Status *QueryCreditStatus `form:"status,omitempty" json:"status,omitempty"` +} + +// GetApiV2OrganizationsOrganizationIdInvitationsParams defines parameters for GetApiV2OrganizationsOrganizationIdInvitations. +type GetApiV2OrganizationsOrganizationIdInvitationsParams struct { + // Status Either PENDING or ACCEPTED + Status *QueryInviteStatus `form:"status,omitempty" json:"status,omitempty"` +} + +// GetApiV2OrganizationsOrganizationIdRemainingBudgetParams defines parameters for GetApiV2OrganizationsOrganizationIdRemainingBudget. +type GetApiV2OrganizationsOrganizationIdRemainingBudgetParams struct { + // ExcludeClusterId ID of the cluster to exclude + ExcludeClusterId *QueryExcludeClusterId `form:"exclude_cluster_id,omitempty" json:"exclude_cluster_id,omitempty"` +} + +// GetApiV2ProductsParams defines parameters for GetApiV2Products. +type GetApiV2ProductsParams struct { + // Tier The products can be filtered by their tier using this query parameter. + Tier *QueryProductTier `form:"tier,omitempty" json:"tier,omitempty"` + + // Name The products can be filtered by their name using this query parameter. + Name *QueryProductName `form:"name,omitempty" json:"name,omitempty"` + + // Plan The products can be filtered by their plan using this query parameter. + Plan *QueryProductPlan `form:"plan,omitempty" json:"plan,omitempty"` + + // Offer The products can be filtered by their offer using this query parameter. + Offer *QueryProductOffer `form:"offer,omitempty" json:"offer,omitempty"` +} + +// GetApiV2ProductsClustersPriceParams defines parameters for GetApiV2ProductsClustersPrice. +type GetApiV2ProductsClustersPriceParams struct { + // ProductPlan Specific product plan of the product to query. + ProductPlan *QuerySpecificProductPlan `form:"product_plan,omitempty" json:"product_plan,omitempty"` + + // ProductOffer Specific product offer of the product to query. + ProductOffer *QuerySpecificProductOffer `form:"product_offer,omitempty" json:"product_offer,omitempty"` + + // ProductName Specific product name of the product to query. + ProductName QuerySpecificProductName `form:"product_name" json:"product_name"` + + // ProductTier Specific product tier of the product to query. + ProductTier QuerySpecificProductTier `form:"product_tier" json:"product_tier"` + + // ProductUnit Specific product unit of the product to query. + ProductUnit QuerySpecificProductUnit `form:"product_unit" json:"product_unit"` + + // Region Specific region of the product to query. + Region QueryRegion `form:"region" json:"region"` + + // StorageBytes Storage size in Bytes. + StorageBytes *QueryStorageBytes `form:"storage_bytes,omitempty" json:"storage_bytes,omitempty"` + + // OrganizationId ID of the organization + OrganizationId *QueryOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` +} + +// GetApiV2ProductsKindParams defines parameters for GetApiV2ProductsKind. +type GetApiV2ProductsKindParams struct { + // Tier The products can be filtered by their tier using this query parameter. + Tier *QueryProductTier `form:"tier,omitempty" json:"tier,omitempty"` + + // Name The products can be filtered by their name using this query parameter. + Name *QueryProductName `form:"name,omitempty" json:"name,omitempty"` + + // Plan The products can be filtered by their plan using this query parameter. + Plan *QueryProductPlan `form:"plan,omitempty" json:"plan,omitempty"` + + // Offer The products can be filtered by their offer using this query parameter. + Offer *QueryProductOffer `form:"offer,omitempty" json:"offer,omitempty"` +} + +// GetApiV2ProjectsProjectIdClustersParams defines parameters for GetApiV2ProjectsProjectIdClusters. +type GetApiV2ProjectsProjectIdClustersParams struct { + // SubscriptionId ID of the subscription + SubscriptionId *QuerySubscriptionId `form:"subscription_id,omitempty" json:"subscription_id,omitempty"` + + // ProductName Name of the product + ProductName *QueryClustersProductName `form:"product_name,omitempty" json:"product_name,omitempty"` +} + +// GetApiV2RegionsParams defines parameters for GetApiV2Regions. +type GetApiV2RegionsParams struct { + // OrganizationId ID of the organization + OrganizationId *QueryOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` +} + +// GetApiV2StripePromotionsParams defines parameters for GetApiV2StripePromotions. +type GetApiV2StripePromotionsParams struct { + // OrganizationId ID of the organization + OrganizationId *QueryOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` +} + +// GetApiV2StripeSubscriptionsSubscriptionIdInvoicesParams defines parameters for GetApiV2StripeSubscriptionsSubscriptionIdInvoices. +type GetApiV2StripeSubscriptionsSubscriptionIdInvoicesParams struct { + // Limit Number of items to retrieve + Limit *QueryLimit `form:"limit,omitempty" json:"limit,omitempty"` +} + +// GetApiV2SubscriptionsParams defines parameters for GetApiV2Subscriptions. +type GetApiV2SubscriptionsParams struct { + // OrganizationId ID of the organization + OrganizationId *QueryOrganizationId `form:"organization_id,omitempty" json:"organization_id,omitempty"` +} + +// PatchApiV2AwsSubscriptionsSubscriptionIdJSONRequestBody defines body for PatchApiV2AwsSubscriptionsSubscriptionId for application/json ContentType. +type PatchApiV2AwsSubscriptionsSubscriptionIdJSONRequestBody = SubscriptionEdit + +// PatchApiV2ClustersClusterIdJSONRequestBody defines body for PatchApiV2ClustersClusterId for application/json ContentType. +type PatchApiV2ClustersClusterIdJSONRequestBody = ClusterEdit + +// PutApiV2ClustersClusterIdBackupScheduleJSONRequestBody defines body for PutApiV2ClustersClusterIdBackupSchedule for application/json ContentType. +type PutApiV2ClustersClusterIdBackupScheduleJSONRequestBody = ClusterBackupSchedule + +// PutApiV2ClustersClusterIdDeletionProtectionJSONRequestBody defines body for PutApiV2ClustersClusterIdDeletionProtection for application/json ContentType. +type PutApiV2ClustersClusterIdDeletionProtectionJSONRequestBody = ClusterDeletionProtection + +// PostApiV2ClustersClusterIdExportJobsJSONRequestBody defines body for PostApiV2ClustersClusterIdExportJobs for application/json ContentType. +type PostApiV2ClustersClusterIdExportJobsJSONRequestBody = ClusterExportJob + +// PostApiV2ClustersClusterIdImportJobsJSONRequestBody defines body for PostApiV2ClustersClusterIdImportJobs for application/json ContentType. +type PostApiV2ClustersClusterIdImportJobsJSONRequestBody = ClusterImportJob + +// PutApiV2ClustersClusterIdIpRestrictionsJSONRequestBody defines body for PutApiV2ClustersClusterIdIpRestrictions for application/json ContentType. +type PutApiV2ClustersClusterIdIpRestrictionsJSONRequestBody = ClusterIpWhitelistEdit + +// PutApiV2ClustersClusterIdProductJSONRequestBody defines body for PutApiV2ClustersClusterIdProduct for application/json ContentType. +type PutApiV2ClustersClusterIdProductJSONRequestBody = ClusterProduct + +// PutApiV2ClustersClusterIdScaleJSONRequestBody defines body for PutApiV2ClustersClusterIdScale for application/json ContentType. +type PutApiV2ClustersClusterIdScaleJSONRequestBody = ClusterScale + +// PostApiV2ClustersClusterIdSnapshotsRestoreJSONRequestBody defines body for PostApiV2ClustersClusterIdSnapshotsRestore for application/json ContentType. +type PostApiV2ClustersClusterIdSnapshotsRestoreJSONRequestBody = ClusterSnapshotRestore + +// PutApiV2ClustersClusterIdStorageJSONRequestBody defines body for PutApiV2ClustersClusterIdStorage for application/json ContentType. +type PutApiV2ClustersClusterIdStorageJSONRequestBody = ClusterStorageExpand + +// PutApiV2ClustersClusterIdSuspendJSONRequestBody defines body for PutApiV2ClustersClusterIdSuspend for application/json ContentType. +type PutApiV2ClustersClusterIdSuspendJSONRequestBody = ClusterSuspend + +// PutApiV2ClustersClusterIdUpgradeJSONRequestBody defines body for PutApiV2ClustersClusterIdUpgrade for application/json ContentType. +type PutApiV2ClustersClusterIdUpgradeJSONRequestBody = ClusterUpgrade + +// PutApiV2ConfigurationsKeyJSONRequestBody defines body for PutApiV2ConfigurationsKey for application/json ContentType. +type PutApiV2ConfigurationsKeyJSONRequestBody = ConfigurationItem + +// PostApiV2MetaJwtRefreshJSONRequestBody defines body for PostApiV2MetaJwtRefresh for application/json ContentType. +type PostApiV2MetaJwtRefreshJSONRequestBody = JWTRefreshToken + +// PostApiV2OrganizationsJSONRequestBody defines body for PostApiV2Organizations for application/json ContentType. +type PostApiV2OrganizationsJSONRequestBody = Organization + +// PutApiV2OrganizationsOrganizationIdJSONRequestBody defines body for PutApiV2OrganizationsOrganizationId for application/json ContentType. +type PutApiV2OrganizationsOrganizationIdJSONRequestBody = OrganizationEdit + +// PostApiV2OrganizationsOrganizationIdClustersJSONRequestBody defines body for PostApiV2OrganizationsOrganizationIdClusters for application/json ContentType. +type PostApiV2OrganizationsOrganizationIdClustersJSONRequestBody = ClusterProvision + +// PostApiV2OrganizationsOrganizationIdCreditsJSONRequestBody defines body for PostApiV2OrganizationsOrganizationIdCredits for application/json ContentType. +type PostApiV2OrganizationsOrganizationIdCreditsJSONRequestBody = Credit + +// PatchApiV2OrganizationsOrganizationIdCreditsCreditIdJSONRequestBody defines body for PatchApiV2OrganizationsOrganizationIdCreditsCreditId for application/json ContentType. +type PatchApiV2OrganizationsOrganizationIdCreditsCreditIdJSONRequestBody = Credit + +// PutApiV2OrganizationsOrganizationIdCustomerJSONRequestBody defines body for PutApiV2OrganizationsOrganizationIdCustomer for application/json ContentType. +type PutApiV2OrganizationsOrganizationIdCustomerJSONRequestBody = Customer + +// PostApiV2OrganizationsOrganizationIdFilesJSONRequestBody defines body for PostApiV2OrganizationsOrganizationIdFiles for application/json ContentType. +type PostApiV2OrganizationsOrganizationIdFilesJSONRequestBody = File + +// PostApiV2OrganizationsOrganizationIdSecretsJSONRequestBody defines body for PostApiV2OrganizationsOrganizationIdSecrets for application/json ContentType. +type PostApiV2OrganizationsOrganizationIdSecretsJSONRequestBody = Secret + +// PostApiV2OrganizationsOrganizationIdUsersJSONRequestBody defines body for PostApiV2OrganizationsOrganizationIdUsers for application/json ContentType. +type PostApiV2OrganizationsOrganizationIdUsersJSONRequestBody = OrganizationRole + +// PostApiV2ProjectsJSONRequestBody defines body for PostApiV2Projects for application/json ContentType. +type PostApiV2ProjectsJSONRequestBody = Project + +// PatchApiV2ProjectsProjectIdJSONRequestBody defines body for PatchApiV2ProjectsProjectId for application/json ContentType. +type PatchApiV2ProjectsProjectIdJSONRequestBody = ProjectEdit + +// PostApiV2ProjectsProjectIdUsersJSONRequestBody defines body for PostApiV2ProjectsProjectIdUsers for application/json ContentType. +type PostApiV2ProjectsProjectIdUsersJSONRequestBody = ProjectRole + +// PostApiV2RegionsJSONRequestBody defines body for PostApiV2Regions for application/json ContentType. +type PostApiV2RegionsJSONRequestBody = RegionCreate + +// PostApiV2RegionsRegionNameVerifyBackupLocationJSONRequestBody defines body for PostApiV2RegionsRegionNameVerifyBackupLocation for application/json ContentType. +type PostApiV2RegionsRegionNameVerifyBackupLocationJSONRequestBody = ProjectBackupLocation + +// PatchApiV2StripeOrganizationsOrganizationIdBillingInformationJSONRequestBody defines body for PatchApiV2StripeOrganizationsOrganizationIdBillingInformation for application/json ContentType. +type PatchApiV2StripeOrganizationsOrganizationIdBillingInformationJSONRequestBody = BillingInformation + +// PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdJSONRequestBody defines body for PatchApiV2StripeOrganizationsOrganizationIdCardsCardId for application/json ContentType. +type PatchApiV2StripeOrganizationsOrganizationIdCardsCardIdJSONRequestBody = CardEdit + +// PostApiV2SubscriptionsJSONRequestBody defines body for PostApiV2Subscriptions for application/json ContentType. +type PostApiV2SubscriptionsJSONRequestBody = SubscriptionCreate + +// PatchApiV2SubscriptionsSubscriptionIdAssignOrgJSONRequestBody defines body for PatchApiV2SubscriptionsSubscriptionIdAssignOrg for application/json ContentType. +type PatchApiV2SubscriptionsSubscriptionIdAssignOrgJSONRequestBody = SubscriptionAssignOrg + +// PatchApiV2UsersMeJSONRequestBody defines body for PatchApiV2UsersMe for application/json ContentType. +type PatchApiV2UsersMeJSONRequestBody = CurrentUser + +// PostApiV2UsersMeAcceptInviteJSONRequestBody defines body for PostApiV2UsersMeAcceptInvite for application/json ContentType. +type PostApiV2UsersMeAcceptInviteJSONRequestBody = ConfirmationToken + +// PatchApiV2UsersMeApiKeysApiKeyJSONRequestBody defines body for PatchApiV2UsersMeApiKeysApiKey for application/json ContentType. +type PatchApiV2UsersMeApiKeysApiKeyJSONRequestBody = EditApiKeySchema + +// PutApiV2UsersMeConfirmEmailJSONRequestBody defines body for PutApiV2UsersMeConfirmEmail for application/json ContentType. +type PutApiV2UsersMeConfirmEmailJSONRequestBody = ConfirmationToken + +// Getter for additional properties for NestedSecret. Returns the specified +// element and whether it was found +func (a NestedSecret) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for NestedSecret +func (a *NestedSecret) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for NestedSecret to handle AdditionalProperties +func (a *NestedSecret) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["aws_secret"]; found { + err = json.Unmarshal(raw, &a.AwsSecret) + if err != nil { + return fmt.Errorf("error reading 'aws_secret': %w", err) + } + delete(object, "aws_secret") + } + + if raw, found := object["azure_secret"]; found { + err = json.Unmarshal(raw, &a.AzureSecret) + if err != nil { + return fmt.Errorf("error reading 'azure_secret': %w", err) + } + delete(object, "azure_secret") + } + + 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 NestedSecret to handle AdditionalProperties +func (a NestedSecret) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.AwsSecret != nil { + object["aws_secret"], err = json.Marshal(a.AwsSecret) + if err != nil { + return nil, fmt.Errorf("error marshaling 'aws_secret': %w", err) + } + } + + if a.AzureSecret != nil { + object["azure_secret"], err = json.Marshal(a.AzureSecret) + if err != nil { + return nil, fmt.Errorf("error marshaling 'azure_secret': %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) +}