From 0be05af236bd77f05d864e109d72a43a320a8066 Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Wed, 11 Oct 2023 13:21:14 -0400 Subject: [PATCH 01/18] Source connections from workspace/deployment --- Makefile | 4 +- airflow/container.go | 3 +- airflow/docker.go | 18 +- astro-client-core/api.gen.go | 5530 ++++++++------------ astro-client-core/mocks/client.go | 1393 ++--- cloud/deployment/deployment_test.go | 2 +- cloud/deployment/fromfile/fromfile_test.go | 2 +- cloud/environment/environment.go | 60 + cloud/organization/organization.go | 2 +- cloud/organization/organization_token.go | 14 +- cmd/airflow.go | 40 +- cmd/root.go | 2 +- settings/settings.go | 38 +- 13 files changed, 2928 insertions(+), 4180 deletions(-) create mode 100644 cloud/environment/environment.go diff --git a/Makefile b/Makefile index 5566790c4..76b647485 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION ?= SNAPSHOT-${GIT_COMMIT_SHORT} LDFLAGS_VERSION=-X github.com/astronomer/astro-cli/version.CurrVersion=${VERSION} -CORE_OPENAPI_SPEC=../astro/apps/core/docs/public/public_v1alpha1.yaml +CORE_OPENAPI_SPEC=../astro/apps/core/docs/public/v1alpha1/public_v1alpha1.yaml OUTPUT ?= astro # golangci-lint version @@ -39,7 +39,7 @@ core_api_gen: ifeq (, $(shell which oapi-codegen)) go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest endif - oapi-codegen -include-tags=User,Organization,Invite,Workspace,Cluster,Options,Team,ApiToken,Deployment -generate=types,client -package=astrocore "${CORE_OPENAPI_SPEC}" > ./astro-client-core/api.gen.go + oapi-codegen -include-tags=User,Organization,Invite,Workspace,Cluster,Options,Team,ApiToken,Deployment,Environment -generate=types,client -package=astrocore "${CORE_OPENAPI_SPEC}" > ./astro-client-core/api.gen.go make mock_astro_core test: diff --git a/airflow/container.go b/airflow/container.go index 518a8701d..e43a38d44 100644 --- a/airflow/container.go +++ b/airflow/container.go @@ -11,6 +11,7 @@ import ( "github.com/astronomer/astro-cli/airflow/types" "github.com/astronomer/astro-cli/astro-client" + astrocore "github.com/astronomer/astro-cli/astro-client-core" "github.com/astronomer/astro-cli/config" "github.com/astronomer/astro-cli/pkg/fileutil" "github.com/astronomer/astro-cli/pkg/util" @@ -21,7 +22,7 @@ import ( ) type ContainerHandler interface { - Start(imageName, settingsFile, composeFile string, noCache, noBrowser bool, waitTime time.Duration) error + Start(imageName, settingsFile, composeFile string, noCache, noBrowser bool, waitTime time.Duration, envConns map[string]astrocore.EnvironmentObjectConnection) error Stop(waitForExit bool) error PS() error Kill() error diff --git a/airflow/docker.go b/airflow/docker.go index d0ec63aa8..f0393ce0a 100644 --- a/airflow/docker.go +++ b/airflow/docker.go @@ -18,6 +18,7 @@ import ( semver "github.com/Masterminds/semver/v3" airflowTypes "github.com/astronomer/astro-cli/airflow/types" "github.com/astronomer/astro-cli/astro-client" + astrocore "github.com/astronomer/astro-cli/astro-client-core" "github.com/astronomer/astro-cli/cloud/deployment" "github.com/astronomer/astro-cli/config" "github.com/astronomer/astro-cli/docker" @@ -203,7 +204,7 @@ func DockerComposeInit(airflowHome, envFile, dockerfile, imageName string) (*Doc // Start starts a local airflow development cluster // //nolint:gocognit -func (d *DockerCompose) Start(imageName, settingsFile, composeFile string, noCache, noBrowser bool, waitTime time.Duration) error { +func (d *DockerCompose) Start(imageName, settingsFile, composeFile string, noCache, noBrowser bool, waitTime time.Duration, envConns map[string]astrocore.EnvironmentObjectConnection) error { // check if docker is up for macOS if runtime.GOOS == "darwin" && config.CFG.DockerCommand.GetString() == dockerCmd { err := startDocker() @@ -300,7 +301,7 @@ func (d *DockerCompose) Start(imageName, settingsFile, composeFile string, noCac startupTimeout = 5 * time.Minute } - err = checkWebserverHealth(settingsFile, project, d.composeService, airflowDockerVersion, noBrowser, startupTimeout) + err = checkWebserverHealth(settingsFile, envConns, project, d.composeService, airflowDockerVersion, noBrowser, startupTimeout) if err != nil { return err } @@ -1205,7 +1206,7 @@ func (d *DockerCompose) ImportSettings(settingsFile, envFile string, connections return errNoFile } - err = initSettings(containerID, settingsFile, airflowDockerVersion, connections, variables, pools) + err = initSettings(containerID, settingsFile, nil, airflowDockerVersion, connections, variables, pools) if err != nil { return err } @@ -1365,15 +1366,14 @@ var createDockerProject = func(projectName, airflowHome, envFile, buildImage, se return project, err } -var checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { +var checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { if config.CFG.DockerCommand.GetString() == podman { - err := printStatus(settingsFile, project, composeService, airflowDockerVersion, noBrowser) + err := printStatus(settingsFile, envConns, project, composeService, airflowDockerVersion, noBrowser) if err != nil { if !errors.Is(err, errComposeProjectRunning) { return err } } - } else { ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() @@ -1387,7 +1387,7 @@ var checkWebserverHealth = func(settingsFile string, project *types.Project, com return err } if string(marshal) == `{"action":"health_status: healthy"}` { - err := printStatus(settingsFile, project, composeService, airflowDockerVersion, noBrowser) + err := printStatus(settingsFile, envConns, project, composeService, airflowDockerVersion, noBrowser) if err != nil { return err } @@ -1409,7 +1409,7 @@ var checkWebserverHealth = func(settingsFile string, project *types.Project, com return nil } -func printStatus(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool) error { +func printStatus(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool) error { psInfo, err := composeService.Ps(context.Background(), project.Name, api.PsOptions{ All: true, }) @@ -1426,7 +1426,7 @@ func printStatus(settingsFile string, project *types.Project, composeService api for i := range psInfo { if strings.Contains(psInfo[i].Name, project.Name) && strings.Contains(psInfo[i].Name, WebserverDockerContainerName) { - err = initSettings(psInfo[i].ID, settingsFile, airflowDockerVersion, true, true, true) + err = initSettings(psInfo[i].ID, settingsFile, envConns, airflowDockerVersion, true, true, true) if err != nil { return err } diff --git a/astro-client-core/api.gen.go b/astro-client-core/api.gen.go index 19960a8d1..0e6a62930 100644 --- a/astro-client-core/api.gen.go +++ b/astro-client-core/api.gen.go @@ -23,12 +23,14 @@ const ( // Defines values for ApiTokenType. const ( + ApiTokenTypeDEPLOYMENT ApiTokenType = "DEPLOYMENT" ApiTokenTypeORGANIZATION ApiTokenType = "ORGANIZATION" ApiTokenTypeWORKSPACE ApiTokenType = "WORKSPACE" ) // Defines values for ApiTokenRoleEntityType. const ( + ApiTokenRoleEntityTypeDEPLOYMENT ApiTokenRoleEntityType = "DEPLOYMENT" ApiTokenRoleEntityTypeORGANIZATION ApiTokenRoleEntityType = "ORGANIZATION" ApiTokenRoleEntityTypeWORKSPACE ApiTokenRoleEntityType = "WORKSPACE" ) @@ -63,7 +65,6 @@ const ( ClusterTypeBRINGYOUROWNCLOUD ClusterType = "BRING_YOUR_OWN_CLOUD" ClusterTypeHOSTED ClusterType = "HOSTED" ClusterTypeSHARED ClusterType = "SHARED" - ClusterTypeVIRTUALRUNTIMES ClusterType = "VIRTUAL_RUNTIMES" ) // Defines values for ClusterDetailedCloudProvider. @@ -90,7 +91,6 @@ const ( ClusterDetailedTypeBRINGYOUROWNCLOUD ClusterDetailedType = "BRING_YOUR_OWN_CLOUD" ClusterDetailedTypeHOSTED ClusterDetailedType = "HOSTED" ClusterDetailedTypeSHARED ClusterDetailedType = "SHARED" - ClusterDetailedTypeVIRTUALRUNTIMES ClusterDetailedType = "VIRTUAL_RUNTIMES" ) // Defines values for CreateAwsClusterRequestType. @@ -98,7 +98,6 @@ const ( CreateAwsClusterRequestTypeBRINGYOUROWNCLOUD CreateAwsClusterRequestType = "BRING_YOUR_OWN_CLOUD" CreateAwsClusterRequestTypeHOSTED CreateAwsClusterRequestType = "HOSTED" CreateAwsClusterRequestTypeSHARED CreateAwsClusterRequestType = "SHARED" - CreateAwsClusterRequestTypeVIRTUALRUNTIMES CreateAwsClusterRequestType = "VIRTUAL_RUNTIMES" ) // Defines values for CreateAzureClusterRequestType. @@ -106,7 +105,44 @@ const ( CreateAzureClusterRequestTypeBRINGYOUROWNCLOUD CreateAzureClusterRequestType = "BRING_YOUR_OWN_CLOUD" CreateAzureClusterRequestTypeHOSTED CreateAzureClusterRequestType = "HOSTED" CreateAzureClusterRequestTypeSHARED CreateAzureClusterRequestType = "SHARED" - CreateAzureClusterRequestTypeVIRTUALRUNTIMES CreateAzureClusterRequestType = "VIRTUAL_RUNTIMES" +) + +// Defines values for CreateDedicatedDeploymentRequestExecutor. +const ( + CreateDedicatedDeploymentRequestExecutorCELERY CreateDedicatedDeploymentRequestExecutor = "CELERY" + CreateDedicatedDeploymentRequestExecutorKUBERNETES CreateDedicatedDeploymentRequestExecutor = "KUBERNETES" +) + +// Defines values for CreateDedicatedDeploymentRequestSchedulerSize. +const ( + CreateDedicatedDeploymentRequestSchedulerSizeLARGE CreateDedicatedDeploymentRequestSchedulerSize = "LARGE" + CreateDedicatedDeploymentRequestSchedulerSizeMEDIUM CreateDedicatedDeploymentRequestSchedulerSize = "MEDIUM" + CreateDedicatedDeploymentRequestSchedulerSizeSMALL CreateDedicatedDeploymentRequestSchedulerSize = "SMALL" +) + +// Defines values for CreateDedicatedDeploymentRequestType. +const ( + CreateDedicatedDeploymentRequestTypeDEDICATED CreateDedicatedDeploymentRequestType = "DEDICATED" + CreateDedicatedDeploymentRequestTypeHYBRID CreateDedicatedDeploymentRequestType = "HYBRID" + CreateDedicatedDeploymentRequestTypeSTANDARD CreateDedicatedDeploymentRequestType = "STANDARD" +) + +// Defines values for CreateEnvironmentObjectLinkRequestScope. +const ( + CreateEnvironmentObjectLinkRequestScopeDEPLOYMENT CreateEnvironmentObjectLinkRequestScope = "DEPLOYMENT" + CreateEnvironmentObjectLinkRequestScopePROJECT CreateEnvironmentObjectLinkRequestScope = "PROJECT" +) + +// Defines values for CreateEnvironmentObjectRequestObjectType. +const ( + CreateEnvironmentObjectRequestObjectTypeCONNECTION CreateEnvironmentObjectRequestObjectType = "CONNECTION" +) + +// Defines values for CreateEnvironmentObjectRequestScope. +const ( + CreateEnvironmentObjectRequestScopeDEPLOYMENT CreateEnvironmentObjectRequestScope = "DEPLOYMENT" + CreateEnvironmentObjectRequestScopePROJECT CreateEnvironmentObjectRequestScope = "PROJECT" + CreateEnvironmentObjectRequestScopeWORKSPACE CreateEnvironmentObjectRequestScope = "WORKSPACE" ) // Defines values for CreateGcpClusterRequestType. @@ -114,15 +150,46 @@ const ( CreateGcpClusterRequestTypeBRINGYOUROWNCLOUD CreateGcpClusterRequestType = "BRING_YOUR_OWN_CLOUD" CreateGcpClusterRequestTypeHOSTED CreateGcpClusterRequestType = "HOSTED" CreateGcpClusterRequestTypeSHARED CreateGcpClusterRequestType = "SHARED" - CreateGcpClusterRequestTypeVIRTUALRUNTIMES CreateGcpClusterRequestType = "VIRTUAL_RUNTIMES" ) -// Defines values for CreateManagedDomainRequestEnforcedLogins. +// Defines values for CreateHybridDeploymentRequestExecutor. +const ( + CreateHybridDeploymentRequestExecutorCELERY CreateHybridDeploymentRequestExecutor = "CELERY" + CreateHybridDeploymentRequestExecutorKUBERNETES CreateHybridDeploymentRequestExecutor = "KUBERNETES" +) + +// Defines values for CreateHybridDeploymentRequestType. +const ( + CreateHybridDeploymentRequestTypeDEDICATED CreateHybridDeploymentRequestType = "DEDICATED" + CreateHybridDeploymentRequestTypeHYBRID CreateHybridDeploymentRequestType = "HYBRID" + CreateHybridDeploymentRequestTypeSTANDARD CreateHybridDeploymentRequestType = "STANDARD" +) + +// Defines values for CreateStandardDeploymentRequestCloudProvider. +const ( + AWS CreateStandardDeploymentRequestCloudProvider = "AWS" + AZURE CreateStandardDeploymentRequestCloudProvider = "AZURE" + GCP CreateStandardDeploymentRequestCloudProvider = "GCP" +) + +// Defines values for CreateStandardDeploymentRequestExecutor. +const ( + CreateStandardDeploymentRequestExecutorCELERY CreateStandardDeploymentRequestExecutor = "CELERY" + CreateStandardDeploymentRequestExecutorKUBERNETES CreateStandardDeploymentRequestExecutor = "KUBERNETES" +) + +// Defines values for CreateStandardDeploymentRequestSchedulerSize. +const ( + CreateStandardDeploymentRequestSchedulerSizeLARGE CreateStandardDeploymentRequestSchedulerSize = "LARGE" + CreateStandardDeploymentRequestSchedulerSizeMEDIUM CreateStandardDeploymentRequestSchedulerSize = "MEDIUM" + CreateStandardDeploymentRequestSchedulerSizeSMALL CreateStandardDeploymentRequestSchedulerSize = "SMALL" +) + +// Defines values for CreateStandardDeploymentRequestType. const ( - CreateManagedDomainRequestEnforcedLoginsGithub CreateManagedDomainRequestEnforcedLogins = "github" - CreateManagedDomainRequestEnforcedLoginsGoogle CreateManagedDomainRequestEnforcedLogins = "google" - CreateManagedDomainRequestEnforcedLoginsPassword CreateManagedDomainRequestEnforcedLogins = "password" - CreateManagedDomainRequestEnforcedLoginsSso CreateManagedDomainRequestEnforcedLogins = "sso" + CreateStandardDeploymentRequestTypeDEDICATED CreateStandardDeploymentRequestType = "DEDICATED" + CreateStandardDeploymentRequestTypeHYBRID CreateStandardDeploymentRequestType = "HYBRID" + CreateStandardDeploymentRequestTypeSTANDARD CreateStandardDeploymentRequestType = "STANDARD" ) // Defines values for DeploymentStatus. @@ -136,9 +203,9 @@ const ( // Defines values for DeploymentType. const ( - DeploymentTypeHOSTEDDEDICATED DeploymentType = "HOSTED_DEDICATED" - DeploymentTypeHOSTEDSHARED DeploymentType = "HOSTED_SHARED" - DeploymentTypeHYBRID DeploymentType = "HYBRID" + Dedicated DeploymentType = "Dedicated" + Hybrid DeploymentType = "Hybrid" + Standard DeploymentType = "Standard" ) // Defines values for DeploymentLogEntrySource. @@ -158,12 +225,39 @@ const ( EntitlementRequiredTierTRIAL EntitlementRequiredTier = "TRIAL" ) +// Defines values for EnvironmentObjectObjectType. +const ( + EnvironmentObjectObjectTypeCONNECTION EnvironmentObjectObjectType = "CONNECTION" +) + +// Defines values for EnvironmentObjectScope. +const ( + EnvironmentObjectScopeDEPLOYMENT EnvironmentObjectScope = "DEPLOYMENT" + EnvironmentObjectScopePROJECT EnvironmentObjectScope = "PROJECT" + EnvironmentObjectScopeWORKSPACE EnvironmentObjectScope = "WORKSPACE" +) + +// Defines values for EnvironmentObjectLinkScope. +const ( + EnvironmentObjectLinkScopeDEPLOYMENT EnvironmentObjectLinkScope = "DEPLOYMENT" + EnvironmentObjectLinkScopePROJECT EnvironmentObjectLinkScope = "PROJECT" +) + // Defines values for ManagedDomainStatus. const ( PENDING ManagedDomainStatus = "PENDING" VERIFIED ManagedDomainStatus = "VERIFIED" ) +// Defines values for MutateWorkerQueueRequestAstroMachine. +const ( + A10 MutateWorkerQueueRequestAstroMachine = "A10" + A20 MutateWorkerQueueRequestAstroMachine = "A20" + A40 MutateWorkerQueueRequestAstroMachine = "A40" + A5 MutateWorkerQueueRequestAstroMachine = "A5" + A60 MutateWorkerQueueRequestAstroMachine = "A60" +) + // Defines values for OrganizationPaymentMethod. const ( AWSMARKETPLACE OrganizationPaymentMethod = "AWS_MARKETPLACE" @@ -197,113 +291,80 @@ const ( OrganizationSupportPlanTRIAL OrganizationSupportPlan = "TRIAL" ) -// Defines values for PaymentMethodCardBrand. -const ( - PaymentMethodCardBrandAmex PaymentMethodCardBrand = "amex" - PaymentMethodCardBrandDiners PaymentMethodCardBrand = "diners" - PaymentMethodCardBrandDiscover PaymentMethodCardBrand = "discover" - PaymentMethodCardBrandJcb PaymentMethodCardBrand = "jcb" - PaymentMethodCardBrandMastercard PaymentMethodCardBrand = "mastercard" - PaymentMethodCardBrandUnionpay PaymentMethodCardBrand = "unionpay" - PaymentMethodCardBrandUnknown PaymentMethodCardBrand = "unknown" - PaymentMethodCardBrandVisa PaymentMethodCardBrand = "visa" -) - -// Defines values for PaymentMethodCardFunding. +// Defines values for SelfSignupType. const ( - PaymentMethodCardFundingCredit PaymentMethodCardFunding = "credit" - PaymentMethodCardFundingDebit PaymentMethodCardFunding = "debit" - PaymentMethodCardFundingPrepaid PaymentMethodCardFunding = "prepaid" - PaymentMethodCardFundingUnknown PaymentMethodCardFunding = "unknown" + SelfSignupTypeRegular SelfSignupType = "Regular" + SelfSignupTypeTrial SelfSignupType = "Trial" ) -// Defines values for PaymentMethodCardChecksAddressLine1Check. +// Defines values for SharedClusterCloudProvider. const ( - PaymentMethodCardChecksAddressLine1CheckFailed PaymentMethodCardChecksAddressLine1Check = "failed" - PaymentMethodCardChecksAddressLine1CheckPass PaymentMethodCardChecksAddressLine1Check = "pass" - PaymentMethodCardChecksAddressLine1CheckUnavailable PaymentMethodCardChecksAddressLine1Check = "unavailable" - PaymentMethodCardChecksAddressLine1CheckUnchecked PaymentMethodCardChecksAddressLine1Check = "unchecked" + SharedClusterCloudProviderAws SharedClusterCloudProvider = "aws" + SharedClusterCloudProviderAzure SharedClusterCloudProvider = "azure" + SharedClusterCloudProviderGcp SharedClusterCloudProvider = "gcp" ) -// Defines values for PaymentMethodCardChecksAddressPostalCodeCheck. +// Defines values for SharedClusterStatus. const ( - PaymentMethodCardChecksAddressPostalCodeCheckFailed PaymentMethodCardChecksAddressPostalCodeCheck = "failed" - PaymentMethodCardChecksAddressPostalCodeCheckPass PaymentMethodCardChecksAddressPostalCodeCheck = "pass" - PaymentMethodCardChecksAddressPostalCodeCheckUnavailable PaymentMethodCardChecksAddressPostalCodeCheck = "unavailable" - PaymentMethodCardChecksAddressPostalCodeCheckUnchecked PaymentMethodCardChecksAddressPostalCodeCheck = "unchecked" + SharedClusterStatusCREATED SharedClusterStatus = "CREATED" + SharedClusterStatusCREATEFAILED SharedClusterStatus = "CREATE_FAILED" + SharedClusterStatusCREATING SharedClusterStatus = "CREATING" + SharedClusterStatusDELETED SharedClusterStatus = "DELETED" + SharedClusterStatusDELETEFAILED SharedClusterStatus = "DELETE_FAILED" + SharedClusterStatusDELETING SharedClusterStatus = "DELETING" + SharedClusterStatusFORCEDELETED SharedClusterStatus = "FORCE_DELETED" + SharedClusterStatusUPDATING SharedClusterStatus = "UPDATING" ) -// Defines values for PaymentMethodCardChecksCvcCheck. +// Defines values for UpdateEnvironmentObjectLinkRequestScope. const ( - PaymentMethodCardChecksCvcCheckFailed PaymentMethodCardChecksCvcCheck = "failed" - PaymentMethodCardChecksCvcCheckPass PaymentMethodCardChecksCvcCheck = "pass" - PaymentMethodCardChecksCvcCheckUnavailable PaymentMethodCardChecksCvcCheck = "unavailable" - PaymentMethodCardChecksCvcCheckUnchecked PaymentMethodCardChecksCvcCheck = "unchecked" + UpdateEnvironmentObjectLinkRequestScopeDEPLOYMENT UpdateEnvironmentObjectLinkRequestScope = "DEPLOYMENT" + UpdateEnvironmentObjectLinkRequestScopePROJECT UpdateEnvironmentObjectLinkRequestScope = "PROJECT" ) -// Defines values for PaymentMethodCardWalletType. +// Defines values for UpdateEnvironmentObjectRequestObjectType. const ( - AmexExpressCheckout PaymentMethodCardWalletType = "amexExpressCheckout" - ApplePay PaymentMethodCardWalletType = "applePay" - GooglePay PaymentMethodCardWalletType = "googlePay" - Link PaymentMethodCardWalletType = "link" - Masterpass PaymentMethodCardWalletType = "masterpass" - SamsungPay PaymentMethodCardWalletType = "samsungPay" - VisaCheckout PaymentMethodCardWalletType = "visaCheckout" + UpdateEnvironmentObjectRequestObjectTypeCONNECTION UpdateEnvironmentObjectRequestObjectType = "CONNECTION" ) -// Defines values for PaymentMethodUSBankAccountAccountHolderType. +// Defines values for UpdateEnvironmentObjectRequestScope. const ( - Company PaymentMethodUSBankAccountAccountHolderType = "company" - Individual PaymentMethodUSBankAccountAccountHolderType = "individual" + UpdateEnvironmentObjectRequestScopeDEPLOYMENT UpdateEnvironmentObjectRequestScope = "DEPLOYMENT" + UpdateEnvironmentObjectRequestScopePROJECT UpdateEnvironmentObjectRequestScope = "PROJECT" + UpdateEnvironmentObjectRequestScopeWORKSPACE UpdateEnvironmentObjectRequestScope = "WORKSPACE" ) -// Defines values for PaymentMethodUSBankAccountAccountType. +// Defines values for UpdateHostedDeploymentRequestExecutor. const ( - Checking PaymentMethodUSBankAccountAccountType = "checking" - Savings PaymentMethodUSBankAccountAccountType = "savings" + UpdateHostedDeploymentRequestExecutorCELERY UpdateHostedDeploymentRequestExecutor = "CELERY" + UpdateHostedDeploymentRequestExecutorKUBERNETES UpdateHostedDeploymentRequestExecutor = "KUBERNETES" ) -// Defines values for SharedClusterCloudProvider. +// Defines values for UpdateHostedDeploymentRequestSchedulerSize. const ( - SharedClusterCloudProviderAws SharedClusterCloudProvider = "aws" - SharedClusterCloudProviderAzure SharedClusterCloudProvider = "azure" - SharedClusterCloudProviderGcp SharedClusterCloudProvider = "gcp" + LARGE UpdateHostedDeploymentRequestSchedulerSize = "LARGE" + MEDIUM UpdateHostedDeploymentRequestSchedulerSize = "MEDIUM" + SMALL UpdateHostedDeploymentRequestSchedulerSize = "SMALL" ) -// Defines values for SharedClusterStatus. +// Defines values for UpdateHostedDeploymentRequestType. const ( - SharedClusterStatusCREATED SharedClusterStatus = "CREATED" - SharedClusterStatusCREATEFAILED SharedClusterStatus = "CREATE_FAILED" - SharedClusterStatusCREATING SharedClusterStatus = "CREATING" - SharedClusterStatusDELETED SharedClusterStatus = "DELETED" - SharedClusterStatusDELETEFAILED SharedClusterStatus = "DELETE_FAILED" - SharedClusterStatusDELETING SharedClusterStatus = "DELETING" - SharedClusterStatusFORCEDELETED SharedClusterStatus = "FORCE_DELETED" - SharedClusterStatusUPDATING SharedClusterStatus = "UPDATING" + UpdateHostedDeploymentRequestTypeDEDICATED UpdateHostedDeploymentRequestType = "DEDICATED" + UpdateHostedDeploymentRequestTypeHYBRID UpdateHostedDeploymentRequestType = "HYBRID" + UpdateHostedDeploymentRequestTypeSTANDARD UpdateHostedDeploymentRequestType = "STANDARD" ) -// Defines values for SsoConnectionConfigStrategy. +// Defines values for UpdateHybridDeploymentRequestExecutor. const ( - Samlp SsoConnectionConfigStrategy = "samlp" - Waad SsoConnectionConfigStrategy = "waad" + CELERY UpdateHybridDeploymentRequestExecutor = "CELERY" + KUBERNETES UpdateHybridDeploymentRequestExecutor = "KUBERNETES" ) -// Defines values for TaskInstanceState. +// Defines values for UpdateHybridDeploymentRequestType. const ( - TaskInstanceStateDeferred TaskInstanceState = "deferred" - TaskInstanceStateFailed TaskInstanceState = "failed" - TaskInstanceStateNone TaskInstanceState = "none" - TaskInstanceStateQueued TaskInstanceState = "queued" - TaskInstanceStateRemoved TaskInstanceState = "removed" - TaskInstanceStateRestarting TaskInstanceState = "restarting" - TaskInstanceStateRunning TaskInstanceState = "running" - TaskInstanceStateScheduled TaskInstanceState = "scheduled" - TaskInstanceStateSkipped TaskInstanceState = "skipped" - TaskInstanceStateSuccess TaskInstanceState = "success" - TaskInstanceStateUpForReschedule TaskInstanceState = "upForReschedule" - TaskInstanceStateUpForRetry TaskInstanceState = "upForRetry" - TaskInstanceStateUpstreamFailed TaskInstanceState = "upstreamFailed" + UpdateHybridDeploymentRequestTypeDEDICATED UpdateHybridDeploymentRequestType = "DEDICATED" + UpdateHybridDeploymentRequestTypeHYBRID UpdateHybridDeploymentRequestType = "HYBRID" + UpdateHybridDeploymentRequestTypeSTANDARD UpdateHybridDeploymentRequestType = "STANDARD" ) // Defines values for UpdateInviteRequestInviteStatus. @@ -312,12 +373,10 @@ const ( Reject UpdateInviteRequestInviteStatus = "reject" ) -// Defines values for UpdateManagedDomainRequestEnforcedLogins. +// Defines values for UserSignupType. const ( - UpdateManagedDomainRequestEnforcedLoginsGithub UpdateManagedDomainRequestEnforcedLogins = "github" - UpdateManagedDomainRequestEnforcedLoginsGoogle UpdateManagedDomainRequestEnforcedLogins = "google" - UpdateManagedDomainRequestEnforcedLoginsPassword UpdateManagedDomainRequestEnforcedLogins = "password" - UpdateManagedDomainRequestEnforcedLoginsSso UpdateManagedDomainRequestEnforcedLogins = "sso" + UserSignupTypeRegular UserSignupType = "Regular" + UserSignupTypeTrial UserSignupType = "Trial" ) // Defines values for GetSharedClusterParamsCloudProvider. @@ -339,7 +398,6 @@ const ( GetClusterOptionsParamsTypeBRINGYOUROWNCLOUD GetClusterOptionsParamsType = "BRING_YOUR_OWN_CLOUD" GetClusterOptionsParamsTypeHOSTED GetClusterOptionsParamsType = "HOSTED" GetClusterOptionsParamsTypeSHARED GetClusterOptionsParamsType = "SHARED" - GetClusterOptionsParamsTypeVIRTUALRUNTIMES GetClusterOptionsParamsType = "VIRTUAL_RUNTIMES" ) // Defines values for ListOrganizationsParamsTrialStatus. @@ -352,13 +410,13 @@ const ( // Defines values for ListOrganizationsParamsSupportPlan. const ( - BASIC ListOrganizationsParamsSupportPlan = "BASIC" - BUSINESSCRITICAL ListOrganizationsParamsSupportPlan = "BUSINESS_CRITICAL" - INTERNAL ListOrganizationsParamsSupportPlan = "INTERNAL" - POV ListOrganizationsParamsSupportPlan = "POV" - PREMIUM ListOrganizationsParamsSupportPlan = "PREMIUM" - STANDARD ListOrganizationsParamsSupportPlan = "STANDARD" - TRIAL ListOrganizationsParamsSupportPlan = "TRIAL" + ListOrganizationsParamsSupportPlanBASIC ListOrganizationsParamsSupportPlan = "BASIC" + ListOrganizationsParamsSupportPlanBUSINESSCRITICAL ListOrganizationsParamsSupportPlan = "BUSINESS_CRITICAL" + ListOrganizationsParamsSupportPlanINTERNAL ListOrganizationsParamsSupportPlan = "INTERNAL" + ListOrganizationsParamsSupportPlanPOV ListOrganizationsParamsSupportPlan = "POV" + ListOrganizationsParamsSupportPlanPREMIUM ListOrganizationsParamsSupportPlan = "PREMIUM" + ListOrganizationsParamsSupportPlanSTANDARD ListOrganizationsParamsSupportPlan = "STANDARD" + ListOrganizationsParamsSupportPlanTRIAL ListOrganizationsParamsSupportPlan = "TRIAL" ) // Defines values for ListOrganizationsParamsProduct. @@ -418,22 +476,21 @@ const ( // Defines values for ListClustersParamsTypes. const ( - ListClustersParamsTypesBRINGYOUROWNCLOUD ListClustersParamsTypes = "BRING_YOUR_OWN_CLOUD" - ListClustersParamsTypesHOSTED ListClustersParamsTypes = "HOSTED" - ListClustersParamsTypesSHARED ListClustersParamsTypes = "SHARED" - ListClustersParamsTypesVIRTUALRUNTIMES ListClustersParamsTypes = "VIRTUAL_RUNTIMES" + BRINGYOUROWNCLOUD ListClustersParamsTypes = "BRING_YOUR_OWN_CLOUD" + HOSTED ListClustersParamsTypes = "HOSTED" + SHARED ListClustersParamsTypes = "SHARED" ) -// Defines values for ListClustersParamsStatus. +// Defines values for ListClustersParamsStatuses. const ( - CREATED ListClustersParamsStatus = "CREATED" - CREATEFAILED ListClustersParamsStatus = "CREATE_FAILED" - CREATING ListClustersParamsStatus = "CREATING" - DELETED ListClustersParamsStatus = "DELETED" - DELETEFAILED ListClustersParamsStatus = "DELETE_FAILED" - DELETING ListClustersParamsStatus = "DELETING" - FORCEDELETED ListClustersParamsStatus = "FORCE_DELETED" - UPDATING ListClustersParamsStatus = "UPDATING" + CREATED ListClustersParamsStatuses = "CREATED" + CREATEFAILED ListClustersParamsStatuses = "CREATE_FAILED" + CREATING ListClustersParamsStatuses = "CREATING" + DELETED ListClustersParamsStatuses = "DELETED" + DELETEFAILED ListClustersParamsStatuses = "DELETE_FAILED" + DELETING ListClustersParamsStatuses = "DELETING" + FORCEDELETED ListClustersParamsStatuses = "FORCE_DELETED" + UPDATING ListClustersParamsStatuses = "UPDATING" ) // Defines values for ListClustersParamsSorts. @@ -490,20 +547,26 @@ const ( ListDeploymentsParamsSortsWorkspaceIdDesc ListDeploymentsParamsSorts = "workspaceId:desc" ) -// Defines values for GetDeploymentDagRunsParamsState. -const ( - Failed GetDeploymentDagRunsParamsState = "failed" - Queued GetDeploymentDagRunsParamsState = "queued" - Running GetDeploymentDagRunsParamsState = "running" - Success GetDeploymentDagRunsParamsState = "success" -) - -// Defines values for GetDeploymentDagRunsParamsRunTypeIn. +// Defines values for ListDeploymentApiTokensParamsSorts. const ( - Backfill GetDeploymentDagRunsParamsRunTypeIn = "backfill" - DatasetTriggered GetDeploymentDagRunsParamsRunTypeIn = "dataset_triggered" - Manual GetDeploymentDagRunsParamsRunTypeIn = "manual" - Scheduled GetDeploymentDagRunsParamsRunTypeIn = "scheduled" + ListDeploymentApiTokensParamsSortsCreatedAtAsc ListDeploymentApiTokensParamsSorts = "createdAt:asc" + ListDeploymentApiTokensParamsSortsCreatedAtDesc ListDeploymentApiTokensParamsSorts = "createdAt:desc" + ListDeploymentApiTokensParamsSortsCreatedByIdAsc ListDeploymentApiTokensParamsSorts = "createdById:asc" + ListDeploymentApiTokensParamsSortsCreatedByIdDesc ListDeploymentApiTokensParamsSorts = "createdById:desc" + ListDeploymentApiTokensParamsSortsDescriptionAsc ListDeploymentApiTokensParamsSorts = "description:asc" + ListDeploymentApiTokensParamsSortsDescriptionDesc ListDeploymentApiTokensParamsSorts = "description:desc" + ListDeploymentApiTokensParamsSortsIdAsc ListDeploymentApiTokensParamsSorts = "id:asc" + ListDeploymentApiTokensParamsSortsIdDesc ListDeploymentApiTokensParamsSorts = "id:desc" + ListDeploymentApiTokensParamsSortsNameAsc ListDeploymentApiTokensParamsSorts = "name:asc" + ListDeploymentApiTokensParamsSortsNameDesc ListDeploymentApiTokensParamsSorts = "name:desc" + ListDeploymentApiTokensParamsSortsShortTokenAsc ListDeploymentApiTokensParamsSorts = "shortToken:asc" + ListDeploymentApiTokensParamsSortsShortTokenDesc ListDeploymentApiTokensParamsSorts = "shortToken:desc" + ListDeploymentApiTokensParamsSortsTokenStartAtAsc ListDeploymentApiTokensParamsSorts = "tokenStartAt:asc" + ListDeploymentApiTokensParamsSortsTokenStartAtDesc ListDeploymentApiTokensParamsSorts = "tokenStartAt:desc" + ListDeploymentApiTokensParamsSortsUpdatedAtAsc ListDeploymentApiTokensParamsSorts = "updatedAt:asc" + ListDeploymentApiTokensParamsSortsUpdatedAtDesc ListDeploymentApiTokensParamsSorts = "updatedAt:desc" + ListDeploymentApiTokensParamsSortsUpdatedByIdAsc ListDeploymentApiTokensParamsSorts = "updatedById:asc" + ListDeploymentApiTokensParamsSortsUpdatedByIdDesc ListDeploymentApiTokensParamsSorts = "updatedById:desc" ) // Defines values for GetDeploymentLogsParamsSources. @@ -514,15 +577,21 @@ const ( GetDeploymentLogsParamsSourcesWorker GetDeploymentLogsParamsSources = "worker" ) -// Defines values for GetMetronomeDashboardParamsType. +// Defines values for ListEnvironmentObjectsParamsSorts. const ( - Invoices GetMetronomeDashboardParamsType = "invoices" - Usage GetMetronomeDashboardParamsType = "usage" + ListEnvironmentObjectsParamsSortsCreatedAtAsc ListEnvironmentObjectsParamsSorts = "createdAt:asc" + ListEnvironmentObjectsParamsSortsCreatedAtDesc ListEnvironmentObjectsParamsSorts = "createdAt:desc" + ListEnvironmentObjectsParamsSortsObjectKeyAsc ListEnvironmentObjectsParamsSorts = "objectKey:asc" + ListEnvironmentObjectsParamsSortsObjectKeyDesc ListEnvironmentObjectsParamsSorts = "objectKey:desc" + ListEnvironmentObjectsParamsSortsObjectTypeAsc ListEnvironmentObjectsParamsSorts = "objectType:asc" + ListEnvironmentObjectsParamsSortsObjectTypeDesc ListEnvironmentObjectsParamsSorts = "objectType:desc" + ListEnvironmentObjectsParamsSortsUpdatedAtAsc ListEnvironmentObjectsParamsSorts = "updatedAt:asc" + ListEnvironmentObjectsParamsSortsUpdatedAtDesc ListEnvironmentObjectsParamsSorts = "updatedAt:desc" ) -// Defines values for GetStripeClientSecretParamsType. +// Defines values for ListEnvironmentObjectsParamsObjectType. const ( - SetupIntent GetStripeClientSecretParamsType = "setup-intent" + ListEnvironmentObjectsParamsObjectTypeCONNECTION ListEnvironmentObjectsParamsObjectType = "CONNECTION" ) // Defines values for ListOrganizationTeamsParamsSorts. @@ -638,16 +707,6 @@ type AddTeamMembersRequest struct { MemberIds []string `json:"memberIds"` } -// Address defines model for Address. -type Address struct { - City string `json:"city"` - Country string `json:"country"` - Line1 string `json:"line1"` - Line2 *string `json:"line2,omitempty"` - PostalCode string `json:"postalCode"` - State string `json:"state"` -} - // ApiToken defines model for ApiToken. type ApiToken struct { CreatedAt time.Time `json:"createdAt"` @@ -656,7 +715,7 @@ type ApiToken struct { DeletedAt *time.Time `json:"deletedAt,omitempty"` Description string `json:"description"` EndAt *time.Time `json:"endAt,omitempty"` - ExpiryPeriodInDays int `json:"expiryPeriodInDays"` + ExpiryPeriodInDays *int `json:"expiryPeriodInDays,omitempty"` Id string `json:"id"` LastUsedAt *time.Time `json:"lastUsedAt,omitempty"` Name string `json:"name"` @@ -683,25 +742,12 @@ type ApiTokenRole struct { // ApiTokenRoleEntityType defines model for ApiTokenRole.EntityType. type ApiTokenRoleEntityType string -// ApiTokenWorkspaceRole defines model for ApiTokenWorkspaceRole. -type ApiTokenWorkspaceRole struct { +// ApiTokenWorkspaceRoleRequest defines model for ApiTokenWorkspaceRoleRequest. +type ApiTokenWorkspaceRoleRequest struct { EntityId string `json:"entityId"` Role string `json:"role"` } -// AstroBaseUnit defines model for AstroBaseUnit. -type AstroBaseUnit struct { - Cpu int `json:"cpu"` - Memory int `json:"memory"` -} - -// AuConfigs defines model for AuConfigs. -type AuConfigs struct { - Default int `json:"default"` - Limit int `json:"limit"` - Request *int `json:"request,omitempty"` -} - // BasicSubjectProfile defines model for BasicSubjectProfile. type BasicSubjectProfile struct { ApiTokenName *string `json:"apiTokenName,omitempty"` @@ -723,6 +769,7 @@ type Cluster struct { DbInstanceType string `json:"dbInstanceType"` DeletedAt *string `json:"deletedAt,omitempty"` Id string `json:"id"` + IsCordoned *bool `json:"isCordoned,omitempty"` IsDryRun bool `json:"isDryRun"` IsLimited bool `json:"isLimited"` K8sTags []ClusterTag `json:"k8sTags"` @@ -764,6 +811,7 @@ type ClusterDetailed struct { DbInstanceType string `json:"dbInstanceType"` DeletedAt *string `json:"deletedAt,omitempty"` Id string `json:"id"` + IsCordoned *bool `json:"isCordoned,omitempty"` IsDryRun bool `json:"isDryRun"` IsLimited bool `json:"isLimited"` K8sTags []ClusterTag `json:"k8sTags"` @@ -842,17 +890,6 @@ type ClustersPaginated struct { TotalCount int `json:"totalCount"` } -// ComponentsOptions defines model for ComponentsOptions. -type ComponentsOptions struct { - Scheduler ContainerOptions `json:"scheduler"` - Workers ContainerOptions `json:"workers"` -} - -// ContainerOptions defines model for ContainerOptions. -type ContainerOptions struct { - Au AuConfigs `json:"au"` -} - // CreateAwsClusterRequest defines model for CreateAwsClusterRequest. type CreateAwsClusterRequest struct { DbInstanceType string `json:"dbInstanceType"` @@ -888,6 +925,139 @@ type CreateAzureClusterRequest struct { // CreateAzureClusterRequestType defines model for CreateAzureClusterRequest.Type. type CreateAzureClusterRequestType string +// CreateDedicatedDeploymentRequest defines model for CreateDedicatedDeploymentRequest. +type CreateDedicatedDeploymentRequest struct { + // AstroRuntimeVersion Version of the astro runtime to use + AstroRuntimeVersion string `json:"astroRuntimeVersion"` + + // ClusterId Cluster where the deployment should be created on + ClusterId string `json:"clusterId"` + + // DefaultTaskPodCpu Must be valid kubernetes cpu resource string, at least 0.25 in terms of cpu cores + DefaultTaskPodCpu string `json:"defaultTaskPodCpu"` + + // DefaultTaskPodMemory Must be valid kubernetes memory resource string, at least 0.5Gi in terms of Gibibytes (GiB) + DefaultTaskPodMemory string `json:"defaultTaskPodMemory"` + + // Description Optional description of the deployment + Description *string `json:"description,omitempty"` + + // Executor Airflow executors, supported: CELERY, KUBERNETES + Executor CreateDedicatedDeploymentRequestExecutor `json:"executor"` + + // IsCicdEnforced If true, deployment specifications can only be updated through API token, changes will not be allowed through UI. This option can be turned off by admin + IsCicdEnforced bool `json:"isCicdEnforced"` + + // IsDagDeployEnabled If true, dags can be independently pushed through CLI + IsDagDeployEnabled bool `json:"isDagDeployEnabled"` + + // IsHighAvailability If true, deployment will have backup components + IsHighAvailability bool `json:"isHighAvailability"` + + // Name The deployment name + Name string `json:"name"` + + // ResourceQuotaCpu Must be valid kubernetes cpu resource string, at least 1 in terms of cpu cores + ResourceQuotaCpu string `json:"resourceQuotaCpu"` + + // ResourceQuotaMemory Must be valid kubernetes memory resource string, at least 2Gi in terms of Gibibytes (GiB) + ResourceQuotaMemory string `json:"resourceQuotaMemory"` + + // SchedulerSize Size of scheduler, one of: SMALL, MEDIUM, LARGE + SchedulerSize CreateDedicatedDeploymentRequestSchedulerSize `json:"schedulerSize"` + + // Type Types of the deployment, one of: DEDICATED, HYBRID, STANDARD + Type CreateDedicatedDeploymentRequestType `json:"type"` + + // WorkerQueues Specification for worker queues, at least one is required + WorkerQueues []MutateWorkerQueueRequest `json:"workerQueues"` + + // WorkspaceId Workspace Id + WorkspaceId string `json:"workspaceId"` +} + +// CreateDedicatedDeploymentRequestExecutor Airflow executors, supported: CELERY, KUBERNETES +type CreateDedicatedDeploymentRequestExecutor string + +// CreateDedicatedDeploymentRequestSchedulerSize Size of scheduler, one of: SMALL, MEDIUM, LARGE +type CreateDedicatedDeploymentRequestSchedulerSize string + +// CreateDedicatedDeploymentRequestType Types of the deployment, one of: DEDICATED, HYBRID, STANDARD +type CreateDedicatedDeploymentRequestType string + +// CreateDeploymentApiTokenRequest defines model for CreateDeploymentApiTokenRequest. +type CreateDeploymentApiTokenRequest struct { + Description *string `json:"description,omitempty"` + Name string `json:"name"` + Role string `json:"role"` + TokenExpiryPeriodInDays *int `json:"tokenExpiryPeriodInDays,omitempty"` +} + +// CreateDeploymentRequest defines model for CreateDeploymentRequest. +type CreateDeploymentRequest struct { + union json.RawMessage +} + +// CreateEnvironmentObject defines model for CreateEnvironmentObject. +type CreateEnvironmentObject struct { + Id string `json:"id"` +} + +// CreateEnvironmentObjectConnectionOverridesRequest defines model for CreateEnvironmentObjectConnectionOverridesRequest. +type CreateEnvironmentObjectConnectionOverridesRequest struct { + Extra *map[string]interface{} `json:"extra,omitempty"` + Host *string `json:"host,omitempty"` + Login *string `json:"login,omitempty"` + Password *string `json:"password,omitempty"` + Port *int `json:"port,omitempty"` + Schema *string `json:"schema,omitempty"` + Type *string `json:"type,omitempty"` +} + +// CreateEnvironmentObjectConnectionRequest defines model for CreateEnvironmentObjectConnectionRequest. +type CreateEnvironmentObjectConnectionRequest struct { + Extra *map[string]interface{} `json:"extra,omitempty"` + Host *string `json:"host,omitempty"` + Login *string `json:"login,omitempty"` + Password *string `json:"password,omitempty"` + Port *int `json:"port,omitempty"` + Schema *string `json:"schema,omitempty"` + Type string `json:"type"` +} + +// CreateEnvironmentObjectLinkRequest defines model for CreateEnvironmentObjectLinkRequest. +type CreateEnvironmentObjectLinkRequest struct { + Overrides *CreateEnvironmentObjectOverridesRequest `json:"overrides,omitempty"` + Scope CreateEnvironmentObjectLinkRequestScope `json:"scope"` + ScopeEntityId string `json:"scopeEntityId"` +} + +// CreateEnvironmentObjectLinkRequestScope defines model for CreateEnvironmentObjectLinkRequest.Scope. +type CreateEnvironmentObjectLinkRequestScope string + +// CreateEnvironmentObjectOverridesRequest defines model for CreateEnvironmentObjectOverridesRequest. +type CreateEnvironmentObjectOverridesRequest struct { + Connection *CreateEnvironmentObjectConnectionOverridesRequest `json:"connection,omitempty"` +} + +// CreateEnvironmentObjectRequest defines model for CreateEnvironmentObjectRequest. +type CreateEnvironmentObjectRequest struct { + AutoLinkDeployments *bool `json:"autoLinkDeployments,omitempty"` + AutoLinkProjects *bool `json:"autoLinkProjects,omitempty"` + Connection *CreateEnvironmentObjectConnectionRequest `json:"connection,omitempty"` + Links *[]CreateEnvironmentObjectLinkRequest `json:"links,omitempty"` + ObjectKey string `json:"objectKey"` + ObjectType CreateEnvironmentObjectRequestObjectType `json:"objectType"` + Scope CreateEnvironmentObjectRequestScope `json:"scope"` + ScopeEntityId string `json:"scopeEntityId"` +} + +// CreateEnvironmentObjectRequestObjectType defines model for CreateEnvironmentObjectRequest.ObjectType. +type CreateEnvironmentObjectRequestObjectType string + +// CreateEnvironmentObjectRequestScope defines model for CreateEnvironmentObjectRequest.Scope. +type CreateEnvironmentObjectRequestScope string + // CreateGcpClusterRequest defines model for CreateGcpClusterRequest. type CreateGcpClusterRequest struct { DbInstanceType string `json:"dbInstanceType"` @@ -908,14 +1078,45 @@ type CreateGcpClusterRequest struct { // CreateGcpClusterRequestType defines model for CreateGcpClusterRequest.Type. type CreateGcpClusterRequestType string -// CreateManagedDomainRequest defines model for CreateManagedDomainRequest. -type CreateManagedDomainRequest struct { - EnforcedLogins *[]CreateManagedDomainRequestEnforcedLogins `json:"enforcedLogins,omitempty"` - Name string `json:"name"` +// CreateHybridDeploymentRequest defines model for CreateHybridDeploymentRequest. +type CreateHybridDeploymentRequest struct { + // AstroRuntimeVersion Version of the astro runtime to use + AstroRuntimeVersion string `json:"astroRuntimeVersion"` + + // ClusterId Cluster where the deployment should be created on + ClusterId string `json:"clusterId"` + + // Description Optional description of the deployment + Description *string `json:"description,omitempty"` + + // Executor Airflow executors, supported: CELERY, KUBERNETES + Executor CreateHybridDeploymentRequestExecutor `json:"executor"` + + // IsCicdEnforced If true, deployment specifications can only be updated through API token, changes will not be allowed through UI. This option can be turned off by admin + IsCicdEnforced bool `json:"isCicdEnforced"` + + // IsDagDeployEnabled If true, dags can be independently pushed through CLI + IsDagDeployEnabled bool `json:"isDagDeployEnabled"` + + // Name The deployment name + Name string `json:"name"` + Scheduler DeploymentInstanceSpecRequest `json:"scheduler"` + + // Type Types of the deployment, one of: DEDICATED, HYBRID, STANDARD + Type CreateHybridDeploymentRequestType `json:"type"` + + // WorkerQueues Specification for worker queues, at least one is required + WorkerQueues []MutateWorkerQueueRequest `json:"workerQueues"` + + // WorkspaceId Workspace Id + WorkspaceId string `json:"workspaceId"` } -// CreateManagedDomainRequestEnforcedLogins defines model for CreateManagedDomainRequest.EnforcedLogins. -type CreateManagedDomainRequestEnforcedLogins string +// CreateHybridDeploymentRequestExecutor Airflow executors, supported: CELERY, KUBERNETES +type CreateHybridDeploymentRequestExecutor string + +// CreateHybridDeploymentRequestType Types of the deployment, one of: DEDICATED, HYBRID, STANDARD +type CreateHybridDeploymentRequestType string // CreateNodePoolRequest defines model for CreateNodePoolRequest. type CreateNodePoolRequest struct { @@ -939,15 +1140,75 @@ type CreateOrganizationRequest struct { Name string `json:"name"` } -// CreateSsoConnectionRequest defines model for CreateSsoConnectionRequest. -type CreateSsoConnectionRequest struct { - Auth0ConnectionName string `json:"auth0ConnectionName"` - Configuration SsoConnectionConfig `json:"configuration"` - IdpInitiatedLoginEnabled *bool `json:"idpInitiatedLoginEnabled,omitempty"` - JitPolicy *JitPolicy `json:"jitPolicy,omitempty"` - ManagedDomains []SsoConnectionManagedDomain `json:"managedDomains"` +// CreateStandardDeploymentRequest defines model for CreateStandardDeploymentRequest. +type CreateStandardDeploymentRequest struct { + // AstroRuntimeVersion Version of the astro runtime to use + AstroRuntimeVersion string `json:"astroRuntimeVersion"` + + // CloudProvider Supported cloud providers are AWS, AZURE, GCP. Optional if cluster id is specified + CloudProvider *CreateStandardDeploymentRequestCloudProvider `json:"cloudProvider,omitempty"` + + // ClusterId Optional if cloud provider and region is specified + ClusterId *string `json:"clusterId,omitempty"` + + // DefaultTaskPodCpu Must be valid kubernetes cpu resource string, at least 0.25 in terms of cpu cores + DefaultTaskPodCpu string `json:"defaultTaskPodCpu"` + + // DefaultTaskPodMemory Must be valid kubernetes memory resource string, at least 0.5Gi in terms of Gibibytes (GiB) + DefaultTaskPodMemory string `json:"defaultTaskPodMemory"` + + // Description Optional description of the deployment + Description *string `json:"description,omitempty"` + + // Executor Airflow executors, supported: CELERY, KUBERNETES + Executor CreateStandardDeploymentRequestExecutor `json:"executor"` + + // IsCicdEnforced If true, deployment specifications can only be updated through API token, changes will not be allowed through UI. This option can be turned off by admin + IsCicdEnforced bool `json:"isCicdEnforced"` + + // IsDagDeployEnabled If true, dags can be independently pushed through CLI + IsDagDeployEnabled bool `json:"isDagDeployEnabled"` + + // IsHighAvailability If true, deployment will have backup components + IsHighAvailability bool `json:"isHighAvailability"` + + // Name The deployment name + Name string `json:"name"` + + // Region Cloud provider region. Optional if cluster id is specified + Region *string `json:"region,omitempty"` + + // ResourceQuotaCpu Must be valid kubernetes cpu resource string, at least 1 in terms of cpu cores + ResourceQuotaCpu string `json:"resourceQuotaCpu"` + + // ResourceQuotaMemory Must be valid kubernetes memory resource string, at least 2Gi in terms of Gibibytes (GiB) + ResourceQuotaMemory string `json:"resourceQuotaMemory"` + + // SchedulerSize Size of scheduler, one of: SMALL, MEDIUM, LARGE + SchedulerSize CreateStandardDeploymentRequestSchedulerSize `json:"schedulerSize"` + + // Type Types of the deployment, one of: DEDICATED, HYBRID, STANDARD + Type CreateStandardDeploymentRequestType `json:"type"` + + // WorkerQueues At least one worker queue must be specified + WorkerQueues []MutateWorkerQueueRequest `json:"workerQueues"` + + // WorkspaceId Workspace Id + WorkspaceId string `json:"workspaceId"` } +// CreateStandardDeploymentRequestCloudProvider Supported cloud providers are AWS, AZURE, GCP. Optional if cluster id is specified +type CreateStandardDeploymentRequestCloudProvider string + +// CreateStandardDeploymentRequestExecutor Airflow executors, supported: CELERY, KUBERNETES +type CreateStandardDeploymentRequestExecutor string + +// CreateStandardDeploymentRequestSchedulerSize Size of scheduler, one of: SMALL, MEDIUM, LARGE +type CreateStandardDeploymentRequestSchedulerSize string + +// CreateStandardDeploymentRequestType Types of the deployment, one of: DEDICATED, HYBRID, STANDARD +type CreateStandardDeploymentRequestType string + // CreateTeamRequest defines model for CreateTeamRequest. type CreateTeamRequest struct { Description *string `json:"description,omitempty"` @@ -977,18 +1238,6 @@ type CreateWorkspaceRequest struct { Name string `json:"name"` } -// CreditSummary defines model for CreditSummary. -type CreditSummary struct { - TotalCreditsGrantedUSD float32 `json:"totalCreditsGrantedUSD"` - TotalCreditsRemainingUSD float32 `json:"totalCreditsRemainingUSD"` -} - -// CreditType defines model for CreditType. -type CreditType struct { - Id string `json:"id"` - Name string `json:"name"` -} - // DagFilters defines model for DagFilters. type DagFilters struct { Deployments map[string]string `json:"deployments"` @@ -997,18 +1246,6 @@ type DagFilters struct { Warnings *[]string `json:"warnings,omitempty"` } -// DagRun defines model for DagRun. -type DagRun struct { - DataIntervalEnd *string `json:"dataIntervalEnd,omitempty"` - DataIntervalStart *string `json:"dataIntervalStart,omitempty"` - EndDate *string `json:"endDate,omitempty"` - LogicalDate *string `json:"logicalDate,omitempty"` - RunId *string `json:"runId,omitempty"` - RunType *string `json:"runType,omitempty"` - StartDate *string `json:"startDate,omitempty"` - State *string `json:"state,omitempty"` -} - // DagSchedule defines model for DagSchedule. type DagSchedule struct { CronExpression *InternalScheduleIntervalCronExpression `json:"CronExpression,omitempty"` @@ -1018,55 +1255,60 @@ type DagSchedule struct { // Deployment defines model for Deployment. type Deployment struct { - AlertEmails *[]string `json:"alertEmails,omitempty"` - ApiKeyOnlyDeployments bool `json:"apiKeyOnlyDeployments"` - ClusterId string `json:"clusterId"` - CreatedAt time.Time `json:"createdAt"` - CurrentDagTarballVersion *string `json:"currentDagTarballVersion,omitempty"` - CurrentImageVersion *string `json:"currentImageVersion,omitempty"` - DagDeployEnabled bool `json:"dagDeployEnabled"` - Description *string `json:"description,omitempty"` - DesiredDagTarballVersion *string `json:"desiredDagTarballVersion,omitempty"` - EnvironmentVariables *[]DeploymentEnvVar `json:"environmentVariables,omitempty"` - Executor *string `json:"executor,omitempty"` - ExternalIPs *[]string `json:"externalIPs,omitempty"` - Id string `json:"id"` - ImageId string `json:"imageId"` - ImageRepository string `json:"imageRepository"` - ImageTag string `json:"imageTag"` - IsHighAvailability bool `json:"isHighAvailability"` - Name string `json:"name"` + AlertEmails *[]string `json:"alertEmails,omitempty"` + ApiKeyOnlyDeployments bool `json:"apiKeyOnlyDeployments"` + ClusterId string `json:"clusterId"` + CreatedAt time.Time `json:"createdAt"` + CurrentDagTarballVersion *string `json:"currentDagTarballVersion,omitempty"` + CurrentImageVersion *string `json:"currentImageVersion,omitempty"` + DagDeployEnabled bool `json:"dagDeployEnabled"` + DefaultTaskPodCpu *string `json:"defaultTaskPodCpu,omitempty"` + DefaultTaskPodMemory *string `json:"defaultTaskPodMemory,omitempty"` + Description *string `json:"description,omitempty"` + DesiredDagTarballVersion *string `json:"desiredDagTarballVersion,omitempty"` + EnvironmentVariables *[]DeploymentEnvironmentVariable `json:"environmentVariables,omitempty"` + Executor *string `json:"executor,omitempty"` + ExternalIPs *[]string `json:"externalIPs,omitempty"` + Id string `json:"id"` + ImageId string `json:"imageId"` + ImageRepository string `json:"imageRepository"` + ImageTag string `json:"imageTag"` + IsHighAvailability bool `json:"isHighAvailability"` + LaminarHealthStatus *map[string]interface{} `json:"laminarHealthStatus,omitempty"` + Name string `json:"name"` // OrgShortName Deprecated: orgShortName has been replaced with organizationShortName - OrgShortName *string `json:"orgShortName,omitempty"` - OrganizationId string `json:"organizationId"` - OrganizationName string `json:"organizationName"` - OrganizationShortName string `json:"organizationShortName"` - ReleaseName string `json:"releaseName"` - RuntimeVersion string `json:"runtimeVersion"` - SchedulerAu int `json:"schedulerAu"` - SchedulerCpu string `json:"schedulerCpu"` - SchedulerMemory string `json:"schedulerMemory"` - SchedulerReplicas int `json:"schedulerReplicas"` - SchedulerSize *string `json:"schedulerSize,omitempty"` - SpecCreatedAt time.Time `json:"specCreatedAt"` - SpecUpdatedAt time.Time `json:"specUpdatedAt"` - Status DeploymentStatus `json:"status"` - StatusReason *string `json:"statusReason,omitempty"` - Type *DeploymentType `json:"type,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - WebServerCpu string `json:"webServerCpu"` - WebServerIngressHostname string `json:"webServerIngressHostname"` - WebServerMemory string `json:"webServerMemory"` - WebServerReplicas *int `json:"webServerReplicas,omitempty"` - WebServerUrl string `json:"webServerUrl"` - WorkerCpu string `json:"workerCpu"` - WorkerMemory string `json:"workerMemory"` - WorkerQueues *[]DeploymentWorkerQueue `json:"workerQueues,omitempty"` - WorkersAu int `json:"workersAu"` - WorkersReplicas *int `json:"workersReplicas,omitempty"` - WorkloadIdentity *string `json:"workloadIdentity,omitempty"` - WorkspaceId string `json:"workspaceId"` + OrgShortName *string `json:"orgShortName,omitempty"` + OrganizationId string `json:"organizationId"` + OrganizationName string `json:"organizationName"` + OrganizationShortName string `json:"organizationShortName"` + ReleaseName string `json:"releaseName"` + ResourceQuotaCpu *string `json:"resourceQuotaCpu,omitempty"` + ResourceQuotaMemory *string `json:"resourceQuotaMemory,omitempty"` + RuntimeVersion string `json:"runtimeVersion"` + SchedulerAu int `json:"schedulerAu"` + SchedulerCpu string `json:"schedulerCpu"` + SchedulerMemory string `json:"schedulerMemory"` + SchedulerReplicas int `json:"schedulerReplicas"` + SchedulerSize *string `json:"schedulerSize,omitempty"` + SpecCreatedAt time.Time `json:"specCreatedAt"` + SpecUpdatedAt time.Time `json:"specUpdatedAt"` + Status DeploymentStatus `json:"status"` + StatusReason *string `json:"statusReason,omitempty"` + Type *DeploymentType `json:"type,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + WebServerCpu string `json:"webServerCpu"` + WebServerIngressHostname string `json:"webServerIngressHostname"` + WebServerMemory string `json:"webServerMemory"` + WebServerReplicas *int `json:"webServerReplicas,omitempty"` + WebServerUrl string `json:"webServerUrl"` + WorkerCpu string `json:"workerCpu"` + WorkerMemory string `json:"workerMemory"` + WorkerQueues *[]WorkerQueue `json:"workerQueues,omitempty"` + WorkersAu int `json:"workersAu"` + WorkersReplicas *int `json:"workersReplicas,omitempty"` + WorkloadIdentity *string `json:"workloadIdentity,omitempty"` + WorkspaceId string `json:"workspaceId"` } // DeploymentStatus defines model for Deployment.Status. @@ -1075,14 +1317,27 @@ type DeploymentStatus string // DeploymentType defines model for Deployment.Type. type DeploymentType string -// DeploymentEnvVar defines model for DeploymentEnvVar. -type DeploymentEnvVar struct { - IsSecret *bool `json:"isSecret,omitempty"` - Key *string `json:"key,omitempty"` - UpdatedAt *string `json:"updatedAt,omitempty"` +// DeploymentEnvironmentVariable defines model for DeploymentEnvironmentVariable. +type DeploymentEnvironmentVariable struct { + IsSecret bool `json:"isSecret"` + Key string `json:"key"` + UpdatedAt string `json:"updatedAt"` Value *string `json:"value,omitempty"` } +// DeploymentEnvironmentVariableRequest defines model for DeploymentEnvironmentVariableRequest. +type DeploymentEnvironmentVariableRequest struct { + IsSecret bool `json:"isSecret"` + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +// DeploymentInstanceSpecRequest defines model for DeploymentInstanceSpecRequest. +type DeploymentInstanceSpecRequest struct { + Au int `json:"au"` + Replicas int `json:"replicas"` +} + // DeploymentLog defines model for DeploymentLog. type DeploymentLog struct { Limit int `json:"limit"` @@ -1105,23 +1360,13 @@ type DeploymentLogEntrySource string // DeploymentOptions defines model for DeploymentOptions. type DeploymentOptions struct { - AstroUnit AstroBaseUnit `json:"astroUnit"` - Components ComponentsOptions `json:"components"` - RuntimeReleases []RuntimeRelease `json:"runtimeReleases"` -} - -// DeploymentWorkerQueue defines model for DeploymentWorkerQueue. -type DeploymentWorkerQueue struct { - Id string `json:"id"` - IsDefault bool `json:"isDefault"` - MaxWorkerCount int `json:"maxWorkerCount"` - MinWorkerCount int `json:"minWorkerCount"` - Name string `json:"name"` - NodePoolId string `json:"nodePoolId"` - PodCpu string `json:"podCpu"` - PodRam string `json:"podRam"` - PodSize string `json:"podSize"` - WorkerConcurrency int `json:"workerConcurrency"` + Executors []string `json:"executors"` + ResourceQuotas ResourceQuotaOptions `json:"resourceQuotas"` + RuntimeReleases []RuntimeRelease `json:"runtimeReleases"` + SchedulerMachines []SchedulerMachine `json:"schedulerMachines"` + WorkerMachines []WorkerMachine `json:"workerMachines"` + WorkerQueues WorkerQueueOptions `json:"workerQueues"` + WorkloadIdentityOptions *[]WorkloadIdentityOption `json:"workloadIdentityOptions,omitempty"` } // DeploymentsPaginated defines model for DeploymentsPaginated. @@ -1141,6 +1386,68 @@ type Entitlement struct { // EntitlementRequiredTier defines model for Entitlement.RequiredTier. type EntitlementRequiredTier string +// EnvironmentObject defines model for EnvironmentObject. +type EnvironmentObject struct { + AutoLinkDeployments *bool `json:"autoLinkDeployments,omitempty"` + AutoLinkProjects *bool `json:"autoLinkProjects,omitempty"` + Connection *EnvironmentObjectConnection `json:"connection,omitempty"` + CreatedAt *string `json:"createdAt,omitempty"` + Id *string `json:"id,omitempty"` + Links *[]EnvironmentObjectLink `json:"links,omitempty"` + ObjectKey string `json:"objectKey"` + ObjectType EnvironmentObjectObjectType `json:"objectType"` + Scope EnvironmentObjectScope `json:"scope"` + ScopeEntityId string `json:"scopeEntityId"` + UpdatedAt *string `json:"updatedAt,omitempty"` +} + +// EnvironmentObjectObjectType defines model for EnvironmentObject.ObjectType. +type EnvironmentObjectObjectType string + +// EnvironmentObjectScope defines model for EnvironmentObject.Scope. +type EnvironmentObjectScope string + +// EnvironmentObjectConnection defines model for EnvironmentObjectConnection. +type EnvironmentObjectConnection struct { + Extra *map[string]interface{} `json:"extra,omitempty"` + Host *string `json:"host,omitempty"` + Login *string `json:"login,omitempty"` + Password *string `json:"password,omitempty"` + Port *int `json:"port,omitempty"` + Schema *string `json:"schema,omitempty"` + Type string `json:"type"` +} + +// EnvironmentObjectConnectionOverrides defines model for EnvironmentObjectConnectionOverrides. +type EnvironmentObjectConnectionOverrides struct { + Extra *map[string]interface{} `json:"extra,omitempty"` + Host *string `json:"host,omitempty"` + Login *string `json:"login,omitempty"` + Password *string `json:"password,omitempty"` + Port *int `json:"port,omitempty"` + Schema *string `json:"schema,omitempty"` + Type *string `json:"type,omitempty"` +} + +// EnvironmentObjectLink defines model for EnvironmentObjectLink. +type EnvironmentObjectLink struct { + ConnectionOverrides *EnvironmentObjectConnectionOverrides `json:"connectionOverrides,omitempty"` + Id string `json:"id"` + Scope EnvironmentObjectLinkScope `json:"scope"` + ScopeEntityId string `json:"scopeEntityId"` +} + +// EnvironmentObjectLinkScope defines model for EnvironmentObjectLink.Scope. +type EnvironmentObjectLinkScope string + +// EnvironmentObjectsPaginated defines model for EnvironmentObjectsPaginated. +type EnvironmentObjectsPaginated struct { + EnvironmentObjects []EnvironmentObject `json:"environmentObjects"` + Limit int `json:"limit"` + Offset int `json:"offset"` + TotalCount int `json:"totalCount"` +} + // Error defines model for Error. type Error struct { Message string `json:"message"` @@ -1148,69 +1455,15 @@ type Error struct { StatusCode int `json:"statusCode"` } -// EventClient defines model for EventClient. -type EventClient struct { - ClientId *string `json:"client_id,omitempty"` - Metadata *map[string]interface{} `json:"metadata,omitempty"` - Name *string `json:"name,omitempty"` -} - -// EventConnection defines model for EventConnection. -type EventConnection struct { - Id *string `json:"id,omitempty"` - Metadata *interface{} `json:"metadata,omitempty"` - Name *string `json:"name,omitempty"` - Strategy string `json:"strategy"` -} - -// EventOrganization defines model for EventOrganization. -type EventOrganization struct { - DisplayName *string `json:"display_name,omitempty"` - Id *string `json:"id,omitempty"` - Metadata *map[string]interface{} `json:"metadata,omitempty"` - Name *string `json:"name,omitempty"` -} - -// EventRequest defines model for EventRequest. -type EventRequest struct { - Body *map[string]interface{} `json:"body,omitempty"` - Geoip *interface{} `json:"geoip,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Ip *string `json:"ip,omitempty"` - Language *string `json:"language,omitempty"` - Method *string `json:"method,omitempty"` - Query *map[string]interface{} `json:"query,omitempty"` - UserAgent *string `json:"user_agent,omitempty"` -} - -// EventUser defines model for EventUser. -type EventUser struct { - AppMetadata *map[string]interface{} `json:"app_metadata,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - Email *string `json:"email,omitempty"` - EmailVerified *bool `json:"email_verified,omitempty"` - FamilyName *string `json:"family_name,omitempty"` - GivenName *string `json:"given_name,omitempty"` - Identities *[]interface{} `json:"identities,omitempty"` - LastPasswordReset *string `json:"last_password_reset,omitempty"` - Multifactor *[]string `json:"multifactor,omitempty"` - Name *string `json:"name,omitempty"` - Nickname *string `json:"nickname,omitempty"` - PhoneNumber *string `json:"phone_number,omitempty"` - PhoneVerified *bool `json:"phone_verified,omitempty"` - Picture *string `json:"picture,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - UserId *string `json:"user_id,omitempty"` - UserMetadata *map[string]interface{} `json:"user_metadata,omitempty"` - Username *string `json:"username,omitempty"` -} - // FeatureFlag defines model for FeatureFlag. type FeatureFlag struct { Key string `json:"key"` Value bool `json:"value"` } +// GenericJSON defines model for GenericJSON. +type GenericJSON map[string]interface{} + // Invite defines model for Invite. type Invite struct { ExpiresAt string `json:"expiresAt"` @@ -1231,62 +1484,6 @@ type Invite struct { UserId *string `json:"userId,omitempty"` } -// Invoice defines model for Invoice. -type Invoice struct { - Adjustments []InvoiceAdjustment `json:"adjustments"` - CustomerId string `json:"customerId"` - - // EndTimestamp End of the usage period this invoice covers (UTC) - EndTimestamp string `json:"endTimestamp"` - Id string `json:"id"` - LineItems []InvoiceLineItem `json:"lineItems"` - PlanId *string `json:"planId,omitempty"` - PlanName *string `json:"planName,omitempty"` - - // StartTimestamp Beginning of the usage period this invoice covers (UTC) - StartTimestamp string `json:"startTimestamp"` - Status string `json:"status"` - SubtotalUSD float32 `json:"subtotalUSD"` - TotalUSD float32 `json:"totalUSD"` -} - -// InvoiceAdjustment defines model for InvoiceAdjustment. -type InvoiceAdjustment struct { - Name string `json:"name"` - TotalUSD float32 `json:"totalUSD"` -} - -// InvoiceLineItem defines model for InvoiceLineItem. -type InvoiceLineItem struct { - CreditType CreditType `json:"creditType"` - CustomFields map[string]string `json:"customFields"` - GroupKey *string `json:"groupKey,omitempty"` - GroupValue *string `json:"groupValue,omitempty"` - Name string `json:"name"` - ProductId *string `json:"productId,omitempty"` - Quantity float32 `json:"quantity"` - SubLineItems []InvoiceSubLineItem `json:"subLineItems"` - Total float32 `json:"total"` -} - -// InvoiceSubLineItem defines model for InvoiceSubLineItem. -type InvoiceSubLineItem struct { - ChargeId *string `json:"chargeId,omitempty"` - CustomFields map[string]string `json:"customFields"` - Name string `json:"name"` - - // Price the unit price for this charge, present only if the charge is not tiered and the quantity is nonzero - Price *float32 `json:"price,omitempty"` - Quantity float32 `json:"quantity"` - Subtotal float32 `json:"subtotal"` -} - -// JitPolicy defines model for JitPolicy. -type JitPolicy struct { - DefaultOrgRole string `json:"defaultOrgRole"` - DefaultWorkspaceRoles *[]WorkspaceRole `json:"defaultWorkspaceRoles,omitempty"` -} - // ListApiTokensPaginated defines model for ListApiTokensPaginated. type ListApiTokensPaginated struct { ApiTokens []ApiToken `json:"apiTokens"` @@ -1304,6 +1501,20 @@ type ListWorkspaceDags struct { Warnings *[]string `json:"warnings,omitempty"` } +// MachineSpec defines model for MachineSpec. +type MachineSpec struct { + Concurrency *float32 `json:"concurrency,omitempty"` + + // Cpu A slice of CPU expressed in number of cores. + Cpu string `json:"cpu"` + + // EphemeralStorage A slice of Ephemeral Storage expressed in Gibibytes (Gi). + EphemeralStorage *string `json:"ephemeralStorage,omitempty"` + + // Memory A slice of Memory expressed in Gibibytes (Gi). + Memory string `json:"memory"` +} + // ManagedDomain defines model for ManagedDomain. type ManagedDomain struct { CreatedAt time.Time `json:"createdAt"` @@ -1318,11 +1529,6 @@ type ManagedDomain struct { // ManagedDomainStatus defines model for ManagedDomain.Status. type ManagedDomainStatus string -// MetronomeDashboard defines model for MetronomeDashboard. -type MetronomeDashboard struct { - Url string `json:"url"` -} - // MutateOrgTeamRoleRequest defines model for MutateOrgTeamRoleRequest. type MutateOrgTeamRoleRequest struct { Role string `json:"role"` @@ -1333,6 +1539,21 @@ type MutateOrgUserRoleRequest struct { Role string `json:"role"` } +// MutateWorkerQueueRequest defines model for MutateWorkerQueueRequest. +type MutateWorkerQueueRequest struct { + AstroMachine *MutateWorkerQueueRequestAstroMachine `json:"astroMachine,omitempty"` + Id *string `json:"id,omitempty"` + IsDefault bool `json:"isDefault"` + MaxWorkerCount int `json:"maxWorkerCount"` + MinWorkerCount int `json:"minWorkerCount"` + Name string `json:"name"` + NodePoolId *string `json:"nodePoolId,omitempty"` + WorkerConcurrency int `json:"workerConcurrency"` +} + +// MutateWorkerQueueRequestAstroMachine defines model for MutateWorkerQueueRequest.AstroMachine. +type MutateWorkerQueueRequestAstroMachine string + // MutateWorkspaceTeamRoleRequest defines model for MutateWorkspaceTeamRoleRequest. type MutateWorkspaceTeamRoleRequest struct { Role string `json:"role"` @@ -1367,6 +1588,7 @@ type Organization struct { Domains *[]string `json:"domains,omitempty"` Entitlements *map[string]Entitlement `json:"entitlements,omitempty"` Id string `json:"id"` + IsAzureManaged *bool `json:"isAzureManaged,omitempty"` IsScimEnabled bool `json:"isScimEnabled"` ManagedDomains *[]ManagedDomain `json:"managedDomains,omitempty"` MetronomeId *string `json:"metronomeId,omitempty"` @@ -1399,120 +1621,6 @@ type OrganizationStatus string // OrganizationSupportPlan defines model for Organization.SupportPlan. type OrganizationSupportPlan string -// PaymentMethod defines model for PaymentMethod. -type PaymentMethod struct { - BillingDetails *PaymentMethodBillingDetails `json:"billingDetails,omitempty"` - Card *PaymentMethodCard `json:"card,omitempty"` - CreatedAt string `json:"createdAt"` - Id string `json:"id"` - Metadata *map[string]string `json:"metadata,omitempty"` - Type string `json:"type"` - UsBankAccount *PaymentMethodUSBankAccount `json:"usBankAccount,omitempty"` -} - -// PaymentMethodBillingDetails defines model for PaymentMethodBillingDetails. -type PaymentMethodBillingDetails struct { - Address Address `json:"address"` - Email *string `json:"email,omitempty"` - Name *string `json:"name,omitempty"` - Phone *string `json:"phone,omitempty"` -} - -// PaymentMethodCard defines model for PaymentMethodCard. -type PaymentMethodCard struct { - Brand PaymentMethodCardBrand `json:"brand"` - Checks *PaymentMethodCardChecks `json:"checks,omitempty"` - Country string `json:"country"` - ExpMonth int `json:"expMonth"` - ExpYear int `json:"expYear"` - Fingerprint string `json:"fingerprint"` - Funding PaymentMethodCardFunding `json:"funding"` - Last4 string `json:"last4"` - PreferredNetwork string `json:"preferredNetwork"` - SupportedNetworks []string `json:"supportedNetworks"` - ThreeDSecureUsage *bool `json:"threeDSecureUsage,omitempty"` - Wallet *PaymentMethodCardWallet `json:"wallet,omitempty"` -} - -// PaymentMethodCardBrand defines model for PaymentMethodCard.Brand. -type PaymentMethodCardBrand string - -// PaymentMethodCardFunding defines model for PaymentMethodCard.Funding. -type PaymentMethodCardFunding string - -// PaymentMethodCardChecks defines model for PaymentMethodCardChecks. -type PaymentMethodCardChecks struct { - AddressLine1Check PaymentMethodCardChecksAddressLine1Check `json:"addressLine1Check"` - AddressPostalCodeCheck PaymentMethodCardChecksAddressPostalCodeCheck `json:"addressPostalCodeCheck"` - CvcCheck PaymentMethodCardChecksCvcCheck `json:"cvcCheck"` -} - -// PaymentMethodCardChecksAddressLine1Check defines model for PaymentMethodCardChecks.AddressLine1Check. -type PaymentMethodCardChecksAddressLine1Check string - -// PaymentMethodCardChecksAddressPostalCodeCheck defines model for PaymentMethodCardChecks.AddressPostalCodeCheck. -type PaymentMethodCardChecksAddressPostalCodeCheck string - -// PaymentMethodCardChecksCvcCheck defines model for PaymentMethodCardChecks.CvcCheck. -type PaymentMethodCardChecksCvcCheck string - -// PaymentMethodCardWallet defines model for PaymentMethodCardWallet. -type PaymentMethodCardWallet struct { - DynamicLast4 string `json:"dynamicLast4"` - Masterpass *PaymentMethodCardWalletMasterpass `json:"masterpass,omitempty"` - Type PaymentMethodCardWalletType `json:"type"` - VisaCheckout *PaymentMethodCardWalletVisaCheckout `json:"visaCheckout,omitempty"` -} - -// PaymentMethodCardWalletType defines model for PaymentMethodCardWallet.Type. -type PaymentMethodCardWalletType string - -// PaymentMethodCardWalletMasterpass defines model for PaymentMethodCardWalletMasterpass. -type PaymentMethodCardWalletMasterpass struct { - BillingAddress Address `json:"billingAddress"` - Email *string `json:"email,omitempty"` - Name *string `json:"name,omitempty"` - ShippingAddress Address `json:"shippingAddress"` -} - -// PaymentMethodCardWalletVisaCheckout defines model for PaymentMethodCardWalletVisaCheckout. -type PaymentMethodCardWalletVisaCheckout struct { - BillingAddress *Address `json:"billingAddress,omitempty"` - Email string `json:"email"` - Name string `json:"name"` - ShippingAddress *Address `json:"shippingAddress,omitempty"` -} - -// PaymentMethodUSBankAccount defines model for PaymentMethodUSBankAccount. -type PaymentMethodUSBankAccount struct { - AccountHolderType PaymentMethodUSBankAccountAccountHolderType `json:"accountHolderType"` - AccountType PaymentMethodUSBankAccountAccountType `json:"accountType"` - BankName string `json:"bankName"` - FinancialConnectionsAccount *string `json:"financialConnectionsAccount,omitempty"` - Fingerprint string `json:"fingerprint"` - Last4 string `json:"last4"` - PreferredNetwork string `json:"preferredNetwork"` - RoutingNumber string `json:"routingNumber"` - StatusDetails *USBankAccountBlockedStatusDetails `json:"statusDetails,omitempty"` - SupportedNetworks []string `json:"supportedNetworks"` -} - -// PaymentMethodUSBankAccountAccountHolderType defines model for PaymentMethodUSBankAccount.AccountHolderType. -type PaymentMethodUSBankAccountAccountHolderType string - -// PaymentMethodUSBankAccountAccountType defines model for PaymentMethodUSBankAccount.AccountType. -type PaymentMethodUSBankAccountAccountType string - -// PostLoginEvent defines model for PostLoginEvent. -type PostLoginEvent struct { - Client *EventClient `json:"client,omitempty"` - Connection EventConnection `json:"connection"` - Organization *EventOrganization `json:"organization,omitempty"` - Request *EventRequest `json:"request,omitempty"` - Transaction *map[string]interface{} `json:"transaction,omitempty"` - User EventUser `json:"user"` -} - // ProviderInstanceType defines model for ProviderInstanceType. type ProviderInstanceType struct { Cpu int `json:"cpu"` @@ -1527,16 +1635,30 @@ type ProviderRegion struct { Name string `json:"name"` } -// RunGroup defines model for RunGroup. -type RunGroup struct { - Children *[]RunGroup `json:"children,omitempty"` - ExtraLinks *[]string `json:"extraLinks,omitempty"` - HasOutletDatasets *bool `json:"hasOutletDatasets,omitempty"` - Id *string `json:"id,omitempty"` - IsMapped *bool `json:"isMapped,omitempty"` - Label *string `json:"label,omitempty"` - Operator *string `json:"operator,omitempty"` - TaskInstances *[]TaskInstance `json:"taskInstances,omitempty"` +// Range defines model for Range. +type Range struct { + Ceiling float32 `json:"ceiling"` + Default float32 `json:"default"` + Floor float32 `json:"floor"` +} + +// ResourceOption defines model for ResourceOption. +type ResourceOption struct { + Cpu ResourceRange `json:"cpu"` + Memory ResourceRange `json:"memory"` +} + +// ResourceQuotaOptions defines model for ResourceQuotaOptions. +type ResourceQuotaOptions struct { + DefaultPodSize ResourceOption `json:"defaultPodSize"` + ResourceQuota ResourceOption `json:"resourceQuota"` +} + +// ResourceRange defines model for ResourceRange. +type ResourceRange struct { + Ceiling string `json:"ceiling"` + Default string `json:"default"` + Floor string `json:"floor"` } // RuntimeRelease defines model for RuntimeRelease. @@ -1549,6 +1671,13 @@ type RuntimeRelease struct { Version string `json:"version"` } +// SchedulerMachine defines model for SchedulerMachine. +type SchedulerMachine struct { + // Name The name of this machine. + Name string `json:"name"` + Spec MachineSpec `json:"spec"` +} + // Scope defines model for Scope. type Scope struct { EntityId string `json:"entityId"` @@ -1557,21 +1686,25 @@ type Scope struct { // Self defines model for Self. type Self struct { - AvatarUrl string `json:"avatarUrl"` - ColorModePreference *string `json:"colorModePreference,omitempty"` - CreatedAt time.Time `json:"createdAt"` - FeatureFlags *[]FeatureFlag `json:"featureFlags,omitempty"` - FullName string `json:"fullName"` - Id string `json:"id"` - IntercomUserHash *string `json:"intercomUserHash,omitempty"` - Invites *[]Invite `json:"invites,omitempty"` - OrganizationId *string `json:"organizationId,omitempty"` - Roles *[]UserRole `json:"roles,omitempty"` - Status string `json:"status"` - SystemRole *string `json:"systemRole,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - Username string `json:"username"` -} + AvatarUrl string `json:"avatarUrl"` + ColorModePreference *string `json:"colorModePreference,omitempty"` + CreatedAt time.Time `json:"createdAt"` + FeatureFlags *[]FeatureFlag `json:"featureFlags,omitempty"` + FullName string `json:"fullName"` + Id string `json:"id"` + IntercomUserHash *string `json:"intercomUserHash,omitempty"` + Invites *[]Invite `json:"invites,omitempty"` + OrganizationId *string `json:"organizationId,omitempty"` + Roles *[]UserRole `json:"roles,omitempty"` + SignupType *SelfSignupType `json:"signupType,omitempty"` + Status string `json:"status"` + SystemRole *string `json:"systemRole,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + Username string `json:"username"` +} + +// SelfSignupType defines model for Self.SignupType. +type SelfSignupType string // SharedCluster defines model for SharedCluster. type SharedCluster struct { @@ -1579,6 +1712,7 @@ type SharedCluster struct { CreatedAt time.Time `json:"createdAt"` DbInstanceType string `json:"dbInstanceType"` Id string `json:"id"` + IsCordoned *bool `json:"isCordoned,omitempty"` IsDryRun bool `json:"isDryRun"` Metadata ClusterMetadata `json:"metadata"` Name string `json:"name"` @@ -1598,107 +1732,12 @@ type SharedClusterCloudProvider string // SharedClusterStatus defines model for SharedCluster.Status. type SharedClusterStatus string -// SsoBypassKey defines model for SsoBypassKey. -type SsoBypassKey struct { - BypassKey *string `json:"bypassKey,omitempty"` - CreatedAt *string `json:"createdAt,omitempty"` - DeletedAt *string `json:"deletedAt,omitempty"` - - // OrgShortName Deprecated: orgShortName has been replaced with organizationShortName - OrgShortName *string `json:"orgShortName,omitempty"` - OrganizationId string `json:"organizationId"` - OrganizationShortName *string `json:"organizationShortName,omitempty"` - UpdatedAt *string `json:"updatedAt,omitempty"` -} - -// SsoConnection defines model for SsoConnection. -type SsoConnection struct { - Auth0ConnectionId string `json:"auth0ConnectionId"` - Auth0ConnectionName string `json:"auth0ConnectionName"` - Configuration SsoConnectionConfig `json:"configuration"` - Enabled bool `json:"enabled"` - Id string `json:"id"` - JitPolicy *JitPolicy `json:"jitPolicy,omitempty"` - ManagedDomains []ManagedDomain `json:"managedDomains"` - OrganizationId string `json:"organizationId"` -} - -// SsoConnectionConfig defines model for SsoConnectionConfig. -type SsoConnectionConfig struct { - AzureClientId *string `json:"azureClientId,omitempty"` - AzureClientSecret *string `json:"azureClientSecret,omitempty"` - AzureDomainName *string `json:"azureDomainName,omitempty"` - SamlSignInUrl *string `json:"samlSignInUrl,omitempty"` - SamlSignOutUrl *string `json:"samlSignOutUrl,omitempty"` - SamlSigningCert *string `json:"samlSigningCert,omitempty"` - Strategy SsoConnectionConfigStrategy `json:"strategy"` -} - -// SsoConnectionConfigStrategy defines model for SsoConnectionConfig.Strategy. -type SsoConnectionConfigStrategy string - -// SsoConnectionManagedDomain defines model for SsoConnectionManagedDomain. -type SsoConnectionManagedDomain struct { - Id string `json:"id"` - Name string `json:"name"` -} - -// SsoLoginCallback defines model for SsoLoginCallback. -type SsoLoginCallback struct { - AccessTokenClaims *map[string]string `json:"accessTokenClaims,omitempty"` - Deny *SsoLoginDeny `json:"deny,omitempty"` - IdTokenClaims *map[string]string `json:"idTokenClaims,omitempty"` - UserMetaData *interface{} `json:"userMetaData,omitempty"` -} - -// SsoLoginDeny defines model for SsoLoginDeny. -type SsoLoginDeny struct { - Connections *[]string `json:"connections,omitempty"` - Message string `json:"message"` - Reason string `json:"reason"` -} - -// StripeClientSecret defines model for StripeClientSecret. -type StripeClientSecret struct { - ClientSecret string `json:"clientSecret"` -} - // Subject defines model for Subject. type Subject struct { EntityId string `json:"entityId"` Type string `json:"type"` } -// TaskInstance defines model for TaskInstance. -type TaskInstance struct { - Duration *float32 `json:"duration,omitempty"` - EndDate *string `json:"endDate,omitempty"` - ExecutionDate *string `json:"executionDate,omitempty"` - ExecutorConfig *string `json:"executorConfig,omitempty"` - Hostname *string `json:"hostname,omitempty"` - MapIndex *int `json:"mapIndex,omitempty"` - MaxTries *int `json:"maxTries,omitempty"` - Note *string `json:"note,omitempty"` - Operator *string `json:"operator,omitempty"` - Pid *int `json:"pid,omitempty"` - PipelineId string `json:"pipelineId"` - PipelineRunId string `json:"pipelineRunId"` - Pool *string `json:"pool,omitempty"` - PoolSlots *int `json:"poolSlots,omitempty"` - PriorityWeight *int `json:"priorityWeight,omitempty"` - Queue *string `json:"queue,omitempty"` - QueuedWhen *string `json:"queuedWhen,omitempty"` - RenderedFields *map[string]interface{} `json:"renderedFields,omitempty"` - StartDate *string `json:"startDate,omitempty"` - State *TaskInstanceState `json:"state,omitempty"` - TaskId string `json:"taskId"` - TryNumber *int `json:"tryNumber,omitempty"` - Unixname *string `json:"unixname,omitempty"` -} - -// TaskInstanceState defines model for TaskInstance.State. -type TaskInstanceState string - // Team defines model for Team. type Team struct { CreatedAt time.Time `json:"createdAt"` @@ -1747,10 +1786,10 @@ type TemplateVersion struct { Version string `json:"version"` } -// USBankAccountBlockedStatusDetails defines model for USBankAccountBlockedStatusDetails. -type USBankAccountBlockedStatusDetails struct { - NetworkCode string `json:"networkCode"` - Reason string `json:"reason"` +// TransferDeploymentRequest defines model for TransferDeploymentRequest. +type TransferDeploymentRequest struct { + CurrentWorkspaceId string `json:"currentWorkspaceId"` + TargetWorkspaceId string `json:"targetWorkspaceId"` } // UpdateAwsClusterRequest defines model for UpdateAwsClusterRequest. @@ -1771,35 +1810,161 @@ type UpdateAzureClusterRequest struct { TemplateVersion string `json:"templateVersion"` } +// UpdateDeploymentApiTokenRequest defines model for UpdateDeploymentApiTokenRequest. +type UpdateDeploymentApiTokenRequest struct { + Description string `json:"description"` + Name string `json:"name"` + Role string `json:"role"` +} + // UpdateDeploymentRequest defines model for UpdateDeploymentRequest. type UpdateDeploymentRequest struct { - WorkspaceIdTarget string `json:"workspaceIdTarget"` + union json.RawMessage } -// UpdateGcpClusterRequest defines model for UpdateGcpClusterRequest. -type UpdateGcpClusterRequest struct { - DbInstanceType string `json:"dbInstanceType"` - K8sTags []ClusterTag `json:"k8sTags"` - Name string `json:"name"` - NodePools []UpdateNodePoolRequest `json:"nodePools"` - TemplateVersion string `json:"templateVersion"` +// UpdateEnvironmentObjectConnectionOverridesRequest defines model for UpdateEnvironmentObjectConnectionOverridesRequest. +type UpdateEnvironmentObjectConnectionOverridesRequest struct { + Extra *map[string]interface{} `json:"extra,omitempty"` + Host *string `json:"host,omitempty"` + Login *string `json:"login,omitempty"` + Password *string `json:"password,omitempty"` + Port *int `json:"port,omitempty"` + Schema *string `json:"schema,omitempty"` + Type *string `json:"type,omitempty"` } -// UpdateInviteRequest defines model for UpdateInviteRequest. -type UpdateInviteRequest struct { - InviteStatus UpdateInviteRequestInviteStatus `json:"inviteStatus"` +// UpdateEnvironmentObjectConnectionRequest defines model for UpdateEnvironmentObjectConnectionRequest. +type UpdateEnvironmentObjectConnectionRequest struct { + Extra *map[string]interface{} `json:"extra,omitempty"` + Host *string `json:"host,omitempty"` + Login *string `json:"login,omitempty"` + Password *string `json:"password,omitempty"` + Port *int `json:"port,omitempty"` + Schema *string `json:"schema,omitempty"` + Type string `json:"type"` } -// UpdateInviteRequestInviteStatus defines model for UpdateInviteRequest.InviteStatus. -type UpdateInviteRequestInviteStatus string +// UpdateEnvironmentObjectLinkRequest defines model for UpdateEnvironmentObjectLinkRequest. +type UpdateEnvironmentObjectLinkRequest struct { + Overrides *UpdateEnvironmentObjectOverridesRequest `json:"overrides,omitempty"` + Scope UpdateEnvironmentObjectLinkRequestScope `json:"scope"` + ScopeEntityId string `json:"scopeEntityId"` +} + +// UpdateEnvironmentObjectLinkRequestScope defines model for UpdateEnvironmentObjectLinkRequest.Scope. +type UpdateEnvironmentObjectLinkRequestScope string + +// UpdateEnvironmentObjectOverridesRequest defines model for UpdateEnvironmentObjectOverridesRequest. +type UpdateEnvironmentObjectOverridesRequest struct { + Connection *UpdateEnvironmentObjectConnectionOverridesRequest `json:"connection,omitempty"` +} + +// UpdateEnvironmentObjectRequest defines model for UpdateEnvironmentObjectRequest. +type UpdateEnvironmentObjectRequest struct { + AutoLinkDeployments *bool `json:"autoLinkDeployments,omitempty"` + AutoLinkProjects *bool `json:"autoLinkProjects,omitempty"` + Connection *UpdateEnvironmentObjectConnectionRequest `json:"connection,omitempty"` + Links *[]UpdateEnvironmentObjectLinkRequest `json:"links,omitempty"` + ObjectKey string `json:"objectKey"` + ObjectType UpdateEnvironmentObjectRequestObjectType `json:"objectType"` + Scope UpdateEnvironmentObjectRequestScope `json:"scope"` + ScopeEntityId string `json:"scopeEntityId"` +} + +// UpdateEnvironmentObjectRequestObjectType defines model for UpdateEnvironmentObjectRequest.ObjectType. +type UpdateEnvironmentObjectRequestObjectType string + +// UpdateEnvironmentObjectRequestScope defines model for UpdateEnvironmentObjectRequest.Scope. +type UpdateEnvironmentObjectRequestScope string + +// UpdateGcpClusterRequest defines model for UpdateGcpClusterRequest. +type UpdateGcpClusterRequest struct { + DbInstanceType string `json:"dbInstanceType"` + K8sTags []ClusterTag `json:"k8sTags"` + Name string `json:"name"` + NodePools []UpdateNodePoolRequest `json:"nodePools"` + TemplateVersion string `json:"templateVersion"` +} + +// UpdateHostedDeploymentRequest defines model for UpdateHostedDeploymentRequest. +type UpdateHostedDeploymentRequest struct { + ContactEmails *[]string `json:"contactEmails,omitempty"` + + // DefaultTaskPodCpu Must be valid kubernetes cpu resource string, at least 0.25 in terms of cpu cores + DefaultTaskPodCpu string `json:"defaultTaskPodCpu"` + + // DefaultTaskPodMemory Must be valid kubernetes memory resource string, at least 0.5Gi in terms of Gibibytes (GiB) + DefaultTaskPodMemory string `json:"defaultTaskPodMemory"` + Description *string `json:"description,omitempty"` + + // EnvironmentVariables List of deployment environment variables + EnvironmentVariables []DeploymentEnvironmentVariableRequest `json:"environmentVariables"` + Executor UpdateHostedDeploymentRequestExecutor `json:"executor"` + IsCicdEnforced bool `json:"isCicdEnforced"` + IsDagDeployEnabled bool `json:"isDagDeployEnabled"` + + // IsHighAvailability If true, deployment will have backup components + IsHighAvailability bool `json:"isHighAvailability"` + Name string `json:"name"` + + // ResourceQuotaCpu Must be valid kubernetes cpu resource string, at least 1 in terms of cpu cores + ResourceQuotaCpu string `json:"resourceQuotaCpu"` + + // ResourceQuotaMemory Must be valid kubernetes memory resource string, at least 2Gi in terms of Gibibytes (GiB) + ResourceQuotaMemory string `json:"resourceQuotaMemory"` + + // SchedulerSize Size of scheduler, one of: SMALL, MEDIUM, LARGE + SchedulerSize UpdateHostedDeploymentRequestSchedulerSize `json:"schedulerSize"` + Type UpdateHostedDeploymentRequestType `json:"type"` + + // WorkerQueues At least one worker queue must be specified + WorkerQueues []MutateWorkerQueueRequest `json:"workerQueues"` + WorkloadIdentity *string `json:"workloadIdentity,omitempty"` + WorkspaceId string `json:"workspaceId"` +} + +// UpdateHostedDeploymentRequestExecutor defines model for UpdateHostedDeploymentRequest.Executor. +type UpdateHostedDeploymentRequestExecutor string + +// UpdateHostedDeploymentRequestSchedulerSize Size of scheduler, one of: SMALL, MEDIUM, LARGE +type UpdateHostedDeploymentRequestSchedulerSize string + +// UpdateHostedDeploymentRequestType defines model for UpdateHostedDeploymentRequest.Type. +type UpdateHostedDeploymentRequestType string + +// UpdateHybridDeploymentRequest defines model for UpdateHybridDeploymentRequest. +type UpdateHybridDeploymentRequest struct { + ContactEmails *[]string `json:"contactEmails,omitempty"` + Description *string `json:"description,omitempty"` -// UpdateManagedDomainRequest defines model for UpdateManagedDomainRequest. -type UpdateManagedDomainRequest struct { - EnforcedLogins []UpdateManagedDomainRequestEnforcedLogins `json:"enforcedLogins"` + // EnvironmentVariables List of deployment environment variables + EnvironmentVariables []DeploymentEnvironmentVariableRequest `json:"environmentVariables"` + Executor UpdateHybridDeploymentRequestExecutor `json:"executor"` + IsCicdEnforced bool `json:"isCicdEnforced"` + IsDagDeployEnabled bool `json:"isDagDeployEnabled"` + Name string `json:"name"` + Scheduler DeploymentInstanceSpecRequest `json:"scheduler"` + Type UpdateHybridDeploymentRequestType `json:"type"` + + // WorkerQueues At least one worker queue must be specified + WorkerQueues []MutateWorkerQueueRequest `json:"workerQueues"` + WorkloadIdentity *string `json:"workloadIdentity,omitempty"` + WorkspaceId string `json:"workspaceId"` +} + +// UpdateHybridDeploymentRequestExecutor defines model for UpdateHybridDeploymentRequest.Executor. +type UpdateHybridDeploymentRequestExecutor string + +// UpdateHybridDeploymentRequestType defines model for UpdateHybridDeploymentRequest.Type. +type UpdateHybridDeploymentRequestType string + +// UpdateInviteRequest defines model for UpdateInviteRequest. +type UpdateInviteRequest struct { + InviteStatus UpdateInviteRequestInviteStatus `json:"inviteStatus"` } -// UpdateManagedDomainRequestEnforcedLogins defines model for UpdateManagedDomainRequest.EnforcedLogins. -type UpdateManagedDomainRequestEnforcedLogins string +// UpdateInviteRequestInviteStatus defines model for UpdateInviteRequest.InviteStatus. +type UpdateInviteRequestInviteStatus string // UpdateNodePoolRequest defines model for UpdateNodePoolRequest. type UpdateNodePoolRequest struct { @@ -1812,15 +1977,15 @@ type UpdateNodePoolRequest struct { // UpdateOrganizationApiTokenRequest defines model for UpdateOrganizationApiTokenRequest. type UpdateOrganizationApiTokenRequest struct { - Description string `json:"description"` - Name string `json:"name"` - Roles UpdateOrganizationApiTokenRoles `json:"roles"` + Description string `json:"description"` + Name string `json:"name"` + Roles UpdateOrganizationApiTokenRolesRequest `json:"roles"` } -// UpdateOrganizationApiTokenRoles defines model for UpdateOrganizationApiTokenRoles. -type UpdateOrganizationApiTokenRoles struct { - Organization string `json:"organization"` - Workspace *[]ApiTokenWorkspaceRole `json:"workspace,omitempty"` +// UpdateOrganizationApiTokenRolesRequest defines model for UpdateOrganizationApiTokenRolesRequest. +type UpdateOrganizationApiTokenRolesRequest struct { + Organization string `json:"organization"` + Workspace *[]ApiTokenWorkspaceRoleRequest `json:"workspace,omitempty"` } // UpdateOrganizationRequest defines model for UpdateOrganizationRequest. @@ -1830,15 +1995,6 @@ type UpdateOrganizationRequest struct { Name string `json:"name"` } -// UpdateSsoConnectionRequest defines model for UpdateSsoConnectionRequest. -type UpdateSsoConnectionRequest struct { - Configuration SsoConnectionConfig `json:"configuration"` - Enabled bool `json:"enabled"` - IdpInitiatedLoginEnabled bool `json:"idpInitiatedLoginEnabled"` - JitPolicy *JitPolicy `json:"jitPolicy,omitempty"` - ManagedDomains []SsoConnectionManagedDomain `json:"managedDomains"` -} - // UpdateTeamRequest defines model for UpdateTeamRequest. type UpdateTeamRequest struct { Description string `json:"description"` @@ -1877,6 +2033,9 @@ type User struct { // LastLoginConnectionType Only shown if admin listing users LastLoginConnectionType *string `json:"lastLoginConnectionType,omitempty"` + // LoginsCount Only shown if admin listing users + LoginsCount *int `json:"loginsCount,omitempty"` + // OrgCount Only shown if admin listing users OrgCount *int `json:"orgCount,omitempty"` @@ -1887,8 +2046,9 @@ type User struct { OrgUserRelationIsIdpManaged *bool `json:"orgUserRelationIsIdpManaged,omitempty"` // Roles Only shown if admin listing users - Roles *[]UserRole `json:"roles,omitempty"` - Status string `json:"status"` + Roles *[]UserRole `json:"roles,omitempty"` + SignupType *UserSignupType `json:"signupType,omitempty"` + Status string `json:"status"` // SystemRole Only shown if admin listing users SystemRole *string `json:"systemRole,omitempty"` @@ -1902,6 +2062,9 @@ type User struct { WorkspaceRole *string `json:"workspaceRole,omitempty"` } +// UserSignupType defines model for User.SignupType. +type UserSignupType string + // UserRole defines model for UserRole. type UserRole struct { Role string `json:"role"` @@ -1917,20 +2080,43 @@ type UsersPaginated struct { Users []User `json:"users"` } -// ValidateCreditCardPayment defines model for ValidateCreditCardPayment. -type ValidateCreditCardPayment struct { - IsValid bool `json:"isValid"` - StripePaymentMethodId *string `json:"stripePaymentMethodId,omitempty"` +// WorkerMachine defines model for WorkerMachine. +type WorkerMachine struct { + Concurrency Range `json:"concurrency"` + + // Name The name of this machine. + Name string `json:"name"` + Spec MachineSpec `json:"spec"` +} + +// WorkerQueue defines model for WorkerQueue. +type WorkerQueue struct { + AstroMachine *string `json:"astroMachine,omitempty"` + Id string `json:"id"` + IsDefault bool `json:"isDefault"` + MaxWorkerCount int `json:"maxWorkerCount"` + MinWorkerCount int `json:"minWorkerCount"` + Name string `json:"name"` + NodePoolId string `json:"nodePoolId"` + PodCpu string `json:"podCpu"` + PodRam string `json:"podRam"` + + // PodSize todo: remove if there is no side effects after moving to use AstroMachine + PodSize *string `json:"podSize,omitempty"` + WorkerConcurrency int `json:"workerConcurrency"` } -// ValidateCreditCardPaymentRequest defines model for ValidateCreditCardPaymentRequest. -type ValidateCreditCardPaymentRequest struct { - StripePaymentMethodId string `json:"stripePaymentMethodId"` +// WorkerQueueOptions defines model for WorkerQueueOptions. +type WorkerQueueOptions struct { + MaxWorkers Range `json:"maxWorkers"` + MinWorkers Range `json:"minWorkers"` + WorkerConcurrency Range `json:"workerConcurrency"` } -// ValidateSsoLoginRequest defines model for ValidateSsoLoginRequest. -type ValidateSsoLoginRequest struct { - Event PostLoginEvent `json:"event"` +// WorkloadIdentityOption defines model for WorkloadIdentityOption. +type WorkloadIdentityOption struct { + Label string `json:"label"` + Role string `json:"role"` } // Workspace defines model for Workspace. @@ -1944,34 +2130,39 @@ type Workspace struct { Name string `json:"name"` // OrgShortName Deprecated: orgShortName has been replaced with organizationShortName - OrgShortName *string `json:"orgShortName,omitempty"` - OrganizationId string `json:"organizationId"` - OrganizationName *string `json:"organizationName,omitempty"` - OrganizationShortName *string `json:"organizationShortName,omitempty"` - ServerlessRuntimeCount *int `json:"serverlessRuntimeCount,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - UpdatedBy *BasicSubjectProfile `json:"updatedBy,omitempty"` - UserCount *int `json:"userCount,omitempty"` + OrgShortName *string `json:"orgShortName,omitempty"` + OrganizationId string `json:"organizationId"` + OrganizationName *string `json:"organizationName,omitempty"` + OrganizationShortName *string `json:"organizationShortName,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + UpdatedBy *BasicSubjectProfile `json:"updatedBy,omitempty"` + UserCount *int `json:"userCount,omitempty"` } // WorkspaceDag defines model for WorkspaceDag. type WorkspaceDag struct { - DagId string `json:"dagId"` - DeploymentId string `json:"deploymentId"` - IsActive *bool `json:"isActive,omitempty"` - IsPaused bool `json:"isPaused"` - NextRunAt *string `json:"nextRunAt,omitempty"` - Owners *[]string `json:"owners,omitempty"` - Runs *[]DagRun `json:"runs,omitempty"` - Schedule *DagSchedule `json:"schedule,omitempty"` - Tags *[]string `json:"tags,omitempty"` - TimetableDescription *string `json:"timetableDescription,omitempty"` -} - -// WorkspaceRole defines model for WorkspaceRole. -type WorkspaceRole struct { - WorkspaceId string `json:"workspaceId"` - WorkspaceRole string `json:"workspaceRole"` + DagId string `json:"dagId"` + DeploymentId string `json:"deploymentId"` + IsActive *bool `json:"isActive,omitempty"` + IsPaused bool `json:"isPaused"` + NextRunAt *string `json:"nextRunAt,omitempty"` + Owners *[]string `json:"owners,omitempty"` + Runs *[]WorkspaceDagRun `json:"runs,omitempty"` + Schedule *DagSchedule `json:"schedule,omitempty"` + Tags *[]string `json:"tags,omitempty"` + TimetableDescription *string `json:"timetableDescription,omitempty"` +} + +// WorkspaceDagRun defines model for WorkspaceDagRun. +type WorkspaceDagRun struct { + DataIntervalEnd *string `json:"dataIntervalEnd,omitempty"` + DataIntervalStart *string `json:"dataIntervalStart,omitempty"` + EndDate *string `json:"endDate,omitempty"` + LogicalDate *string `json:"logicalDate,omitempty"` + RunId *string `json:"runId,omitempty"` + RunType *string `json:"runType,omitempty"` + StartDate *string `json:"startDate,omitempty"` + State *string `json:"state,omitempty"` } // WorkspacesPaginated defines model for WorkspacesPaginated. @@ -1982,65 +2173,10 @@ type WorkspacesPaginated struct { Workspaces []Workspace `json:"workspaces"` } -// InternalDagRunWithTaskInstances defines model for internal_DagRunWithTaskInstances. -type InternalDagRunWithTaskInstances struct { - DataIntervalEnd *string `json:"dataIntervalEnd,omitempty"` - DataIntervalStart *string `json:"dataIntervalStart,omitempty"` - EndDate *string `json:"endDate,omitempty"` - LogicalDate *string `json:"logicalDate,omitempty"` - RunId *string `json:"runId,omitempty"` - RunType *string `json:"runType,omitempty"` - StartDate *string `json:"startDate,omitempty"` - State *string `json:"state,omitempty"` - TaskInstances *[]InternalTaskInstancesInner `json:"taskInstances,omitempty"` -} - -// InternalDagStructure defines model for internal_DagStructure. -type InternalDagStructure struct { - Edges *[]InternalEdge `json:"edges,omitempty"` - Group *InternalDagStructureGroup `json:"group,omitempty"` - Ordering *[]string `json:"ordering,omitempty"` -} - -// InternalDagStructureGroup defines model for internal_DagStructureGroup. -type InternalDagStructureGroup struct { - Children *[]InternalTaskGroupChildrenInner `json:"children,omitempty"` - Id *string `json:"id,omitempty"` - IsMapped *bool `json:"isMapped,omitempty"` - Label *string `json:"label,omitempty"` - Tooltip *string `json:"tooltip,omitempty"` -} - -// InternalEdge defines model for internal_Edge. -type InternalEdge struct { - From *string `json:"from,omitempty"` - Label *string `json:"label,omitempty"` - To *string `json:"to,omitempty"` -} - -// InternalMappedTaskInstanceSummary defines model for internal_MappedTaskInstanceSummary. -type InternalMappedTaskInstanceSummary struct { - EndDate *string `json:"endDate,omitempty"` - OverallState *string `json:"overallState,omitempty"` - StartDate *string `json:"startDate,omitempty"` - States *map[string]int `json:"states,omitempty"` - TaskId *string `json:"taskId,omitempty"` - TryNumber *int `json:"tryNumber,omitempty"` -} - -// InternalOutlet defines model for internal_Outlet. -type InternalOutlet struct { - Extra *map[string]string `json:"extra,omitempty"` - Type *string `json:"type,omitempty"` - Uri *string `json:"uri,omitempty"` -} - -// InternalPaginationResultDagRunWithTaskInstances defines model for internal_PaginationResultDagRunWithTaskInstances. -type InternalPaginationResultDagRunWithTaskInstances struct { - Items *[]InternalDagRunWithTaskInstances `json:"items,omitempty"` - NextCursor *string `json:"nextCursor,omitempty"` - PrevCursor *string `json:"prevCursor,omitempty"` - TotalCount *int `json:"totalCount,omitempty"` +// InternalRelativeDeltaSchemaWeekday defines model for internal_RelativeDeltaSchemaWeekday. +type InternalRelativeDeltaSchemaWeekday struct { + Int32 *int `json:"int32,omitempty"` + WeekdaySchema *InternalWeekdaySchema `json:"weekdaySchema,omitempty"` } // InternalScheduleIntervalCronExpression defines model for internal_ScheduleIntervalCronExpression. @@ -2050,23 +2186,27 @@ type InternalScheduleIntervalCronExpression struct { // InternalScheduleIntervalRelativeDelta defines model for internal_ScheduleIntervalRelativeDelta. type InternalScheduleIntervalRelativeDelta struct { - Day *int `json:"day,omitempty"` - Days *int `json:"days,omitempty"` - Hour *int `json:"hour,omitempty"` - Hours *int `json:"hours,omitempty"` - Leapdays *int `json:"leapdays,omitempty"` - Microsecond *int `json:"microsecond,omitempty"` - Microseconds *int `json:"microseconds,omitempty"` - Minute *int `json:"minute,omitempty"` - Minutes *int `json:"minutes,omitempty"` - Month *int `json:"month,omitempty"` - Months *int `json:"months,omitempty"` - Second *int `json:"second,omitempty"` - Seconds *int `json:"seconds,omitempty"` - Week *int `json:"week,omitempty"` - Weeks *int `json:"weeks,omitempty"` - Year *int `json:"year,omitempty"` - Years *int `json:"years,omitempty"` + Day *int `json:"day,omitempty"` + Days *int `json:"days,omitempty"` + Dt1 *string `json:"dt1,omitempty"` + Dt2 *string `json:"dt2,omitempty"` + Hour *int `json:"hour,omitempty"` + Hours *int `json:"hours,omitempty"` + Leapdays *int `json:"leapdays,omitempty"` + Microsecond *int `json:"microsecond,omitempty"` + Microseconds *int `json:"microseconds,omitempty"` + Minute *int `json:"minute,omitempty"` + Minutes *int `json:"minutes,omitempty"` + Month *int `json:"month,omitempty"` + Months *int `json:"months,omitempty"` + Nlyearday *int `json:"nlyearday,omitempty"` + Second *int `json:"second,omitempty"` + Seconds *int `json:"seconds,omitempty"` + Weekday *InternalRelativeDeltaSchemaWeekday `json:"weekday,omitempty"` + Weeks *int `json:"weeks,omitempty"` + Year *int `json:"year,omitempty"` + Yearday *int `json:"yearday,omitempty"` + Years *int `json:"years,omitempty"` } // InternalScheduleIntervalTimeDelta defines model for internal_ScheduleIntervalTimeDelta. @@ -2076,45 +2216,10 @@ type InternalScheduleIntervalTimeDelta struct { Seconds *int `json:"seconds,omitempty"` } -// InternalTask defines model for internal_Task. -type InternalTask struct { - ExtraLinks *[]string `json:"extraLinks,omitempty"` - HasOutletDatasets *bool `json:"hasOutletDatasets,omitempty"` - Id *string `json:"id,omitempty"` - IsMapped *bool `json:"isMapped,omitempty"` - Label *string `json:"label,omitempty"` - Operator *string `json:"operator,omitempty"` - Outlets *[]InternalOutlet `json:"outlets,omitempty"` -} - -// InternalTaskGroup defines model for internal_TaskGroup. -type InternalTaskGroup struct { - Children *[]InternalTaskGroupChildrenInner `json:"children,omitempty"` - Id *string `json:"id,omitempty"` - IsMapped *bool `json:"isMapped,omitempty"` - Label *string `json:"label,omitempty"` - Tooltip *string `json:"tooltip,omitempty"` -} - -// InternalTaskGroupChildrenInner defines model for internal_TaskGroupChildrenInner. -type InternalTaskGroupChildrenInner struct { - Task *InternalTask `json:"task,omitempty"` - TaskGroup *InternalTaskGroup `json:"taskGroup,omitempty"` -} - -// InternalTaskInstancesInner defines model for internal_TaskInstancesInner. -type InternalTaskInstancesInner struct { - MappedTaskInstanceSummary *InternalMappedTaskInstanceSummary `json:"mappedTaskInstanceSummary,omitempty"` - UnmappedTaskInstance *InternalUnmappedTaskInstance `json:"unmappedTaskInstance,omitempty"` -} - -// InternalUnmappedTaskInstance defines model for internal_UnmappedTaskInstance. -type InternalUnmappedTaskInstance struct { - EndDate *string `json:"endDate,omitempty"` - StartDate *string `json:"startDate,omitempty"` - State *string `json:"state,omitempty"` - TaskId *string `json:"taskId,omitempty"` - TryNumber *int `json:"tryNumber,omitempty"` +// InternalWeekdaySchema defines model for internal_WeekdaySchema. +type InternalWeekdaySchema struct { + N *int `json:"n,omitempty"` + Weekday *int `json:"weekday,omitempty"` } // GetSharedClusterParams defines parameters for GetSharedCluster. @@ -2144,12 +2249,6 @@ type GetClusterOptionsParamsProvider string // GetClusterOptionsParamsType defines parameters for GetClusterOptions. type GetClusterOptionsParamsType string -// ListOrganizationAuthIdsParams defines parameters for ListOrganizationAuthIds. -type ListOrganizationAuthIdsParams struct { - // Email User email to retrieve organization auth IDs for - Email string `form:"email" json:"email"` -} - // ListOrganizationsParams defines parameters for ListOrganizations. type ListOrganizationsParams struct { // Search string to search for when listing users @@ -2215,8 +2314,8 @@ type ListClustersParams struct { // Types type to filter clusters on Types *[]ListClustersParamsTypes `form:"types,omitempty" json:"types,omitempty"` - // Status status to filter clusters on - Status *ListClustersParamsStatus `form:"status,omitempty" json:"status,omitempty"` + // Statuses statuses to filter clusters on + Statuses *[]ListClustersParamsStatuses `form:"statuses,omitempty" json:"statuses,omitempty"` // Search string to search for when listing clusters Search *string `form:"search,omitempty" json:"search,omitempty"` @@ -2237,12 +2336,18 @@ type ListClustersParamsProvider string // ListClustersParamsTypes defines parameters for ListClusters. type ListClustersParamsTypes string -// ListClustersParamsStatus defines parameters for ListClusters. -type ListClustersParamsStatus string +// ListClustersParamsStatuses defines parameters for ListClusters. +type ListClustersParamsStatuses string // ListClustersParamsSorts defines parameters for ListClusters. type ListClustersParamsSorts string +// GetDeploymentOptionsParams defines parameters for GetDeploymentOptions. +type GetDeploymentOptionsParams struct { + // DeploymentId deployment ID + DeploymentId *string `form:"deploymentId,omitempty" json:"deploymentId,omitempty"` +} + // ListDeploymentsParams defines parameters for ListDeployments. type ListDeploymentsParams struct { // DeploymentIds IDs that define the deployments @@ -2264,47 +2369,20 @@ type ListDeploymentsParams struct { // ListDeploymentsParamsSorts defines parameters for ListDeployments. type ListDeploymentsParamsSorts string -// GetDeploymentDagRunsParams defines parameters for GetDeploymentDagRuns. -type GetDeploymentDagRunsParams struct { - // PageSize page size, default of 20 - PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"` - - // Cursor pagination cursor - Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` - - // RunId filter by ID of the dags run - RunId *string `form:"runId,omitempty" json:"runId,omitempty"` - - // LogicalDateLt filter by logical date (aka execution date) of the dags run less than (RFC3339 format) - LogicalDateLt *time.Time `form:"logicalDate__lt,omitempty" json:"logicalDate__lt,omitempty"` - - // LogicalDateGt filter by logical date (aka execution date) of the dags run greater than (RFC3339 format) - LogicalDateGt *time.Time `form:"logicalDate__gt,omitempty" json:"logicalDate__gt,omitempty"` - - // StartDateLt filter by start date of the dags run less than (RFC3339 format) - StartDateLt *time.Time `form:"startDate__lt,omitempty" json:"startDate__lt,omitempty"` - - // StartDateGt filter by start date of the dags run greater than (RFC3339 format) - StartDateGt *time.Time `form:"startDate__gt,omitempty" json:"startDate__gt,omitempty"` - - // EndDateLt filter by end date of the dags run less than (RFC3339 format) - EndDateLt *time.Time `form:"endDate__lt,omitempty" json:"endDate__lt,omitempty"` - - // EndDateGt filter by end date of the dags run greater than (RFC3339 format) - EndDateGt *time.Time `form:"endDate__gt,omitempty" json:"endDate__gt,omitempty"` +// ListDeploymentApiTokensParams defines parameters for ListDeploymentApiTokens. +type ListDeploymentApiTokensParams struct { + // Offset Offset for pagination + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` - // State filter by dags runs with any of these run states - State *[]GetDeploymentDagRunsParamsState `form:"state,omitempty" json:"state,omitempty"` + // Limit Limit for pagination + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` - // RunTypeIn filter by dags runs with any of these run types - RunTypeIn *[]GetDeploymentDagRunsParamsRunTypeIn `form:"runType__in,omitempty" json:"runType__in,omitempty"` + // Sorts Sorting criteria, each criterion should conform to format 'fieldName:asc' or 'fieldName:desc' + Sorts *[]ListDeploymentApiTokensParamsSorts `form:"sorts,omitempty" json:"sorts,omitempty"` } -// GetDeploymentDagRunsParamsState defines parameters for GetDeploymentDagRuns. -type GetDeploymentDagRunsParamsState string - -// GetDeploymentDagRunsParamsRunTypeIn defines parameters for GetDeploymentDagRuns. -type GetDeploymentDagRunsParamsRunTypeIn string +// ListDeploymentApiTokensParamsSorts defines parameters for ListDeploymentApiTokens. +type ListDeploymentApiTokensParamsSorts string // GetDeploymentLogsParams defines parameters for GetDeploymentLogs. type GetDeploymentLogsParams struct { @@ -2333,20 +2411,44 @@ type GetDeploymentLogsParams struct { // GetDeploymentLogsParamsSources defines parameters for GetDeploymentLogs. type GetDeploymentLogsParamsSources string -// GetMetronomeDashboardParams defines parameters for GetMetronomeDashboard. -type GetMetronomeDashboardParams struct { - // ShowZeroUsageLineItems optional flag to show zero usage line items for invoice dashboards - ShowZeroUsageLineItems *bool `form:"showZeroUsageLineItems,omitempty" json:"showZeroUsageLineItems,omitempty"` +// ListEnvironmentObjectsParams defines parameters for ListEnvironmentObjects. +type ListEnvironmentObjectsParams struct { + // Offset offset for pagination + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit limit for pagination + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Sorts sorting criteria, each criterion should conform to format 'fieldName:asc' or 'fieldName:desc' + Sorts *[]ListEnvironmentObjectsParamsSorts `form:"sorts,omitempty" json:"sorts,omitempty"` + + // WorkspaceId workspace ID + WorkspaceId *string `form:"workspaceId,omitempty" json:"workspaceId,omitempty"` + + // DeploymentId deployment ID + DeploymentId *string `form:"deploymentId,omitempty" json:"deploymentId,omitempty"` + + // ProjectId project ID + ProjectId *string `form:"projectId,omitempty" json:"projectId,omitempty"` + + // ObjectType object type + ObjectType *ListEnvironmentObjectsParamsObjectType `form:"objectType,omitempty" json:"objectType,omitempty"` + + // ObjectKey object key + ObjectKey *string `form:"objectKey,omitempty" json:"objectKey,omitempty"` + + // ShowSecrets show secrets in response + ShowSecrets *bool `form:"showSecrets,omitempty" json:"showSecrets,omitempty"` - // ColorOverrides optional list of colors ('gray_dark', 'gray_medium', 'gray_light', 'gray_extralight', 'white', 'primary_medium', or 'primary_light') to override in the format 'color:#hex-color-value' Eg. 'gray_dark:#ff0000' - ColorOverrides *[]string `form:"colorOverrides,omitempty" json:"colorOverrides,omitempty"` + // ResolveLinked resolve linked objects + ResolveLinked *bool `form:"resolveLinked,omitempty" json:"resolveLinked,omitempty"` } -// GetMetronomeDashboardParamsType defines parameters for GetMetronomeDashboard. -type GetMetronomeDashboardParamsType string +// ListEnvironmentObjectsParamsSorts defines parameters for ListEnvironmentObjects. +type ListEnvironmentObjectsParamsSorts string -// GetStripeClientSecretParamsType defines parameters for GetStripeClientSecret. -type GetStripeClientSecretParamsType string +// ListEnvironmentObjectsParamsObjectType defines parameters for ListEnvironmentObjects. +type ListEnvironmentObjectsParamsObjectType string // ListOrganizationTeamsParams defines parameters for ListOrganizationTeams. type ListOrganizationTeamsParams struct { @@ -2510,9 +2612,6 @@ type GetSelfUserParams struct { CreateIfNotExist *bool `form:"createIfNotExist,omitempty" json:"createIfNotExist,omitempty"` } -// ValidateSsoLoginJSONRequestBody defines body for ValidateSsoLogin for application/json ContentType. -type ValidateSsoLoginJSONRequestBody = ValidateSsoLoginRequest - // CreateOrganizationJSONRequestBody defines body for CreateOrganization for application/json ContentType. type CreateOrganizationJSONRequestBody = CreateOrganizationRequest @@ -2543,20 +2642,29 @@ type CreateGcpClusterJSONRequestBody = CreateGcpClusterRequest // UpdateGcpClusterJSONRequestBody defines body for UpdateGcpCluster for application/json ContentType. type UpdateGcpClusterJSONRequestBody = UpdateGcpClusterRequest -// CreateManagedDomainJSONRequestBody defines body for CreateManagedDomain for application/json ContentType. -type CreateManagedDomainJSONRequestBody = CreateManagedDomainRequest +// CreateDeploymentJSONRequestBody defines body for CreateDeployment for application/json ContentType. +type CreateDeploymentJSONRequestBody = CreateDeploymentRequest -// UpdateManagedDomainJSONRequestBody defines body for UpdateManagedDomain for application/json ContentType. -type UpdateManagedDomainJSONRequestBody = UpdateManagedDomainRequest +// UpdateDeploymentJSONRequestBody defines body for UpdateDeployment for application/json ContentType. +type UpdateDeploymentJSONRequestBody = UpdateDeploymentRequest -// CreateUserInviteJSONRequestBody defines body for CreateUserInvite for application/json ContentType. -type CreateUserInviteJSONRequestBody = CreateUserInviteRequest +// CreateDeploymentApiTokenJSONRequestBody defines body for CreateDeploymentApiToken for application/json ContentType. +type CreateDeploymentApiTokenJSONRequestBody = CreateDeploymentApiTokenRequest + +// UpdateDeploymentApiTokenJSONRequestBody defines body for UpdateDeploymentApiToken for application/json ContentType. +type UpdateDeploymentApiTokenJSONRequestBody = UpdateDeploymentApiTokenRequest + +// TransferDeploymentJSONRequestBody defines body for TransferDeployment for application/json ContentType. +type TransferDeploymentJSONRequestBody = TransferDeploymentRequest + +// CreateEnvironmentObjectJSONRequestBody defines body for CreateEnvironmentObject for application/json ContentType. +type CreateEnvironmentObjectJSONRequestBody = CreateEnvironmentObjectRequest -// CreateSsoConnectionJSONRequestBody defines body for CreateSsoConnection for application/json ContentType. -type CreateSsoConnectionJSONRequestBody = CreateSsoConnectionRequest +// UpdateEnvironmentObjectJSONRequestBody defines body for UpdateEnvironmentObject for application/json ContentType. +type UpdateEnvironmentObjectJSONRequestBody = UpdateEnvironmentObjectRequest -// UpdateSsoConnectionJSONRequestBody defines body for UpdateSsoConnection for application/json ContentType. -type UpdateSsoConnectionJSONRequestBody = UpdateSsoConnectionRequest +// CreateUserInviteJSONRequestBody defines body for CreateUserInvite for application/json ContentType. +type CreateUserInviteJSONRequestBody = CreateUserInviteRequest // CreateTeamJSONRequestBody defines body for CreateTeam for application/json ContentType. type CreateTeamJSONRequestBody = CreateTeamRequest @@ -2573,9 +2681,6 @@ type MutateOrgTeamRoleJSONRequestBody = MutateOrgTeamRoleRequest // MutateOrgUserRoleJSONRequestBody defines body for MutateOrgUserRole for application/json ContentType. type MutateOrgUserRoleJSONRequestBody = MutateOrgUserRoleRequest -// ValidateCreditCardPaymentJSONRequestBody defines body for ValidateCreditCardPayment for application/json ContentType. -type ValidateCreditCardPaymentJSONRequestBody = ValidateCreditCardPaymentRequest - // CreateWorkspaceJSONRequestBody defines body for CreateWorkspace for application/json ContentType. type CreateWorkspaceJSONRequestBody = CreateWorkspaceRequest @@ -2588,9 +2693,6 @@ type CreateWorkspaceApiTokenJSONRequestBody = CreateWorkspaceApiTokenRequest // UpdateWorkspaceApiTokenJSONRequestBody defines body for UpdateWorkspaceApiToken for application/json ContentType. type UpdateWorkspaceApiTokenJSONRequestBody = UpdateWorkspaceApiTokenRequest -// UpdateDeploymentJSONRequestBody defines body for UpdateDeployment for application/json ContentType. -type UpdateDeploymentJSONRequestBody = UpdateDeploymentRequest - // MutateWorkspaceTeamRoleJSONRequestBody defines body for MutateWorkspaceTeamRole for application/json ContentType. type MutateWorkspaceTeamRoleJSONRequestBody = MutateWorkspaceTeamRoleRequest @@ -2600,6 +2702,156 @@ type MutateWorkspaceUserRoleJSONRequestBody = MutateWorkspaceUserRoleRequest // UpdateSelfUserInviteJSONRequestBody defines body for UpdateSelfUserInvite for application/json ContentType. type UpdateSelfUserInviteJSONRequestBody = UpdateInviteRequest +// AsCreateDedicatedDeploymentRequest returns the union data inside the CreateDeploymentRequest as a CreateDedicatedDeploymentRequest +func (t CreateDeploymentRequest) AsCreateDedicatedDeploymentRequest() (CreateDedicatedDeploymentRequest, error) { + var body CreateDedicatedDeploymentRequest + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCreateDedicatedDeploymentRequest overwrites any union data inside the CreateDeploymentRequest as the provided CreateDedicatedDeploymentRequest +func (t *CreateDeploymentRequest) FromCreateDedicatedDeploymentRequest(v CreateDedicatedDeploymentRequest) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCreateDedicatedDeploymentRequest performs a merge with any union data inside the CreateDeploymentRequest, using the provided CreateDedicatedDeploymentRequest +func (t *CreateDeploymentRequest) MergeCreateDedicatedDeploymentRequest(v CreateDedicatedDeploymentRequest) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +// AsCreateHybridDeploymentRequest returns the union data inside the CreateDeploymentRequest as a CreateHybridDeploymentRequest +func (t CreateDeploymentRequest) AsCreateHybridDeploymentRequest() (CreateHybridDeploymentRequest, error) { + var body CreateHybridDeploymentRequest + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCreateHybridDeploymentRequest overwrites any union data inside the CreateDeploymentRequest as the provided CreateHybridDeploymentRequest +func (t *CreateDeploymentRequest) FromCreateHybridDeploymentRequest(v CreateHybridDeploymentRequest) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCreateHybridDeploymentRequest performs a merge with any union data inside the CreateDeploymentRequest, using the provided CreateHybridDeploymentRequest +func (t *CreateDeploymentRequest) MergeCreateHybridDeploymentRequest(v CreateHybridDeploymentRequest) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +// AsCreateStandardDeploymentRequest returns the union data inside the CreateDeploymentRequest as a CreateStandardDeploymentRequest +func (t CreateDeploymentRequest) AsCreateStandardDeploymentRequest() (CreateStandardDeploymentRequest, error) { + var body CreateStandardDeploymentRequest + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCreateStandardDeploymentRequest overwrites any union data inside the CreateDeploymentRequest as the provided CreateStandardDeploymentRequest +func (t *CreateDeploymentRequest) FromCreateStandardDeploymentRequest(v CreateStandardDeploymentRequest) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCreateStandardDeploymentRequest performs a merge with any union data inside the CreateDeploymentRequest, using the provided CreateStandardDeploymentRequest +func (t *CreateDeploymentRequest) MergeCreateStandardDeploymentRequest(v CreateStandardDeploymentRequest) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +func (t CreateDeploymentRequest) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CreateDeploymentRequest) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsUpdateHostedDeploymentRequest returns the union data inside the UpdateDeploymentRequest as a UpdateHostedDeploymentRequest +func (t UpdateDeploymentRequest) AsUpdateHostedDeploymentRequest() (UpdateHostedDeploymentRequest, error) { + var body UpdateHostedDeploymentRequest + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromUpdateHostedDeploymentRequest overwrites any union data inside the UpdateDeploymentRequest as the provided UpdateHostedDeploymentRequest +func (t *UpdateDeploymentRequest) FromUpdateHostedDeploymentRequest(v UpdateHostedDeploymentRequest) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeUpdateHostedDeploymentRequest performs a merge with any union data inside the UpdateDeploymentRequest, using the provided UpdateHostedDeploymentRequest +func (t *UpdateDeploymentRequest) MergeUpdateHostedDeploymentRequest(v UpdateHostedDeploymentRequest) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +// AsUpdateHybridDeploymentRequest returns the union data inside the UpdateDeploymentRequest as a UpdateHybridDeploymentRequest +func (t UpdateDeploymentRequest) AsUpdateHybridDeploymentRequest() (UpdateHybridDeploymentRequest, error) { + var body UpdateHybridDeploymentRequest + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromUpdateHybridDeploymentRequest overwrites any union data inside the UpdateDeploymentRequest as the provided UpdateHybridDeploymentRequest +func (t *UpdateDeploymentRequest) FromUpdateHybridDeploymentRequest(v UpdateHybridDeploymentRequest) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeUpdateHybridDeploymentRequest performs a merge with any union data inside the UpdateDeploymentRequest, using the provided UpdateHybridDeploymentRequest +func (t *UpdateDeploymentRequest) MergeUpdateHybridDeploymentRequest(v UpdateHybridDeploymentRequest) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +func (t UpdateDeploymentRequest) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *UpdateDeploymentRequest) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + // RequestEditorFn is the function signature for the RequestEditor callback function type RequestEditorFn func(ctx context.Context, req *http.Request) error @@ -2676,23 +2928,12 @@ type ClientInterface interface { // GetUserInvite request GetUserInvite(ctx context.Context, inviteId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // ValidateSsoLogin request with any body - ValidateSsoLoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - ValidateSsoLogin(ctx context.Context, body ValidateSsoLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetSharedCluster request GetSharedCluster(ctx context.Context, params *GetSharedClusterParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetClusterOptions request GetClusterOptions(ctx context.Context, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetDeploymentOptions request - GetDeploymentOptions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListOrganizationAuthIds request - ListOrganizationAuthIds(ctx context.Context, params *ListOrganizationAuthIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListOrganizations request ListOrganizations(ctx context.Context, params *ListOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2773,90 +3014,84 @@ type ClientInterface interface { // GetCluster request GetCluster(ctx context.Context, organizationId string, clusterId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetDeploymentOptions request + GetDeploymentOptions(ctx context.Context, organizationId string, params *GetDeploymentOptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListDeployments request ListDeployments(ctx context.Context, organizationId string, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetDeploymentDagRuns request - GetDeploymentDagRuns(ctx context.Context, organizationId string, deploymentId string, dagId string, params *GetDeploymentDagRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDeploymentDagStructure request - GetDeploymentDagStructure(ctx context.Context, organizationId string, deploymentId string, dagId string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDeploymentLogs request - GetDeploymentLogs(ctx context.Context, organizationId string, deploymentId string, params *GetDeploymentLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateDeployment request with any body + CreateDeploymentWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListManagedDomains request - ListManagedDomains(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDeployment(ctx context.Context, organizationId string, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateManagedDomain request with any body - CreateManagedDomainWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteDeployment request + DeleteDeployment(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateManagedDomain(ctx context.Context, organizationId string, body CreateManagedDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetDeployment request + GetDeployment(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteManagedDomain request - DeleteManagedDomain(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateDeployment request with any body + UpdateDeploymentWithBody(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetManagedDomain request - GetManagedDomain(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateDeployment(ctx context.Context, organizationId string, deploymentId string, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateManagedDomain request with any body - UpdateManagedDomainWithBody(ctx context.Context, organizationId string, domainId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListDeploymentApiTokens request + ListDeploymentApiTokens(ctx context.Context, organizationId string, deploymentId string, params *ListDeploymentApiTokensParams, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdateManagedDomain(ctx context.Context, organizationId string, domainId string, body UpdateManagedDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateDeploymentApiToken request with any body + CreateDeploymentApiTokenWithBody(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // VerifyManagedDomain request - VerifyManagedDomain(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, body CreateDeploymentApiTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetDraftInvoice request - GetDraftInvoice(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteDeploymentApiToken request + DeleteDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateUserInvite request with any body - CreateUserInviteWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetDeploymentApiToken request + GetDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateUserInvite(ctx context.Context, organizationId string, body CreateUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateDeploymentApiToken request with any body + UpdateDeploymentApiTokenWithBody(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteUserInvite request - DeleteUserInvite(ctx context.Context, organizationId string, inviteId string, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, body UpdateDeploymentApiTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetCreditSummary request - GetCreditSummary(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // RotateDeploymentApiToken request + RotateDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetMetronomeDashboard request - GetMetronomeDashboard(ctx context.Context, organizationId string, pType GetMetronomeDashboardParamsType, params *GetMetronomeDashboardParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetDeploymentHealth request + GetDeploymentHealth(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetPaymentMethod request - GetPaymentMethod(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetDeploymentLogs request + GetDeploymentLogs(ctx context.Context, organizationId string, deploymentId string, params *GetDeploymentLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteSsoBypassKey request - DeleteSsoBypassKey(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // TransferDeployment request with any body + TransferDeploymentWithBody(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetSsoBypassKey request - GetSsoBypassKey(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) + TransferDeployment(ctx context.Context, organizationId string, deploymentId string, body TransferDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpsertSsoBypassKey request - UpsertSsoBypassKey(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListEnvironmentObjects request + ListEnvironmentObjects(ctx context.Context, organizationId string, params *ListEnvironmentObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListSsoConnections request - ListSsoConnections(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateEnvironmentObject request with any body + CreateEnvironmentObjectWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateSsoConnection request with any body - CreateSsoConnectionWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateEnvironmentObject(ctx context.Context, organizationId string, body CreateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateSsoConnection(ctx context.Context, organizationId string, body CreateSsoConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteEnvironmentObject request + DeleteEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteSsoConnection request - DeleteSsoConnection(ctx context.Context, organizationId string, connectionId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateEnvironmentObject request with any body + UpdateEnvironmentObjectWithBody(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetSsoConnection request - GetSsoConnection(ctx context.Context, organizationId string, connectionId string, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, body UpdateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateSsoConnection request with any body - UpdateSsoConnectionWithBody(ctx context.Context, organizationId string, connectionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateUserInvite request with any body + CreateUserInviteWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdateSsoConnection(ctx context.Context, organizationId string, connectionId string, body UpdateSsoConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateUserInvite(ctx context.Context, organizationId string, body CreateUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetStripeClientSecret request - GetStripeClientSecret(ctx context.Context, organizationId string, pType GetStripeClientSecretParamsType, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteUserInvite request + DeleteUserInvite(ctx context.Context, organizationId string, inviteId string, reqEditors ...RequestEditorFn) (*http.Response, error) // ListOrganizationTeams request ListOrganizationTeams(ctx context.Context, organizationId string, params *ListOrganizationTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2904,11 +3139,6 @@ type ClientInterface interface { MutateOrgUserRole(ctx context.Context, organizationId string, userId string, body MutateOrgUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ValidateCreditCardPayment request with any body - ValidateCreditCardPaymentWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - ValidateCreditCardPayment(ctx context.Context, organizationId string, body ValidateCreditCardPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListWorkspaces request ListWorkspaces(ctx context.Context, organizationId string, params *ListWorkspacesParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2956,11 +3186,6 @@ type ClientInterface interface { // ListWorkspaceDags request ListWorkspaceDags(ctx context.Context, organizationId string, workspaceId string, params *ListWorkspaceDagsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateDeployment request with any body - UpdateDeploymentWithBody(ctx context.Context, organizationId string, workspaceId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateDeployment(ctx context.Context, organizationId string, workspaceId string, deploymentId string, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListWorkspaceTeams request ListWorkspaceTeams(ctx context.Context, organizationId string, workspaceId string, params *ListWorkspaceTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3004,30 +3229,6 @@ func (c *Client) GetUserInvite(ctx context.Context, inviteId string, reqEditors return c.Client.Do(req) } -func (c *Client) ValidateSsoLoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewValidateSsoLoginRequestWithBody(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) ValidateSsoLogin(ctx context.Context, body ValidateSsoLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewValidateSsoLoginRequest(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) GetSharedCluster(ctx context.Context, params *GetSharedClusterParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetSharedClusterRequest(c.Server, params) if err != nil { @@ -3052,30 +3253,6 @@ func (c *Client) GetClusterOptions(ctx context.Context, params *GetClusterOption return c.Client.Do(req) } -func (c *Client) GetDeploymentOptions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDeploymentOptionsRequest(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) ListOrganizationAuthIds(ctx context.Context, params *ListOrganizationAuthIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListOrganizationAuthIdsRequest(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) ListOrganizations(ctx context.Context, params *ListOrganizationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListOrganizationsRequest(c.Server, params) if err != nil { @@ -3436,20 +3613,8 @@ func (c *Client) GetCluster(ctx context.Context, organizationId string, clusterI return c.Client.Do(req) } -func (c *Client) ListDeployments(ctx context.Context, organizationId string, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListDeploymentsRequest(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) GetDeploymentDagRuns(ctx context.Context, organizationId string, deploymentId string, dagId string, params *GetDeploymentDagRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDeploymentDagRunsRequest(c.Server, organizationId, deploymentId, dagId, params) +func (c *Client) GetDeploymentOptions(ctx context.Context, organizationId string, params *GetDeploymentOptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDeploymentOptionsRequest(c.Server, organizationId, params) if err != nil { return nil, err } @@ -3460,8 +3625,8 @@ func (c *Client) GetDeploymentDagRuns(ctx context.Context, organizationId string return c.Client.Do(req) } -func (c *Client) GetDeploymentDagStructure(ctx context.Context, organizationId string, deploymentId string, dagId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDeploymentDagStructureRequest(c.Server, organizationId, deploymentId, dagId) +func (c *Client) ListDeployments(ctx context.Context, organizationId string, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListDeploymentsRequest(c.Server, organizationId, params) if err != nil { return nil, err } @@ -3472,8 +3637,8 @@ func (c *Client) GetDeploymentDagStructure(ctx context.Context, organizationId s return c.Client.Do(req) } -func (c *Client) GetDeploymentLogs(ctx context.Context, organizationId string, deploymentId string, params *GetDeploymentLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDeploymentLogsRequest(c.Server, organizationId, deploymentId, params) +func (c *Client) CreateDeploymentWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDeploymentRequestWithBody(c.Server, organizationId, contentType, body) if err != nil { return nil, err } @@ -3484,8 +3649,8 @@ func (c *Client) GetDeploymentLogs(ctx context.Context, organizationId string, d return c.Client.Do(req) } -func (c *Client) ListManagedDomains(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListManagedDomainsRequest(c.Server, organizationId) +func (c *Client) CreateDeployment(ctx context.Context, organizationId string, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDeploymentRequest(c.Server, organizationId, body) if err != nil { return nil, err } @@ -3496,8 +3661,8 @@ func (c *Client) ListManagedDomains(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) CreateManagedDomainWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateManagedDomainRequestWithBody(c.Server, organizationId, contentType, body) +func (c *Client) DeleteDeployment(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDeploymentRequest(c.Server, organizationId, deploymentId) if err != nil { return nil, err } @@ -3508,8 +3673,8 @@ func (c *Client) CreateManagedDomainWithBody(ctx context.Context, organizationId return c.Client.Do(req) } -func (c *Client) CreateManagedDomain(ctx context.Context, organizationId string, body CreateManagedDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateManagedDomainRequest(c.Server, organizationId, body) +func (c *Client) GetDeployment(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDeploymentRequest(c.Server, organizationId, deploymentId) if err != nil { return nil, err } @@ -3520,8 +3685,8 @@ func (c *Client) CreateManagedDomain(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) DeleteManagedDomain(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteManagedDomainRequest(c.Server, organizationId, domainId) +func (c *Client) UpdateDeploymentWithBody(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateDeploymentRequestWithBody(c.Server, organizationId, deploymentId, contentType, body) if err != nil { return nil, err } @@ -3532,8 +3697,8 @@ func (c *Client) DeleteManagedDomain(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) GetManagedDomain(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetManagedDomainRequest(c.Server, organizationId, domainId) +func (c *Client) UpdateDeployment(ctx context.Context, organizationId string, deploymentId string, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateDeploymentRequest(c.Server, organizationId, deploymentId, body) if err != nil { return nil, err } @@ -3544,8 +3709,8 @@ func (c *Client) GetManagedDomain(ctx context.Context, organizationId string, do return c.Client.Do(req) } -func (c *Client) UpdateManagedDomainWithBody(ctx context.Context, organizationId string, domainId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateManagedDomainRequestWithBody(c.Server, organizationId, domainId, contentType, body) +func (c *Client) ListDeploymentApiTokens(ctx context.Context, organizationId string, deploymentId string, params *ListDeploymentApiTokensParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListDeploymentApiTokensRequest(c.Server, organizationId, deploymentId, params) if err != nil { return nil, err } @@ -3556,8 +3721,8 @@ func (c *Client) UpdateManagedDomainWithBody(ctx context.Context, organizationId return c.Client.Do(req) } -func (c *Client) UpdateManagedDomain(ctx context.Context, organizationId string, domainId string, body UpdateManagedDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateManagedDomainRequest(c.Server, organizationId, domainId, body) +func (c *Client) CreateDeploymentApiTokenWithBody(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDeploymentApiTokenRequestWithBody(c.Server, organizationId, deploymentId, contentType, body) if err != nil { return nil, err } @@ -3568,8 +3733,8 @@ func (c *Client) UpdateManagedDomain(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) VerifyManagedDomain(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewVerifyManagedDomainRequest(c.Server, organizationId, domainId) +func (c *Client) CreateDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, body CreateDeploymentApiTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDeploymentApiTokenRequest(c.Server, organizationId, deploymentId, body) if err != nil { return nil, err } @@ -3580,8 +3745,8 @@ func (c *Client) VerifyManagedDomain(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) GetDraftInvoice(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDraftInvoiceRequest(c.Server, organizationId) +func (c *Client) DeleteDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDeploymentApiTokenRequest(c.Server, organizationId, deploymentId, apiTokenId) if err != nil { return nil, err } @@ -3592,8 +3757,8 @@ func (c *Client) GetDraftInvoice(ctx context.Context, organizationId string, req return c.Client.Do(req) } -func (c *Client) CreateUserInviteWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUserInviteRequestWithBody(c.Server, organizationId, contentType, body) +func (c *Client) GetDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDeploymentApiTokenRequest(c.Server, organizationId, deploymentId, apiTokenId) if err != nil { return nil, err } @@ -3604,8 +3769,8 @@ func (c *Client) CreateUserInviteWithBody(ctx context.Context, organizationId st return c.Client.Do(req) } -func (c *Client) CreateUserInvite(ctx context.Context, organizationId string, body CreateUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUserInviteRequest(c.Server, organizationId, body) +func (c *Client) UpdateDeploymentApiTokenWithBody(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateDeploymentApiTokenRequestWithBody(c.Server, organizationId, deploymentId, apiTokenId, contentType, body) if err != nil { return nil, err } @@ -3616,8 +3781,8 @@ func (c *Client) CreateUserInvite(ctx context.Context, organizationId string, bo return c.Client.Do(req) } -func (c *Client) DeleteUserInvite(ctx context.Context, organizationId string, inviteId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteUserInviteRequest(c.Server, organizationId, inviteId) +func (c *Client) UpdateDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, body UpdateDeploymentApiTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateDeploymentApiTokenRequest(c.Server, organizationId, deploymentId, apiTokenId, body) if err != nil { return nil, err } @@ -3628,8 +3793,8 @@ func (c *Client) DeleteUserInvite(ctx context.Context, organizationId string, in return c.Client.Do(req) } -func (c *Client) GetCreditSummary(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCreditSummaryRequest(c.Server, organizationId) +func (c *Client) RotateDeploymentApiToken(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRotateDeploymentApiTokenRequest(c.Server, organizationId, deploymentId, apiTokenId) if err != nil { return nil, err } @@ -3640,8 +3805,8 @@ func (c *Client) GetCreditSummary(ctx context.Context, organizationId string, re return c.Client.Do(req) } -func (c *Client) GetMetronomeDashboard(ctx context.Context, organizationId string, pType GetMetronomeDashboardParamsType, params *GetMetronomeDashboardParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetMetronomeDashboardRequest(c.Server, organizationId, pType, params) +func (c *Client) GetDeploymentHealth(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDeploymentHealthRequest(c.Server, organizationId, deploymentId) if err != nil { return nil, err } @@ -3652,8 +3817,8 @@ func (c *Client) GetMetronomeDashboard(ctx context.Context, organizationId strin return c.Client.Do(req) } -func (c *Client) GetPaymentMethod(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPaymentMethodRequest(c.Server, organizationId) +func (c *Client) GetDeploymentLogs(ctx context.Context, organizationId string, deploymentId string, params *GetDeploymentLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDeploymentLogsRequest(c.Server, organizationId, deploymentId, params) if err != nil { return nil, err } @@ -3664,8 +3829,8 @@ func (c *Client) GetPaymentMethod(ctx context.Context, organizationId string, re return c.Client.Do(req) } -func (c *Client) DeleteSsoBypassKey(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSsoBypassKeyRequest(c.Server, organizationId) +func (c *Client) TransferDeploymentWithBody(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTransferDeploymentRequestWithBody(c.Server, organizationId, deploymentId, contentType, body) if err != nil { return nil, err } @@ -3676,8 +3841,8 @@ func (c *Client) DeleteSsoBypassKey(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) GetSsoBypassKey(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSsoBypassKeyRequest(c.Server, organizationId) +func (c *Client) TransferDeployment(ctx context.Context, organizationId string, deploymentId string, body TransferDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTransferDeploymentRequest(c.Server, organizationId, deploymentId, body) if err != nil { return nil, err } @@ -3688,8 +3853,8 @@ func (c *Client) GetSsoBypassKey(ctx context.Context, organizationId string, req return c.Client.Do(req) } -func (c *Client) UpsertSsoBypassKey(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpsertSsoBypassKeyRequest(c.Server, organizationId) +func (c *Client) ListEnvironmentObjects(ctx context.Context, organizationId string, params *ListEnvironmentObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListEnvironmentObjectsRequest(c.Server, organizationId, params) if err != nil { return nil, err } @@ -3700,8 +3865,8 @@ func (c *Client) UpsertSsoBypassKey(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) ListSsoConnections(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSsoConnectionsRequest(c.Server, organizationId) +func (c *Client) CreateEnvironmentObjectWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateEnvironmentObjectRequestWithBody(c.Server, organizationId, contentType, body) if err != nil { return nil, err } @@ -3712,8 +3877,8 @@ func (c *Client) ListSsoConnections(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) CreateSsoConnectionWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSsoConnectionRequestWithBody(c.Server, organizationId, contentType, body) +func (c *Client) CreateEnvironmentObject(ctx context.Context, organizationId string, body CreateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateEnvironmentObjectRequest(c.Server, organizationId, body) if err != nil { return nil, err } @@ -3724,8 +3889,8 @@ func (c *Client) CreateSsoConnectionWithBody(ctx context.Context, organizationId return c.Client.Do(req) } -func (c *Client) CreateSsoConnection(ctx context.Context, organizationId string, body CreateSsoConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSsoConnectionRequest(c.Server, organizationId, body) +func (c *Client) DeleteEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteEnvironmentObjectRequest(c.Server, organizationId, environmentObjectId) if err != nil { return nil, err } @@ -3736,8 +3901,8 @@ func (c *Client) CreateSsoConnection(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) DeleteSsoConnection(ctx context.Context, organizationId string, connectionId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSsoConnectionRequest(c.Server, organizationId, connectionId) +func (c *Client) UpdateEnvironmentObjectWithBody(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateEnvironmentObjectRequestWithBody(c.Server, organizationId, environmentObjectId, contentType, body) if err != nil { return nil, err } @@ -3748,8 +3913,8 @@ func (c *Client) DeleteSsoConnection(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) GetSsoConnection(ctx context.Context, organizationId string, connectionId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSsoConnectionRequest(c.Server, organizationId, connectionId) +func (c *Client) UpdateEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, body UpdateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateEnvironmentObjectRequest(c.Server, organizationId, environmentObjectId, body) if err != nil { return nil, err } @@ -3760,8 +3925,8 @@ func (c *Client) GetSsoConnection(ctx context.Context, organizationId string, co return c.Client.Do(req) } -func (c *Client) UpdateSsoConnectionWithBody(ctx context.Context, organizationId string, connectionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSsoConnectionRequestWithBody(c.Server, organizationId, connectionId, contentType, body) +func (c *Client) CreateUserInviteWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUserInviteRequestWithBody(c.Server, organizationId, contentType, body) if err != nil { return nil, err } @@ -3772,8 +3937,8 @@ func (c *Client) UpdateSsoConnectionWithBody(ctx context.Context, organizationId return c.Client.Do(req) } -func (c *Client) UpdateSsoConnection(ctx context.Context, organizationId string, connectionId string, body UpdateSsoConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSsoConnectionRequest(c.Server, organizationId, connectionId, body) +func (c *Client) CreateUserInvite(ctx context.Context, organizationId string, body CreateUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUserInviteRequest(c.Server, organizationId, body) if err != nil { return nil, err } @@ -3784,8 +3949,8 @@ func (c *Client) UpdateSsoConnection(ctx context.Context, organizationId string, return c.Client.Do(req) } -func (c *Client) GetStripeClientSecret(ctx context.Context, organizationId string, pType GetStripeClientSecretParamsType, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetStripeClientSecretRequest(c.Server, organizationId, pType) +func (c *Client) DeleteUserInvite(ctx context.Context, organizationId string, inviteId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteUserInviteRequest(c.Server, organizationId, inviteId) if err != nil { return nil, err } @@ -4000,30 +4165,6 @@ func (c *Client) MutateOrgUserRole(ctx context.Context, organizationId string, u return c.Client.Do(req) } -func (c *Client) ValidateCreditCardPaymentWithBody(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewValidateCreditCardPaymentRequestWithBody(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) ValidateCreditCardPayment(ctx context.Context, organizationId string, body ValidateCreditCardPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewValidateCreditCardPaymentRequest(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) ListWorkspaces(ctx context.Context, organizationId string, params *ListWorkspacesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListWorkspacesRequest(c.Server, organizationId, params) if err != nil { @@ -4228,30 +4369,6 @@ func (c *Client) ListWorkspaceDags(ctx context.Context, organizationId string, w return c.Client.Do(req) } -func (c *Client) UpdateDeploymentWithBody(ctx context.Context, organizationId string, workspaceId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDeploymentRequestWithBody(c.Server, organizationId, workspaceId, deploymentId, 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) UpdateDeployment(ctx context.Context, organizationId string, workspaceId string, deploymentId string, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDeploymentRequest(c.Server, organizationId, workspaceId, deploymentId, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) ListWorkspaceTeams(ctx context.Context, organizationId string, workspaceId string, params *ListWorkspaceTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListWorkspaceTeamsRequest(c.Server, organizationId, workspaceId, params) if err != nil { @@ -4418,46 +4535,6 @@ func NewGetUserInviteRequest(server string, inviteId string) (*http.Request, err return req, nil } -// NewValidateSsoLoginRequest calls the generic ValidateSsoLogin builder with application/json body -func NewValidateSsoLoginRequest(server string, body ValidateSsoLoginJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewValidateSsoLoginRequestWithBody(server, "application/json", bodyReader) -} - -// NewValidateSsoLoginRequestWithBody generates requests for ValidateSsoLogin with any type of body -func NewValidateSsoLoginRequestWithBody(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("/auth/post-login-callback") - 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 -} - // NewGetSharedClusterRequest generates requests for GetSharedCluster func NewGetSharedClusterRequest(server string, params *GetSharedClusterParams) (*http.Request, error) { var err error @@ -4576,78 +4653,6 @@ func NewGetClusterOptionsRequest(server string, params *GetClusterOptionsParams) return req, nil } -// NewGetDeploymentOptionsRequest generates requests for GetDeploymentOptions -func NewGetDeploymentOptionsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/options/deployment") - 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 -} - -// NewListOrganizationAuthIdsRequest generates requests for ListOrganizationAuthIds -func NewListOrganizationAuthIdsRequest(server string, params *ListOrganizationAuthIdsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizationAuthIds") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "email", runtime.ParamLocationQuery, params.Email); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - // NewListOrganizationsRequest generates requests for ListOrganizations func NewListOrganizationsRequest(server string, params *ListOrganizationsParams) (*http.Request, error) { var err error @@ -5333,9 +5338,9 @@ func NewListClustersRequest(server string, organizationId string, params *ListCl } - if params.Status != nil { + if params.Statuses != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != 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 @@ -5809,6 +5814,62 @@ func NewGetClusterRequest(server string, organizationId string, clusterId string return req, nil } +// NewGetDeploymentOptionsRequest generates requests for GetDeploymentOptions +func NewGetDeploymentOptionsRequest(server string, organizationId string, params *GetDeploymentOptionsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/%s/deployment-options", 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.DeploymentId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deploymentId", runtime.ParamLocationQuery, *params.DeploymentId); err != nil { + return nil, err + } else if 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 +} + // NewListDeploymentsRequest generates requests for ListDeployments func NewListDeploymentsRequest(server string, organizationId string, params *ListDeploymentsParams) (*http.Request, error) { var err error @@ -5929,8 +5990,19 @@ func NewListDeploymentsRequest(server string, organizationId string, params *Lis return req, nil } -// NewGetDeploymentDagRunsRequest generates requests for GetDeploymentDagRuns -func NewGetDeploymentDagRunsRequest(server string, organizationId string, deploymentId string, dagId string, params *GetDeploymentDagRunsParams) (*http.Request, error) { +// NewCreateDeploymentRequest calls the generic CreateDeployment builder with application/json body +func NewCreateDeploymentRequest(server string, organizationId string, body CreateDeploymentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateDeploymentRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewCreateDeploymentRequestWithBody generates requests for CreateDeployment with any type of body +func NewCreateDeploymentRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5940,169 +6012,206 @@ func NewGetDeploymentDagRunsRequest(server string, organizationId string, deploy return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam2 string + operationPath := fmt.Sprintf("/organizations/%s/deployments", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "dagId", runtime.ParamLocationPath, dagId) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - serverURL, err := url.Parse(server) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/dags/%s/runs", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + req.Header.Add("Content-Type", contentType) - queryURL, err := serverURL.Parse(operationPath) + return req, nil +} + +// NewDeleteDeploymentRequest generates requests for DeleteDeployment +func NewDeleteDeploymentRequest(server string, organizationId string, deploymentId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) if err != nil { return nil, err } - if params != nil { - queryValues := queryURL.Query() + var pathParam1 string - if params.PageSize != nil { + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if params.Cursor != nil { + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cursor", runtime.ParamLocationQuery, *params.Cursor); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - } + return req, nil +} - if params.RunId != nil { +// NewGetDeploymentRequest generates requests for GetDeployment +func NewGetDeploymentRequest(server string, organizationId string, deploymentId string) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "runId", runtime.ParamLocationQuery, *params.RunId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + var pathParam0 string - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } - if params.LogicalDateLt != nil { + var pathParam1 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "logicalDate__lt", runtime.ParamLocationQuery, *params.LogicalDateLt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) + if err != nil { + return nil, err + } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if params.LogicalDateGt != nil { + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "logicalDate__gt", runtime.ParamLocationQuery, *params.LogicalDateGt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - if params.StartDateLt != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startDate__lt", runtime.ParamLocationQuery, *params.StartDateLt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewUpdateDeploymentRequest calls the generic UpdateDeployment builder with application/json body +func NewUpdateDeploymentRequest(server string, organizationId string, deploymentId string, body UpdateDeploymentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateDeploymentRequestWithBody(server, organizationId, deploymentId, "application/json", bodyReader) +} - } +// NewUpdateDeploymentRequestWithBody generates requests for UpdateDeployment with any type of body +func NewUpdateDeploymentRequestWithBody(server string, organizationId string, deploymentId string, contentType string, body io.Reader) (*http.Request, error) { + var err error - if params.StartDateGt != nil { + var pathParam0 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startDate__gt", runtime.ParamLocationQuery, *params.StartDateGt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } - } + var pathParam1 string - if params.EndDateLt != nil { + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endDate__lt", runtime.ParamLocationQuery, *params.EndDateLt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListDeploymentApiTokensRequest generates requests for ListDeploymentApiTokens +func NewListDeploymentApiTokensRequest(server string, organizationId string, deploymentId string, params *ListDeploymentApiTokensParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/api-tokens", 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.EndDateGt != nil { + if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endDate__gt", runtime.ParamLocationQuery, *params.EndDateGt); err != 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 @@ -6116,9 +6225,9 @@ func NewGetDeploymentDagRunsRequest(server string, organizationId string, deploy } - if params.State != nil { + if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "state", runtime.ParamLocationQuery, *params.State); err != 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 @@ -6132,9 +6241,9 @@ func NewGetDeploymentDagRunsRequest(server string, organizationId string, deploy } - if params.RunTypeIn != nil { + if params.Sorts != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "runType__in", runtime.ParamLocationQuery, *params.RunTypeIn); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sorts", runtime.ParamLocationQuery, *params.Sorts); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6159,8 +6268,19 @@ func NewGetDeploymentDagRunsRequest(server string, organizationId string, deploy return req, nil } -// NewGetDeploymentDagStructureRequest generates requests for GetDeploymentDagStructure -func NewGetDeploymentDagStructureRequest(server string, organizationId string, deploymentId string, dagId string) (*http.Request, error) { +// NewCreateDeploymentApiTokenRequest calls the generic CreateDeploymentApiToken builder with application/json body +func NewCreateDeploymentApiTokenRequest(server string, organizationId string, deploymentId string, body CreateDeploymentApiTokenJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateDeploymentApiTokenRequestWithBody(server, organizationId, deploymentId, "application/json", bodyReader) +} + +// NewCreateDeploymentApiTokenRequestWithBody generates requests for CreateDeploymentApiToken with any type of body +func NewCreateDeploymentApiTokenRequestWithBody(server string, organizationId string, deploymentId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6177,19 +6297,12 @@ func NewGetDeploymentDagStructureRequest(server string, organizationId string, d return nil, err } - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "dagId", runtime.ParamLocationPath, dagId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/dags/%s/structure", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/api-tokens", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6199,16 +6312,18 @@ func NewGetDeploymentDagStructureRequest(server string, organizationId string, d return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetDeploymentLogsRequest generates requests for GetDeploymentLogs -func NewGetDeploymentLogsRequest(server string, organizationId string, deploymentId string, params *GetDeploymentLogsParams) (*http.Request, error) { +// NewDeleteDeploymentApiTokenRequest generates requests for DeleteDeploymentApiToken +func NewDeleteDeploymentApiTokenRequest(server string, organizationId string, deploymentId string, apiTokenId string) (*http.Request, error) { var err error var pathParam0 string @@ -6225,12 +6340,19 @@ func NewGetDeploymentLogsRequest(server string, organizationId string, deploymen return nil, err } + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "apiTokenId", runtime.ParamLocationPath, apiTokenId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/logs", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/api-tokens/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6240,121 +6362,7 @@ func NewGetDeploymentLogsRequest(server string, organizationId string, deploymen return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sources", runtime.ParamLocationQuery, params.Sources); err != nil { - return nil, err - } else if 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.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) - } - } - } - - } - - if params.Range != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "range", runtime.ParamLocationQuery, *params.Range); err != nil { - return nil, err - } else if 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.MaxNumResults != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "maxNumResults", runtime.ParamLocationQuery, *params.MaxNumResults); err != nil { - return nil, err - } else if 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.SearchId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchId", runtime.ParamLocationQuery, *params.SearchId); err != nil { - return nil, err - } else if 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.SearchText != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchText", runtime.ParamLocationQuery, *params.SearchText); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -6362,8 +6370,8 @@ func NewGetDeploymentLogsRequest(server string, organizationId string, deploymen return req, nil } -// NewListManagedDomainsRequest generates requests for ListManagedDomains -func NewListManagedDomainsRequest(server string, organizationId string) (*http.Request, error) { +// NewGetDeploymentApiTokenRequest generates requests for GetDeploymentApiToken +func NewGetDeploymentApiTokenRequest(server string, organizationId string, deploymentId string, apiTokenId string) (*http.Request, error) { var err error var pathParam0 string @@ -6373,12 +6381,26 @@ func NewListManagedDomainsRequest(server string, organizationId string) (*http.R return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "apiTokenId", runtime.ParamLocationPath, apiTokenId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/domains", pathParam0) + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/api-tokens/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6396,19 +6418,19 @@ func NewListManagedDomainsRequest(server string, organizationId string) (*http.R return req, nil } -// NewCreateManagedDomainRequest calls the generic CreateManagedDomain builder with application/json body -func NewCreateManagedDomainRequest(server string, organizationId string, body CreateManagedDomainJSONRequestBody) (*http.Request, error) { +// NewUpdateDeploymentApiTokenRequest calls the generic UpdateDeploymentApiToken builder with application/json body +func NewUpdateDeploymentApiTokenRequest(server string, organizationId string, deploymentId string, apiTokenId string, body UpdateDeploymentApiTokenJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateManagedDomainRequestWithBody(server, organizationId, "application/json", bodyReader) + return NewUpdateDeploymentApiTokenRequestWithBody(server, organizationId, deploymentId, apiTokenId, "application/json", bodyReader) } -// NewCreateManagedDomainRequestWithBody generates requests for CreateManagedDomain with any type of body -func NewCreateManagedDomainRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateDeploymentApiTokenRequestWithBody generates requests for UpdateDeploymentApiToken with any type of body +func NewUpdateDeploymentApiTokenRequestWithBody(server string, organizationId string, deploymentId string, apiTokenId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6418,45 +6440,16 @@ func NewCreateManagedDomainRequestWithBody(server string, organizationId string, return nil, err } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/%s/domains", 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 -} - -// NewDeleteManagedDomainRequest generates requests for DeleteManagedDomain -func NewDeleteManagedDomainRequest(server string, organizationId string, domainId string) (*http.Request, error) { - var err error - - var pathParam0 string + var pathParam1 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) if err != nil { return nil, err } - var pathParam1 string + var pathParam2 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "domainId", runtime.ParamLocationPath, domainId) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "apiTokenId", runtime.ParamLocationPath, apiTokenId) if err != nil { return nil, err } @@ -6466,7 +6459,7 @@ func NewDeleteManagedDomainRequest(server string, organizationId string, domainI return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/domains/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/api-tokens/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6476,16 +6469,18 @@ func NewDeleteManagedDomainRequest(server string, organizationId string, domainI return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetManagedDomainRequest generates requests for GetManagedDomain -func NewGetManagedDomainRequest(server string, organizationId string, domainId string) (*http.Request, error) { +// NewRotateDeploymentApiTokenRequest generates requests for RotateDeploymentApiToken +func NewRotateDeploymentApiTokenRequest(server string, organizationId string, deploymentId string, apiTokenId string) (*http.Request, error) { var err error var pathParam0 string @@ -6497,7 +6492,14 @@ func NewGetManagedDomainRequest(server string, organizationId string, domainId s var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "domainId", runtime.ParamLocationPath, domainId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "apiTokenId", runtime.ParamLocationPath, apiTokenId) if err != nil { return nil, err } @@ -6507,7 +6509,7 @@ func NewGetManagedDomainRequest(server string, organizationId string, domainId s return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/domains/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/api-tokens/%s/rotate", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6517,7 +6519,7 @@ func NewGetManagedDomainRequest(server string, organizationId string, domainId s return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -6525,19 +6527,8 @@ func NewGetManagedDomainRequest(server string, organizationId string, domainId s return req, nil } -// NewUpdateManagedDomainRequest calls the generic UpdateManagedDomain builder with application/json body -func NewUpdateManagedDomainRequest(server string, organizationId string, domainId string, body UpdateManagedDomainJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateManagedDomainRequestWithBody(server, organizationId, domainId, "application/json", bodyReader) -} - -// NewUpdateManagedDomainRequestWithBody generates requests for UpdateManagedDomain with any type of body -func NewUpdateManagedDomainRequestWithBody(server string, organizationId string, domainId string, contentType string, body io.Reader) (*http.Request, error) { +// NewGetDeploymentHealthRequest generates requests for GetDeploymentHealth +func NewGetDeploymentHealthRequest(server string, organizationId string, deploymentId string) (*http.Request, error) { var err error var pathParam0 string @@ -6549,7 +6540,7 @@ func NewUpdateManagedDomainRequestWithBody(server string, organizationId string, var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "domainId", runtime.ParamLocationPath, domainId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) if err != nil { return nil, err } @@ -6559,7 +6550,7 @@ func NewUpdateManagedDomainRequestWithBody(server string, organizationId string, return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/domains/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/health", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6569,18 +6560,16 @@ func NewUpdateManagedDomainRequestWithBody(server string, organizationId string, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewVerifyManagedDomainRequest generates requests for VerifyManagedDomain -func NewVerifyManagedDomainRequest(server string, organizationId string, domainId string) (*http.Request, error) { +// NewGetDeploymentLogsRequest generates requests for GetDeploymentLogs +func NewGetDeploymentLogsRequest(server string, organizationId string, deploymentId string, params *GetDeploymentLogsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6592,7 +6581,7 @@ func NewVerifyManagedDomainRequest(server string, organizationId string, domainI var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "domainId", runtime.ParamLocationPath, domainId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) if err != nil { return nil, err } @@ -6602,7 +6591,7 @@ func NewVerifyManagedDomainRequest(server string, organizationId string, domainI return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/domains/%s/verify", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/logs", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6612,97 +6601,141 @@ func NewVerifyManagedDomainRequest(server string, organizationId string, domainI return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sources", runtime.ParamLocationQuery, params.Sources); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewGetDraftInvoiceRequest generates requests for GetDraftInvoice -func NewGetDraftInvoiceRequest(server string, organizationId string) (*http.Request, error) { - var err error + if params.Limit != nil { - var pathParam0 string + 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) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if params.Offset != nil { - operationPath := fmt.Sprintf("/organizations/%s/draft-invoice", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + 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, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + } - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + if params.Range != nil { - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "range", runtime.ParamLocationQuery, *params.Range); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewCreateUserInviteRequest calls the generic CreateUserInvite builder with application/json body -func NewCreateUserInviteRequest(server string, organizationId string, body CreateUserInviteJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateUserInviteRequestWithBody(server, organizationId, "application/json", bodyReader) -} + } -// NewCreateUserInviteRequestWithBody generates requests for CreateUserInvite with any type of body -func NewCreateUserInviteRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { - var err error + if params.MaxNumResults != nil { - var pathParam0 string + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "maxNumResults", runtime.ParamLocationQuery, *params.MaxNumResults); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if params.SearchId != nil { - operationPath := fmt.Sprintf("/organizations/%s/invites", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchId", runtime.ParamLocationQuery, *params.SearchId); err != nil { + return nil, err + } else if 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.SearchText != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchText", runtime.ParamLocationQuery, *params.SearchText); err != nil { + return nil, err + } else if 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() } - queryURL, err := serverURL.Parse(operationPath) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + return req, nil +} + +// NewTransferDeploymentRequest calls the generic TransferDeployment builder with application/json body +func NewTransferDeploymentRequest(server string, organizationId string, deploymentId string, body TransferDeploymentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - return req, nil + bodyReader = bytes.NewReader(buf) + return NewTransferDeploymentRequestWithBody(server, organizationId, deploymentId, "application/json", bodyReader) } -// NewDeleteUserInviteRequest generates requests for DeleteUserInvite -func NewDeleteUserInviteRequest(server string, organizationId string, inviteId string) (*http.Request, error) { +// NewTransferDeploymentRequestWithBody generates requests for TransferDeployment with any type of body +func NewTransferDeploymentRequestWithBody(server string, organizationId string, deploymentId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6714,7 +6747,7 @@ func NewDeleteUserInviteRequest(server string, organizationId string, inviteId s var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "inviteId", runtime.ParamLocationPath, inviteId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) if err != nil { return nil, err } @@ -6724,7 +6757,7 @@ func NewDeleteUserInviteRequest(server string, organizationId string, inviteId s return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/invites/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/deployments/%s/transfer", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6734,50 +6767,18 @@ func NewDeleteUserInviteRequest(server string, organizationId string, inviteId s return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetCreditSummaryRequest generates requests for GetCreditSummary -func NewGetCreditSummaryRequest(server string, organizationId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/%s/metronome/credit-summary", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + req.Header.Add("Content-Type", contentType) return req, nil } -// NewGetMetronomeDashboardRequest generates requests for GetMetronomeDashboard -func NewGetMetronomeDashboardRequest(server string, organizationId string, pType GetMetronomeDashboardParamsType, params *GetMetronomeDashboardParams) (*http.Request, error) { +// NewListEnvironmentObjectsRequest generates requests for ListEnvironmentObjects +func NewListEnvironmentObjectsRequest(server string, organizationId string, params *ListEnvironmentObjectsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6787,19 +6788,12 @@ func NewGetMetronomeDashboardRequest(server string, organizationId string, pType return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "type", runtime.ParamLocationPath, pType) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/metronome/dashboard/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/environment-objects", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6812,9 +6806,9 @@ func NewGetMetronomeDashboardRequest(server string, organizationId string, pType if params != nil { queryValues := queryURL.Query() - if params.ShowZeroUsageLineItems != nil { + if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "showZeroUsageLineItems", runtime.ParamLocationQuery, *params.ShowZeroUsageLineItems); err != 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 @@ -6828,9 +6822,9 @@ func NewGetMetronomeDashboardRequest(server string, organizationId string, pType } - if params.ColorOverrides != nil { + if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "colorOverrides", runtime.ParamLocationQuery, *params.ColorOverrides); err != 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 @@ -6844,177 +6838,135 @@ func NewGetMetronomeDashboardRequest(server string, organizationId string, pType } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetPaymentMethodRequest generates requests for GetPaymentMethod -func NewGetPaymentMethodRequest(server string, organizationId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/%s/payment-method", 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 -} - -// NewDeleteSsoBypassKeyRequest generates requests for DeleteSsoBypassKey -func NewDeleteSsoBypassKeyRequest(server string, organizationId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/%s/sso-bypass-key", 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 -} + if params.Sorts != nil { -// NewGetSsoBypassKeyRequest generates requests for GetSsoBypassKey -func NewGetSsoBypassKeyRequest(server string, organizationId string) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sorts", runtime.ParamLocationQuery, *params.Sorts); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - var pathParam0 string + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } + if params.WorkspaceId != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workspaceId", runtime.ParamLocationQuery, *params.WorkspaceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/organizations/%s/sso-bypass-key", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if params.DeploymentId != nil { - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deploymentId", runtime.ParamLocationQuery, *params.DeploymentId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - return req, nil -} + } -// NewUpsertSsoBypassKeyRequest generates requests for UpsertSsoBypassKey -func NewUpsertSsoBypassKeyRequest(server string, organizationId string) (*http.Request, error) { - var err error + if params.ProjectId != nil { - var pathParam0 string + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectId", 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) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if params.ObjectType != nil { - operationPath := fmt.Sprintf("/organizations/%s/sso-bypass-key", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "objectType", runtime.ParamLocationQuery, *params.ObjectType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + } - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } + if params.ObjectKey != nil { - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "objectKey", runtime.ParamLocationQuery, *params.ObjectKey); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewListSsoConnectionsRequest generates requests for ListSsoConnections -func NewListSsoConnectionsRequest(server string, organizationId string) (*http.Request, error) { - var err error + } - var pathParam0 string + if params.ShowSecrets != nil { - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "showSecrets", runtime.ParamLocationQuery, *params.ShowSecrets); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + } - operationPath := fmt.Sprintf("/organizations/%s/sso-connections", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.ResolveLinked != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "resolveLinked", runtime.ParamLocationQuery, *params.ResolveLinked); err != nil { + return nil, err + } else if 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) @@ -7025,19 +6977,19 @@ func NewListSsoConnectionsRequest(server string, organizationId string) (*http.R return req, nil } -// NewCreateSsoConnectionRequest calls the generic CreateSsoConnection builder with application/json body -func NewCreateSsoConnectionRequest(server string, organizationId string, body CreateSsoConnectionJSONRequestBody) (*http.Request, error) { +// NewCreateEnvironmentObjectRequest calls the generic CreateEnvironmentObject builder with application/json body +func NewCreateEnvironmentObjectRequest(server string, organizationId string, body CreateEnvironmentObjectJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSsoConnectionRequestWithBody(server, organizationId, "application/json", bodyReader) + return NewCreateEnvironmentObjectRequestWithBody(server, organizationId, "application/json", bodyReader) } -// NewCreateSsoConnectionRequestWithBody generates requests for CreateSsoConnection with any type of body -func NewCreateSsoConnectionRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateEnvironmentObjectRequestWithBody generates requests for CreateEnvironmentObject with any type of body +func NewCreateEnvironmentObjectRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7052,7 +7004,7 @@ func NewCreateSsoConnectionRequestWithBody(server string, organizationId string, return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/sso-connections", pathParam0) + operationPath := fmt.Sprintf("/organizations/%s/environment-objects", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7072,8 +7024,8 @@ func NewCreateSsoConnectionRequestWithBody(server string, organizationId string, return req, nil } -// NewDeleteSsoConnectionRequest generates requests for DeleteSsoConnection -func NewDeleteSsoConnectionRequest(server string, organizationId string, connectionId string) (*http.Request, error) { +// NewDeleteEnvironmentObjectRequest generates requests for DeleteEnvironmentObject +func NewDeleteEnvironmentObjectRequest(server string, organizationId string, environmentObjectId string) (*http.Request, error) { var err error var pathParam0 string @@ -7085,7 +7037,7 @@ func NewDeleteSsoConnectionRequest(server string, organizationId string, connect var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connectionId", runtime.ParamLocationPath, connectionId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "environmentObjectId", runtime.ParamLocationPath, environmentObjectId) if err != nil { return nil, err } @@ -7095,7 +7047,7 @@ func NewDeleteSsoConnectionRequest(server string, organizationId string, connect return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/sso-connections/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/environment-objects/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7113,8 +7065,19 @@ func NewDeleteSsoConnectionRequest(server string, organizationId string, connect return req, nil } -// NewGetSsoConnectionRequest generates requests for GetSsoConnection -func NewGetSsoConnectionRequest(server string, organizationId string, connectionId string) (*http.Request, error) { +// NewUpdateEnvironmentObjectRequest calls the generic UpdateEnvironmentObject builder with application/json body +func NewUpdateEnvironmentObjectRequest(server string, organizationId string, environmentObjectId string, body UpdateEnvironmentObjectJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateEnvironmentObjectRequestWithBody(server, organizationId, environmentObjectId, "application/json", bodyReader) +} + +// NewUpdateEnvironmentObjectRequestWithBody generates requests for UpdateEnvironmentObject with any type of body +func NewUpdateEnvironmentObjectRequestWithBody(server string, organizationId string, environmentObjectId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7126,7 +7089,7 @@ func NewGetSsoConnectionRequest(server string, organizationId string, connection var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connectionId", runtime.ParamLocationPath, connectionId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "environmentObjectId", runtime.ParamLocationPath, environmentObjectId) if err != nil { return nil, err } @@ -7136,7 +7099,7 @@ func NewGetSsoConnectionRequest(server string, organizationId string, connection return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/sso-connections/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/environment-objects/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7146,27 +7109,29 @@ func NewGetSsoConnectionRequest(server string, organizationId string, connection return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewUpdateSsoConnectionRequest calls the generic UpdateSsoConnection builder with application/json body -func NewUpdateSsoConnectionRequest(server string, organizationId string, connectionId string, body UpdateSsoConnectionJSONRequestBody) (*http.Request, error) { +// NewCreateUserInviteRequest calls the generic CreateUserInvite builder with application/json body +func NewCreateUserInviteRequest(server string, organizationId string, body CreateUserInviteJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSsoConnectionRequestWithBody(server, organizationId, connectionId, "application/json", bodyReader) + return NewCreateUserInviteRequestWithBody(server, organizationId, "application/json", bodyReader) } -// NewUpdateSsoConnectionRequestWithBody generates requests for UpdateSsoConnection with any type of body -func NewUpdateSsoConnectionRequestWithBody(server string, organizationId string, connectionId string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateUserInviteRequestWithBody generates requests for CreateUserInvite with any type of body +func NewCreateUserInviteRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7176,19 +7141,12 @@ func NewUpdateSsoConnectionRequestWithBody(server string, organizationId string, return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connectionId", runtime.ParamLocationPath, connectionId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/sso-connections/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/invites", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7208,8 +7166,8 @@ func NewUpdateSsoConnectionRequestWithBody(server string, organizationId string, return req, nil } -// NewGetStripeClientSecretRequest generates requests for GetStripeClientSecret -func NewGetStripeClientSecretRequest(server string, organizationId string, pType GetStripeClientSecretParamsType) (*http.Request, error) { +// NewDeleteUserInviteRequest generates requests for DeleteUserInvite +func NewDeleteUserInviteRequest(server string, organizationId string, inviteId string) (*http.Request, error) { var err error var pathParam0 string @@ -7221,7 +7179,7 @@ func NewGetStripeClientSecretRequest(server string, organizationId string, pType var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "type", runtime.ParamLocationPath, pType) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "inviteId", runtime.ParamLocationPath, inviteId) if err != nil { return nil, err } @@ -7231,7 +7189,7 @@ func NewGetStripeClientSecretRequest(server string, organizationId string, pType return nil, err } - operationPath := fmt.Sprintf("/organizations/%s/stripe/client-secret/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/organizations/%s/invites/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7241,7 +7199,7 @@ func NewGetStripeClientSecretRequest(server string, organizationId string, pType return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -7948,53 +7906,6 @@ func NewMutateOrgUserRoleRequestWithBody(server string, organizationId string, u return req, nil } -// NewValidateCreditCardPaymentRequest calls the generic ValidateCreditCardPayment builder with application/json body -func NewValidateCreditCardPaymentRequest(server string, organizationId string, body ValidateCreditCardPaymentJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewValidateCreditCardPaymentRequestWithBody(server, organizationId, "application/json", bodyReader) -} - -// NewValidateCreditCardPaymentRequestWithBody generates requests for ValidateCreditCardPayment with any type of body -func NewValidateCreditCardPaymentRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/%s/validate-credit-card-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(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - // NewListWorkspacesRequest generates requests for ListWorkspaces func NewListWorkspacesRequest(server string, organizationId string, params *ListWorkspacesParams) (*http.Request, error) { var err error @@ -8964,67 +8875,6 @@ func NewListWorkspaceDagsRequest(server string, organizationId string, workspace return req, nil } -// NewUpdateDeploymentRequest calls the generic UpdateDeployment builder with application/json body -func NewUpdateDeploymentRequest(server string, organizationId string, workspaceId string, deploymentId string, body UpdateDeploymentJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateDeploymentRequestWithBody(server, organizationId, workspaceId, deploymentId, "application/json", bodyReader) -} - -// NewUpdateDeploymentRequestWithBody generates requests for UpdateDeployment with any type of body -func NewUpdateDeploymentRequestWithBody(server string, organizationId string, workspaceId string, deploymentId string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workspaceId", runtime.ParamLocationPath, workspaceId) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "deploymentId", runtime.ParamLocationPath, deploymentId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/%s/workspaces/%s/deployments/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - // NewListWorkspaceTeamsRequest generates requests for ListWorkspaceTeams func NewListWorkspaceTeamsRequest(server string, organizationId string, workspaceId string, params *ListWorkspaceTeamsParams) (*http.Request, error) { var err error @@ -9607,23 +9457,12 @@ type ClientWithResponsesInterface interface { // GetUserInvite request GetUserInviteWithResponse(ctx context.Context, inviteId string, reqEditors ...RequestEditorFn) (*GetUserInviteResponse, error) - // ValidateSsoLogin request with any body - ValidateSsoLoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateSsoLoginResponse, error) - - ValidateSsoLoginWithResponse(ctx context.Context, body ValidateSsoLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateSsoLoginResponse, error) - // GetSharedCluster request GetSharedClusterWithResponse(ctx context.Context, params *GetSharedClusterParams, reqEditors ...RequestEditorFn) (*GetSharedClusterResponse, error) // GetClusterOptions request GetClusterOptionsWithResponse(ctx context.Context, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*GetClusterOptionsResponse, error) - // GetDeploymentOptions request - GetDeploymentOptionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDeploymentOptionsResponse, error) - - // ListOrganizationAuthIds request - ListOrganizationAuthIdsWithResponse(ctx context.Context, params *ListOrganizationAuthIdsParams, reqEditors ...RequestEditorFn) (*ListOrganizationAuthIdsResponse, error) - // ListOrganizations request ListOrganizationsWithResponse(ctx context.Context, params *ListOrganizationsParams, reqEditors ...RequestEditorFn) (*ListOrganizationsResponse, error) @@ -9704,90 +9543,84 @@ type ClientWithResponsesInterface interface { // GetCluster request GetClusterWithResponse(ctx context.Context, organizationId string, clusterId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error) + // GetDeploymentOptions request + GetDeploymentOptionsWithResponse(ctx context.Context, organizationId string, params *GetDeploymentOptionsParams, reqEditors ...RequestEditorFn) (*GetDeploymentOptionsResponse, error) + // ListDeployments request ListDeploymentsWithResponse(ctx context.Context, organizationId string, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*ListDeploymentsResponse, error) - // GetDeploymentDagRuns request - GetDeploymentDagRunsWithResponse(ctx context.Context, organizationId string, deploymentId string, dagId string, params *GetDeploymentDagRunsParams, reqEditors ...RequestEditorFn) (*GetDeploymentDagRunsResponse, error) - - // GetDeploymentDagStructure request - GetDeploymentDagStructureWithResponse(ctx context.Context, organizationId string, deploymentId string, dagId string, reqEditors ...RequestEditorFn) (*GetDeploymentDagStructureResponse, error) - - // GetDeploymentLogs request - GetDeploymentLogsWithResponse(ctx context.Context, organizationId string, deploymentId string, params *GetDeploymentLogsParams, reqEditors ...RequestEditorFn) (*GetDeploymentLogsResponse, error) + // CreateDeployment request with any body + CreateDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error) - // ListManagedDomains request - ListManagedDomainsWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*ListManagedDomainsResponse, error) + CreateDeploymentWithResponse(ctx context.Context, organizationId string, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error) - // CreateManagedDomain request with any body - CreateManagedDomainWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDomainResponse, error) + // DeleteDeployment request + DeleteDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*DeleteDeploymentResponse, error) - CreateManagedDomainWithResponse(ctx context.Context, organizationId string, body CreateManagedDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDomainResponse, error) + // GetDeployment request + GetDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*GetDeploymentResponse, error) - // DeleteManagedDomain request - DeleteManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*DeleteManagedDomainResponse, error) + // UpdateDeployment request with any body + UpdateDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) - // GetManagedDomain request - GetManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*GetManagedDomainResponse, error) + UpdateDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) - // UpdateManagedDomain request with any body - UpdateManagedDomainWithBodyWithResponse(ctx context.Context, organizationId string, domainId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateManagedDomainResponse, error) + // ListDeploymentApiTokens request + ListDeploymentApiTokensWithResponse(ctx context.Context, organizationId string, deploymentId string, params *ListDeploymentApiTokensParams, reqEditors ...RequestEditorFn) (*ListDeploymentApiTokensResponse, error) - UpdateManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, body UpdateManagedDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateManagedDomainResponse, error) + // CreateDeploymentApiToken request with any body + CreateDeploymentApiTokenWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeploymentApiTokenResponse, error) - // VerifyManagedDomain request - VerifyManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*VerifyManagedDomainResponse, error) + CreateDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, body CreateDeploymentApiTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeploymentApiTokenResponse, error) - // GetDraftInvoice request - GetDraftInvoiceWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetDraftInvoiceResponse, error) + // DeleteDeploymentApiToken request + DeleteDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*DeleteDeploymentApiTokenResponse, error) - // CreateUserInvite request with any body - CreateUserInviteWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserInviteResponse, error) + // GetDeploymentApiToken request + GetDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*GetDeploymentApiTokenResponse, error) - CreateUserInviteWithResponse(ctx context.Context, organizationId string, body CreateUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserInviteResponse, error) + // UpdateDeploymentApiToken request with any body + UpdateDeploymentApiTokenWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentApiTokenResponse, error) - // DeleteUserInvite request - DeleteUserInviteWithResponse(ctx context.Context, organizationId string, inviteId string, reqEditors ...RequestEditorFn) (*DeleteUserInviteResponse, error) + UpdateDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, body UpdateDeploymentApiTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentApiTokenResponse, error) - // GetCreditSummary request - GetCreditSummaryWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetCreditSummaryResponse, error) + // RotateDeploymentApiToken request + RotateDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*RotateDeploymentApiTokenResponse, error) - // GetMetronomeDashboard request - GetMetronomeDashboardWithResponse(ctx context.Context, organizationId string, pType GetMetronomeDashboardParamsType, params *GetMetronomeDashboardParams, reqEditors ...RequestEditorFn) (*GetMetronomeDashboardResponse, error) + // GetDeploymentHealth request + GetDeploymentHealthWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*GetDeploymentHealthResponse, error) - // GetPaymentMethod request - GetPaymentMethodWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetPaymentMethodResponse, error) + // GetDeploymentLogs request + GetDeploymentLogsWithResponse(ctx context.Context, organizationId string, deploymentId string, params *GetDeploymentLogsParams, reqEditors ...RequestEditorFn) (*GetDeploymentLogsResponse, error) - // DeleteSsoBypassKey request - DeleteSsoBypassKeyWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*DeleteSsoBypassKeyResponse, error) + // TransferDeployment request with any body + TransferDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TransferDeploymentResponse, error) - // GetSsoBypassKey request - GetSsoBypassKeyWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetSsoBypassKeyResponse, error) + TransferDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, body TransferDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*TransferDeploymentResponse, error) - // UpsertSsoBypassKey request - UpsertSsoBypassKeyWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*UpsertSsoBypassKeyResponse, error) + // ListEnvironmentObjects request + ListEnvironmentObjectsWithResponse(ctx context.Context, organizationId string, params *ListEnvironmentObjectsParams, reqEditors ...RequestEditorFn) (*ListEnvironmentObjectsResponse, error) - // ListSsoConnections request - ListSsoConnectionsWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*ListSsoConnectionsResponse, error) + // CreateEnvironmentObject request with any body + CreateEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEnvironmentObjectResponse, error) - // CreateSsoConnection request with any body - CreateSsoConnectionWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSsoConnectionResponse, error) + CreateEnvironmentObjectWithResponse(ctx context.Context, organizationId string, body CreateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEnvironmentObjectResponse, error) - CreateSsoConnectionWithResponse(ctx context.Context, organizationId string, body CreateSsoConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSsoConnectionResponse, error) + // DeleteEnvironmentObject request + DeleteEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*DeleteEnvironmentObjectResponse, error) - // DeleteSsoConnection request - DeleteSsoConnectionWithResponse(ctx context.Context, organizationId string, connectionId string, reqEditors ...RequestEditorFn) (*DeleteSsoConnectionResponse, error) + // UpdateEnvironmentObject request with any body + UpdateEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateEnvironmentObjectResponse, error) - // GetSsoConnection request - GetSsoConnectionWithResponse(ctx context.Context, organizationId string, connectionId string, reqEditors ...RequestEditorFn) (*GetSsoConnectionResponse, error) + UpdateEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, body UpdateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateEnvironmentObjectResponse, error) - // UpdateSsoConnection request with any body - UpdateSsoConnectionWithBodyWithResponse(ctx context.Context, organizationId string, connectionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSsoConnectionResponse, error) + // CreateUserInvite request with any body + CreateUserInviteWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserInviteResponse, error) - UpdateSsoConnectionWithResponse(ctx context.Context, organizationId string, connectionId string, body UpdateSsoConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSsoConnectionResponse, error) + CreateUserInviteWithResponse(ctx context.Context, organizationId string, body CreateUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserInviteResponse, error) - // GetStripeClientSecret request - GetStripeClientSecretWithResponse(ctx context.Context, organizationId string, pType GetStripeClientSecretParamsType, reqEditors ...RequestEditorFn) (*GetStripeClientSecretResponse, error) + // DeleteUserInvite request + DeleteUserInviteWithResponse(ctx context.Context, organizationId string, inviteId string, reqEditors ...RequestEditorFn) (*DeleteUserInviteResponse, error) // ListOrganizationTeams request ListOrganizationTeamsWithResponse(ctx context.Context, organizationId string, params *ListOrganizationTeamsParams, reqEditors ...RequestEditorFn) (*ListOrganizationTeamsResponse, error) @@ -9835,11 +9668,6 @@ type ClientWithResponsesInterface interface { MutateOrgUserRoleWithResponse(ctx context.Context, organizationId string, userId string, body MutateOrgUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*MutateOrgUserRoleResponse, error) - // ValidateCreditCardPayment request with any body - ValidateCreditCardPaymentWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateCreditCardPaymentResponse, error) - - ValidateCreditCardPaymentWithResponse(ctx context.Context, organizationId string, body ValidateCreditCardPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateCreditCardPaymentResponse, error) - // ListWorkspaces request ListWorkspacesWithResponse(ctx context.Context, organizationId string, params *ListWorkspacesParams, reqEditors ...RequestEditorFn) (*ListWorkspacesResponse, error) @@ -9887,11 +9715,6 @@ type ClientWithResponsesInterface interface { // ListWorkspaceDags request ListWorkspaceDagsWithResponse(ctx context.Context, organizationId string, workspaceId string, params *ListWorkspaceDagsParams, reqEditors ...RequestEditorFn) (*ListWorkspaceDagsResponse, error) - // UpdateDeployment request with any body - UpdateDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, workspaceId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) - - UpdateDeploymentWithResponse(ctx context.Context, organizationId string, workspaceId string, deploymentId string, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) - // ListWorkspaceTeams request ListWorkspaceTeamsWithResponse(ctx context.Context, organizationId string, workspaceId string, params *ListWorkspaceTeamsParams, reqEditors ...RequestEditorFn) (*ListWorkspaceTeamsResponse, error) @@ -9912,102 +9735,21 @@ type ClientWithResponsesInterface interface { // MutateWorkspaceUserRole request with any body MutateWorkspaceUserRoleWithBodyWithResponse(ctx context.Context, organizationId string, workspaceId string, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MutateWorkspaceUserRoleResponse, error) - MutateWorkspaceUserRoleWithResponse(ctx context.Context, organizationId string, workspaceId string, userId string, body MutateWorkspaceUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*MutateWorkspaceUserRoleResponse, error) - - // GetSelfUser request - GetSelfUserWithResponse(ctx context.Context, params *GetSelfUserParams, reqEditors ...RequestEditorFn) (*GetSelfUserResponse, error) - - // UpdateSelfUserInvite request with any body - UpdateSelfUserInviteWithBodyWithResponse(ctx context.Context, inviteId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSelfUserInviteResponse, error) - - UpdateSelfUserInviteWithResponse(ctx context.Context, inviteId string, body UpdateSelfUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSelfUserInviteResponse, error) -} - -type GetUserInviteResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Invite - JSON400 *Error - JSON401 *Error - JSON403 *Error - JSON404 *Error - JSON500 *Error -} - -// Status returns HTTPResponse.Status -func (r GetUserInviteResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetUserInviteResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ValidateSsoLoginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SsoLoginCallback - JSON400 *Error - JSON401 *Error - JSON403 *Error - JSON404 *Error - JSON500 *Error -} - -// Status returns HTTPResponse.Status -func (r ValidateSsoLoginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ValidateSsoLoginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSharedClusterResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SharedCluster - JSON400 *Error - JSON401 *Error - JSON403 *Error - JSON404 *Error - JSON500 *Error -} - -// Status returns HTTPResponse.Status -func (r GetSharedClusterResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSharedClusterResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 + MutateWorkspaceUserRoleWithResponse(ctx context.Context, organizationId string, workspaceId string, userId string, body MutateWorkspaceUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*MutateWorkspaceUserRoleResponse, error) + + // GetSelfUser request + GetSelfUserWithResponse(ctx context.Context, params *GetSelfUserParams, reqEditors ...RequestEditorFn) (*GetSelfUserResponse, error) + + // UpdateSelfUserInvite request with any body + UpdateSelfUserInviteWithBodyWithResponse(ctx context.Context, inviteId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSelfUserInviteResponse, error) + + UpdateSelfUserInviteWithResponse(ctx context.Context, inviteId string, body UpdateSelfUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSelfUserInviteResponse, error) } -type GetClusterOptionsResponse struct { +type GetUserInviteResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]ClusterOptions + JSON200 *Invite JSON400 *Error JSON401 *Error JSON403 *Error @@ -10016,7 +9758,7 @@ type GetClusterOptionsResponse struct { } // Status returns HTTPResponse.Status -func (r GetClusterOptionsResponse) Status() string { +func (r GetUserInviteResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10024,25 +9766,26 @@ func (r GetClusterOptionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetClusterOptionsResponse) StatusCode() int { +func (r GetUserInviteResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDeploymentOptionsResponse struct { +type GetSharedClusterResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DeploymentOptions + JSON200 *SharedCluster JSON400 *Error JSON401 *Error JSON403 *Error + JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r GetDeploymentOptionsResponse) Status() string { +func (r GetSharedClusterResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10050,25 +9793,26 @@ func (r GetDeploymentOptionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDeploymentOptionsResponse) StatusCode() int { +func (r GetSharedClusterResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListOrganizationAuthIdsResponse struct { +type GetClusterOptionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]string + JSON200 *[]ClusterOptions JSON400 *Error JSON401 *Error JSON403 *Error + JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r ListOrganizationAuthIdsResponse) Status() string { +func (r GetClusterOptionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10076,7 +9820,7 @@ func (r ListOrganizationAuthIdsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListOrganizationAuthIdsResponse) StatusCode() int { +func (r GetClusterOptionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10621,125 +10365,18 @@ func (r GetClusterResponse) StatusCode() int { return 0 } -type ListDeploymentsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeploymentsPaginated - JSON400 *Error - JSON401 *Error - JSON403 *Error - JSON500 *Error -} - -// Status returns HTTPResponse.Status -func (r ListDeploymentsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListDeploymentsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDeploymentDagRunsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *InternalPaginationResultDagRunWithTaskInstances - JSON400 *Error - JSON401 *Error - JSON403 *Error - JSON404 *Error - JSON500 *Error -} - -// Status returns HTTPResponse.Status -func (r GetDeploymentDagRunsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDeploymentDagRunsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDeploymentDagStructureResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *InternalDagStructure - JSON400 *Error - JSON401 *Error - JSON403 *Error - JSON404 *Error - JSON500 *Error -} - -// Status returns HTTPResponse.Status -func (r GetDeploymentDagStructureResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDeploymentDagStructureResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDeploymentLogsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeploymentLog - JSON400 *Error - JSON401 *Error - JSON403 *Error - JSON500 *Error -} - -// Status returns HTTPResponse.Status -func (r GetDeploymentLogsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDeploymentLogsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListManagedDomainsResponse struct { +type GetDeploymentOptionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]ManagedDomain + JSON200 *DeploymentOptions JSON400 *Error JSON401 *Error JSON403 *Error - JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r ListManagedDomainsResponse) Status() string { +func (r GetDeploymentOptionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10747,26 +10384,25 @@ func (r ListManagedDomainsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListManagedDomainsResponse) StatusCode() int { +func (r GetDeploymentOptionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateManagedDomainResponse struct { +type ListDeploymentsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ManagedDomain + JSON200 *DeploymentsPaginated JSON400 *Error JSON401 *Error JSON403 *Error - JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r CreateManagedDomainResponse) Status() string { +func (r ListDeploymentsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10774,25 +10410,25 @@ func (r CreateManagedDomainResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateManagedDomainResponse) StatusCode() int { +func (r ListDeploymentsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteManagedDomainResponse struct { +type CreateDeploymentResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *Deployment JSON400 *Error JSON401 *Error JSON403 *Error - JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r DeleteManagedDomainResponse) Status() string { +func (r CreateDeploymentResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10800,17 +10436,16 @@ func (r DeleteManagedDomainResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteManagedDomainResponse) StatusCode() int { +func (r CreateDeploymentResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetManagedDomainResponse struct { +type DeleteDeploymentResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ManagedDomain JSON400 *Error JSON401 *Error JSON403 *Error @@ -10819,7 +10454,7 @@ type GetManagedDomainResponse struct { } // Status returns HTTPResponse.Status -func (r GetManagedDomainResponse) Status() string { +func (r DeleteDeploymentResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10827,17 +10462,17 @@ func (r GetManagedDomainResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetManagedDomainResponse) StatusCode() int { +func (r DeleteDeploymentResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateManagedDomainResponse struct { +type GetDeploymentResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ManagedDomain + JSON200 *Deployment JSON400 *Error JSON401 *Error JSON403 *Error @@ -10846,7 +10481,7 @@ type UpdateManagedDomainResponse struct { } // Status returns HTTPResponse.Status -func (r UpdateManagedDomainResponse) Status() string { +func (r GetDeploymentResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10854,17 +10489,17 @@ func (r UpdateManagedDomainResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateManagedDomainResponse) StatusCode() int { +func (r GetDeploymentResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type VerifyManagedDomainResponse struct { +type UpdateDeploymentResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ManagedDomain + JSON200 *Deployment JSON400 *Error JSON401 *Error JSON403 *Error @@ -10873,7 +10508,7 @@ type VerifyManagedDomainResponse struct { } // Status returns HTTPResponse.Status -func (r VerifyManagedDomainResponse) Status() string { +func (r UpdateDeploymentResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10881,17 +10516,17 @@ func (r VerifyManagedDomainResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r VerifyManagedDomainResponse) StatusCode() int { +func (r UpdateDeploymentResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDraftInvoiceResponse struct { +type ListDeploymentApiTokensResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Invoice + JSON200 *ListApiTokensPaginated JSON400 *Error JSON401 *Error JSON403 *Error @@ -10900,7 +10535,7 @@ type GetDraftInvoiceResponse struct { } // Status returns HTTPResponse.Status -func (r GetDraftInvoiceResponse) Status() string { +func (r ListDeploymentApiTokensResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10908,17 +10543,17 @@ func (r GetDraftInvoiceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDraftInvoiceResponse) StatusCode() int { +func (r ListDeploymentApiTokensResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateUserInviteResponse struct { +type CreateDeploymentApiTokenResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Invite + JSON200 *ApiToken JSON400 *Error JSON401 *Error JSON403 *Error @@ -10927,7 +10562,7 @@ type CreateUserInviteResponse struct { } // Status returns HTTPResponse.Status -func (r CreateUserInviteResponse) Status() string { +func (r CreateDeploymentApiTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10935,14 +10570,14 @@ func (r CreateUserInviteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateUserInviteResponse) StatusCode() int { +func (r CreateDeploymentApiTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteUserInviteResponse struct { +type DeleteDeploymentApiTokenResponse struct { Body []byte HTTPResponse *http.Response JSON400 *Error @@ -10953,7 +10588,7 @@ type DeleteUserInviteResponse struct { } // Status returns HTTPResponse.Status -func (r DeleteUserInviteResponse) Status() string { +func (r DeleteDeploymentApiTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10961,17 +10596,17 @@ func (r DeleteUserInviteResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteUserInviteResponse) StatusCode() int { +func (r DeleteDeploymentApiTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetCreditSummaryResponse struct { +type GetDeploymentApiTokenResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CreditSummary + JSON200 *ApiToken JSON400 *Error JSON401 *Error JSON403 *Error @@ -10980,7 +10615,7 @@ type GetCreditSummaryResponse struct { } // Status returns HTTPResponse.Status -func (r GetCreditSummaryResponse) Status() string { +func (r GetDeploymentApiTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10988,17 +10623,17 @@ func (r GetCreditSummaryResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetCreditSummaryResponse) StatusCode() int { +func (r GetDeploymentApiTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetMetronomeDashboardResponse struct { +type UpdateDeploymentApiTokenResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MetronomeDashboard + JSON200 *ApiToken JSON400 *Error JSON401 *Error JSON403 *Error @@ -11007,7 +10642,7 @@ type GetMetronomeDashboardResponse struct { } // Status returns HTTPResponse.Status -func (r GetMetronomeDashboardResponse) Status() string { +func (r UpdateDeploymentApiTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11015,17 +10650,17 @@ func (r GetMetronomeDashboardResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMetronomeDashboardResponse) StatusCode() int { +func (r UpdateDeploymentApiTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetPaymentMethodResponse struct { +type RotateDeploymentApiTokenResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaymentMethod + JSON200 *ApiToken JSON400 *Error JSON401 *Error JSON403 *Error @@ -11034,7 +10669,7 @@ type GetPaymentMethodResponse struct { } // Status returns HTTPResponse.Status -func (r GetPaymentMethodResponse) Status() string { +func (r RotateDeploymentApiTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11042,16 +10677,17 @@ func (r GetPaymentMethodResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetPaymentMethodResponse) StatusCode() int { +func (r RotateDeploymentApiTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteSsoBypassKeyResponse struct { +type GetDeploymentHealthResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *GenericJSON JSON400 *Error JSON401 *Error JSON403 *Error @@ -11060,7 +10696,7 @@ type DeleteSsoBypassKeyResponse struct { } // Status returns HTTPResponse.Status -func (r DeleteSsoBypassKeyResponse) Status() string { +func (r GetDeploymentHealthResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11068,26 +10704,25 @@ func (r DeleteSsoBypassKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSsoBypassKeyResponse) StatusCode() int { +func (r GetDeploymentHealthResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSsoBypassKeyResponse struct { +type GetDeploymentLogsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SsoBypassKey + JSON200 *DeploymentLog JSON400 *Error JSON401 *Error JSON403 *Error - JSON404 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r GetSsoBypassKeyResponse) Status() string { +func (r GetDeploymentLogsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11095,17 +10730,17 @@ func (r GetSsoBypassKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSsoBypassKeyResponse) StatusCode() int { +func (r GetDeploymentLogsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpsertSsoBypassKeyResponse struct { +type TransferDeploymentResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SsoBypassKey + JSON200 *Deployment JSON400 *Error JSON401 *Error JSON403 *Error @@ -11114,7 +10749,7 @@ type UpsertSsoBypassKeyResponse struct { } // Status returns HTTPResponse.Status -func (r UpsertSsoBypassKeyResponse) Status() string { +func (r TransferDeploymentResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11122,18 +10757,17 @@ func (r UpsertSsoBypassKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpsertSsoBypassKeyResponse) StatusCode() int { +func (r TransferDeploymentResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSsoConnectionsResponse struct { +type ListEnvironmentObjectsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]SsoConnection - JSON400 *Error + JSON200 *EnvironmentObjectsPaginated JSON401 *Error JSON403 *Error JSON404 *Error @@ -11141,7 +10775,7 @@ type ListSsoConnectionsResponse struct { } // Status returns HTTPResponse.Status -func (r ListSsoConnectionsResponse) Status() string { +func (r ListEnvironmentObjectsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11149,26 +10783,26 @@ func (r ListSsoConnectionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSsoConnectionsResponse) StatusCode() int { +func (r ListEnvironmentObjectsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSsoConnectionResponse struct { +type CreateEnvironmentObjectResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SsoConnection - JSON400 *Error + JSON200 *CreateEnvironmentObject JSON401 *Error JSON403 *Error JSON404 *Error + JSON409 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r CreateSsoConnectionResponse) Status() string { +func (r CreateEnvironmentObjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11176,25 +10810,25 @@ func (r CreateSsoConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSsoConnectionResponse) StatusCode() int { +func (r CreateEnvironmentObjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteSsoConnectionResponse struct { +type DeleteEnvironmentObjectResponse struct { Body []byte HTTPResponse *http.Response - JSON400 *Error JSON401 *Error JSON403 *Error JSON404 *Error + JSON409 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r DeleteSsoConnectionResponse) Status() string { +func (r DeleteEnvironmentObjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11202,26 +10836,25 @@ func (r DeleteSsoConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSsoConnectionResponse) StatusCode() int { +func (r DeleteEnvironmentObjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSsoConnectionResponse struct { +type UpdateEnvironmentObjectResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SsoConnection - JSON400 *Error JSON401 *Error JSON403 *Error JSON404 *Error + JSON409 *Error JSON500 *Error } // Status returns HTTPResponse.Status -func (r GetSsoConnectionResponse) Status() string { +func (r UpdateEnvironmentObjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11229,17 +10862,17 @@ func (r GetSsoConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSsoConnectionResponse) StatusCode() int { +func (r UpdateEnvironmentObjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSsoConnectionResponse struct { +type CreateUserInviteResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SsoConnection + JSON200 *Invite JSON400 *Error JSON401 *Error JSON403 *Error @@ -11248,7 +10881,7 @@ type UpdateSsoConnectionResponse struct { } // Status returns HTTPResponse.Status -func (r UpdateSsoConnectionResponse) Status() string { +func (r CreateUserInviteResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11256,17 +10889,16 @@ func (r UpdateSsoConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSsoConnectionResponse) StatusCode() int { +func (r CreateUserInviteResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetStripeClientSecretResponse struct { +type DeleteUserInviteResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *StripeClientSecret JSON400 *Error JSON401 *Error JSON403 *Error @@ -11275,7 +10907,7 @@ type GetStripeClientSecretResponse struct { } // Status returns HTTPResponse.Status -func (r GetStripeClientSecretResponse) Status() string { +func (r DeleteUserInviteResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11283,7 +10915,7 @@ func (r GetStripeClientSecretResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetStripeClientSecretResponse) StatusCode() int { +func (r DeleteUserInviteResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11609,33 +11241,6 @@ func (r MutateOrgUserRoleResponse) StatusCode() int { return 0 } -type ValidateCreditCardPaymentResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ValidateCreditCardPayment - JSON400 *Error - JSON401 *Error - JSON403 *Error - JSON404 *Error - JSON500 *Error -} - -// Status returns HTTPResponse.Status -func (r ValidateCreditCardPaymentResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ValidateCreditCardPaymentResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type ListWorkspacesResponse struct { Body []byte HTTPResponse *http.Response @@ -11984,33 +11589,6 @@ func (r ListWorkspaceDagsResponse) StatusCode() int { return 0 } -type UpdateDeploymentResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Deployment - JSON400 *Error - JSON401 *Error - JSON403 *Error - JSON404 *Error - JSON500 *Error -} - -// Status returns HTTPResponse.Status -func (r UpdateDeploymentResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateDeploymentResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type ListWorkspaceTeamsResponse struct { Body []byte HTTPResponse *http.Response @@ -12233,23 +11811,6 @@ func (c *ClientWithResponses) GetUserInviteWithResponse(ctx context.Context, inv return ParseGetUserInviteResponse(rsp) } -// ValidateSsoLoginWithBodyWithResponse request with arbitrary body returning *ValidateSsoLoginResponse -func (c *ClientWithResponses) ValidateSsoLoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateSsoLoginResponse, error) { - rsp, err := c.ValidateSsoLoginWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseValidateSsoLoginResponse(rsp) -} - -func (c *ClientWithResponses) ValidateSsoLoginWithResponse(ctx context.Context, body ValidateSsoLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateSsoLoginResponse, error) { - rsp, err := c.ValidateSsoLogin(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseValidateSsoLoginResponse(rsp) -} - // GetSharedClusterWithResponse request returning *GetSharedClusterResponse func (c *ClientWithResponses) GetSharedClusterWithResponse(ctx context.Context, params *GetSharedClusterParams, reqEditors ...RequestEditorFn) (*GetSharedClusterResponse, error) { rsp, err := c.GetSharedCluster(ctx, params, reqEditors...) @@ -12260,30 +11821,12 @@ func (c *ClientWithResponses) GetSharedClusterWithResponse(ctx context.Context, } // GetClusterOptionsWithResponse request returning *GetClusterOptionsResponse -func (c *ClientWithResponses) GetClusterOptionsWithResponse(ctx context.Context, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*GetClusterOptionsResponse, error) { - rsp, err := c.GetClusterOptions(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetClusterOptionsResponse(rsp) -} - -// GetDeploymentOptionsWithResponse request returning *GetDeploymentOptionsResponse -func (c *ClientWithResponses) GetDeploymentOptionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDeploymentOptionsResponse, error) { - rsp, err := c.GetDeploymentOptions(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDeploymentOptionsResponse(rsp) -} - -// ListOrganizationAuthIdsWithResponse request returning *ListOrganizationAuthIdsResponse -func (c *ClientWithResponses) ListOrganizationAuthIdsWithResponse(ctx context.Context, params *ListOrganizationAuthIdsParams, reqEditors ...RequestEditorFn) (*ListOrganizationAuthIdsResponse, error) { - rsp, err := c.ListOrganizationAuthIds(ctx, params, reqEditors...) +func (c *ClientWithResponses) GetClusterOptionsWithResponse(ctx context.Context, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*GetClusterOptionsResponse, error) { + rsp, err := c.GetClusterOptions(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseListOrganizationAuthIdsResponse(rsp) + return ParseGetClusterOptionsResponse(rsp) } // ListOrganizationsWithResponse request returning *ListOrganizationsResponse @@ -12546,269 +12089,257 @@ func (c *ClientWithResponses) GetClusterWithResponse(ctx context.Context, organi return ParseGetClusterResponse(rsp) } -// ListDeploymentsWithResponse request returning *ListDeploymentsResponse -func (c *ClientWithResponses) ListDeploymentsWithResponse(ctx context.Context, organizationId string, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*ListDeploymentsResponse, error) { - rsp, err := c.ListDeployments(ctx, organizationId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListDeploymentsResponse(rsp) -} - -// GetDeploymentDagRunsWithResponse request returning *GetDeploymentDagRunsResponse -func (c *ClientWithResponses) GetDeploymentDagRunsWithResponse(ctx context.Context, organizationId string, deploymentId string, dagId string, params *GetDeploymentDagRunsParams, reqEditors ...RequestEditorFn) (*GetDeploymentDagRunsResponse, error) { - rsp, err := c.GetDeploymentDagRuns(ctx, organizationId, deploymentId, dagId, params, reqEditors...) +// GetDeploymentOptionsWithResponse request returning *GetDeploymentOptionsResponse +func (c *ClientWithResponses) GetDeploymentOptionsWithResponse(ctx context.Context, organizationId string, params *GetDeploymentOptionsParams, reqEditors ...RequestEditorFn) (*GetDeploymentOptionsResponse, error) { + rsp, err := c.GetDeploymentOptions(ctx, organizationId, params, reqEditors...) if err != nil { return nil, err } - return ParseGetDeploymentDagRunsResponse(rsp) + return ParseGetDeploymentOptionsResponse(rsp) } -// GetDeploymentDagStructureWithResponse request returning *GetDeploymentDagStructureResponse -func (c *ClientWithResponses) GetDeploymentDagStructureWithResponse(ctx context.Context, organizationId string, deploymentId string, dagId string, reqEditors ...RequestEditorFn) (*GetDeploymentDagStructureResponse, error) { - rsp, err := c.GetDeploymentDagStructure(ctx, organizationId, deploymentId, dagId, reqEditors...) +// ListDeploymentsWithResponse request returning *ListDeploymentsResponse +func (c *ClientWithResponses) ListDeploymentsWithResponse(ctx context.Context, organizationId string, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*ListDeploymentsResponse, error) { + rsp, err := c.ListDeployments(ctx, organizationId, params, reqEditors...) if err != nil { return nil, err } - return ParseGetDeploymentDagStructureResponse(rsp) + return ParseListDeploymentsResponse(rsp) } -// GetDeploymentLogsWithResponse request returning *GetDeploymentLogsResponse -func (c *ClientWithResponses) GetDeploymentLogsWithResponse(ctx context.Context, organizationId string, deploymentId string, params *GetDeploymentLogsParams, reqEditors ...RequestEditorFn) (*GetDeploymentLogsResponse, error) { - rsp, err := c.GetDeploymentLogs(ctx, organizationId, deploymentId, params, reqEditors...) +// CreateDeploymentWithBodyWithResponse request with arbitrary body returning *CreateDeploymentResponse +func (c *ClientWithResponses) CreateDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error) { + rsp, err := c.CreateDeploymentWithBody(ctx, organizationId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetDeploymentLogsResponse(rsp) + return ParseCreateDeploymentResponse(rsp) } -// ListManagedDomainsWithResponse request returning *ListManagedDomainsResponse -func (c *ClientWithResponses) ListManagedDomainsWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*ListManagedDomainsResponse, error) { - rsp, err := c.ListManagedDomains(ctx, organizationId, reqEditors...) +func (c *ClientWithResponses) CreateDeploymentWithResponse(ctx context.Context, organizationId string, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error) { + rsp, err := c.CreateDeployment(ctx, organizationId, body, reqEditors...) if err != nil { return nil, err } - return ParseListManagedDomainsResponse(rsp) + return ParseCreateDeploymentResponse(rsp) } -// CreateManagedDomainWithBodyWithResponse request with arbitrary body returning *CreateManagedDomainResponse -func (c *ClientWithResponses) CreateManagedDomainWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDomainResponse, error) { - rsp, err := c.CreateManagedDomainWithBody(ctx, organizationId, contentType, body, reqEditors...) +// DeleteDeploymentWithResponse request returning *DeleteDeploymentResponse +func (c *ClientWithResponses) DeleteDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*DeleteDeploymentResponse, error) { + rsp, err := c.DeleteDeployment(ctx, organizationId, deploymentId, reqEditors...) if err != nil { return nil, err } - return ParseCreateManagedDomainResponse(rsp) + return ParseDeleteDeploymentResponse(rsp) } -func (c *ClientWithResponses) CreateManagedDomainWithResponse(ctx context.Context, organizationId string, body CreateManagedDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDomainResponse, error) { - rsp, err := c.CreateManagedDomain(ctx, organizationId, body, reqEditors...) +// GetDeploymentWithResponse request returning *GetDeploymentResponse +func (c *ClientWithResponses) GetDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*GetDeploymentResponse, error) { + rsp, err := c.GetDeployment(ctx, organizationId, deploymentId, reqEditors...) if err != nil { return nil, err } - return ParseCreateManagedDomainResponse(rsp) + return ParseGetDeploymentResponse(rsp) } -// DeleteManagedDomainWithResponse request returning *DeleteManagedDomainResponse -func (c *ClientWithResponses) DeleteManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*DeleteManagedDomainResponse, error) { - rsp, err := c.DeleteManagedDomain(ctx, organizationId, domainId, reqEditors...) +// UpdateDeploymentWithBodyWithResponse request with arbitrary body returning *UpdateDeploymentResponse +func (c *ClientWithResponses) UpdateDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) { + rsp, err := c.UpdateDeploymentWithBody(ctx, organizationId, deploymentId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteManagedDomainResponse(rsp) + return ParseUpdateDeploymentResponse(rsp) } -// GetManagedDomainWithResponse request returning *GetManagedDomainResponse -func (c *ClientWithResponses) GetManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*GetManagedDomainResponse, error) { - rsp, err := c.GetManagedDomain(ctx, organizationId, domainId, reqEditors...) +func (c *ClientWithResponses) UpdateDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) { + rsp, err := c.UpdateDeployment(ctx, organizationId, deploymentId, body, reqEditors...) if err != nil { return nil, err } - return ParseGetManagedDomainResponse(rsp) + return ParseUpdateDeploymentResponse(rsp) } -// UpdateManagedDomainWithBodyWithResponse request with arbitrary body returning *UpdateManagedDomainResponse -func (c *ClientWithResponses) UpdateManagedDomainWithBodyWithResponse(ctx context.Context, organizationId string, domainId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateManagedDomainResponse, error) { - rsp, err := c.UpdateManagedDomainWithBody(ctx, organizationId, domainId, contentType, body, reqEditors...) +// ListDeploymentApiTokensWithResponse request returning *ListDeploymentApiTokensResponse +func (c *ClientWithResponses) ListDeploymentApiTokensWithResponse(ctx context.Context, organizationId string, deploymentId string, params *ListDeploymentApiTokensParams, reqEditors ...RequestEditorFn) (*ListDeploymentApiTokensResponse, error) { + rsp, err := c.ListDeploymentApiTokens(ctx, organizationId, deploymentId, params, reqEditors...) if err != nil { return nil, err } - return ParseUpdateManagedDomainResponse(rsp) + return ParseListDeploymentApiTokensResponse(rsp) } -func (c *ClientWithResponses) UpdateManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, body UpdateManagedDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateManagedDomainResponse, error) { - rsp, err := c.UpdateManagedDomain(ctx, organizationId, domainId, body, reqEditors...) +// CreateDeploymentApiTokenWithBodyWithResponse request with arbitrary body returning *CreateDeploymentApiTokenResponse +func (c *ClientWithResponses) CreateDeploymentApiTokenWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeploymentApiTokenResponse, error) { + rsp, err := c.CreateDeploymentApiTokenWithBody(ctx, organizationId, deploymentId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateManagedDomainResponse(rsp) + return ParseCreateDeploymentApiTokenResponse(rsp) } -// VerifyManagedDomainWithResponse request returning *VerifyManagedDomainResponse -func (c *ClientWithResponses) VerifyManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, reqEditors ...RequestEditorFn) (*VerifyManagedDomainResponse, error) { - rsp, err := c.VerifyManagedDomain(ctx, organizationId, domainId, reqEditors...) +func (c *ClientWithResponses) CreateDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, body CreateDeploymentApiTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeploymentApiTokenResponse, error) { + rsp, err := c.CreateDeploymentApiToken(ctx, organizationId, deploymentId, body, reqEditors...) if err != nil { return nil, err } - return ParseVerifyManagedDomainResponse(rsp) + return ParseCreateDeploymentApiTokenResponse(rsp) } -// GetDraftInvoiceWithResponse request returning *GetDraftInvoiceResponse -func (c *ClientWithResponses) GetDraftInvoiceWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetDraftInvoiceResponse, error) { - rsp, err := c.GetDraftInvoice(ctx, organizationId, reqEditors...) +// DeleteDeploymentApiTokenWithResponse request returning *DeleteDeploymentApiTokenResponse +func (c *ClientWithResponses) DeleteDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*DeleteDeploymentApiTokenResponse, error) { + rsp, err := c.DeleteDeploymentApiToken(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) if err != nil { return nil, err } - return ParseGetDraftInvoiceResponse(rsp) + return ParseDeleteDeploymentApiTokenResponse(rsp) } -// CreateUserInviteWithBodyWithResponse request with arbitrary body returning *CreateUserInviteResponse -func (c *ClientWithResponses) CreateUserInviteWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserInviteResponse, error) { - rsp, err := c.CreateUserInviteWithBody(ctx, organizationId, contentType, body, reqEditors...) +// GetDeploymentApiTokenWithResponse request returning *GetDeploymentApiTokenResponse +func (c *ClientWithResponses) GetDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*GetDeploymentApiTokenResponse, error) { + rsp, err := c.GetDeploymentApiToken(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) if err != nil { return nil, err } - return ParseCreateUserInviteResponse(rsp) + return ParseGetDeploymentApiTokenResponse(rsp) } -func (c *ClientWithResponses) CreateUserInviteWithResponse(ctx context.Context, organizationId string, body CreateUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserInviteResponse, error) { - rsp, err := c.CreateUserInvite(ctx, organizationId, body, reqEditors...) +// UpdateDeploymentApiTokenWithBodyWithResponse request with arbitrary body returning *UpdateDeploymentApiTokenResponse +func (c *ClientWithResponses) UpdateDeploymentApiTokenWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentApiTokenResponse, error) { + rsp, err := c.UpdateDeploymentApiTokenWithBody(ctx, organizationId, deploymentId, apiTokenId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateUserInviteResponse(rsp) + return ParseUpdateDeploymentApiTokenResponse(rsp) } -// DeleteUserInviteWithResponse request returning *DeleteUserInviteResponse -func (c *ClientWithResponses) DeleteUserInviteWithResponse(ctx context.Context, organizationId string, inviteId string, reqEditors ...RequestEditorFn) (*DeleteUserInviteResponse, error) { - rsp, err := c.DeleteUserInvite(ctx, organizationId, inviteId, reqEditors...) +func (c *ClientWithResponses) UpdateDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, body UpdateDeploymentApiTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentApiTokenResponse, error) { + rsp, err := c.UpdateDeploymentApiToken(ctx, organizationId, deploymentId, apiTokenId, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteUserInviteResponse(rsp) + return ParseUpdateDeploymentApiTokenResponse(rsp) } -// GetCreditSummaryWithResponse request returning *GetCreditSummaryResponse -func (c *ClientWithResponses) GetCreditSummaryWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetCreditSummaryResponse, error) { - rsp, err := c.GetCreditSummary(ctx, organizationId, reqEditors...) +// RotateDeploymentApiTokenWithResponse request returning *RotateDeploymentApiTokenResponse +func (c *ClientWithResponses) RotateDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...RequestEditorFn) (*RotateDeploymentApiTokenResponse, error) { + rsp, err := c.RotateDeploymentApiToken(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) if err != nil { return nil, err } - return ParseGetCreditSummaryResponse(rsp) + return ParseRotateDeploymentApiTokenResponse(rsp) } -// GetMetronomeDashboardWithResponse request returning *GetMetronomeDashboardResponse -func (c *ClientWithResponses) GetMetronomeDashboardWithResponse(ctx context.Context, organizationId string, pType GetMetronomeDashboardParamsType, params *GetMetronomeDashboardParams, reqEditors ...RequestEditorFn) (*GetMetronomeDashboardResponse, error) { - rsp, err := c.GetMetronomeDashboard(ctx, organizationId, pType, params, reqEditors...) +// GetDeploymentHealthWithResponse request returning *GetDeploymentHealthResponse +func (c *ClientWithResponses) GetDeploymentHealthWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*GetDeploymentHealthResponse, error) { + rsp, err := c.GetDeploymentHealth(ctx, organizationId, deploymentId, reqEditors...) if err != nil { return nil, err } - return ParseGetMetronomeDashboardResponse(rsp) + return ParseGetDeploymentHealthResponse(rsp) } -// GetPaymentMethodWithResponse request returning *GetPaymentMethodResponse -func (c *ClientWithResponses) GetPaymentMethodWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetPaymentMethodResponse, error) { - rsp, err := c.GetPaymentMethod(ctx, organizationId, reqEditors...) +// GetDeploymentLogsWithResponse request returning *GetDeploymentLogsResponse +func (c *ClientWithResponses) GetDeploymentLogsWithResponse(ctx context.Context, organizationId string, deploymentId string, params *GetDeploymentLogsParams, reqEditors ...RequestEditorFn) (*GetDeploymentLogsResponse, error) { + rsp, err := c.GetDeploymentLogs(ctx, organizationId, deploymentId, params, reqEditors...) if err != nil { return nil, err } - return ParseGetPaymentMethodResponse(rsp) + return ParseGetDeploymentLogsResponse(rsp) } -// DeleteSsoBypassKeyWithResponse request returning *DeleteSsoBypassKeyResponse -func (c *ClientWithResponses) DeleteSsoBypassKeyWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*DeleteSsoBypassKeyResponse, error) { - rsp, err := c.DeleteSsoBypassKey(ctx, organizationId, reqEditors...) +// TransferDeploymentWithBodyWithResponse request with arbitrary body returning *TransferDeploymentResponse +func (c *ClientWithResponses) TransferDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TransferDeploymentResponse, error) { + rsp, err := c.TransferDeploymentWithBody(ctx, organizationId, deploymentId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteSsoBypassKeyResponse(rsp) + return ParseTransferDeploymentResponse(rsp) } -// GetSsoBypassKeyWithResponse request returning *GetSsoBypassKeyResponse -func (c *ClientWithResponses) GetSsoBypassKeyWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetSsoBypassKeyResponse, error) { - rsp, err := c.GetSsoBypassKey(ctx, organizationId, reqEditors...) +func (c *ClientWithResponses) TransferDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, body TransferDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*TransferDeploymentResponse, error) { + rsp, err := c.TransferDeployment(ctx, organizationId, deploymentId, body, reqEditors...) if err != nil { return nil, err } - return ParseGetSsoBypassKeyResponse(rsp) + return ParseTransferDeploymentResponse(rsp) } -// UpsertSsoBypassKeyWithResponse request returning *UpsertSsoBypassKeyResponse -func (c *ClientWithResponses) UpsertSsoBypassKeyWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*UpsertSsoBypassKeyResponse, error) { - rsp, err := c.UpsertSsoBypassKey(ctx, organizationId, reqEditors...) +// ListEnvironmentObjectsWithResponse request returning *ListEnvironmentObjectsResponse +func (c *ClientWithResponses) ListEnvironmentObjectsWithResponse(ctx context.Context, organizationId string, params *ListEnvironmentObjectsParams, reqEditors ...RequestEditorFn) (*ListEnvironmentObjectsResponse, error) { + rsp, err := c.ListEnvironmentObjects(ctx, organizationId, params, reqEditors...) if err != nil { return nil, err } - return ParseUpsertSsoBypassKeyResponse(rsp) + return ParseListEnvironmentObjectsResponse(rsp) } -// ListSsoConnectionsWithResponse request returning *ListSsoConnectionsResponse -func (c *ClientWithResponses) ListSsoConnectionsWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*ListSsoConnectionsResponse, error) { - rsp, err := c.ListSsoConnections(ctx, organizationId, reqEditors...) +// CreateEnvironmentObjectWithBodyWithResponse request with arbitrary body returning *CreateEnvironmentObjectResponse +func (c *ClientWithResponses) CreateEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEnvironmentObjectResponse, error) { + rsp, err := c.CreateEnvironmentObjectWithBody(ctx, organizationId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseListSsoConnectionsResponse(rsp) + return ParseCreateEnvironmentObjectResponse(rsp) } -// CreateSsoConnectionWithBodyWithResponse request with arbitrary body returning *CreateSsoConnectionResponse -func (c *ClientWithResponses) CreateSsoConnectionWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSsoConnectionResponse, error) { - rsp, err := c.CreateSsoConnectionWithBody(ctx, organizationId, contentType, body, reqEditors...) +func (c *ClientWithResponses) CreateEnvironmentObjectWithResponse(ctx context.Context, organizationId string, body CreateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEnvironmentObjectResponse, error) { + rsp, err := c.CreateEnvironmentObject(ctx, organizationId, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateSsoConnectionResponse(rsp) + return ParseCreateEnvironmentObjectResponse(rsp) } -func (c *ClientWithResponses) CreateSsoConnectionWithResponse(ctx context.Context, organizationId string, body CreateSsoConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSsoConnectionResponse, error) { - rsp, err := c.CreateSsoConnection(ctx, organizationId, body, reqEditors...) +// DeleteEnvironmentObjectWithResponse request returning *DeleteEnvironmentObjectResponse +func (c *ClientWithResponses) DeleteEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*DeleteEnvironmentObjectResponse, error) { + rsp, err := c.DeleteEnvironmentObject(ctx, organizationId, environmentObjectId, reqEditors...) if err != nil { return nil, err } - return ParseCreateSsoConnectionResponse(rsp) + return ParseDeleteEnvironmentObjectResponse(rsp) } -// DeleteSsoConnectionWithResponse request returning *DeleteSsoConnectionResponse -func (c *ClientWithResponses) DeleteSsoConnectionWithResponse(ctx context.Context, organizationId string, connectionId string, reqEditors ...RequestEditorFn) (*DeleteSsoConnectionResponse, error) { - rsp, err := c.DeleteSsoConnection(ctx, organizationId, connectionId, reqEditors...) +// UpdateEnvironmentObjectWithBodyWithResponse request with arbitrary body returning *UpdateEnvironmentObjectResponse +func (c *ClientWithResponses) UpdateEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateEnvironmentObjectResponse, error) { + rsp, err := c.UpdateEnvironmentObjectWithBody(ctx, organizationId, environmentObjectId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteSsoConnectionResponse(rsp) + return ParseUpdateEnvironmentObjectResponse(rsp) } -// GetSsoConnectionWithResponse request returning *GetSsoConnectionResponse -func (c *ClientWithResponses) GetSsoConnectionWithResponse(ctx context.Context, organizationId string, connectionId string, reqEditors ...RequestEditorFn) (*GetSsoConnectionResponse, error) { - rsp, err := c.GetSsoConnection(ctx, organizationId, connectionId, reqEditors...) +func (c *ClientWithResponses) UpdateEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, body UpdateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateEnvironmentObjectResponse, error) { + rsp, err := c.UpdateEnvironmentObject(ctx, organizationId, environmentObjectId, body, reqEditors...) if err != nil { return nil, err } - return ParseGetSsoConnectionResponse(rsp) + return ParseUpdateEnvironmentObjectResponse(rsp) } -// UpdateSsoConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSsoConnectionResponse -func (c *ClientWithResponses) UpdateSsoConnectionWithBodyWithResponse(ctx context.Context, organizationId string, connectionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSsoConnectionResponse, error) { - rsp, err := c.UpdateSsoConnectionWithBody(ctx, organizationId, connectionId, contentType, body, reqEditors...) +// CreateUserInviteWithBodyWithResponse request with arbitrary body returning *CreateUserInviteResponse +func (c *ClientWithResponses) CreateUserInviteWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserInviteResponse, error) { + rsp, err := c.CreateUserInviteWithBody(ctx, organizationId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateSsoConnectionResponse(rsp) + return ParseCreateUserInviteResponse(rsp) } -func (c *ClientWithResponses) UpdateSsoConnectionWithResponse(ctx context.Context, organizationId string, connectionId string, body UpdateSsoConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSsoConnectionResponse, error) { - rsp, err := c.UpdateSsoConnection(ctx, organizationId, connectionId, body, reqEditors...) +func (c *ClientWithResponses) CreateUserInviteWithResponse(ctx context.Context, organizationId string, body CreateUserInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserInviteResponse, error) { + rsp, err := c.CreateUserInvite(ctx, organizationId, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateSsoConnectionResponse(rsp) + return ParseCreateUserInviteResponse(rsp) } -// GetStripeClientSecretWithResponse request returning *GetStripeClientSecretResponse -func (c *ClientWithResponses) GetStripeClientSecretWithResponse(ctx context.Context, organizationId string, pType GetStripeClientSecretParamsType, reqEditors ...RequestEditorFn) (*GetStripeClientSecretResponse, error) { - rsp, err := c.GetStripeClientSecret(ctx, organizationId, pType, reqEditors...) +// DeleteUserInviteWithResponse request returning *DeleteUserInviteResponse +func (c *ClientWithResponses) DeleteUserInviteWithResponse(ctx context.Context, organizationId string, inviteId string, reqEditors ...RequestEditorFn) (*DeleteUserInviteResponse, error) { + rsp, err := c.DeleteUserInvite(ctx, organizationId, inviteId, reqEditors...) if err != nil { return nil, err } - return ParseGetStripeClientSecretResponse(rsp) + return ParseDeleteUserInviteResponse(rsp) } // ListOrganizationTeamsWithResponse request returning *ListOrganizationTeamsResponse @@ -12959,23 +12490,6 @@ func (c *ClientWithResponses) MutateOrgUserRoleWithResponse(ctx context.Context, return ParseMutateOrgUserRoleResponse(rsp) } -// ValidateCreditCardPaymentWithBodyWithResponse request with arbitrary body returning *ValidateCreditCardPaymentResponse -func (c *ClientWithResponses) ValidateCreditCardPaymentWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateCreditCardPaymentResponse, error) { - rsp, err := c.ValidateCreditCardPaymentWithBody(ctx, organizationId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseValidateCreditCardPaymentResponse(rsp) -} - -func (c *ClientWithResponses) ValidateCreditCardPaymentWithResponse(ctx context.Context, organizationId string, body ValidateCreditCardPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateCreditCardPaymentResponse, error) { - rsp, err := c.ValidateCreditCardPayment(ctx, organizationId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseValidateCreditCardPaymentResponse(rsp) -} - // ListWorkspacesWithResponse request returning *ListWorkspacesResponse func (c *ClientWithResponses) ListWorkspacesWithResponse(ctx context.Context, organizationId string, params *ListWorkspacesParams, reqEditors ...RequestEditorFn) (*ListWorkspacesResponse, error) { rsp, err := c.ListWorkspaces(ctx, organizationId, params, reqEditors...) @@ -13125,23 +12639,6 @@ func (c *ClientWithResponses) ListWorkspaceDagsWithResponse(ctx context.Context, return ParseListWorkspaceDagsResponse(rsp) } -// UpdateDeploymentWithBodyWithResponse request with arbitrary body returning *UpdateDeploymentResponse -func (c *ClientWithResponses) UpdateDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, workspaceId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) { - rsp, err := c.UpdateDeploymentWithBody(ctx, organizationId, workspaceId, deploymentId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateDeploymentResponse(rsp) -} - -func (c *ClientWithResponses) UpdateDeploymentWithResponse(ctx context.Context, organizationId string, workspaceId string, deploymentId string, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) { - rsp, err := c.UpdateDeployment(ctx, organizationId, workspaceId, deploymentId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateDeploymentResponse(rsp) -} - // ListWorkspaceTeamsWithResponse request returning *ListWorkspaceTeamsResponse func (c *ClientWithResponses) ListWorkspaceTeamsWithResponse(ctx context.Context, organizationId string, workspaceId string, params *ListWorkspaceTeamsParams, reqEditors ...RequestEditorFn) (*ListWorkspaceTeamsResponse, error) { rsp, err := c.ListWorkspaceTeams(ctx, organizationId, workspaceId, params, reqEditors...) @@ -13237,206 +12734,23 @@ func (c *ClientWithResponses) UpdateSelfUserInviteWithResponse(ctx context.Conte } return ParseUpdateSelfUserInviteResponse(rsp) } - -// ParseGetUserInviteResponse parses an HTTP response from a GetUserInviteWithResponse call -func ParseGetUserInviteResponse(rsp *http.Response) (*GetUserInviteResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetUserInviteResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Invite - if 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 Error - if 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 Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseValidateSsoLoginResponse parses an HTTP response from a ValidateSsoLoginWithResponse call -func ParseValidateSsoLoginResponse(rsp *http.Response) (*ValidateSsoLoginResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ValidateSsoLoginResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SsoLoginCallback - if 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 Error - if 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 Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetSharedClusterResponse parses an HTTP response from a GetSharedClusterWithResponse call -func ParseGetSharedClusterResponse(rsp *http.Response) (*GetSharedClusterResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSharedClusterResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SharedCluster - if 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 Error - if 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 Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetClusterOptionsResponse parses an HTTP response from a GetClusterOptionsWithResponse call -func ParseGetClusterOptionsResponse(rsp *http.Response) (*GetClusterOptionsResponse, error) { + +// ParseGetUserInviteResponse parses an HTTP response from a GetUserInviteWithResponse call +func ParseGetUserInviteResponse(rsp *http.Response) (*GetUserInviteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetClusterOptionsResponse{ + response := &GetUserInviteResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []ClusterOptions + var dest Invite if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13482,22 +12796,22 @@ func ParseGetClusterOptionsResponse(rsp *http.Response) (*GetClusterOptionsRespo return response, nil } -// ParseGetDeploymentOptionsResponse parses an HTTP response from a GetDeploymentOptionsWithResponse call -func ParseGetDeploymentOptionsResponse(rsp *http.Response) (*GetDeploymentOptionsResponse, error) { +// ParseGetSharedClusterResponse parses an HTTP response from a GetSharedClusterWithResponse call +func ParseGetSharedClusterResponse(rsp *http.Response) (*GetSharedClusterResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetDeploymentOptionsResponse{ + response := &GetSharedClusterResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DeploymentOptions + var dest SharedCluster if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13524,6 +12838,13 @@ func ParseGetDeploymentOptionsResponse(rsp *http.Response) (*GetDeploymentOption } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13536,22 +12857,22 @@ func ParseGetDeploymentOptionsResponse(rsp *http.Response) (*GetDeploymentOption return response, nil } -// ParseListOrganizationAuthIdsResponse parses an HTTP response from a ListOrganizationAuthIdsWithResponse call -func ParseListOrganizationAuthIdsResponse(rsp *http.Response) (*ListOrganizationAuthIdsResponse, error) { +// ParseGetClusterOptionsResponse parses an HTTP response from a GetClusterOptionsWithResponse call +func ParseGetClusterOptionsResponse(rsp *http.Response) (*GetClusterOptionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListOrganizationAuthIdsResponse{ + response := &GetClusterOptionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []string + var dest []ClusterOptions if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13578,6 +12899,13 @@ func ParseListOrganizationAuthIdsResponse(rsp *http.Response) (*ListOrganization } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14796,252 +14124,22 @@ func ParseGetClusterResponse(rsp *http.Response) (*GetClusterResponse, error) { return response, nil } -// ParseListDeploymentsResponse parses an HTTP response from a ListDeploymentsWithResponse call -func ParseListDeploymentsResponse(rsp *http.Response) (*ListDeploymentsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListDeploymentsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DeploymentsPaginated - if 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 Error - if 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 Error - if 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 Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetDeploymentDagRunsResponse parses an HTTP response from a GetDeploymentDagRunsWithResponse call -func ParseGetDeploymentDagRunsResponse(rsp *http.Response) (*GetDeploymentDagRunsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDeploymentDagRunsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest InternalPaginationResultDagRunWithTaskInstances - if 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 Error - if 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 Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetDeploymentDagStructureResponse parses an HTTP response from a GetDeploymentDagStructureWithResponse call -func ParseGetDeploymentDagStructureResponse(rsp *http.Response) (*GetDeploymentDagStructureResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDeploymentDagStructureResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest InternalDagStructure - if 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 Error - if 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 Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetDeploymentLogsResponse parses an HTTP response from a GetDeploymentLogsWithResponse call -func ParseGetDeploymentLogsResponse(rsp *http.Response) (*GetDeploymentLogsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDeploymentLogsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DeploymentLog - if 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 Error - if 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 Error - if 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 Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseListManagedDomainsResponse parses an HTTP response from a ListManagedDomainsWithResponse call -func ParseListManagedDomainsResponse(rsp *http.Response) (*ListManagedDomainsResponse, error) { +// ParseGetDeploymentOptionsResponse parses an HTTP response from a GetDeploymentOptionsWithResponse call +func ParseGetDeploymentOptionsResponse(rsp *http.Response) (*GetDeploymentOptionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListManagedDomainsResponse{ + response := &GetDeploymentOptionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []ManagedDomain + var dest DeploymentOptions if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15068,13 +14166,6 @@ func ParseListManagedDomainsResponse(rsp *http.Response) (*ListManagedDomainsRes } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15087,22 +14178,22 @@ func ParseListManagedDomainsResponse(rsp *http.Response) (*ListManagedDomainsRes return response, nil } -// ParseCreateManagedDomainResponse parses an HTTP response from a CreateManagedDomainWithResponse call -func ParseCreateManagedDomainResponse(rsp *http.Response) (*CreateManagedDomainResponse, error) { +// ParseListDeploymentsResponse parses an HTTP response from a ListDeploymentsWithResponse call +func ParseListDeploymentsResponse(rsp *http.Response) (*ListDeploymentsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateManagedDomainResponse{ + response := &ListDeploymentsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ManagedDomain + var dest DeploymentsPaginated if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15129,13 +14220,6 @@ func ParseCreateManagedDomainResponse(rsp *http.Response) (*CreateManagedDomainR } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15148,20 +14232,27 @@ func ParseCreateManagedDomainResponse(rsp *http.Response) (*CreateManagedDomainR return response, nil } -// ParseDeleteManagedDomainResponse parses an HTTP response from a DeleteManagedDomainWithResponse call -func ParseDeleteManagedDomainResponse(rsp *http.Response) (*DeleteManagedDomainResponse, error) { +// ParseCreateDeploymentResponse parses an HTTP response from a CreateDeploymentWithResponse call +func ParseCreateDeploymentResponse(rsp *http.Response) (*CreateDeploymentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteManagedDomainResponse{ + response := &CreateDeploymentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Deployment + if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15183,13 +14274,6 @@ func ParseDeleteManagedDomainResponse(rsp *http.Response) (*DeleteManagedDomainR } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15202,27 +14286,20 @@ func ParseDeleteManagedDomainResponse(rsp *http.Response) (*DeleteManagedDomainR return response, nil } -// ParseGetManagedDomainResponse parses an HTTP response from a GetManagedDomainWithResponse call -func ParseGetManagedDomainResponse(rsp *http.Response) (*GetManagedDomainResponse, error) { +// ParseDeleteDeploymentResponse parses an HTTP response from a DeleteDeploymentWithResponse call +func ParseDeleteDeploymentResponse(rsp *http.Response) (*DeleteDeploymentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetManagedDomainResponse{ + response := &DeleteDeploymentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ManagedDomain - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15263,22 +14340,22 @@ func ParseGetManagedDomainResponse(rsp *http.Response) (*GetManagedDomainRespons return response, nil } -// ParseUpdateManagedDomainResponse parses an HTTP response from a UpdateManagedDomainWithResponse call -func ParseUpdateManagedDomainResponse(rsp *http.Response) (*UpdateManagedDomainResponse, error) { +// ParseGetDeploymentResponse parses an HTTP response from a GetDeploymentWithResponse call +func ParseGetDeploymentResponse(rsp *http.Response) (*GetDeploymentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateManagedDomainResponse{ + response := &GetDeploymentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ManagedDomain + var dest Deployment if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15324,22 +14401,22 @@ func ParseUpdateManagedDomainResponse(rsp *http.Response) (*UpdateManagedDomainR return response, nil } -// ParseVerifyManagedDomainResponse parses an HTTP response from a VerifyManagedDomainWithResponse call -func ParseVerifyManagedDomainResponse(rsp *http.Response) (*VerifyManagedDomainResponse, error) { +// ParseUpdateDeploymentResponse parses an HTTP response from a UpdateDeploymentWithResponse call +func ParseUpdateDeploymentResponse(rsp *http.Response) (*UpdateDeploymentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &VerifyManagedDomainResponse{ + response := &UpdateDeploymentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ManagedDomain + var dest Deployment if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15385,22 +14462,22 @@ func ParseVerifyManagedDomainResponse(rsp *http.Response) (*VerifyManagedDomainR return response, nil } -// ParseGetDraftInvoiceResponse parses an HTTP response from a GetDraftInvoiceWithResponse call -func ParseGetDraftInvoiceResponse(rsp *http.Response) (*GetDraftInvoiceResponse, error) { +// ParseListDeploymentApiTokensResponse parses an HTTP response from a ListDeploymentApiTokensWithResponse call +func ParseListDeploymentApiTokensResponse(rsp *http.Response) (*ListDeploymentApiTokensResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetDraftInvoiceResponse{ + response := &ListDeploymentApiTokensResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Invoice + var dest ListApiTokensPaginated if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15446,22 +14523,22 @@ func ParseGetDraftInvoiceResponse(rsp *http.Response) (*GetDraftInvoiceResponse, return response, nil } -// ParseCreateUserInviteResponse parses an HTTP response from a CreateUserInviteWithResponse call -func ParseCreateUserInviteResponse(rsp *http.Response) (*CreateUserInviteResponse, error) { +// ParseCreateDeploymentApiTokenResponse parses an HTTP response from a CreateDeploymentApiTokenWithResponse call +func ParseCreateDeploymentApiTokenResponse(rsp *http.Response) (*CreateDeploymentApiTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateUserInviteResponse{ + response := &CreateDeploymentApiTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Invite + var dest ApiToken if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15507,15 +14584,15 @@ func ParseCreateUserInviteResponse(rsp *http.Response) (*CreateUserInviteRespons return response, nil } -// ParseDeleteUserInviteResponse parses an HTTP response from a DeleteUserInviteWithResponse call -func ParseDeleteUserInviteResponse(rsp *http.Response) (*DeleteUserInviteResponse, error) { +// ParseDeleteDeploymentApiTokenResponse parses an HTTP response from a DeleteDeploymentApiTokenWithResponse call +func ParseDeleteDeploymentApiTokenResponse(rsp *http.Response) (*DeleteDeploymentApiTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteUserInviteResponse{ + response := &DeleteDeploymentApiTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -15561,22 +14638,22 @@ func ParseDeleteUserInviteResponse(rsp *http.Response) (*DeleteUserInviteRespons return response, nil } -// ParseGetCreditSummaryResponse parses an HTTP response from a GetCreditSummaryWithResponse call -func ParseGetCreditSummaryResponse(rsp *http.Response) (*GetCreditSummaryResponse, error) { +// ParseGetDeploymentApiTokenResponse parses an HTTP response from a GetDeploymentApiTokenWithResponse call +func ParseGetDeploymentApiTokenResponse(rsp *http.Response) (*GetDeploymentApiTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetCreditSummaryResponse{ + response := &GetDeploymentApiTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CreditSummary + var dest ApiToken if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15622,22 +14699,22 @@ func ParseGetCreditSummaryResponse(rsp *http.Response) (*GetCreditSummaryRespons return response, nil } -// ParseGetMetronomeDashboardResponse parses an HTTP response from a GetMetronomeDashboardWithResponse call -func ParseGetMetronomeDashboardResponse(rsp *http.Response) (*GetMetronomeDashboardResponse, error) { +// ParseUpdateDeploymentApiTokenResponse parses an HTTP response from a UpdateDeploymentApiTokenWithResponse call +func ParseUpdateDeploymentApiTokenResponse(rsp *http.Response) (*UpdateDeploymentApiTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMetronomeDashboardResponse{ + response := &UpdateDeploymentApiTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MetronomeDashboard + var dest ApiToken if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15683,22 +14760,22 @@ func ParseGetMetronomeDashboardResponse(rsp *http.Response) (*GetMetronomeDashbo return response, nil } -// ParseGetPaymentMethodResponse parses an HTTP response from a GetPaymentMethodWithResponse call -func ParseGetPaymentMethodResponse(rsp *http.Response) (*GetPaymentMethodResponse, error) { +// ParseRotateDeploymentApiTokenResponse parses an HTTP response from a RotateDeploymentApiTokenWithResponse call +func ParseRotateDeploymentApiTokenResponse(rsp *http.Response) (*RotateDeploymentApiTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPaymentMethodResponse{ + response := &RotateDeploymentApiTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PaymentMethod + var dest ApiToken if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15744,20 +14821,27 @@ func ParseGetPaymentMethodResponse(rsp *http.Response) (*GetPaymentMethodRespons return response, nil } -// ParseDeleteSsoBypassKeyResponse parses an HTTP response from a DeleteSsoBypassKeyWithResponse call -func ParseDeleteSsoBypassKeyResponse(rsp *http.Response) (*DeleteSsoBypassKeyResponse, error) { +// ParseGetDeploymentHealthResponse parses an HTTP response from a GetDeploymentHealthWithResponse call +func ParseGetDeploymentHealthResponse(rsp *http.Response) (*GetDeploymentHealthResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSsoBypassKeyResponse{ + response := &GetDeploymentHealthResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GenericJSON + if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15798,22 +14882,22 @@ func ParseDeleteSsoBypassKeyResponse(rsp *http.Response) (*DeleteSsoBypassKeyRes return response, nil } -// ParseGetSsoBypassKeyResponse parses an HTTP response from a GetSsoBypassKeyWithResponse call -func ParseGetSsoBypassKeyResponse(rsp *http.Response) (*GetSsoBypassKeyResponse, error) { +// ParseGetDeploymentLogsResponse parses an HTTP response from a GetDeploymentLogsWithResponse call +func ParseGetDeploymentLogsResponse(rsp *http.Response) (*GetDeploymentLogsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSsoBypassKeyResponse{ + response := &GetDeploymentLogsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SsoBypassKey + var dest DeploymentLog if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15840,13 +14924,6 @@ func ParseGetSsoBypassKeyResponse(rsp *http.Response) (*GetSsoBypassKeyResponse, } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15859,22 +14936,22 @@ func ParseGetSsoBypassKeyResponse(rsp *http.Response) (*GetSsoBypassKeyResponse, return response, nil } -// ParseUpsertSsoBypassKeyResponse parses an HTTP response from a UpsertSsoBypassKeyWithResponse call -func ParseUpsertSsoBypassKeyResponse(rsp *http.Response) (*UpsertSsoBypassKeyResponse, error) { +// ParseTransferDeploymentResponse parses an HTTP response from a TransferDeploymentWithResponse call +func ParseTransferDeploymentResponse(rsp *http.Response) (*TransferDeploymentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpsertSsoBypassKeyResponse{ + response := &TransferDeploymentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SsoBypassKey + var dest Deployment if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15920,34 +14997,27 @@ func ParseUpsertSsoBypassKeyResponse(rsp *http.Response) (*UpsertSsoBypassKeyRes return response, nil } -// ParseListSsoConnectionsResponse parses an HTTP response from a ListSsoConnectionsWithResponse call -func ParseListSsoConnectionsResponse(rsp *http.Response) (*ListSsoConnectionsResponse, error) { +// ParseListEnvironmentObjectsResponse parses an HTTP response from a ListEnvironmentObjectsWithResponse call +func ParseListEnvironmentObjectsResponse(rsp *http.Response) (*ListEnvironmentObjectsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSsoConnectionsResponse{ + response := &ListEnvironmentObjectsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []SsoConnection + var dest EnvironmentObjectsPaginated if 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 Error - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15981,34 +15051,27 @@ func ParseListSsoConnectionsResponse(rsp *http.Response) (*ListSsoConnectionsRes return response, nil } -// ParseCreateSsoConnectionResponse parses an HTTP response from a CreateSsoConnectionWithResponse call -func ParseCreateSsoConnectionResponse(rsp *http.Response) (*CreateSsoConnectionResponse, error) { +// ParseCreateEnvironmentObjectResponse parses an HTTP response from a CreateEnvironmentObjectWithResponse call +func ParseCreateEnvironmentObjectResponse(rsp *http.Response) (*CreateEnvironmentObjectResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSsoConnectionResponse{ + response := &CreateEnvironmentObjectResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SsoConnection + var dest CreateEnvironmentObject if 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 Error - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16030,6 +15093,13 @@ func ParseCreateSsoConnectionResponse(rsp *http.Response) (*CreateSsoConnectionR } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16042,27 +15112,20 @@ func ParseCreateSsoConnectionResponse(rsp *http.Response) (*CreateSsoConnectionR return response, nil } -// ParseDeleteSsoConnectionResponse parses an HTTP response from a DeleteSsoConnectionWithResponse call -func ParseDeleteSsoConnectionResponse(rsp *http.Response) (*DeleteSsoConnectionResponse, error) { +// ParseDeleteEnvironmentObjectResponse parses an HTTP response from a DeleteEnvironmentObjectWithResponse call +func ParseDeleteEnvironmentObjectResponse(rsp *http.Response) (*DeleteEnvironmentObjectResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSsoConnectionResponse{ + response := &DeleteEnvironmentObjectResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16084,6 +15147,13 @@ func ParseDeleteSsoConnectionResponse(rsp *http.Response) (*DeleteSsoConnectionR } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16096,34 +15166,20 @@ func ParseDeleteSsoConnectionResponse(rsp *http.Response) (*DeleteSsoConnectionR return response, nil } -// ParseGetSsoConnectionResponse parses an HTTP response from a GetSsoConnectionWithResponse call -func ParseGetSsoConnectionResponse(rsp *http.Response) (*GetSsoConnectionResponse, error) { +// ParseUpdateEnvironmentObjectResponse parses an HTTP response from a UpdateEnvironmentObjectWithResponse call +func ParseUpdateEnvironmentObjectResponse(rsp *http.Response) (*UpdateEnvironmentObjectResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSsoConnectionResponse{ + response := &UpdateEnvironmentObjectResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SsoConnection - if 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 Error - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16145,6 +15201,13 @@ func ParseGetSsoConnectionResponse(rsp *http.Response) (*GetSsoConnectionRespons } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16157,22 +15220,22 @@ func ParseGetSsoConnectionResponse(rsp *http.Response) (*GetSsoConnectionRespons return response, nil } -// ParseUpdateSsoConnectionResponse parses an HTTP response from a UpdateSsoConnectionWithResponse call -func ParseUpdateSsoConnectionResponse(rsp *http.Response) (*UpdateSsoConnectionResponse, error) { +// ParseCreateUserInviteResponse parses an HTTP response from a CreateUserInviteWithResponse call +func ParseCreateUserInviteResponse(rsp *http.Response) (*CreateUserInviteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSsoConnectionResponse{ + response := &CreateUserInviteResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SsoConnection + var dest Invite if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16218,27 +15281,20 @@ func ParseUpdateSsoConnectionResponse(rsp *http.Response) (*UpdateSsoConnectionR return response, nil } -// ParseGetStripeClientSecretResponse parses an HTTP response from a GetStripeClientSecretWithResponse call -func ParseGetStripeClientSecretResponse(rsp *http.Response) (*GetStripeClientSecretResponse, error) { +// ParseDeleteUserInviteResponse parses an HTTP response from a DeleteUserInviteWithResponse call +func ParseDeleteUserInviteResponse(rsp *http.Response) (*DeleteUserInviteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetStripeClientSecretResponse{ + response := &DeleteUserInviteResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest StripeClientSecret - if 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 Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16976,67 +16032,6 @@ func ParseMutateOrgUserRoleResponse(rsp *http.Response) (*MutateOrgUserRoleRespo return response, nil } -// ParseValidateCreditCardPaymentResponse parses an HTTP response from a ValidateCreditCardPaymentWithResponse call -func ParseValidateCreditCardPaymentResponse(rsp *http.Response) (*ValidateCreditCardPaymentResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ValidateCreditCardPaymentResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ValidateCreditCardPayment - if 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 Error - if 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 Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseListWorkspacesResponse parses an HTTP response from a ListWorkspacesWithResponse call func ParseListWorkspacesResponse(rsp *http.Response) (*ListWorkspacesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -17809,67 +16804,6 @@ func ParseListWorkspaceDagsResponse(rsp *http.Response) (*ListWorkspaceDagsRespo return response, nil } -// ParseUpdateDeploymentResponse parses an HTTP response from a UpdateDeploymentWithResponse call -func ParseUpdateDeploymentResponse(rsp *http.Response) (*UpdateDeploymentResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateDeploymentResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Deployment - if 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 Error - if 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 Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest Error - if 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 Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseListWorkspaceTeamsResponse parses an HTTP response from a ListWorkspaceTeamsWithResponse call func ParseListWorkspaceTeamsResponse(rsp *http.Response) (*ListWorkspaceTeamsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/astro-client-core/mocks/client.go b/astro-client-core/mocks/client.go index 4c2743611..ed14a285e 100644 --- a/astro-client-core/mocks/client.go +++ b/astro-client-core/mocks/client.go @@ -215,32 +215,32 @@ func (_m *ClientWithResponsesInterface) CreateAzureClusterWithResponse(ctx conte return r0, r1 } -// CreateGcpClusterWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateGcpClusterWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateGcpClusterResponse, error) { +// CreateDeploymentApiTokenWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateDeploymentApiTokenWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateDeploymentApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, contentType, body) + _ca = append(_ca, ctx, organizationId, deploymentId, contentType, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateGcpClusterResponse + var r0 *astrocore.CreateDeploymentApiTokenResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateGcpClusterResponse, error)); ok { - return rf(ctx, organizationId, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateDeploymentApiTokenResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateGcpClusterResponse); ok { - r0 = rf(ctx, organizationId, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateDeploymentApiTokenResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateGcpClusterResponse) + r0 = ret.Get(0).(*astrocore.CreateDeploymentApiTokenResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, contentType, body, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, contentType, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -248,32 +248,32 @@ func (_m *ClientWithResponsesInterface) CreateGcpClusterWithBodyWithResponse(ctx return r0, r1 } -// CreateGcpClusterWithResponse provides a mock function with given fields: ctx, organizationId, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateGcpClusterWithResponse(ctx context.Context, organizationId string, body astrocore.CreateGcpClusterRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateGcpClusterResponse, error) { +// CreateDeploymentApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, body astrocore.CreateDeploymentApiTokenRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateDeploymentApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, body) + _ca = append(_ca, ctx, organizationId, deploymentId, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateGcpClusterResponse + var r0 *astrocore.CreateDeploymentApiTokenResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateGcpClusterRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateGcpClusterResponse, error)); ok { - return rf(ctx, organizationId, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.CreateDeploymentApiTokenRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateDeploymentApiTokenResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateGcpClusterRequest, ...astrocore.RequestEditorFn) *astrocore.CreateGcpClusterResponse); ok { - r0 = rf(ctx, organizationId, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.CreateDeploymentApiTokenRequest, ...astrocore.RequestEditorFn) *astrocore.CreateDeploymentApiTokenResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateGcpClusterResponse) + r0 = ret.Get(0).(*astrocore.CreateDeploymentApiTokenResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.CreateGcpClusterRequest, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, body, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, astrocore.CreateDeploymentApiTokenRequest, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -281,8 +281,8 @@ func (_m *ClientWithResponsesInterface) CreateGcpClusterWithResponse(ctx context return r0, r1 } -// CreateManagedDomainWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateManagedDomainWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateManagedDomainResponse, error) { +// CreateDeploymentWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateDeploymentResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -292,16 +292,16 @@ func (_m *ClientWithResponsesInterface) CreateManagedDomainWithBodyWithResponse( _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateManagedDomainResponse + var r0 *astrocore.CreateDeploymentResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateManagedDomainResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateDeploymentResponse, error)); ok { return rf(ctx, organizationId, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateManagedDomainResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateDeploymentResponse); ok { r0 = rf(ctx, organizationId, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateManagedDomainResponse) + r0 = ret.Get(0).(*astrocore.CreateDeploymentResponse) } } @@ -314,8 +314,8 @@ func (_m *ClientWithResponsesInterface) CreateManagedDomainWithBodyWithResponse( return r0, r1 } -// CreateManagedDomainWithResponse provides a mock function with given fields: ctx, organizationId, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateManagedDomainWithResponse(ctx context.Context, organizationId string, body astrocore.CreateManagedDomainRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateManagedDomainResponse, error) { +// CreateDeploymentWithResponse provides a mock function with given fields: ctx, organizationId, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateDeploymentWithResponse(ctx context.Context, organizationId string, body astrocore.CreateDeploymentRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateDeploymentResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -325,20 +325,20 @@ func (_m *ClientWithResponsesInterface) CreateManagedDomainWithResponse(ctx cont _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateManagedDomainResponse + var r0 *astrocore.CreateDeploymentResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateManagedDomainRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateManagedDomainResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateDeploymentRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateDeploymentResponse, error)); ok { return rf(ctx, organizationId, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateManagedDomainRequest, ...astrocore.RequestEditorFn) *astrocore.CreateManagedDomainResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateDeploymentRequest, ...astrocore.RequestEditorFn) *astrocore.CreateDeploymentResponse); ok { r0 = rf(ctx, organizationId, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateManagedDomainResponse) + r0 = ret.Get(0).(*astrocore.CreateDeploymentResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.CreateManagedDomainRequest, ...astrocore.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.CreateDeploymentRequest, ...astrocore.RequestEditorFn) error); ok { r1 = rf(ctx, organizationId, body, reqEditors...) } else { r1 = ret.Error(1) @@ -347,8 +347,8 @@ func (_m *ClientWithResponsesInterface) CreateManagedDomainWithResponse(ctx cont return r0, r1 } -// CreateOrganizationApiTokenWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateOrganizationApiTokenWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationApiTokenResponse, error) { +// CreateEnvironmentObjectWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateEnvironmentObjectResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -358,16 +358,16 @@ func (_m *ClientWithResponsesInterface) CreateOrganizationApiTokenWithBodyWithRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateOrganizationApiTokenResponse + var r0 *astrocore.CreateEnvironmentObjectResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationApiTokenResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateEnvironmentObjectResponse, error)); ok { return rf(ctx, organizationId, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateOrganizationApiTokenResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateEnvironmentObjectResponse); ok { r0 = rf(ctx, organizationId, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateOrganizationApiTokenResponse) + r0 = ret.Get(0).(*astrocore.CreateEnvironmentObjectResponse) } } @@ -380,8 +380,8 @@ func (_m *ClientWithResponsesInterface) CreateOrganizationApiTokenWithBodyWithRe return r0, r1 } -// CreateOrganizationApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateOrganizationApiTokenWithResponse(ctx context.Context, organizationId string, body astrocore.CreateOrganizationApiTokenRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationApiTokenResponse, error) { +// CreateEnvironmentObjectWithResponse provides a mock function with given fields: ctx, organizationId, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateEnvironmentObjectWithResponse(ctx context.Context, organizationId string, body astrocore.CreateEnvironmentObjectRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateEnvironmentObjectResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -391,20 +391,20 @@ func (_m *ClientWithResponsesInterface) CreateOrganizationApiTokenWithResponse(c _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateOrganizationApiTokenResponse + var r0 *astrocore.CreateEnvironmentObjectResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateOrganizationApiTokenRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationApiTokenResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateEnvironmentObjectRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateEnvironmentObjectResponse, error)); ok { return rf(ctx, organizationId, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateOrganizationApiTokenRequest, ...astrocore.RequestEditorFn) *astrocore.CreateOrganizationApiTokenResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateEnvironmentObjectRequest, ...astrocore.RequestEditorFn) *astrocore.CreateEnvironmentObjectResponse); ok { r0 = rf(ctx, organizationId, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateOrganizationApiTokenResponse) + r0 = ret.Get(0).(*astrocore.CreateEnvironmentObjectResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.CreateOrganizationApiTokenRequest, ...astrocore.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.CreateEnvironmentObjectRequest, ...astrocore.RequestEditorFn) error); ok { r1 = rf(ctx, organizationId, body, reqEditors...) } else { r1 = ret.Error(1) @@ -413,32 +413,32 @@ func (_m *ClientWithResponsesInterface) CreateOrganizationApiTokenWithResponse(c return r0, r1 } -// CreateOrganizationWithBodyWithResponse provides a mock function with given fields: ctx, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationResponse, error) { +// CreateGcpClusterWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateGcpClusterWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateGcpClusterResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, contentType, body) + _ca = append(_ca, ctx, organizationId, contentType, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateOrganizationResponse + var r0 *astrocore.CreateGcpClusterResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationResponse, error)); ok { - return rf(ctx, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateGcpClusterResponse, error)); ok { + return rf(ctx, organizationId, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateOrganizationResponse); ok { - r0 = rf(ctx, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateGcpClusterResponse); ok { + r0 = rf(ctx, organizationId, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateOrganizationResponse) + r0 = ret.Get(0).(*astrocore.CreateGcpClusterResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, contentType, body, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, contentType, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -446,32 +446,32 @@ func (_m *ClientWithResponsesInterface) CreateOrganizationWithBodyWithResponse(c return r0, r1 } -// CreateOrganizationWithResponse provides a mock function with given fields: ctx, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateOrganizationWithResponse(ctx context.Context, body astrocore.CreateOrganizationRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationResponse, error) { +// CreateGcpClusterWithResponse provides a mock function with given fields: ctx, organizationId, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateGcpClusterWithResponse(ctx context.Context, organizationId string, body astrocore.CreateGcpClusterRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateGcpClusterResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, body) + _ca = append(_ca, ctx, organizationId, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateOrganizationResponse + var r0 *astrocore.CreateGcpClusterResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, astrocore.CreateOrganizationRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationResponse, error)); ok { - return rf(ctx, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateGcpClusterRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateGcpClusterResponse, error)); ok { + return rf(ctx, organizationId, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, astrocore.CreateOrganizationRequest, ...astrocore.RequestEditorFn) *astrocore.CreateOrganizationResponse); ok { - r0 = rf(ctx, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateGcpClusterRequest, ...astrocore.RequestEditorFn) *astrocore.CreateGcpClusterResponse); ok { + r0 = rf(ctx, organizationId, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateOrganizationResponse) + r0 = ret.Get(0).(*astrocore.CreateGcpClusterResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, astrocore.CreateOrganizationRequest, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, body, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.CreateGcpClusterRequest, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -479,8 +479,8 @@ func (_m *ClientWithResponsesInterface) CreateOrganizationWithResponse(ctx conte return r0, r1 } -// CreateSsoConnectionWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateSsoConnectionWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateSsoConnectionResponse, error) { +// CreateOrganizationApiTokenWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateOrganizationApiTokenWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -490,16 +490,16 @@ func (_m *ClientWithResponsesInterface) CreateSsoConnectionWithBodyWithResponse( _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateSsoConnectionResponse + var r0 *astrocore.CreateOrganizationApiTokenResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateSsoConnectionResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationApiTokenResponse, error)); ok { return rf(ctx, organizationId, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateSsoConnectionResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateOrganizationApiTokenResponse); ok { r0 = rf(ctx, organizationId, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateSsoConnectionResponse) + r0 = ret.Get(0).(*astrocore.CreateOrganizationApiTokenResponse) } } @@ -512,8 +512,8 @@ func (_m *ClientWithResponsesInterface) CreateSsoConnectionWithBodyWithResponse( return r0, r1 } -// CreateSsoConnectionWithResponse provides a mock function with given fields: ctx, organizationId, body, reqEditors -func (_m *ClientWithResponsesInterface) CreateSsoConnectionWithResponse(ctx context.Context, organizationId string, body astrocore.CreateSsoConnectionRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateSsoConnectionResponse, error) { +// CreateOrganizationApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateOrganizationApiTokenWithResponse(ctx context.Context, organizationId string, body astrocore.CreateOrganizationApiTokenRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -523,20 +523,20 @@ func (_m *ClientWithResponsesInterface) CreateSsoConnectionWithResponse(ctx cont _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.CreateSsoConnectionResponse + var r0 *astrocore.CreateOrganizationApiTokenResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateSsoConnectionRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateSsoConnectionResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateOrganizationApiTokenRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationApiTokenResponse, error)); ok { return rf(ctx, organizationId, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateSsoConnectionRequest, ...astrocore.RequestEditorFn) *astrocore.CreateSsoConnectionResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.CreateOrganizationApiTokenRequest, ...astrocore.RequestEditorFn) *astrocore.CreateOrganizationApiTokenResponse); ok { r0 = rf(ctx, organizationId, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.CreateSsoConnectionResponse) + r0 = ret.Get(0).(*astrocore.CreateOrganizationApiTokenResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.CreateSsoConnectionRequest, ...astrocore.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.CreateOrganizationApiTokenRequest, ...astrocore.RequestEditorFn) error); ok { r1 = rf(ctx, organizationId, body, reqEditors...) } else { r1 = ret.Error(1) @@ -545,6 +545,72 @@ func (_m *ClientWithResponsesInterface) CreateSsoConnectionWithResponse(ctx cont return r0, r1 } +// CreateOrganizationWithBodyWithResponse provides a mock function with given fields: ctx, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationResponse, error) { + _va := make([]interface{}, len(reqEditors)) + for _i := range reqEditors { + _va[_i] = reqEditors[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, contentType, body) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *astrocore.CreateOrganizationResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationResponse, error)); ok { + return rf(ctx, contentType, body, reqEditors...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.CreateOrganizationResponse); ok { + r0 = rf(ctx, contentType, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*astrocore.CreateOrganizationResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, contentType, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateOrganizationWithResponse provides a mock function with given fields: ctx, body, reqEditors +func (_m *ClientWithResponsesInterface) CreateOrganizationWithResponse(ctx context.Context, body astrocore.CreateOrganizationRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationResponse, error) { + _va := make([]interface{}, len(reqEditors)) + for _i := range reqEditors { + _va[_i] = reqEditors[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, body) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *astrocore.CreateOrganizationResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, astrocore.CreateOrganizationRequest, ...astrocore.RequestEditorFn) (*astrocore.CreateOrganizationResponse, error)); ok { + return rf(ctx, body, reqEditors...) + } + if rf, ok := ret.Get(0).(func(context.Context, astrocore.CreateOrganizationRequest, ...astrocore.RequestEditorFn) *astrocore.CreateOrganizationResponse); ok { + r0 = rf(ctx, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*astrocore.CreateOrganizationResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, astrocore.CreateOrganizationRequest, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // CreateTeamWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors func (_m *ClientWithResponsesInterface) CreateTeamWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.CreateTeamResponse, error) { _va := make([]interface{}, len(reqEditors)) @@ -842,32 +908,32 @@ func (_m *ClientWithResponsesInterface) DeleteClusterWithResponse(ctx context.Co return r0, r1 } -// DeleteManagedDomainWithResponse provides a mock function with given fields: ctx, organizationId, domainId, reqEditors -func (_m *ClientWithResponsesInterface) DeleteManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteManagedDomainResponse, error) { +// DeleteDeploymentApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, apiTokenId, reqEditors +func (_m *ClientWithResponsesInterface) DeleteDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteDeploymentApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, domainId) + _ca = append(_ca, ctx, organizationId, deploymentId, apiTokenId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.DeleteManagedDomainResponse + var r0 *astrocore.DeleteDeploymentApiTokenResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteManagedDomainResponse, error)); ok { - return rf(ctx, organizationId, domainId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteDeploymentApiTokenResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.DeleteManagedDomainResponse); ok { - r0 = rf(ctx, organizationId, domainId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) *astrocore.DeleteDeploymentApiTokenResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.DeleteManagedDomainResponse) + r0 = ret.Get(0).(*astrocore.DeleteDeploymentApiTokenResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, domainId, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) } else { r1 = ret.Error(1) } @@ -875,32 +941,32 @@ func (_m *ClientWithResponsesInterface) DeleteManagedDomainWithResponse(ctx cont return r0, r1 } -// DeleteOrgUserWithResponse provides a mock function with given fields: ctx, organizationId, userId, reqEditors -func (_m *ClientWithResponsesInterface) DeleteOrgUserWithResponse(ctx context.Context, organizationId string, userId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteOrgUserResponse, error) { +// DeleteDeploymentWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, reqEditors +func (_m *ClientWithResponsesInterface) DeleteDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteDeploymentResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, userId) + _ca = append(_ca, ctx, organizationId, deploymentId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.DeleteOrgUserResponse + var r0 *astrocore.DeleteDeploymentResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteOrgUserResponse, error)); ok { - return rf(ctx, organizationId, userId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteDeploymentResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.DeleteOrgUserResponse); ok { - r0 = rf(ctx, organizationId, userId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.DeleteDeploymentResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.DeleteOrgUserResponse) + r0 = ret.Get(0).(*astrocore.DeleteDeploymentResponse) } } if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, userId, reqEditors...) + r1 = rf(ctx, organizationId, deploymentId, reqEditors...) } else { r1 = ret.Error(1) } @@ -908,32 +974,32 @@ func (_m *ClientWithResponsesInterface) DeleteOrgUserWithResponse(ctx context.Co return r0, r1 } -// DeleteOrganizationApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, apiTokenId, reqEditors -func (_m *ClientWithResponsesInterface) DeleteOrganizationApiTokenWithResponse(ctx context.Context, organizationId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteOrganizationApiTokenResponse, error) { +// DeleteEnvironmentObjectWithResponse provides a mock function with given fields: ctx, organizationId, environmentObjectId, reqEditors +func (_m *ClientWithResponsesInterface) DeleteEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteEnvironmentObjectResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, apiTokenId) + _ca = append(_ca, ctx, organizationId, environmentObjectId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.DeleteOrganizationApiTokenResponse + var r0 *astrocore.DeleteEnvironmentObjectResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteOrganizationApiTokenResponse, error)); ok { - return rf(ctx, organizationId, apiTokenId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteEnvironmentObjectResponse, error)); ok { + return rf(ctx, organizationId, environmentObjectId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.DeleteOrganizationApiTokenResponse); ok { - r0 = rf(ctx, organizationId, apiTokenId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.DeleteEnvironmentObjectResponse); ok { + r0 = rf(ctx, organizationId, environmentObjectId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.DeleteOrganizationApiTokenResponse) + r0 = ret.Get(0).(*astrocore.DeleteEnvironmentObjectResponse) } } if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, apiTokenId, reqEditors...) + r1 = rf(ctx, organizationId, environmentObjectId, reqEditors...) } else { r1 = ret.Error(1) } @@ -941,32 +1007,32 @@ func (_m *ClientWithResponsesInterface) DeleteOrganizationApiTokenWithResponse(c return r0, r1 } -// DeleteSsoBypassKeyWithResponse provides a mock function with given fields: ctx, organizationId, reqEditors -func (_m *ClientWithResponsesInterface) DeleteSsoBypassKeyWithResponse(ctx context.Context, organizationId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteSsoBypassKeyResponse, error) { +// DeleteOrgUserWithResponse provides a mock function with given fields: ctx, organizationId, userId, reqEditors +func (_m *ClientWithResponsesInterface) DeleteOrgUserWithResponse(ctx context.Context, organizationId string, userId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteOrgUserResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId) + _ca = append(_ca, ctx, organizationId, userId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.DeleteSsoBypassKeyResponse + var r0 *astrocore.DeleteOrgUserResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteSsoBypassKeyResponse, error)); ok { - return rf(ctx, organizationId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteOrgUserResponse, error)); ok { + return rf(ctx, organizationId, userId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) *astrocore.DeleteSsoBypassKeyResponse); ok { - r0 = rf(ctx, organizationId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.DeleteOrgUserResponse); ok { + r0 = rf(ctx, organizationId, userId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.DeleteSsoBypassKeyResponse) + r0 = ret.Get(0).(*astrocore.DeleteOrgUserResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, userId, reqEditors...) } else { r1 = ret.Error(1) } @@ -974,32 +1040,32 @@ func (_m *ClientWithResponsesInterface) DeleteSsoBypassKeyWithResponse(ctx conte return r0, r1 } -// DeleteSsoConnectionWithResponse provides a mock function with given fields: ctx, organizationId, connectionId, reqEditors -func (_m *ClientWithResponsesInterface) DeleteSsoConnectionWithResponse(ctx context.Context, organizationId string, connectionId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteSsoConnectionResponse, error) { +// DeleteOrganizationApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, apiTokenId, reqEditors +func (_m *ClientWithResponsesInterface) DeleteOrganizationApiTokenWithResponse(ctx context.Context, organizationId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.DeleteOrganizationApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, connectionId) + _ca = append(_ca, ctx, organizationId, apiTokenId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.DeleteSsoConnectionResponse + var r0 *astrocore.DeleteOrganizationApiTokenResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteSsoConnectionResponse, error)); ok { - return rf(ctx, organizationId, connectionId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.DeleteOrganizationApiTokenResponse, error)); ok { + return rf(ctx, organizationId, apiTokenId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.DeleteSsoConnectionResponse); ok { - r0 = rf(ctx, organizationId, connectionId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.DeleteOrganizationApiTokenResponse); ok { + r0 = rf(ctx, organizationId, apiTokenId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.DeleteSsoConnectionResponse) + r0 = ret.Get(0).(*astrocore.DeleteOrganizationApiTokenResponse) } } if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, connectionId, reqEditors...) + r1 = rf(ctx, organizationId, apiTokenId, reqEditors...) } else { r1 = ret.Error(1) } @@ -1271,65 +1337,32 @@ func (_m *ClientWithResponsesInterface) GetClusterWithResponse(ctx context.Conte return r0, r1 } -// GetCreditSummaryWithResponse provides a mock function with given fields: ctx, organizationId, reqEditors -func (_m *ClientWithResponsesInterface) GetCreditSummaryWithResponse(ctx context.Context, organizationId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetCreditSummaryResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.GetCreditSummaryResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) (*astrocore.GetCreditSummaryResponse, error)); ok { - return rf(ctx, organizationId, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) *astrocore.GetCreditSummaryResponse); ok { - r0 = rf(ctx, organizationId, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetCreditSummaryResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetDeploymentDagRunsWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, dagId, params, reqEditors -func (_m *ClientWithResponsesInterface) GetDeploymentDagRunsWithResponse(ctx context.Context, organizationId string, deploymentId string, dagId string, params *astrocore.GetDeploymentDagRunsParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentDagRunsResponse, error) { +// GetDeploymentApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, apiTokenId, reqEditors +func (_m *ClientWithResponsesInterface) GetDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, deploymentId, dagId, params) + _ca = append(_ca, ctx, organizationId, deploymentId, apiTokenId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.GetDeploymentDagRunsResponse + var r0 *astrocore.GetDeploymentApiTokenResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *astrocore.GetDeploymentDagRunsParams, ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentDagRunsResponse, error)); ok { - return rf(ctx, organizationId, deploymentId, dagId, params, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentApiTokenResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *astrocore.GetDeploymentDagRunsParams, ...astrocore.RequestEditorFn) *astrocore.GetDeploymentDagRunsResponse); ok { - r0 = rf(ctx, organizationId, deploymentId, dagId, params, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) *astrocore.GetDeploymentApiTokenResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetDeploymentDagRunsResponse) + r0 = ret.Get(0).(*astrocore.GetDeploymentApiTokenResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, *astrocore.GetDeploymentDagRunsParams, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, deploymentId, dagId, params, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) } else { r1 = ret.Error(1) } @@ -1337,32 +1370,32 @@ func (_m *ClientWithResponsesInterface) GetDeploymentDagRunsWithResponse(ctx con return r0, r1 } -// GetDeploymentDagStructureWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, dagId, reqEditors -func (_m *ClientWithResponsesInterface) GetDeploymentDagStructureWithResponse(ctx context.Context, organizationId string, deploymentId string, dagId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentDagStructureResponse, error) { +// GetDeploymentHealthWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, reqEditors +func (_m *ClientWithResponsesInterface) GetDeploymentHealthWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentHealthResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, deploymentId, dagId) + _ca = append(_ca, ctx, organizationId, deploymentId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.GetDeploymentDagStructureResponse + var r0 *astrocore.GetDeploymentHealthResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentDagStructureResponse, error)); ok { - return rf(ctx, organizationId, deploymentId, dagId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentHealthResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) *astrocore.GetDeploymentDagStructureResponse); ok { - r0 = rf(ctx, organizationId, deploymentId, dagId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.GetDeploymentHealthResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetDeploymentDagStructureResponse) + r0 = ret.Get(0).(*astrocore.GetDeploymentHealthResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, deploymentId, dagId, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, reqEditors...) } else { r1 = ret.Error(1) } @@ -1403,32 +1436,32 @@ func (_m *ClientWithResponsesInterface) GetDeploymentLogsWithResponse(ctx contex return r0, r1 } -// GetDeploymentOptionsWithResponse provides a mock function with given fields: ctx, reqEditors -func (_m *ClientWithResponsesInterface) GetDeploymentOptionsWithResponse(ctx context.Context, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentOptionsResponse, error) { +// GetDeploymentOptionsWithResponse provides a mock function with given fields: ctx, organizationId, params, reqEditors +func (_m *ClientWithResponsesInterface) GetDeploymentOptionsWithResponse(ctx context.Context, organizationId string, params *astrocore.GetDeploymentOptionsParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentOptionsResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx) + _ca = append(_ca, ctx, organizationId, params) _ca = append(_ca, _va...) ret := _m.Called(_ca...) var r0 *astrocore.GetDeploymentOptionsResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentOptionsResponse, error)); ok { - return rf(ctx, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, *astrocore.GetDeploymentOptionsParams, ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentOptionsResponse, error)); ok { + return rf(ctx, organizationId, params, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, ...astrocore.RequestEditorFn) *astrocore.GetDeploymentOptionsResponse); ok { - r0 = rf(ctx, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, *astrocore.GetDeploymentOptionsParams, ...astrocore.RequestEditorFn) *astrocore.GetDeploymentOptionsResponse); ok { + r0 = rf(ctx, organizationId, params, reqEditors...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*astrocore.GetDeploymentOptionsResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, *astrocore.GetDeploymentOptionsParams, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, params, reqEditors...) } else { r1 = ret.Error(1) } @@ -1436,32 +1469,32 @@ func (_m *ClientWithResponsesInterface) GetDeploymentOptionsWithResponse(ctx con return r0, r1 } -// GetDraftInvoiceWithResponse provides a mock function with given fields: ctx, organizationId, reqEditors -func (_m *ClientWithResponsesInterface) GetDraftInvoiceWithResponse(ctx context.Context, organizationId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetDraftInvoiceResponse, error) { +// GetDeploymentWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, reqEditors +func (_m *ClientWithResponsesInterface) GetDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId) + _ca = append(_ca, ctx, organizationId, deploymentId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.GetDraftInvoiceResponse + var r0 *astrocore.GetDeploymentResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) (*astrocore.GetDraftInvoiceResponse, error)); ok { - return rf(ctx, organizationId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.GetDeploymentResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) *astrocore.GetDraftInvoiceResponse); ok { - r0 = rf(ctx, organizationId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.GetDeploymentResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetDraftInvoiceResponse) + r0 = ret.Get(0).(*astrocore.GetDeploymentResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, reqEditors...) } else { r1 = ret.Error(1) } @@ -1469,32 +1502,32 @@ func (_m *ClientWithResponsesInterface) GetDraftInvoiceWithResponse(ctx context. return r0, r1 } -// GetManagedDomainWithResponse provides a mock function with given fields: ctx, organizationId, domainId, reqEditors -func (_m *ClientWithResponsesInterface) GetManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetManagedDomainResponse, error) { +// GetOrganizationApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, apiTokenId, reqEditors +func (_m *ClientWithResponsesInterface) GetOrganizationApiTokenWithResponse(ctx context.Context, organizationId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetOrganizationApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, domainId) + _ca = append(_ca, ctx, organizationId, apiTokenId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.GetManagedDomainResponse + var r0 *astrocore.GetOrganizationApiTokenResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.GetManagedDomainResponse, error)); ok { - return rf(ctx, organizationId, domainId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.GetOrganizationApiTokenResponse, error)); ok { + return rf(ctx, organizationId, apiTokenId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.GetManagedDomainResponse); ok { - r0 = rf(ctx, organizationId, domainId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.GetOrganizationApiTokenResponse); ok { + r0 = rf(ctx, organizationId, apiTokenId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetManagedDomainResponse) + r0 = ret.Get(0).(*astrocore.GetOrganizationApiTokenResponse) } } if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, domainId, reqEditors...) + r1 = rf(ctx, organizationId, apiTokenId, reqEditors...) } else { r1 = ret.Error(1) } @@ -1502,98 +1535,32 @@ func (_m *ClientWithResponsesInterface) GetManagedDomainWithResponse(ctx context return r0, r1 } -// GetMetronomeDashboardWithResponse provides a mock function with given fields: ctx, organizationId, pType, params, reqEditors -func (_m *ClientWithResponsesInterface) GetMetronomeDashboardWithResponse(ctx context.Context, organizationId string, pType astrocore.GetMetronomeDashboardParamsType, params *astrocore.GetMetronomeDashboardParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetMetronomeDashboardResponse, error) { +// GetOrganizationAuditLogsWithResponse provides a mock function with given fields: ctx, organizationId, params, reqEditors +func (_m *ClientWithResponsesInterface) GetOrganizationAuditLogsWithResponse(ctx context.Context, organizationId string, params *astrocore.GetOrganizationAuditLogsParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetOrganizationAuditLogsResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, pType, params) + _ca = append(_ca, ctx, organizationId, params) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.GetMetronomeDashboardResponse + var r0 *astrocore.GetOrganizationAuditLogsResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.GetMetronomeDashboardParamsType, *astrocore.GetMetronomeDashboardParams, ...astrocore.RequestEditorFn) (*astrocore.GetMetronomeDashboardResponse, error)); ok { - return rf(ctx, organizationId, pType, params, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, *astrocore.GetOrganizationAuditLogsParams, ...astrocore.RequestEditorFn) (*astrocore.GetOrganizationAuditLogsResponse, error)); ok { + return rf(ctx, organizationId, params, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.GetMetronomeDashboardParamsType, *astrocore.GetMetronomeDashboardParams, ...astrocore.RequestEditorFn) *astrocore.GetMetronomeDashboardResponse); ok { - r0 = rf(ctx, organizationId, pType, params, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, *astrocore.GetOrganizationAuditLogsParams, ...astrocore.RequestEditorFn) *astrocore.GetOrganizationAuditLogsResponse); ok { + r0 = rf(ctx, organizationId, params, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetMetronomeDashboardResponse) + r0 = ret.Get(0).(*astrocore.GetOrganizationAuditLogsResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.GetMetronomeDashboardParamsType, *astrocore.GetMetronomeDashboardParams, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, pType, params, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetOrganizationApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, apiTokenId, reqEditors -func (_m *ClientWithResponsesInterface) GetOrganizationApiTokenWithResponse(ctx context.Context, organizationId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetOrganizationApiTokenResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId, apiTokenId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.GetOrganizationApiTokenResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.GetOrganizationApiTokenResponse, error)); ok { - return rf(ctx, organizationId, apiTokenId, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.GetOrganizationApiTokenResponse); ok { - r0 = rf(ctx, organizationId, apiTokenId, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetOrganizationApiTokenResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, apiTokenId, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetOrganizationAuditLogsWithResponse provides a mock function with given fields: ctx, organizationId, params, reqEditors -func (_m *ClientWithResponsesInterface) GetOrganizationAuditLogsWithResponse(ctx context.Context, organizationId string, params *astrocore.GetOrganizationAuditLogsParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetOrganizationAuditLogsResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId, params) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.GetOrganizationAuditLogsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, *astrocore.GetOrganizationAuditLogsParams, ...astrocore.RequestEditorFn) (*astrocore.GetOrganizationAuditLogsResponse, error)); ok { - return rf(ctx, organizationId, params, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, *astrocore.GetOrganizationAuditLogsParams, ...astrocore.RequestEditorFn) *astrocore.GetOrganizationAuditLogsResponse); ok { - r0 = rf(ctx, organizationId, params, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetOrganizationAuditLogsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, *astrocore.GetOrganizationAuditLogsParams, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, params, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, *astrocore.GetOrganizationAuditLogsParams, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, params, reqEditors...) } else { r1 = ret.Error(1) } @@ -1634,39 +1601,6 @@ func (_m *ClientWithResponsesInterface) GetOrganizationWithResponse(ctx context. return r0, r1 } -// GetPaymentMethodWithResponse provides a mock function with given fields: ctx, organizationId, reqEditors -func (_m *ClientWithResponsesInterface) GetPaymentMethodWithResponse(ctx context.Context, organizationId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetPaymentMethodResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.GetPaymentMethodResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) (*astrocore.GetPaymentMethodResponse, error)); ok { - return rf(ctx, organizationId, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) *astrocore.GetPaymentMethodResponse); ok { - r0 = rf(ctx, organizationId, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetPaymentMethodResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // GetSelfUserWithResponse provides a mock function with given fields: ctx, params, reqEditors func (_m *ClientWithResponsesInterface) GetSelfUserWithResponse(ctx context.Context, params *astrocore.GetSelfUserParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetSelfUserResponse, error) { _va := make([]interface{}, len(reqEditors)) @@ -1733,105 +1667,6 @@ func (_m *ClientWithResponsesInterface) GetSharedClusterWithResponse(ctx context return r0, r1 } -// GetSsoBypassKeyWithResponse provides a mock function with given fields: ctx, organizationId, reqEditors -func (_m *ClientWithResponsesInterface) GetSsoBypassKeyWithResponse(ctx context.Context, organizationId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetSsoBypassKeyResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.GetSsoBypassKeyResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) (*astrocore.GetSsoBypassKeyResponse, error)); ok { - return rf(ctx, organizationId, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) *astrocore.GetSsoBypassKeyResponse); ok { - r0 = rf(ctx, organizationId, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetSsoBypassKeyResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSsoConnectionWithResponse provides a mock function with given fields: ctx, organizationId, connectionId, reqEditors -func (_m *ClientWithResponsesInterface) GetSsoConnectionWithResponse(ctx context.Context, organizationId string, connectionId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetSsoConnectionResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId, connectionId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.GetSsoConnectionResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.GetSsoConnectionResponse, error)); ok { - return rf(ctx, organizationId, connectionId, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.GetSsoConnectionResponse); ok { - r0 = rf(ctx, organizationId, connectionId, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetSsoConnectionResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, connectionId, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetStripeClientSecretWithResponse provides a mock function with given fields: ctx, organizationId, pType, reqEditors -func (_m *ClientWithResponsesInterface) GetStripeClientSecretWithResponse(ctx context.Context, organizationId string, pType astrocore.GetStripeClientSecretParamsType, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetStripeClientSecretResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId, pType) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.GetStripeClientSecretResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.GetStripeClientSecretParamsType, ...astrocore.RequestEditorFn) (*astrocore.GetStripeClientSecretResponse, error)); ok { - return rf(ctx, organizationId, pType, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.GetStripeClientSecretParamsType, ...astrocore.RequestEditorFn) *astrocore.GetStripeClientSecretResponse); ok { - r0 = rf(ctx, organizationId, pType, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.GetStripeClientSecretResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.GetStripeClientSecretParamsType, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, pType, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // GetTeamWithResponse provides a mock function with given fields: ctx, organizationId, teamId, reqEditors func (_m *ClientWithResponsesInterface) GetTeamWithResponse(ctx context.Context, organizationId string, teamId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.GetTeamResponse, error) { _va := make([]interface{}, len(reqEditors)) @@ -2030,6 +1865,39 @@ func (_m *ClientWithResponsesInterface) ListClustersWithResponse(ctx context.Con return r0, r1 } +// ListDeploymentApiTokensWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, params, reqEditors +func (_m *ClientWithResponsesInterface) ListDeploymentApiTokensWithResponse(ctx context.Context, organizationId string, deploymentId string, params *astrocore.ListDeploymentApiTokensParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ListDeploymentApiTokensResponse, error) { + _va := make([]interface{}, len(reqEditors)) + for _i := range reqEditors { + _va[_i] = reqEditors[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, organizationId, deploymentId, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *astrocore.ListDeploymentApiTokensResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, *astrocore.ListDeploymentApiTokensParams, ...astrocore.RequestEditorFn) (*astrocore.ListDeploymentApiTokensResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, params, reqEditors...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, *astrocore.ListDeploymentApiTokensParams, ...astrocore.RequestEditorFn) *astrocore.ListDeploymentApiTokensResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, params, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*astrocore.ListDeploymentApiTokensResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, *astrocore.ListDeploymentApiTokensParams, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, params, reqEditors...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // ListDeploymentsWithResponse provides a mock function with given fields: ctx, organizationId, params, reqEditors func (_m *ClientWithResponsesInterface) ListDeploymentsWithResponse(ctx context.Context, organizationId string, params *astrocore.ListDeploymentsParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ListDeploymentsResponse, error) { _va := make([]interface{}, len(reqEditors)) @@ -2063,32 +1931,32 @@ func (_m *ClientWithResponsesInterface) ListDeploymentsWithResponse(ctx context. return r0, r1 } -// ListManagedDomainsWithResponse provides a mock function with given fields: ctx, organizationId, reqEditors -func (_m *ClientWithResponsesInterface) ListManagedDomainsWithResponse(ctx context.Context, organizationId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ListManagedDomainsResponse, error) { +// ListEnvironmentObjectsWithResponse provides a mock function with given fields: ctx, organizationId, params, reqEditors +func (_m *ClientWithResponsesInterface) ListEnvironmentObjectsWithResponse(ctx context.Context, organizationId string, params *astrocore.ListEnvironmentObjectsParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ListEnvironmentObjectsResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId) + _ca = append(_ca, ctx, organizationId, params) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.ListManagedDomainsResponse + var r0 *astrocore.ListEnvironmentObjectsResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) (*astrocore.ListManagedDomainsResponse, error)); ok { - return rf(ctx, organizationId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, *astrocore.ListEnvironmentObjectsParams, ...astrocore.RequestEditorFn) (*astrocore.ListEnvironmentObjectsResponse, error)); ok { + return rf(ctx, organizationId, params, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) *astrocore.ListManagedDomainsResponse); ok { - r0 = rf(ctx, organizationId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, *astrocore.ListEnvironmentObjectsParams, ...astrocore.RequestEditorFn) *astrocore.ListEnvironmentObjectsResponse); ok { + r0 = rf(ctx, organizationId, params, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.ListManagedDomainsResponse) + r0 = ret.Get(0).(*astrocore.ListEnvironmentObjectsResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, *astrocore.ListEnvironmentObjectsParams, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, params, reqEditors...) } else { r1 = ret.Error(1) } @@ -2162,39 +2030,6 @@ func (_m *ClientWithResponsesInterface) ListOrganizationApiTokensWithResponse(ct return r0, r1 } -// ListOrganizationAuthIdsWithResponse provides a mock function with given fields: ctx, params, reqEditors -func (_m *ClientWithResponsesInterface) ListOrganizationAuthIdsWithResponse(ctx context.Context, params *astrocore.ListOrganizationAuthIdsParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ListOrganizationAuthIdsResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, params) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.ListOrganizationAuthIdsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *astrocore.ListOrganizationAuthIdsParams, ...astrocore.RequestEditorFn) (*astrocore.ListOrganizationAuthIdsResponse, error)); ok { - return rf(ctx, params, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, *astrocore.ListOrganizationAuthIdsParams, ...astrocore.RequestEditorFn) *astrocore.ListOrganizationAuthIdsResponse); ok { - r0 = rf(ctx, params, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.ListOrganizationAuthIdsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *astrocore.ListOrganizationAuthIdsParams, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, params, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // ListOrganizationTeamsWithResponse provides a mock function with given fields: ctx, organizationId, params, reqEditors func (_m *ClientWithResponsesInterface) ListOrganizationTeamsWithResponse(ctx context.Context, organizationId string, params *astrocore.ListOrganizationTeamsParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ListOrganizationTeamsResponse, error) { _va := make([]interface{}, len(reqEditors)) @@ -2261,39 +2096,6 @@ func (_m *ClientWithResponsesInterface) ListOrganizationsWithResponse(ctx contex return r0, r1 } -// ListSsoConnectionsWithResponse provides a mock function with given fields: ctx, organizationId, reqEditors -func (_m *ClientWithResponsesInterface) ListSsoConnectionsWithResponse(ctx context.Context, organizationId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ListSsoConnectionsResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.ListSsoConnectionsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) (*astrocore.ListSsoConnectionsResponse, error)); ok { - return rf(ctx, organizationId, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) *astrocore.ListSsoConnectionsResponse); ok { - r0 = rf(ctx, organizationId, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.ListSsoConnectionsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // ListWorkspaceApiTokensWithResponse provides a mock function with given fields: ctx, organizationId, workspaceId, params, reqEditors func (_m *ClientWithResponsesInterface) ListWorkspaceApiTokensWithResponse(ctx context.Context, organizationId string, workspaceId string, params *astrocore.ListWorkspaceApiTokensParams, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ListWorkspaceApiTokensResponse, error) { _va := make([]interface{}, len(reqEditors)) @@ -2789,32 +2591,32 @@ func (_m *ClientWithResponsesInterface) RemoveTeamMemberWithResponse(ctx context return r0, r1 } -// RotateOrganizationApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, apiTokenId, reqEditors -func (_m *ClientWithResponsesInterface) RotateOrganizationApiTokenWithResponse(ctx context.Context, organizationId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.RotateOrganizationApiTokenResponse, error) { +// RotateDeploymentApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, apiTokenId, reqEditors +func (_m *ClientWithResponsesInterface) RotateDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.RotateDeploymentApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, apiTokenId) + _ca = append(_ca, ctx, organizationId, deploymentId, apiTokenId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.RotateOrganizationApiTokenResponse + var r0 *astrocore.RotateDeploymentApiTokenResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.RotateOrganizationApiTokenResponse, error)); ok { - return rf(ctx, organizationId, apiTokenId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) (*astrocore.RotateDeploymentApiTokenResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.RotateOrganizationApiTokenResponse); ok { - r0 = rf(ctx, organizationId, apiTokenId, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) *astrocore.RotateDeploymentApiTokenResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.RotateOrganizationApiTokenResponse) + r0 = ret.Get(0).(*astrocore.RotateDeploymentApiTokenResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, apiTokenId, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, apiTokenId, reqEditors...) } else { r1 = ret.Error(1) } @@ -2822,18 +2624,51 @@ func (_m *ClientWithResponsesInterface) RotateOrganizationApiTokenWithResponse(c return r0, r1 } -// RotateWorkspaceApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, workspaceId, apiTokenId, reqEditors -func (_m *ClientWithResponsesInterface) RotateWorkspaceApiTokenWithResponse(ctx context.Context, organizationId string, workspaceId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.RotateWorkspaceApiTokenResponse, error) { +// RotateOrganizationApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, apiTokenId, reqEditors +func (_m *ClientWithResponsesInterface) RotateOrganizationApiTokenWithResponse(ctx context.Context, organizationId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.RotateOrganizationApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, workspaceId, apiTokenId) + _ca = append(_ca, ctx, organizationId, apiTokenId) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.RotateWorkspaceApiTokenResponse + var r0 *astrocore.RotateOrganizationApiTokenResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.RotateOrganizationApiTokenResponse, error)); ok { + return rf(ctx, organizationId, apiTokenId, reqEditors...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.RotateOrganizationApiTokenResponse); ok { + r0 = rf(ctx, organizationId, apiTokenId, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*astrocore.RotateOrganizationApiTokenResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, apiTokenId, reqEditors...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RotateWorkspaceApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, workspaceId, apiTokenId, reqEditors +func (_m *ClientWithResponsesInterface) RotateWorkspaceApiTokenWithResponse(ctx context.Context, organizationId string, workspaceId string, apiTokenId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.RotateWorkspaceApiTokenResponse, error) { + _va := make([]interface{}, len(reqEditors)) + for _i := range reqEditors { + _va[_i] = reqEditors[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, organizationId, workspaceId, apiTokenId) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *astrocore.RotateWorkspaceApiTokenResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...astrocore.RequestEditorFn) (*astrocore.RotateWorkspaceApiTokenResponse, error)); ok { return rf(ctx, organizationId, workspaceId, apiTokenId, reqEditors...) @@ -2855,6 +2690,72 @@ func (_m *ClientWithResponsesInterface) RotateWorkspaceApiTokenWithResponse(ctx return r0, r1 } +// TransferDeploymentWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) TransferDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.TransferDeploymentResponse, error) { + _va := make([]interface{}, len(reqEditors)) + for _i := range reqEditors { + _va[_i] = reqEditors[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, organizationId, deploymentId, contentType, body) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *astrocore.TransferDeploymentResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.TransferDeploymentResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, contentType, body, reqEditors...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.TransferDeploymentResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, contentType, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*astrocore.TransferDeploymentResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, contentType, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// TransferDeploymentWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, body, reqEditors +func (_m *ClientWithResponsesInterface) TransferDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, body astrocore.TransferDeploymentRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.TransferDeploymentResponse, error) { + _va := make([]interface{}, len(reqEditors)) + for _i := range reqEditors { + _va[_i] = reqEditors[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, organizationId, deploymentId, body) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *astrocore.TransferDeploymentResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.TransferDeploymentRequest, ...astrocore.RequestEditorFn) (*astrocore.TransferDeploymentResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, body, reqEditors...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.TransferDeploymentRequest, ...astrocore.RequestEditorFn) *astrocore.TransferDeploymentResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*astrocore.TransferDeploymentResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, astrocore.TransferDeploymentRequest, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // UpdateAwsClusterWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, clusterId, contentType, body, reqEditors func (_m *ClientWithResponsesInterface) UpdateAwsClusterWithBodyWithResponse(ctx context.Context, organizationId string, clusterId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateAwsClusterResponse, error) { _va := make([]interface{}, len(reqEditors)) @@ -2987,32 +2888,98 @@ func (_m *ClientWithResponsesInterface) UpdateAzureClusterWithResponse(ctx conte return r0, r1 } -// UpdateDeploymentWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, workspaceId, deploymentId, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) UpdateDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, workspaceId string, deploymentId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentResponse, error) { +// UpdateDeploymentApiTokenWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, apiTokenId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) UpdateDeploymentApiTokenWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentApiTokenResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, workspaceId, deploymentId, contentType, body) + _ca = append(_ca, ctx, organizationId, deploymentId, apiTokenId, contentType, body) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *astrocore.UpdateDeploymentApiTokenResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentApiTokenResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, apiTokenId, contentType, body, reqEditors...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.UpdateDeploymentApiTokenResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, apiTokenId, contentType, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*astrocore.UpdateDeploymentApiTokenResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, apiTokenId, contentType, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateDeploymentApiTokenWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, apiTokenId, body, reqEditors +func (_m *ClientWithResponsesInterface) UpdateDeploymentApiTokenWithResponse(ctx context.Context, organizationId string, deploymentId string, apiTokenId string, body astrocore.UpdateDeploymentApiTokenRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentApiTokenResponse, error) { + _va := make([]interface{}, len(reqEditors)) + for _i := range reqEditors { + _va[_i] = reqEditors[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, organizationId, deploymentId, apiTokenId, body) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *astrocore.UpdateDeploymentApiTokenResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, astrocore.UpdateDeploymentApiTokenRequest, ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentApiTokenResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, apiTokenId, body, reqEditors...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, astrocore.UpdateDeploymentApiTokenRequest, ...astrocore.RequestEditorFn) *astrocore.UpdateDeploymentApiTokenResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, apiTokenId, body, reqEditors...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*astrocore.UpdateDeploymentApiTokenResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, astrocore.UpdateDeploymentApiTokenRequest, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, apiTokenId, body, reqEditors...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateDeploymentWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) UpdateDeploymentWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentResponse, error) { + _va := make([]interface{}, len(reqEditors)) + for _i := range reqEditors { + _va[_i] = reqEditors[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, organizationId, deploymentId, contentType, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) var r0 *astrocore.UpdateDeploymentResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentResponse, error)); ok { - return rf(ctx, organizationId, workspaceId, deploymentId, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.UpdateDeploymentResponse); ok { - r0 = rf(ctx, organizationId, workspaceId, deploymentId, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.UpdateDeploymentResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*astrocore.UpdateDeploymentResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, workspaceId, deploymentId, contentType, body, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, contentType, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -3020,32 +2987,32 @@ func (_m *ClientWithResponsesInterface) UpdateDeploymentWithBodyWithResponse(ctx return r0, r1 } -// UpdateDeploymentWithResponse provides a mock function with given fields: ctx, organizationId, workspaceId, deploymentId, body, reqEditors -func (_m *ClientWithResponsesInterface) UpdateDeploymentWithResponse(ctx context.Context, organizationId string, workspaceId string, deploymentId string, body astrocore.UpdateDeploymentRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentResponse, error) { +// UpdateDeploymentWithResponse provides a mock function with given fields: ctx, organizationId, deploymentId, body, reqEditors +func (_m *ClientWithResponsesInterface) UpdateDeploymentWithResponse(ctx context.Context, organizationId string, deploymentId string, body astrocore.UpdateDeploymentRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, workspaceId, deploymentId, body) + _ca = append(_ca, ctx, organizationId, deploymentId, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) var r0 *astrocore.UpdateDeploymentResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, astrocore.UpdateDeploymentRequest, ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentResponse, error)); ok { - return rf(ctx, organizationId, workspaceId, deploymentId, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateDeploymentRequest, ...astrocore.RequestEditorFn) (*astrocore.UpdateDeploymentResponse, error)); ok { + return rf(ctx, organizationId, deploymentId, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, astrocore.UpdateDeploymentRequest, ...astrocore.RequestEditorFn) *astrocore.UpdateDeploymentResponse); ok { - r0 = rf(ctx, organizationId, workspaceId, deploymentId, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateDeploymentRequest, ...astrocore.RequestEditorFn) *astrocore.UpdateDeploymentResponse); ok { + r0 = rf(ctx, organizationId, deploymentId, body, reqEditors...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*astrocore.UpdateDeploymentResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, astrocore.UpdateDeploymentRequest, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, workspaceId, deploymentId, body, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, astrocore.UpdateDeploymentRequest, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, deploymentId, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -3053,32 +3020,32 @@ func (_m *ClientWithResponsesInterface) UpdateDeploymentWithResponse(ctx context return r0, r1 } -// UpdateGcpClusterWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, clusterId, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) UpdateGcpClusterWithBodyWithResponse(ctx context.Context, organizationId string, clusterId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateGcpClusterResponse, error) { +// UpdateEnvironmentObjectWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, environmentObjectId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) UpdateEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateEnvironmentObjectResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, clusterId, contentType, body) + _ca = append(_ca, ctx, organizationId, environmentObjectId, contentType, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.UpdateGcpClusterResponse + var r0 *astrocore.UpdateEnvironmentObjectResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.UpdateGcpClusterResponse, error)); ok { - return rf(ctx, organizationId, clusterId, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.UpdateEnvironmentObjectResponse, error)); ok { + return rf(ctx, organizationId, environmentObjectId, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.UpdateGcpClusterResponse); ok { - r0 = rf(ctx, organizationId, clusterId, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.UpdateEnvironmentObjectResponse); ok { + r0 = rf(ctx, organizationId, environmentObjectId, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.UpdateGcpClusterResponse) + r0 = ret.Get(0).(*astrocore.UpdateEnvironmentObjectResponse) } } if rf, ok := ret.Get(1).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, clusterId, contentType, body, reqEditors...) + r1 = rf(ctx, organizationId, environmentObjectId, contentType, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -3086,32 +3053,32 @@ func (_m *ClientWithResponsesInterface) UpdateGcpClusterWithBodyWithResponse(ctx return r0, r1 } -// UpdateGcpClusterWithResponse provides a mock function with given fields: ctx, organizationId, clusterId, body, reqEditors -func (_m *ClientWithResponsesInterface) UpdateGcpClusterWithResponse(ctx context.Context, organizationId string, clusterId string, body astrocore.UpdateGcpClusterRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateGcpClusterResponse, error) { +// UpdateEnvironmentObjectWithResponse provides a mock function with given fields: ctx, organizationId, environmentObjectId, body, reqEditors +func (_m *ClientWithResponsesInterface) UpdateEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, body astrocore.UpdateEnvironmentObjectRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateEnvironmentObjectResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, clusterId, body) + _ca = append(_ca, ctx, organizationId, environmentObjectId, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.UpdateGcpClusterResponse + var r0 *astrocore.UpdateEnvironmentObjectResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateGcpClusterRequest, ...astrocore.RequestEditorFn) (*astrocore.UpdateGcpClusterResponse, error)); ok { - return rf(ctx, organizationId, clusterId, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateEnvironmentObjectRequest, ...astrocore.RequestEditorFn) (*astrocore.UpdateEnvironmentObjectResponse, error)); ok { + return rf(ctx, organizationId, environmentObjectId, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateGcpClusterRequest, ...astrocore.RequestEditorFn) *astrocore.UpdateGcpClusterResponse); ok { - r0 = rf(ctx, organizationId, clusterId, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateEnvironmentObjectRequest, ...astrocore.RequestEditorFn) *astrocore.UpdateEnvironmentObjectResponse); ok { + r0 = rf(ctx, organizationId, environmentObjectId, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.UpdateGcpClusterResponse) + r0 = ret.Get(0).(*astrocore.UpdateEnvironmentObjectResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, astrocore.UpdateGcpClusterRequest, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, clusterId, body, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, astrocore.UpdateEnvironmentObjectRequest, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, environmentObjectId, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -3119,32 +3086,32 @@ func (_m *ClientWithResponsesInterface) UpdateGcpClusterWithResponse(ctx context return r0, r1 } -// UpdateManagedDomainWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, domainId, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) UpdateManagedDomainWithBodyWithResponse(ctx context.Context, organizationId string, domainId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateManagedDomainResponse, error) { +// UpdateGcpClusterWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, clusterId, contentType, body, reqEditors +func (_m *ClientWithResponsesInterface) UpdateGcpClusterWithBodyWithResponse(ctx context.Context, organizationId string, clusterId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateGcpClusterResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, domainId, contentType, body) + _ca = append(_ca, ctx, organizationId, clusterId, contentType, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.UpdateManagedDomainResponse + var r0 *astrocore.UpdateGcpClusterResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.UpdateManagedDomainResponse, error)); ok { - return rf(ctx, organizationId, domainId, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.UpdateGcpClusterResponse, error)); ok { + return rf(ctx, organizationId, clusterId, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.UpdateManagedDomainResponse); ok { - r0 = rf(ctx, organizationId, domainId, contentType, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.UpdateGcpClusterResponse); ok { + r0 = rf(ctx, organizationId, clusterId, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.UpdateManagedDomainResponse) + r0 = ret.Get(0).(*astrocore.UpdateGcpClusterResponse) } } if rf, ok := ret.Get(1).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, domainId, contentType, body, reqEditors...) + r1 = rf(ctx, organizationId, clusterId, contentType, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -3152,32 +3119,32 @@ func (_m *ClientWithResponsesInterface) UpdateManagedDomainWithBodyWithResponse( return r0, r1 } -// UpdateManagedDomainWithResponse provides a mock function with given fields: ctx, organizationId, domainId, body, reqEditors -func (_m *ClientWithResponsesInterface) UpdateManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, body astrocore.UpdateManagedDomainRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateManagedDomainResponse, error) { +// UpdateGcpClusterWithResponse provides a mock function with given fields: ctx, organizationId, clusterId, body, reqEditors +func (_m *ClientWithResponsesInterface) UpdateGcpClusterWithResponse(ctx context.Context, organizationId string, clusterId string, body astrocore.UpdateGcpClusterRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateGcpClusterResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] } var _ca []interface{} - _ca = append(_ca, ctx, organizationId, domainId, body) + _ca = append(_ca, ctx, organizationId, clusterId, body) _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *astrocore.UpdateManagedDomainResponse + var r0 *astrocore.UpdateGcpClusterResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateManagedDomainRequest, ...astrocore.RequestEditorFn) (*astrocore.UpdateManagedDomainResponse, error)); ok { - return rf(ctx, organizationId, domainId, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateGcpClusterRequest, ...astrocore.RequestEditorFn) (*astrocore.UpdateGcpClusterResponse, error)); ok { + return rf(ctx, organizationId, clusterId, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateManagedDomainRequest, ...astrocore.RequestEditorFn) *astrocore.UpdateManagedDomainResponse); ok { - r0 = rf(ctx, organizationId, domainId, body, reqEditors...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateGcpClusterRequest, ...astrocore.RequestEditorFn) *astrocore.UpdateGcpClusterResponse); ok { + r0 = rf(ctx, organizationId, clusterId, body, reqEditors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.UpdateManagedDomainResponse) + r0 = ret.Get(0).(*astrocore.UpdateGcpClusterResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, astrocore.UpdateManagedDomainRequest, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, domainId, body, reqEditors...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, astrocore.UpdateGcpClusterRequest, ...astrocore.RequestEditorFn) error); ok { + r1 = rf(ctx, organizationId, clusterId, body, reqEditors...) } else { r1 = ret.Error(1) } @@ -3383,72 +3350,6 @@ func (_m *ClientWithResponsesInterface) UpdateSelfUserInviteWithResponse(ctx con return r0, r1 } -// UpdateSsoConnectionWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, connectionId, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) UpdateSsoConnectionWithBodyWithResponse(ctx context.Context, organizationId string, connectionId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateSsoConnectionResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId, connectionId, contentType, body) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.UpdateSsoConnectionResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.UpdateSsoConnectionResponse, error)); ok { - return rf(ctx, organizationId, connectionId, contentType, body, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.UpdateSsoConnectionResponse); ok { - r0 = rf(ctx, organizationId, connectionId, contentType, body, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.UpdateSsoConnectionResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, connectionId, contentType, body, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// UpdateSsoConnectionWithResponse provides a mock function with given fields: ctx, organizationId, connectionId, body, reqEditors -func (_m *ClientWithResponsesInterface) UpdateSsoConnectionWithResponse(ctx context.Context, organizationId string, connectionId string, body astrocore.UpdateSsoConnectionRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateSsoConnectionResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId, connectionId, body) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.UpdateSsoConnectionResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateSsoConnectionRequest, ...astrocore.RequestEditorFn) (*astrocore.UpdateSsoConnectionResponse, error)); ok { - return rf(ctx, organizationId, connectionId, body, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, astrocore.UpdateSsoConnectionRequest, ...astrocore.RequestEditorFn) *astrocore.UpdateSsoConnectionResponse); ok { - r0 = rf(ctx, organizationId, connectionId, body, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.UpdateSsoConnectionResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, astrocore.UpdateSsoConnectionRequest, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, connectionId, body, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // UpdateTeamWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, teamId, contentType, body, reqEditors func (_m *ClientWithResponsesInterface) UpdateTeamWithBodyWithResponse(ctx context.Context, organizationId string, teamId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpdateTeamResponse, error) { _va := make([]interface{}, len(reqEditors)) @@ -3647,204 +3548,6 @@ func (_m *ClientWithResponsesInterface) UpdateWorkspaceWithResponse(ctx context. return r0, r1 } -// UpsertSsoBypassKeyWithResponse provides a mock function with given fields: ctx, organizationId, reqEditors -func (_m *ClientWithResponsesInterface) UpsertSsoBypassKeyWithResponse(ctx context.Context, organizationId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.UpsertSsoBypassKeyResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.UpsertSsoBypassKeyResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) (*astrocore.UpsertSsoBypassKeyResponse, error)); ok { - return rf(ctx, organizationId, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, ...astrocore.RequestEditorFn) *astrocore.UpsertSsoBypassKeyResponse); ok { - r0 = rf(ctx, organizationId, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.UpsertSsoBypassKeyResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ValidateCreditCardPaymentWithBodyWithResponse provides a mock function with given fields: ctx, organizationId, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) ValidateCreditCardPaymentWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ValidateCreditCardPaymentResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId, contentType, body) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.ValidateCreditCardPaymentResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.ValidateCreditCardPaymentResponse, error)); ok { - return rf(ctx, organizationId, contentType, body, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.ValidateCreditCardPaymentResponse); ok { - r0 = rf(ctx, organizationId, contentType, body, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.ValidateCreditCardPaymentResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, contentType, body, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ValidateCreditCardPaymentWithResponse provides a mock function with given fields: ctx, organizationId, body, reqEditors -func (_m *ClientWithResponsesInterface) ValidateCreditCardPaymentWithResponse(ctx context.Context, organizationId string, body astrocore.ValidateCreditCardPaymentRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ValidateCreditCardPaymentResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId, body) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.ValidateCreditCardPaymentResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.ValidateCreditCardPaymentRequest, ...astrocore.RequestEditorFn) (*astrocore.ValidateCreditCardPaymentResponse, error)); ok { - return rf(ctx, organizationId, body, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, astrocore.ValidateCreditCardPaymentRequest, ...astrocore.RequestEditorFn) *astrocore.ValidateCreditCardPaymentResponse); ok { - r0 = rf(ctx, organizationId, body, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.ValidateCreditCardPaymentResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, astrocore.ValidateCreditCardPaymentRequest, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, body, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ValidateSsoLoginWithBodyWithResponse provides a mock function with given fields: ctx, contentType, body, reqEditors -func (_m *ClientWithResponsesInterface) ValidateSsoLoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ValidateSsoLoginResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, contentType, body) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.ValidateSsoLoginResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...astrocore.RequestEditorFn) (*astrocore.ValidateSsoLoginResponse, error)); ok { - return rf(ctx, contentType, body, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...astrocore.RequestEditorFn) *astrocore.ValidateSsoLoginResponse); ok { - r0 = rf(ctx, contentType, body, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.ValidateSsoLoginResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, io.Reader, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, contentType, body, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ValidateSsoLoginWithResponse provides a mock function with given fields: ctx, body, reqEditors -func (_m *ClientWithResponsesInterface) ValidateSsoLoginWithResponse(ctx context.Context, body astrocore.ValidateSsoLoginRequest, reqEditors ...astrocore.RequestEditorFn) (*astrocore.ValidateSsoLoginResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, body) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.ValidateSsoLoginResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, astrocore.ValidateSsoLoginRequest, ...astrocore.RequestEditorFn) (*astrocore.ValidateSsoLoginResponse, error)); ok { - return rf(ctx, body, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, astrocore.ValidateSsoLoginRequest, ...astrocore.RequestEditorFn) *astrocore.ValidateSsoLoginResponse); ok { - r0 = rf(ctx, body, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.ValidateSsoLoginResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, astrocore.ValidateSsoLoginRequest, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, body, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// VerifyManagedDomainWithResponse provides a mock function with given fields: ctx, organizationId, domainId, reqEditors -func (_m *ClientWithResponsesInterface) VerifyManagedDomainWithResponse(ctx context.Context, organizationId string, domainId string, reqEditors ...astrocore.RequestEditorFn) (*astrocore.VerifyManagedDomainResponse, error) { - _va := make([]interface{}, len(reqEditors)) - for _i := range reqEditors { - _va[_i] = reqEditors[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, organizationId, domainId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *astrocore.VerifyManagedDomainResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) (*astrocore.VerifyManagedDomainResponse, error)); ok { - return rf(ctx, organizationId, domainId, reqEditors...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...astrocore.RequestEditorFn) *astrocore.VerifyManagedDomainResponse); ok { - r0 = rf(ctx, organizationId, domainId, reqEditors...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*astrocore.VerifyManagedDomainResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, ...astrocore.RequestEditorFn) error); ok { - r1 = rf(ctx, organizationId, domainId, reqEditors...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // NewClientWithResponsesInterface creates a new instance of ClientWithResponsesInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewClientWithResponsesInterface(t interface { diff --git a/cloud/deployment/deployment_test.go b/cloud/deployment/deployment_test.go index 06fef339b..a5f541bfd 100644 --- a/cloud/deployment/deployment_test.go +++ b/cloud/deployment/deployment_test.go @@ -25,7 +25,7 @@ var ( disableCiCdEnforcement = false errMock = errors.New("mock error") limit = 1000 - clusterType = []astrocore.ListClustersParamsTypes{astrocore.ListClustersParamsTypesBRINGYOUROWNCLOUD, astrocore.ListClustersParamsTypesHOSTED} + clusterType = []astrocore.ListClustersParamsTypes{astrocore.BRINGYOUROWNCLOUD, astrocore.HOSTED} clusterListParams = &astrocore.ListClustersParams{ Types: &clusterType, Limit: &limit, diff --git a/cloud/deployment/fromfile/fromfile_test.go b/cloud/deployment/fromfile/fromfile_test.go index b1511063b..7bc174e70 100644 --- a/cloud/deployment/fromfile/fromfile_test.go +++ b/cloud/deployment/fromfile/fromfile_test.go @@ -43,7 +43,7 @@ var ( Deployments: mockCoreDeploymentResponse, }, } - clusterType = []astrocore.ListClustersParamsTypes{astrocore.ListClustersParamsTypesBRINGYOUROWNCLOUD, astrocore.ListClustersParamsTypesHOSTED} + clusterType = []astrocore.ListClustersParamsTypes{astrocore.BRINGYOUROWNCLOUD, astrocore.HOSTED} clusterListParams = &astrocore.ListClustersParams{ Types: &clusterType, Limit: &limit, diff --git a/cloud/environment/environment.go b/cloud/environment/environment.go new file mode 100644 index 000000000..8907940f4 --- /dev/null +++ b/cloud/environment/environment.go @@ -0,0 +1,60 @@ +package environment + +import ( + http_context "context" + + astrocore "github.com/astronomer/astro-cli/astro-client-core" + "github.com/astronomer/astro-cli/config" +) + +func ListConnections(deploymentId string, coreClient astrocore.CoreClient) (map[string]astrocore.EnvironmentObjectConnection, error) { + envObjs, err := listEnvironmentObjects(deploymentId, astrocore.ListEnvironmentObjectsParamsObjectTypeCONNECTION, coreClient) + if err != nil { + return nil, err + } + connections := make(map[string]astrocore.EnvironmentObjectConnection) + for _, envObj := range envObjs { + connections[envObj.ObjectKey] = *envObj.Connection + } + + return connections, nil +} + +func listEnvironmentObjects(deploymentId string, objectType astrocore.ListEnvironmentObjectsParamsObjectType, coreClient astrocore.CoreClient) ([]astrocore.EnvironmentObject, error) { + c, err := config.GetCurrentContext() + if err != nil { + return []astrocore.EnvironmentObject{}, nil + } + showSecrets := true + resolvedLinked := true + limit := 1000 + listParams := &astrocore.ListEnvironmentObjectsParams{ + ObjectType: &objectType, + ShowSecrets: &showSecrets, + ResolveLinked: &resolvedLinked, + Limit: &limit, + } + if deploymentId != "" { + // if the deployment is specified during the command, use that as the entity + // that environment objects will be listed for + listParams.DeploymentId = &deploymentId + } else if c.Workspace != "" { + // or, if the workspace is specified as part of the context, use that + listParams.WorkspaceId = &c.Workspace + } else { + // otherwise, we don't have an entity to list for, so we return an empty list + return []astrocore.EnvironmentObject{}, nil + } + resp, err := coreClient.ListEnvironmentObjectsWithResponse(http_context.Background(), c.OrganizationShortName, listParams) + if err != nil { + return []astrocore.EnvironmentObject{}, nil + } + err = astrocore.NormalizeAPIError(resp.HTTPResponse, resp.Body) + if err != nil { + return []astrocore.EnvironmentObject{}, nil + } + envObjsPaginated := *resp.JSON200 + envObjs := envObjsPaginated.EnvironmentObjects + + return envObjs, nil +} diff --git a/cloud/organization/organization.go b/cloud/organization/organization.go index 53aa15ccc..d7bb7e3f0 100644 --- a/cloud/organization/organization.go +++ b/cloud/organization/organization.go @@ -199,7 +199,7 @@ func IsOrgHosted() bool { } func ListClusters(organizationShortName string, coreClient astrocore.CoreClient) ([]astrocore.Cluster, error) { - clusterTypes := []astrocore.ListClustersParamsTypes{astrocore.ListClustersParamsTypesBRINGYOUROWNCLOUD, astrocore.ListClustersParamsTypesHOSTED} + clusterTypes := []astrocore.ListClustersParamsTypes{astrocore.BRINGYOUROWNCLOUD, astrocore.HOSTED} limit := 1000 clusterListParams := &astrocore.ListClustersParams{ Types: &clusterTypes, diff --git a/cloud/organization/organization_token.go b/cloud/organization/organization_token.go index f7f28beab..af20c3db6 100644 --- a/cloud/organization/organization_token.go +++ b/cloud/organization/organization_token.go @@ -94,13 +94,13 @@ func AddOrgTokenToWorkspace(id, name, role, workspace string, out io.Writer, cli } } - apiTokenWorkspaceRole := astrocore.ApiTokenWorkspaceRole{ + apiTokenWorkspaceRole := astrocore.ApiTokenWorkspaceRoleRequest{ EntityId: workspace, Role: role, } - apiTokenWorkspaceRoles := []astrocore.ApiTokenWorkspaceRole{apiTokenWorkspaceRole} + apiTokenWorkspaceRoles := []astrocore.ApiTokenWorkspaceRoleRequest{apiTokenWorkspaceRole} - updateOrganizationAPITokenRoles := astrocore.UpdateOrganizationApiTokenRoles{ + updateOrganizationAPITokenRoles := astrocore.UpdateOrganizationApiTokenRolesRequest{ Organization: orgRole, Workspace: &apiTokenWorkspaceRoles, } @@ -391,11 +391,11 @@ func UpdateToken(id, name, newName, description, role string, out io.Writer, cli } var currentOrgRole string - apiTokenWorkspaceRoles := []astrocore.ApiTokenWorkspaceRole{} + apiTokenWorkspaceRoles := []astrocore.ApiTokenWorkspaceRoleRequest{} for i := range token.Roles { if token.Roles[i].EntityType == workspaceEntity { - apiTokenWorkspaceRoles = append(apiTokenWorkspaceRoles, astrocore.ApiTokenWorkspaceRole{ + apiTokenWorkspaceRoles = append(apiTokenWorkspaceRoles, astrocore.ApiTokenWorkspaceRoleRequest{ EntityId: token.Roles[i].EntityId, Role: token.Roles[i].Role, }) @@ -406,7 +406,7 @@ func UpdateToken(id, name, newName, description, role string, out io.Writer, cli } } if role == "" { - updateOrganizationAPITokenRoles := astrocore.UpdateOrganizationApiTokenRoles{ + updateOrganizationAPITokenRoles := astrocore.UpdateOrganizationApiTokenRolesRequest{ Organization: currentOrgRole, Workspace: &apiTokenWorkspaceRoles, } @@ -417,7 +417,7 @@ func UpdateToken(id, name, newName, description, role string, out io.Writer, cli if err != nil { return err } - updateOrganizationAPITokenRoles := astrocore.UpdateOrganizationApiTokenRoles{ + updateOrganizationAPITokenRoles := astrocore.UpdateOrganizationApiTokenRolesRequest{ Organization: role, Workspace: &apiTokenWorkspaceRoles, } diff --git a/cmd/airflow.go b/cmd/airflow.go index bcb524d98..43c47afae 100644 --- a/cmd/airflow.go +++ b/cmd/airflow.go @@ -10,6 +10,8 @@ import ( "github.com/astronomer/astro-cli/airflow" airflowversions "github.com/astronomer/astro-cli/airflow_versions" astro "github.com/astronomer/astro-cli/astro-client" + astrocore "github.com/astronomer/astro-cli/astro-client-core" + "github.com/astronomer/astro-cli/cloud/environment" "github.com/astronomer/astro-cli/cmd/utils" "github.com/astronomer/astro-cli/config" "github.com/astronomer/astro-cli/context" @@ -103,7 +105,7 @@ astro dev init --airflow-version 2.2.3 errPytestArgs = errors.New("") ) -func newDevRootCmd(astroClient astro.Client) *cobra.Command { +func newDevRootCmd(astroClient astro.Client, astroCoreClient astrocore.CoreClient) *cobra.Command { cmd := &cobra.Command{ Use: "dev", Aliases: []string{"d"}, @@ -112,7 +114,7 @@ func newDevRootCmd(astroClient astro.Client) *cobra.Command { } cmd.AddCommand( newAirflowInitCmd(), - newAirflowStartCmd(), + newAirflowStartCmd(astroCoreClient), newAirflowRunCmd(), newAirflowPSCmd(), newAirflowLogsCmd(), @@ -120,7 +122,7 @@ func newDevRootCmd(astroClient astro.Client) *cobra.Command { newAirflowKillCmd(), newAirflowPytestCmd(), newAirflowParseCmd(), - newAirflowRestartCmd(), + newAirflowRestartCmd(astroCoreClient), newAirflowUpgradeCheckCmd(), newAirflowBashCmd(), newAirflowObjectRootCmd(), @@ -210,7 +212,7 @@ func newAirflowUpgradeTestCmd(astroClient astro.Client) *cobra.Command { return cmd } -func newAirflowStartCmd() *cobra.Command { +func newAirflowStartCmd(astroCoreClient astrocore.CoreClient) *cobra.Command { cmd := &cobra.Command{ Use: "start", Short: "Start a local Airflow environment", @@ -221,7 +223,9 @@ func newAirflowStartCmd() *cobra.Command { return nil }, PreRunE: utils.EnsureProjectDir, - RunE: airflowStart, + RunE: func(cmd *cobra.Command, args []string) error { + return airflowStart(cmd, args, astroCoreClient) + }, } cmd.Flags().StringVarP(&envFile, "env", "e", ".env", "Location of file containing environment variables") cmd.Flags().BoolVarP(&noCache, "no-cache", "", false, "Do not use cache when building container image") @@ -230,6 +234,7 @@ func newAirflowStartCmd() *cobra.Command { cmd.Flags().BoolVarP(&noBrowser, "no-browser", "n", false, "Don't bring up the browser once the Webserver is healthy") cmd.Flags().DurationVar(&waitTime, "wait", 1*time.Minute, "Duration to wait for webserver to get healthy. The default is 5 minutes on M1 architecture and 1 minute for everything else. Use --wait 2m to wait for 2 minutes.") cmd.Flags().StringVarP(&composeFile, "compose-file", "", "", "Location of a custom compose file to use for starting Airflow") + cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve connections from") return cmd } @@ -314,7 +319,7 @@ func newAirflowKillCmd() *cobra.Command { return cmd } -func newAirflowRestartCmd() *cobra.Command { +func newAirflowRestartCmd(astroCoreClient astrocore.CoreClient) *cobra.Command { cmd := &cobra.Command{ Use: "restart", Short: "Restart all locally running Airflow containers", @@ -324,12 +329,15 @@ func newAirflowRestartCmd() *cobra.Command { return nil }, PreRunE: utils.EnsureProjectDir, - RunE: airflowRestart, + RunE: func(cmd *cobra.Command, args []string) error { + return airflowRestart(cmd, args, astroCoreClient) + }, } cmd.Flags().StringVarP(&envFile, "env", "e", ".env", "Location of file containing environment variables") cmd.Flags().BoolVarP(&noCache, "no-cache", "", false, "Do not use cache when building container image") cmd.Flags().StringVarP(&customImageName, "image-name", "i", "", "Name of a custom built image to restart airflow with") cmd.Flags().StringVarP(&settingsFile, "settings-file", "s", "airflow_settings.yaml", "Settings or env file to import airflow objects from") + cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve connections from") return cmd } @@ -614,7 +622,7 @@ func airflowUpgradeTest(cmd *cobra.Command, astroClient astro.Client) error { // } // Start an airflow cluster -func airflowStart(cmd *cobra.Command, args []string) error { +func airflowStart(cmd *cobra.Command, args []string, astroCoreClient astrocore.CoreClient) error { // Silence Usage as we have now validated command input cmd.SilenceUsage = true @@ -623,12 +631,17 @@ func airflowStart(cmd *cobra.Command, args []string) error { envFile = args[0] } + envConns, err := environment.ListConnections(deploymentID, astroCoreClient) + if err != nil { + return err + } + containerHandler, err := containerHandlerInit(config.WorkingPath, envFile, dockerfile, "") if err != nil { return err } - return containerHandler.Start(customImageName, settingsFile, composeFile, noCache, noBrowser, waitTime) + return containerHandler.Start(customImageName, settingsFile, composeFile, noCache, noBrowser, waitTime, envConns) } // airflowRun @@ -717,7 +730,7 @@ func airflowStop(cmd *cobra.Command, args []string) error { } // Stop an airflow cluster -func airflowRestart(cmd *cobra.Command, args []string) error { +func airflowRestart(cmd *cobra.Command, args []string, astroCoreClient astrocore.CoreClient) error { // Silence Usage as we have now validated command input cmd.SilenceUsage = true @@ -738,7 +751,12 @@ func airflowRestart(cmd *cobra.Command, args []string) error { // don't startup browser on restart noBrowser = true - return containerHandler.Start(customImageName, settingsFile, composeFile, noCache, noBrowser, waitTime) + envConns, err := environment.ListConnections(deploymentID, astroCoreClient) + if err != nil { + return err + } + + return containerHandler.Start(customImageName, settingsFile, composeFile, noCache, noBrowser, waitTime, envConns) } // run pytest on an airflow project diff --git a/cmd/root.go b/cmd/root.go index 2c947cd90..8bc0fd4cc 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -100,7 +100,7 @@ Welcome to the Astro CLI, the modern command line interface for data orchestrati newLoginCommand(astroClient, astroCoreClient, os.Stdout), newLogoutCommand(os.Stdout), newVersionCommand(), - newDevRootCmd(astroClient), + newDevRootCmd(astroClient, astroCoreClient), newContextCmd(os.Stdout), newConfigRootCmd(os.Stdout), newRunCommand(), diff --git a/settings/settings.go b/settings/settings.go index 9074ba6fb..0cfe9d327 100644 --- a/settings/settings.go +++ b/settings/settings.go @@ -11,6 +11,7 @@ import ( "gopkg.in/yaml.v3" + astrocore "github.com/astronomer/astro-cli/astro-client-core" "github.com/astronomer/astro-cli/docker" "github.com/astronomer/astro-cli/pkg/fileutil" "github.com/pkg/errors" @@ -57,7 +58,7 @@ var ( ) // ConfigSettings is the main builder of the settings package -func ConfigSettings(id, settingsFile string, version uint64, connections, variables, pools bool) error { +func ConfigSettings(id, settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, version uint64, connections, variables, pools bool) error { if id == "" { return errNoID } @@ -72,7 +73,7 @@ func ConfigSettings(id, settingsFile string, version uint64, connections, variab AddVariables(id, version) } if connections { - AddConnections(id, version) + AddConnections(id, version, envConns) } return nil } @@ -130,8 +131,39 @@ func AddVariables(id string, version uint64) { } // AddConnections is a function to add Connections from settings.yaml -func AddConnections(id string, version uint64) { +func AddConnections(id string, version uint64, envConns map[string]astrocore.EnvironmentObjectConnection) { connections := settings.Airflow.Connections + for envConnId, envConn := range envConns { + for _, conn := range connections { + if conn.ConnID == envConnId { + // if connection already exists in settings file, skip it because the file takes precedence + continue + } + } + conn := Connection{ + ConnID: envConnId, + ConnType: envConn.Type, + } + if envConn.Host != nil { + conn.ConnHost = *envConn.Host + } + if envConn.Port != nil { + conn.ConnPort = *envConn.Port + } + if envConn.Login != nil { + conn.ConnLogin = *envConn.Login + } + if envConn.Password != nil { + conn.ConnPassword = *envConn.Password + } + if envConn.Schema != nil { + conn.ConnSchema = *envConn.Schema + } + if envConn.Extra != nil { + conn.ConnExtra = *envConn.Extra + } + connections = append(connections, conn) + } baseCmd := "airflow connections " var baseAddCmd, baseRmCmd, baseListCmd, connIDArg, connTypeArg, connURIArg, connExtraArg, connHostArg, connLoginArg, connPasswordArg, connSchemaArg, connPortArg string if version >= AirflowVersionTwo { From d16bd52053a4d8a531d12097aac2cf85e18dff2b Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Fri, 13 Oct 2023 10:48:23 -0400 Subject: [PATCH 02/18] Working through unit tests --- airflow/docker_test.go | 63 +++++++++--------- airflow/mocks/ContainerHandler.go | 12 ++-- cloud/environment/environment.go | 37 ++++++----- cmd/.gitignore | 2 + cmd/airflow.go | 24 ++++--- cmd/airflow_test.go | 104 ++++++++++++++++++++++++------ config/config.go | 1 + config/types.go | 1 + 8 files changed, 164 insertions(+), 80 deletions(-) create mode 100755 cmd/.gitignore diff --git a/airflow/docker_test.go b/airflow/docker_test.go index 8503e9748..6f9cd49e8 100644 --- a/airflow/docker_test.go +++ b/airflow/docker_test.go @@ -14,6 +14,7 @@ import ( "github.com/astronomer/astro-cli/airflow/mocks" airflowTypes "github.com/astronomer/astro-cli/airflow/types" "github.com/astronomer/astro-cli/astro-client" + astrocore "github.com/astronomer/astro-cli/astro-client-core" astro_mocks "github.com/astronomer/astro-cli/astro-client/mocks" "github.com/astronomer/astro-cli/config" "github.com/sirupsen/logrus" @@ -370,7 +371,7 @@ func TestDockerComposeStart(t *testing.T) { composeMock.On("Up", mock.Anything, mock.Anything, api.UpOptions{Create: api.CreateOptions{}}).Return(nil).Twice() orgCheckWebserverHealthFunc := checkWebserverHealth - checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { + checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { return nil } defer func() { checkWebserverHealth = orgCheckWebserverHealthFunc }() @@ -378,10 +379,10 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock mockDockerCompose.imageHandler = imageHandler - err := mockDockerCompose.Start("", "", "", noCache, false, waitTime) + err := mockDockerCompose.Start("", "", "", noCache, false, waitTime, nil) assert.NoError(t, err) - err = mockDockerCompose.Start("custom-image", "", "", noCache, false, waitTime) + err = mockDockerCompose.Start("custom-image", "", "", noCache, false, waitTime, nil) assert.NoError(t, err) imageHandler.AssertExpectations(t) @@ -405,7 +406,7 @@ func TestDockerComposeStart(t *testing.T) { isM1 = mockIsM1 orgCheckWebserverHealthFunc := checkWebserverHealth - checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { + checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { assert.Equal(t, defaultTimeOut, timeout) return nil } @@ -414,7 +415,7 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock mockDockerCompose.imageHandler = imageHandler - err := mockDockerCompose.Start("", "", "", noCache, false, defaultTimeOut) + err := mockDockerCompose.Start("", "", "", noCache, false, defaultTimeOut, nil) assert.NoError(t, err) imageHandler.AssertExpectations(t) @@ -439,7 +440,7 @@ func TestDockerComposeStart(t *testing.T) { isM1 = mockIsM1 orgCheckWebserverHealthFunc := checkWebserverHealth - checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { + checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { assert.Equal(t, expectedTimeout, timeout) return nil } @@ -448,7 +449,7 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock mockDockerCompose.imageHandler = imageHandler - err := mockDockerCompose.Start("", "", "", noCache, false, defaultTimeOut) + err := mockDockerCompose.Start("", "", "", noCache, false, defaultTimeOut, nil) assert.NoError(t, err) imageHandler.AssertExpectations(t) @@ -467,7 +468,7 @@ func TestDockerComposeStart(t *testing.T) { composeMock.On("Up", mock.Anything, mock.Anything, api.UpOptions{Create: api.CreateOptions{}}).Return(nil).Once() orgCheckWebserverHealthFunc := checkWebserverHealth - checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { + checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { assert.Equal(t, userProvidedTimeOut, timeout) return nil } @@ -476,7 +477,7 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock mockDockerCompose.imageHandler = imageHandler - err := mockDockerCompose.Start("", "", "", noCache, false, userProvidedTimeOut) + err := mockDockerCompose.Start("", "", "", noCache, false, userProvidedTimeOut, nil) assert.NoError(t, err) imageHandler.AssertExpectations(t) @@ -495,7 +496,7 @@ func TestDockerComposeStart(t *testing.T) { composeMock.On("Up", mock.Anything, mock.Anything, api.UpOptions{Create: api.CreateOptions{}}).Return(nil).Twice() orgCheckWebserverHealthFunc := checkWebserverHealth - checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { + checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { return nil } defer func() { checkWebserverHealth = orgCheckWebserverHealthFunc }() @@ -503,10 +504,10 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock mockDockerCompose.imageHandler = imageHandler - err := mockDockerCompose.Start("", "", "", noCache, false, waitTime) + err := mockDockerCompose.Start("", "", "", noCache, false, waitTime, nil) assert.NoError(t, err) - err = mockDockerCompose.Start("custom-image", "", "", noCache, false, waitTime) + err = mockDockerCompose.Start("custom-image", "", "", noCache, false, waitTime, nil) assert.NoError(t, err) imageHandler.AssertExpectations(t) @@ -519,7 +520,7 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock - err := mockDockerCompose.Start("", "", "", false, false, waitTime) + err := mockDockerCompose.Start("", "", "", false, false, waitTime, nil) assert.Contains(t, err.Error(), "cannot start, project already running") composeMock.AssertExpectations(t) @@ -531,7 +532,7 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock - err := mockDockerCompose.Start("", "", "", false, false, waitTime) + err := mockDockerCompose.Start("", "", "", false, false, waitTime, nil) assert.ErrorIs(t, err, errMockDocker) composeMock.AssertExpectations(t) @@ -546,7 +547,7 @@ func TestDockerComposeStart(t *testing.T) { composeMock.On("Ps", mock.Anything, mockDockerCompose.projectName, api.PsOptions{All: true}).Return([]api.ContainerSummary{}, nil).Once() orgCheckWebserverHealthFunc := checkWebserverHealth - checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { + checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { return nil } defer func() { checkWebserverHealth = orgCheckWebserverHealthFunc }() @@ -554,7 +555,7 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock mockDockerCompose.imageHandler = imageHandler - err := mockDockerCompose.Start("", "", "", noCache, false, waitTime) + err := mockDockerCompose.Start("", "", "", noCache, false, waitTime, nil) assert.ErrorIs(t, err, errMockDocker) imageHandler.AssertExpectations(t) @@ -571,7 +572,7 @@ func TestDockerComposeStart(t *testing.T) { composeMock.On("Ps", mock.Anything, mockDockerCompose.projectName, api.PsOptions{All: true}).Return([]api.ContainerSummary{}, nil).Once() orgCheckWebserverHealthFunc := checkWebserverHealth - checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { + checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { return nil } defer func() { checkWebserverHealth = orgCheckWebserverHealthFunc }() @@ -579,7 +580,7 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock mockDockerCompose.imageHandler = imageHandler - err := mockDockerCompose.Start("", "", "", noCache, false, waitTime) + err := mockDockerCompose.Start("", "", "", noCache, false, waitTime, nil) assert.ErrorIs(t, err, errMockDocker) imageHandler.AssertExpectations(t) @@ -597,7 +598,7 @@ func TestDockerComposeStart(t *testing.T) { composeMock.On("Up", mock.Anything, mock.Anything, api.UpOptions{Create: api.CreateOptions{}}).Return(errMockDocker).Once() orgCheckWebserverHealthFunc := checkWebserverHealth - checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { + checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { return nil } defer func() { checkWebserverHealth = orgCheckWebserverHealthFunc }() @@ -605,7 +606,7 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock mockDockerCompose.imageHandler = imageHandler - err := mockDockerCompose.Start("", "", "", noCache, false, waitTime) + err := mockDockerCompose.Start("", "", "", noCache, false, waitTime, nil) assert.ErrorIs(t, err, errMockDocker) imageHandler.AssertExpectations(t) @@ -623,7 +624,7 @@ func TestDockerComposeStart(t *testing.T) { composeMock.On("Up", mock.Anything, mock.Anything, api.UpOptions{Create: api.CreateOptions{}}).Return(nil).Once() orgCheckWebserverHealthFunc := checkWebserverHealth - checkWebserverHealth = func(settingsFile string, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { + checkWebserverHealth = func(settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, project *types.Project, composeService api.Service, airflowDockerVersion uint64, noBrowser bool, timeout time.Duration) error { return errMockDocker } defer func() { checkWebserverHealth = orgCheckWebserverHealthFunc }() @@ -631,7 +632,7 @@ func TestDockerComposeStart(t *testing.T) { mockDockerCompose.composeService = composeMock mockDockerCompose.imageHandler = imageHandler - err := mockDockerCompose.Start("", "", "", noCache, false, waitTime) + err := mockDockerCompose.Start("", "", "", noCache, false, waitTime, nil) assert.ErrorIs(t, err, errMockDocker) imageHandler.AssertExpectations(t) @@ -1432,7 +1433,7 @@ func TestDockerComposeSettings(t *testing.T) { imageHandler := new(mocks.ImageHandler) imageHandler.On("ListLabels").Return(map[string]string{airflowVersionLabelName: airflowVersionLabel}, nil).Once() - initSettings = func(id, settingsFile string, version uint64, connections, variables, pools bool) error { + initSettings = func(id, settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, version uint64, connections, variables, pools bool) error { return nil } @@ -1449,7 +1450,7 @@ func TestDockerComposeSettings(t *testing.T) { composeMock.On("Ps", mock.Anything, mockDockerCompose.projectName, api.PsOptions{All: true}).Return([]api.ContainerSummary{{ID: "test-webserver-id", State: "running", Name: "test-webserver"}}, nil).Once() imageHandler := new(mocks.ImageHandler) imageHandler.On("ListLabels").Return(map[string]string{airflowVersionLabelName: airflowVersionLabel}, nil).Once() - initSettings = func(id, settingsFile string, version uint64, connections, variables, pools bool) error { + initSettings = func(id, settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, version uint64, connections, variables, pools bool) error { return errMockSettings } @@ -1762,7 +1763,7 @@ func TestCheckWebserverHealth(t *testing.T) { } orgInitSetting := initSettings - initSettings = func(id, settingsFile string, version uint64, connections, variables, pools bool) error { + initSettings = func(id, settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, version uint64, connections, variables, pools bool) error { return nil } defer func() { initSettings = orgInitSetting }() @@ -1772,7 +1773,7 @@ func TestCheckWebserverHealth(t *testing.T) { r, w, _ := os.Pipe() os.Stdout = w - err := checkWebserverHealth(settingsFile, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) + err := checkWebserverHealth(settingsFile, nil, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) assert.NoError(t, err) w.Close() @@ -1790,7 +1791,7 @@ func TestCheckWebserverHealth(t *testing.T) { } orgInitSetting := initSettings - initSettings = func(id, settingsFile string, version uint64, connections, variables, pools bool) error { + initSettings = func(id, settingsFile string, envConns map[string]astrocore.EnvironmentObjectConnection, version uint64, connections, variables, pools bool) error { return nil } defer func() { initSettings = orgInitSetting }() @@ -1802,7 +1803,7 @@ func TestCheckWebserverHealth(t *testing.T) { // set config to podman config.CFG.DockerCommand.SetHomeString("podman") - err := checkWebserverHealth(settingsFile, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) + err := checkWebserverHealth(settingsFile, nil, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) assert.NoError(t, err) w.Close() @@ -1835,7 +1836,7 @@ func TestCheckWebserverHealth(t *testing.T) { return nil } - err := checkWebserverHealth(settingsFile, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) + err := checkWebserverHealth(settingsFile, nil, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) assert.ErrorIs(t, err, errMockDocker) }) @@ -1864,7 +1865,7 @@ func TestCheckWebserverHealth(t *testing.T) { } isM1 = mockIsM1 - err := checkWebserverHealth(settingsFile, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) + err := checkWebserverHealth(settingsFile, nil, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) assert.ErrorContains(t, err, "The webserver health check timed out after 1s") }) t.Run("timeout waiting for webserver to get to healthy with long timeout", func(t *testing.T) { @@ -1892,7 +1893,7 @@ func TestCheckWebserverHealth(t *testing.T) { } isM1 = mockIsM1 - err := checkWebserverHealth(settingsFile, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) + err := checkWebserverHealth(settingsFile, nil, &types.Project{Name: "test"}, composeMock, 2, false, 1*time.Second) assert.ErrorContains(t, err, "The webserver health check timed out after 1s") }) } diff --git a/airflow/mocks/ContainerHandler.go b/airflow/mocks/ContainerHandler.go index 6182bd686..ae1327ddb 100644 --- a/airflow/mocks/ContainerHandler.go +++ b/airflow/mocks/ContainerHandler.go @@ -4,6 +4,8 @@ package mocks import ( astro "github.com/astronomer/astro-cli/astro-client" + astrocore "github.com/astronomer/astro-cli/astro-client-core" + mock "github.com/stretchr/testify/mock" time "time" @@ -185,13 +187,13 @@ func (_m *ContainerHandler) RunDAG(dagID string, settingsFile string, dagFile st return r0 } -// Start provides a mock function with given fields: imageName, settingsFile, composeFile, noCache, noBrowser, waitTime -func (_m *ContainerHandler) Start(imageName string, settingsFile string, composeFile string, noCache bool, noBrowser bool, waitTime time.Duration) error { - ret := _m.Called(imageName, settingsFile, composeFile, noCache, noBrowser, waitTime) +// Start provides a mock function with given fields: imageName, settingsFile, composeFile, noCache, noBrowser, waitTime, envConns +func (_m *ContainerHandler) Start(imageName string, settingsFile string, composeFile string, noCache bool, noBrowser bool, waitTime time.Duration, envConns map[string]astrocore.EnvironmentObjectConnection) error { + ret := _m.Called(imageName, settingsFile, composeFile, noCache, noBrowser, waitTime, envConns) var r0 error - if rf, ok := ret.Get(0).(func(string, string, string, bool, bool, time.Duration) error); ok { - r0 = rf(imageName, settingsFile, composeFile, noCache, noBrowser, waitTime) + if rf, ok := ret.Get(0).(func(string, string, string, bool, bool, time.Duration, map[string]astrocore.EnvironmentObjectConnection) error); ok { + r0 = rf(imageName, settingsFile, composeFile, noCache, noBrowser, waitTime, envConns) } else { r0 = ret.Error(0) } diff --git a/cloud/environment/environment.go b/cloud/environment/environment.go index 8907940f4..6848c8ca5 100644 --- a/cloud/environment/environment.go +++ b/cloud/environment/environment.go @@ -7,23 +7,20 @@ import ( "github.com/astronomer/astro-cli/config" ) -func ListConnections(deploymentId string, coreClient astrocore.CoreClient) (map[string]astrocore.EnvironmentObjectConnection, error) { - envObjs, err := listEnvironmentObjects(deploymentId, astrocore.ListEnvironmentObjectsParamsObjectTypeCONNECTION, coreClient) - if err != nil { - return nil, err - } +func ListConnections(workspaceID, deploymentID string, coreClient astrocore.CoreClient) map[string]astrocore.EnvironmentObjectConnection { + envObjs := listEnvironmentObjects(workspaceID, deploymentID, astrocore.ListEnvironmentObjectsParamsObjectTypeCONNECTION, coreClient) connections := make(map[string]astrocore.EnvironmentObjectConnection) for _, envObj := range envObjs { connections[envObj.ObjectKey] = *envObj.Connection } - return connections, nil + return connections } -func listEnvironmentObjects(deploymentId string, objectType astrocore.ListEnvironmentObjectsParamsObjectType, coreClient astrocore.CoreClient) ([]astrocore.EnvironmentObject, error) { +func listEnvironmentObjects(workspaceID, deploymentID string, objectType astrocore.ListEnvironmentObjectsParamsObjectType, coreClient astrocore.CoreClient) []astrocore.EnvironmentObject { c, err := config.GetCurrentContext() if err != nil { - return []astrocore.EnvironmentObject{}, nil + return []astrocore.EnvironmentObject{} } showSecrets := true resolvedLinked := true @@ -34,27 +31,33 @@ func listEnvironmentObjects(deploymentId string, objectType astrocore.ListEnviro ResolveLinked: &resolvedLinked, Limit: &limit, } - if deploymentId != "" { + + switch { + case deploymentID != "": // if the deployment is specified during the command, use that as the entity // that environment objects will be listed for - listParams.DeploymentId = &deploymentId - } else if c.Workspace != "" { + listParams.DeploymentId = &deploymentID + case workspaceID != "": + // or, if the workspace is specified during the command, use that + listParams.WorkspaceId = &workspaceID + case c.Workspace != "": // or, if the workspace is specified as part of the context, use that listParams.WorkspaceId = &c.Workspace - } else { + default: // otherwise, we don't have an entity to list for, so we return an empty list - return []astrocore.EnvironmentObject{}, nil + return []astrocore.EnvironmentObject{} } - resp, err := coreClient.ListEnvironmentObjectsWithResponse(http_context.Background(), c.OrganizationShortName, listParams) + + resp, err := coreClient.ListEnvironmentObjectsWithResponse(http_context.Background(), c.Organization, listParams) if err != nil { - return []astrocore.EnvironmentObject{}, nil + return []astrocore.EnvironmentObject{} } err = astrocore.NormalizeAPIError(resp.HTTPResponse, resp.Body) if err != nil { - return []astrocore.EnvironmentObject{}, nil + return []astrocore.EnvironmentObject{} } envObjsPaginated := *resp.JSON200 envObjs := envObjsPaginated.EnvironmentObjects - return envObjs, nil + return envObjs } diff --git a/cmd/.gitignore b/cmd/.gitignore new file mode 100755 index 000000000..1dcb128fa --- /dev/null +++ b/cmd/.gitignore @@ -0,0 +1,2 @@ + +upgrade-test* \ No newline at end of file diff --git a/cmd/airflow.go b/cmd/airflow.go index 43c47afae..d401e6c20 100644 --- a/cmd/airflow.go +++ b/cmd/airflow.go @@ -38,6 +38,7 @@ var ( exportComposeFile string pytestArgs string pytestFile string + workspaceID string deploymentID string followLogs bool schedulerLogs bool @@ -234,7 +235,8 @@ func newAirflowStartCmd(astroCoreClient astrocore.CoreClient) *cobra.Command { cmd.Flags().BoolVarP(&noBrowser, "no-browser", "n", false, "Don't bring up the browser once the Webserver is healthy") cmd.Flags().DurationVar(&waitTime, "wait", 1*time.Minute, "Duration to wait for webserver to get healthy. The default is 5 minutes on M1 architecture and 1 minute for everything else. Use --wait 2m to wait for 2 minutes.") cmd.Flags().StringVarP(&composeFile, "compose-file", "", "", "Location of a custom compose file to use for starting Airflow") - cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve connections from") + cmd.Flags().StringVarP(&workspaceID, "workspace-id", "w", "", "ID of the Workspace to retrieve environment connections from. If not specified uses the current Workspace.") + cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve environment connections from") return cmd } @@ -337,7 +339,8 @@ func newAirflowRestartCmd(astroCoreClient astrocore.CoreClient) *cobra.Command { cmd.Flags().BoolVarP(&noCache, "no-cache", "", false, "Do not use cache when building container image") cmd.Flags().StringVarP(&customImageName, "image-name", "i", "", "Name of a custom built image to restart airflow with") cmd.Flags().StringVarP(&settingsFile, "settings-file", "s", "airflow_settings.yaml", "Settings or env file to import airflow objects from") - cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve connections from") + cmd.Flags().StringVarP(&workspaceID, "workspace-id", "w", "", "ID of the Workspace to retrieve environment connections from. If not specified uses the current Workspace.") + cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve environment connections from") return cmd } @@ -631,9 +634,14 @@ func airflowStart(cmd *cobra.Command, args []string, astroCoreClient astrocore.C envFile = args[0] } - envConns, err := environment.ListConnections(deploymentID, astroCoreClient) - if err != nil { - return err + configExists := config.ProjectConfigExists() + if !configExists { + config.CreateProjectConfig(config.WorkingPath) + } + + var envConns map[string]astrocore.EnvironmentObjectConnection + if !config.CFG.DisableEnvObjects.GetBool() { + envConns = environment.ListConnections(workspaceID, deploymentID, astroCoreClient) } containerHandler, err := containerHandlerInit(config.WorkingPath, envFile, dockerfile, "") @@ -751,9 +759,9 @@ func airflowRestart(cmd *cobra.Command, args []string, astroCoreClient astrocore // don't startup browser on restart noBrowser = true - envConns, err := environment.ListConnections(deploymentID, astroCoreClient) - if err != nil { - return err + var envConns map[string]astrocore.EnvironmentObjectConnection + if !config.CFG.DisableEnvObjects.GetBool() { + envConns = environment.ListConnections(workspaceID, deploymentID, astroCoreClient) } return containerHandler.Start(customImageName, settingsFile, composeFile, noCache, noBrowser, waitTime, envConns) diff --git a/cmd/airflow_test.go b/cmd/airflow_test.go index c2f551ca1..f9721d82c 100644 --- a/cmd/airflow_test.go +++ b/cmd/airflow_test.go @@ -4,6 +4,7 @@ import ( "bytes" "errors" "io" + "net/http" "os" "strings" "testing" @@ -12,6 +13,8 @@ import ( "github.com/astronomer/astro-cli/airflow" "github.com/astronomer/astro-cli/airflow/mocks" airflowversions "github.com/astronomer/astro-cli/airflow_versions" + astrocore "github.com/astronomer/astro-cli/astro-client-core" + coreMocks "github.com/astronomer/astro-cli/astro-client-core/mocks" testUtil "github.com/astronomer/astro-cli/pkg/testing" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" @@ -96,7 +99,7 @@ func TestNewAirflowInitCmd(t *testing.T) { } func TestNewAirflowStartCmd(t *testing.T) { - cmd := newAirflowStartCmd() + cmd := newAirflowStartCmd(nil) assert.Nil(t, cmd.PersistentPreRunE(new(cobra.Command), []string{})) } @@ -400,45 +403,75 @@ func TestAirflowInit(t *testing.T) { } func TestAirflowStart(t *testing.T) { + testUtil.InitTestConfig(testUtil.LocalPlatform) t.Run("success", func(t *testing.T) { - cmd := newAirflowStartCmd() + cmd := newAirflowStartCmd(nil) args := []string{"test-env-file"} + envObj := astrocore.EnvironmentObject{ + ObjectKey: "test-object-key", + Connection: &astrocore.EnvironmentObjectConnection{ + Type: "test-conn-type", + }, + } + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.Anything).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{ + StatusCode: 200, + }, + JSON200: &astrocore.EnvironmentObjectsPaginated{ + EnvironmentObjects: []astrocore.EnvironmentObject{envObj}, + }, + }, nil).Once() + mockContainerHandler := new(mocks.ContainerHandler) containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { - mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", false, false, 1*time.Minute).Return(nil).Once() + mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", false, false, 1*time.Minute, map[string]astrocore.EnvironmentObjectConnection{envObj.ObjectKey: *envObj.Connection}).Return(nil).Once() return mockContainerHandler, nil } - err := airflowStart(cmd, args) + err := airflowStart(cmd, args, mockCoreClient) assert.NoError(t, err) mockContainerHandler.AssertExpectations(t) + mockCoreClient.AssertExpectations(t) }) t.Run("failure", func(t *testing.T) { - cmd := newAirflowStartCmd() + cmd := newAirflowStartCmd(nil) args := []string{"test-env-file"} + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.Anything).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{StatusCode: 200}, + JSON200: &astrocore.EnvironmentObjectsPaginated{EnvironmentObjects: []astrocore.EnvironmentObject{}}, + }, nil).Once() + mockContainerHandler := new(mocks.ContainerHandler) containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { - mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", false, false, 1*time.Minute).Return(errMock).Once() + mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", false, false, 1*time.Minute, map[string]astrocore.EnvironmentObjectConnection{}).Return(errMock).Once() return mockContainerHandler, nil } - err := airflowStart(cmd, args) + err := airflowStart(cmd, args, mockCoreClient) assert.ErrorIs(t, err, errMock) mockContainerHandler.AssertExpectations(t) }) t.Run("containerHandlerInit failure", func(t *testing.T) { - cmd := newAirflowStartCmd() + cmd := newAirflowStartCmd(nil) args := []string{} + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.Anything).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{StatusCode: 200}, + JSON200: &astrocore.EnvironmentObjectsPaginated{EnvironmentObjects: []astrocore.EnvironmentObject{}}, + }, nil).Once() + containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { return nil, errMock } - err := airflowStart(cmd, args) + err := airflowStart(cmd, args, mockCoreClient) assert.ErrorIs(t, err, errMock) }) } @@ -788,66 +821,99 @@ func TestAirflowStop(t *testing.T) { } func TestAirflowRestart(t *testing.T) { + testUtil.InitTestConfig(testUtil.CloudPlatform) t.Run("success", func(t *testing.T) { - cmd := newAirflowRestartCmd() + cmd := newAirflowRestartCmd(nil) cmd.Flag("no-cache").Value.Set("true") args := []string{"test-env-file"} + envObj := astrocore.EnvironmentObject{ + ObjectKey: "test-object-key", + Connection: &astrocore.EnvironmentObjectConnection{Type: "test-conn-type"}, + } + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.Anything).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{ + StatusCode: 200, + }, + JSON200: &astrocore.EnvironmentObjectsPaginated{ + EnvironmentObjects: []astrocore.EnvironmentObject{envObj}, + }, + }, nil).Once() + mockContainerHandler := new(mocks.ContainerHandler) containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { mockContainerHandler.On("Stop", true).Return(nil).Once() - mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", true, true, 1*time.Minute).Return(nil).Once() + mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", true, true, 1*time.Minute, map[string]astrocore.EnvironmentObjectConnection{envObj.ObjectKey: *envObj.Connection}).Return(nil).Once() return mockContainerHandler, nil } - err := airflowRestart(cmd, args) + err := airflowRestart(cmd, args, mockCoreClient) assert.NoError(t, err) mockContainerHandler.AssertExpectations(t) }) t.Run("stop failure", func(t *testing.T) { - cmd := newAirflowRestartCmd() + cmd := newAirflowRestartCmd(nil) cmd.Flag("no-cache").Value.Set("true") args := []string{"test-env-file"} + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.Anything).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{StatusCode: 200}, + JSON200: &astrocore.EnvironmentObjectsPaginated{EnvironmentObjects: []astrocore.EnvironmentObject{}}, + }, nil).Once() + mockContainerHandler := new(mocks.ContainerHandler) containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { mockContainerHandler.On("Stop", true).Return(errMock).Once() return mockContainerHandler, nil } - err := airflowRestart(cmd, args) + err := airflowRestart(cmd, args, mockCoreClient) assert.ErrorIs(t, err, errMock) mockContainerHandler.AssertExpectations(t) }) t.Run("start failure", func(t *testing.T) { - cmd := newAirflowRestartCmd() + cmd := newAirflowRestartCmd(nil) cmd.Flag("no-cache").Value.Set("true") args := []string{"test-env-file"} + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.Anything).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{StatusCode: 200}, + JSON200: &astrocore.EnvironmentObjectsPaginated{EnvironmentObjects: []astrocore.EnvironmentObject{}}, + }, nil).Once() + mockContainerHandler := new(mocks.ContainerHandler) containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { mockContainerHandler.On("Stop", true).Return(nil).Once() - mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", true, true, 1*time.Minute).Return(errMock).Once() + mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", true, true, 1*time.Minute, map[string]astrocore.EnvironmentObjectConnection{}).Return(errMock).Once() return mockContainerHandler, nil } - err := airflowRestart(cmd, args) + err := airflowRestart(cmd, args, mockCoreClient) assert.ErrorIs(t, err, errMock) mockContainerHandler.AssertExpectations(t) }) t.Run("containerHandlerInit failure", func(t *testing.T) { - cmd := newAirflowRestartCmd() + cmd := newAirflowRestartCmd(nil) cmd.Flag("no-cache").Value.Set("true") args := []string{"test-env-file"} + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.Anything).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{StatusCode: 200}, + JSON200: &astrocore.EnvironmentObjectsPaginated{EnvironmentObjects: []astrocore.EnvironmentObject{}}, + }, nil).Once() + containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { return nil, errMock } - err := airflowRestart(cmd, args) + err := airflowRestart(cmd, args, mockCoreClient) assert.ErrorIs(t, err, errMock) }) } diff --git a/config/config.go b/config/config.go index 5d2b83811..e604966af 100644 --- a/config/config.go +++ b/config/config.go @@ -83,6 +83,7 @@ var ( PageSize: newCfg("page_size", "20"), UpgradeMessage: newCfg("upgrade_message", "true"), DisableAstroRun: newCfg("disable_astro_run", "false"), + DisableEnvObjects: newCfg("disable_env_objects", "false"), } // viperHome is the viper object in the users home directory diff --git a/config/types.go b/config/types.go index 03bd6511b..283abeca6 100644 --- a/config/types.go +++ b/config/types.go @@ -44,6 +44,7 @@ type cfgs struct { AuditLogs cfg UpgradeMessage cfg DisableAstroRun cfg + DisableEnvObjects cfg } // Creates a new cfg struct From c4e0532811dcaf71ab824c680e1aef5a71fc24eb Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Fri, 13 Oct 2023 11:41:29 -0400 Subject: [PATCH 03/18] More --- settings/settings_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/settings/settings_test.go b/settings/settings_test.go index de0a3ad64..fe3388842 100644 --- a/settings/settings_test.go +++ b/settings/settings_test.go @@ -11,13 +11,13 @@ import ( func TestConfigSettings(t *testing.T) { // config settings success - err := ConfigSettings("container-id", "", 2, false, false, false) + err := ConfigSettings("container-id", "", nil, 2, false, false, false) assert.NoError(t, err) // config setttings no id error - err = ConfigSettings("", "", 2, false, false, false) + err = ConfigSettings("", "", nil, 2, false, false, false) assert.ErrorIs(t, err, errNoID) // config settings settings file error - err = ConfigSettings("container-id", "testfiles/airflow_settings_invalid.yaml", 2, false, false, false) + err = ConfigSettings("container-id", "testfiles/airflow_settings_invalid.yaml", nil, 2, false, false, false) assert.Contains(t, err.Error(), "unable to decode file") } @@ -43,7 +43,7 @@ func TestAddConnectionsAirflowOne(t *testing.T) { assert.Contains(t, []string{expectedAddCmd, expectedListCmd}, airflowCommand) return "" } - AddConnections("test-conn-id", 1) + AddConnections("test-conn-id", 1, nil) } func TestAddConnectionsAirflowTwo(t *testing.T) { @@ -72,7 +72,7 @@ func TestAddConnectionsAirflowTwo(t *testing.T) { } return "" } - AddConnections("test-conn-id", 2) + AddConnections("test-conn-id", 2, nil) } func TestAddConnectionsAirflowTwoURI(t *testing.T) { @@ -91,7 +91,7 @@ func TestAddConnectionsAirflowTwoURI(t *testing.T) { } return "" } - AddConnections("test-conn-id", 2) + AddConnections("test-conn-id", 2, nil) } func TestAddVariableAirflowOne(t *testing.T) { From 8ab1d2156d462fbf1f14691d0a39593a901fff06 Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Fri, 13 Oct 2023 11:59:34 -0400 Subject: [PATCH 04/18] Temporarily comment out locally-broken test --- airflow/docker_registry_test.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/airflow/docker_registry_test.go b/airflow/docker_registry_test.go index ace99ea56..cbc45397f 100644 --- a/airflow/docker_registry_test.go +++ b/airflow/docker_registry_test.go @@ -17,20 +17,20 @@ func TestDockerRegistryInit(t *testing.T) { } func TestRegistryLogin(t *testing.T) { - t.Run("success", func(t *testing.T) { - mockClient := new(mocks.DockerRegistryAPI) - mockClient.On("NegotiateAPIVersion", context.Background()).Return(nil).Once() - mockClient.On("RegistryLogin", context.Background(), mock.AnythingOfType("types.AuthConfig")).Return(registry.AuthenticateOKBody{}, nil).Once() - - handler := DockerRegistry{ - registry: "test", - cli: mockClient, - } - - err := handler.Login("", "") - assert.NoError(t, err) - mockClient.AssertExpectations(t) - }) + // t.Run("success", func(t *testing.T) { + // mockClient := new(mocks.DockerRegistryAPI) + // mockClient.On("NegotiateAPIVersion", context.Background()).Return(nil).Once() + // mockClient.On("RegistryLogin", context.Background(), mock.AnythingOfType("types.AuthConfig")).Return(registry.AuthenticateOKBody{}, nil).Once() + + // handler := DockerRegistry{ + // registry: "test", + // cli: mockClient, + // } + + // err := handler.Login("", "") + // assert.NoError(t, err) + // mockClient.AssertExpectations(t) + // }) t.Run("registry error", func(t *testing.T) { mockClient := new(mocks.DockerRegistryAPI) From 81039421597b439081735a4602c854d94a4b29bb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 15:59:57 +0000 Subject: [PATCH 05/18] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- cmd/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/.gitignore b/cmd/.gitignore index 1dcb128fa..0c31d2fe3 100755 --- a/cmd/.gitignore +++ b/cmd/.gitignore @@ -1,2 +1,2 @@ -upgrade-test* \ No newline at end of file +upgrade-test* From e68eb2703a5c14c707d4115a39cd5834f8c88cd6 Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Fri, 13 Oct 2023 15:10:11 -0400 Subject: [PATCH 06/18] Test scenarios covered --- airflow/docker_registry_test.go | 28 ++--- cloud/environment/environment_test.go | 132 +++++++++++++++++++++ cmd/.gitignore | 2 +- cmd/airflow.go | 5 + cmd/airflow_test.go | 164 ++++++++++++++++++++++++++ settings/settings.go | 6 +- settings/settings_test.go | 51 ++++++++ 7 files changed, 372 insertions(+), 16 deletions(-) create mode 100644 cloud/environment/environment_test.go diff --git a/airflow/docker_registry_test.go b/airflow/docker_registry_test.go index cbc45397f..ace99ea56 100644 --- a/airflow/docker_registry_test.go +++ b/airflow/docker_registry_test.go @@ -17,20 +17,20 @@ func TestDockerRegistryInit(t *testing.T) { } func TestRegistryLogin(t *testing.T) { - // t.Run("success", func(t *testing.T) { - // mockClient := new(mocks.DockerRegistryAPI) - // mockClient.On("NegotiateAPIVersion", context.Background()).Return(nil).Once() - // mockClient.On("RegistryLogin", context.Background(), mock.AnythingOfType("types.AuthConfig")).Return(registry.AuthenticateOKBody{}, nil).Once() - - // handler := DockerRegistry{ - // registry: "test", - // cli: mockClient, - // } - - // err := handler.Login("", "") - // assert.NoError(t, err) - // mockClient.AssertExpectations(t) - // }) + t.Run("success", func(t *testing.T) { + mockClient := new(mocks.DockerRegistryAPI) + mockClient.On("NegotiateAPIVersion", context.Background()).Return(nil).Once() + mockClient.On("RegistryLogin", context.Background(), mock.AnythingOfType("types.AuthConfig")).Return(registry.AuthenticateOKBody{}, nil).Once() + + handler := DockerRegistry{ + registry: "test", + cli: mockClient, + } + + err := handler.Login("", "") + assert.NoError(t, err) + mockClient.AssertExpectations(t) + }) t.Run("registry error", func(t *testing.T) { mockClient := new(mocks.DockerRegistryAPI) diff --git a/cloud/environment/environment_test.go b/cloud/environment/environment_test.go new file mode 100644 index 000000000..a77e0d53c --- /dev/null +++ b/cloud/environment/environment_test.go @@ -0,0 +1,132 @@ +package environment + +import ( + "net/http" + "testing" + + astrocore "github.com/astronomer/astro-cli/astro-client-core" + astrocore_mocks "github.com/astronomer/astro-cli/astro-client-core/mocks" + "github.com/astronomer/astro-cli/config" + testUtil "github.com/astronomer/astro-cli/pkg/testing" + "github.com/lucsky/cuid" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func TestListConnections(t *testing.T) { + testUtil.InitTestConfig(testUtil.CloudPlatform) + + context, _ := config.GetCurrentContext() + organization := context.Organization + deploymentID := cuid.New() + objectType := astrocore.ListEnvironmentObjectsParamsObjectTypeCONNECTION + showSecrets := true + resolvedLinked := true + limit := 1000 + + t.Run("List connections with deployment ID", func(t *testing.T) { + listParams := &astrocore.ListEnvironmentObjectsParams{ + DeploymentId: &deploymentID, + ObjectType: &objectType, + ShowSecrets: &showSecrets, + ResolveLinked: &resolvedLinked, + Limit: &limit, + } + + mockClient := new(astrocore_mocks.ClientWithResponsesInterface) + mockClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, organization, listParams).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{StatusCode: 200}, + JSON200: &astrocore.EnvironmentObjectsPaginated{EnvironmentObjects: []astrocore.EnvironmentObject{ + {ObjectKey: "conn1", Connection: &astrocore.EnvironmentObjectConnection{Type: "postgres"}}, + }}, + }, nil).Once() + + conns := ListConnections("", deploymentID, mockClient) + assert.Len(t, conns, 1) + assert.Equal(t, "postgres", conns["conn1"].Type) + + mockClient.AssertExpectations(t) + }) + + t.Run("List connections with specified workspace ID", func(t *testing.T) { + workspaceID := cuid.New() + listParams := &astrocore.ListEnvironmentObjectsParams{ + WorkspaceId: &workspaceID, + ObjectType: &objectType, + ShowSecrets: &showSecrets, + ResolveLinked: &resolvedLinked, + Limit: &limit, + } + + mockClient := new(astrocore_mocks.ClientWithResponsesInterface) + mockClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, organization, listParams).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{StatusCode: 200}, + JSON200: &astrocore.EnvironmentObjectsPaginated{EnvironmentObjects: []astrocore.EnvironmentObject{ + {ObjectKey: "conn1", Connection: &astrocore.EnvironmentObjectConnection{Type: "postgres"}}, + }}, + }, nil).Once() + + conns := ListConnections(workspaceID, "", mockClient) + assert.Len(t, conns, 1) + assert.Equal(t, "postgres", conns["conn1"].Type) + + mockClient.AssertExpectations(t) + }) + + t.Run("List connections with context workspace ID", func(t *testing.T) { + workspaceID := context.Workspace + listParams := &astrocore.ListEnvironmentObjectsParams{ + WorkspaceId: &workspaceID, + ObjectType: &objectType, + ShowSecrets: &showSecrets, + ResolveLinked: &resolvedLinked, + Limit: &limit, + } + + mockClient := new(astrocore_mocks.ClientWithResponsesInterface) + mockClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, organization, listParams).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{StatusCode: 200}, + JSON200: &astrocore.EnvironmentObjectsPaginated{EnvironmentObjects: []astrocore.EnvironmentObject{ + {ObjectKey: "conn1", Connection: &astrocore.EnvironmentObjectConnection{Type: "postgres"}}, + }}, + }, nil).Once() + + conns := ListConnections("", "", mockClient) + assert.Len(t, conns, 1) + assert.Equal(t, "postgres", conns["conn1"].Type) + + mockClient.AssertExpectations(t) + }) + + t.Run("List no connections when no deployment or workspace IDs", func(t *testing.T) { + originalWorkspace := context.Workspace + context.Workspace = "" + context.SetContext() + defer func() { context.Workspace = originalWorkspace; context.SetContext() }() + + mockClient := new(astrocore_mocks.ClientWithResponsesInterface) + + conns := ListConnections("", "", mockClient) + assert.Len(t, conns, 0) + + mockClient.AssertExpectations(t) + }) + + t.Run("List no connections when core listing fails", func(t *testing.T) { + listParams := &astrocore.ListEnvironmentObjectsParams{ + WorkspaceId: &context.Workspace, + ObjectType: &objectType, + ShowSecrets: &showSecrets, + ResolveLinked: &resolvedLinked, + Limit: &limit, + } + + mockClient := new(astrocore_mocks.ClientWithResponsesInterface) + mockClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, organization, listParams).Return(nil, assert.AnError).Once() + + conns := ListConnections("", "", mockClient) + assert.Len(t, conns, 0) + + mockClient.AssertExpectations(t) + }) +} diff --git a/cmd/.gitignore b/cmd/.gitignore index 0c31d2fe3..1dcb128fa 100755 --- a/cmd/.gitignore +++ b/cmd/.gitignore @@ -1,2 +1,2 @@ -upgrade-test* +upgrade-test* \ No newline at end of file diff --git a/cmd/airflow.go b/cmd/airflow.go index d401e6c20..a550fb11d 100644 --- a/cmd/airflow.go +++ b/cmd/airflow.go @@ -759,6 +759,11 @@ func airflowRestart(cmd *cobra.Command, args []string, astroCoreClient astrocore // don't startup browser on restart noBrowser = true + configExists := config.ProjectConfigExists() + if !configExists { + config.CreateProjectConfig(config.WorkingPath) + } + var envConns map[string]astrocore.EnvironmentObjectConnection if !config.CFG.DisableEnvObjects.GetBool() { envConns = environment.ListConnections(workspaceID, deploymentID, astroCoreClient) diff --git a/cmd/airflow_test.go b/cmd/airflow_test.go index f9721d82c..290975196 100644 --- a/cmd/airflow_test.go +++ b/cmd/airflow_test.go @@ -15,6 +15,7 @@ import ( airflowversions "github.com/astronomer/astro-cli/airflow_versions" astrocore "github.com/astronomer/astro-cli/astro-client-core" coreMocks "github.com/astronomer/astro-cli/astro-client-core/mocks" + "github.com/astronomer/astro-cli/config" testUtil "github.com/astronomer/astro-cli/pkg/testing" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" @@ -436,6 +437,98 @@ func TestAirflowStart(t *testing.T) { mockCoreClient.AssertExpectations(t) }) + t.Run("success with environment objects disabled", func(t *testing.T) { + cmd := newAirflowStartCmd(nil) + args := []string{"test-env-file"} + config.CFG.DisableEnvObjects.SetHomeString("true") + defer config.CFG.DisableEnvObjects.SetHomeString("false") + + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + + mockContainerHandler := new(mocks.ContainerHandler) + containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { + mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", false, false, 1*time.Minute, map[string]astrocore.EnvironmentObjectConnection(nil)).Return(nil).Once() + return mockContainerHandler, nil + } + + err := airflowStart(cmd, args, mockCoreClient) + assert.NoError(t, err) + mockContainerHandler.AssertExpectations(t) + mockCoreClient.AssertExpectations(t) + }) + + t.Run("success with deployment id flag set", func(t *testing.T) { + cmd := newAirflowStartCmd(nil) + deploymentID = "test-deployment-id" + cmd.Flag("deployment-id").Value.Set(deploymentID) + args := []string{"test-env-file"} + + envObj := astrocore.EnvironmentObject{ + ObjectKey: "test-object-key", + Connection: &astrocore.EnvironmentObjectConnection{ + Type: "test-conn-type", + }, + } + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.MatchedBy(func(params *astrocore.ListEnvironmentObjectsParams) bool { + return *params.DeploymentId == deploymentID + })).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{ + StatusCode: 200, + }, + JSON200: &astrocore.EnvironmentObjectsPaginated{ + EnvironmentObjects: []astrocore.EnvironmentObject{envObj}, + }, + }, nil).Once() + + mockContainerHandler := new(mocks.ContainerHandler) + containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { + mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", false, false, 1*time.Minute, map[string]astrocore.EnvironmentObjectConnection{envObj.ObjectKey: *envObj.Connection}).Return(nil).Once() + return mockContainerHandler, nil + } + + err := airflowStart(cmd, args, mockCoreClient) + assert.NoError(t, err) + mockContainerHandler.AssertExpectations(t) + mockCoreClient.AssertExpectations(t) + }) + + t.Run("success with workspace id flag set", func(t *testing.T) { + cmd := newAirflowStartCmd(nil) + workspaceID = "test-workspace-id" + cmd.Flag("workspace-id").Value.Set(workspaceID) + args := []string{"test-env-file"} + + envObj := astrocore.EnvironmentObject{ + ObjectKey: "test-object-key", + Connection: &astrocore.EnvironmentObjectConnection{ + Type: "test-conn-type", + }, + } + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.MatchedBy(func(params *astrocore.ListEnvironmentObjectsParams) bool { + return *params.WorkspaceId == workspaceID + })).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{ + StatusCode: 200, + }, + JSON200: &astrocore.EnvironmentObjectsPaginated{ + EnvironmentObjects: []astrocore.EnvironmentObject{envObj}, + }, + }, nil).Once() + + mockContainerHandler := new(mocks.ContainerHandler) + containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { + mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", false, false, 1*time.Minute, map[string]astrocore.EnvironmentObjectConnection{envObj.ObjectKey: *envObj.Connection}).Return(nil).Once() + return mockContainerHandler, nil + } + + err := airflowStart(cmd, args, mockCoreClient) + assert.NoError(t, err) + mockContainerHandler.AssertExpectations(t) + mockCoreClient.AssertExpectations(t) + }) + t.Run("failure", func(t *testing.T) { cmd := newAirflowStartCmd(nil) args := []string{"test-env-file"} @@ -822,6 +915,7 @@ func TestAirflowStop(t *testing.T) { func TestAirflowRestart(t *testing.T) { testUtil.InitTestConfig(testUtil.CloudPlatform) + t.Run("success", func(t *testing.T) { cmd := newAirflowRestartCmd(nil) cmd.Flag("no-cache").Value.Set("true") @@ -853,6 +947,76 @@ func TestAirflowRestart(t *testing.T) { mockContainerHandler.AssertExpectations(t) }) + t.Run("success with deployment id flag set", func(t *testing.T) { + cmd := newAirflowRestartCmd(nil) + cmd.Flag("no-cache").Value.Set("true") + deploymentID := "test-deployment-id" + cmd.Flag("deployment-id").Value.Set(deploymentID) + args := []string{"test-env-file"} + + envObj := astrocore.EnvironmentObject{ + ObjectKey: "test-object-key", + Connection: &astrocore.EnvironmentObjectConnection{Type: "test-conn-type"}, + } + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.MatchedBy(func(params *astrocore.ListEnvironmentObjectsParams) bool { + return *params.DeploymentId == deploymentID + })).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{ + StatusCode: 200, + }, + JSON200: &astrocore.EnvironmentObjectsPaginated{ + EnvironmentObjects: []astrocore.EnvironmentObject{envObj}, + }, + }, nil).Once() + + mockContainerHandler := new(mocks.ContainerHandler) + containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { + mockContainerHandler.On("Stop", true).Return(nil).Once() + mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", true, true, 1*time.Minute, map[string]astrocore.EnvironmentObjectConnection{envObj.ObjectKey: *envObj.Connection}).Return(nil).Once() + return mockContainerHandler, nil + } + + err := airflowRestart(cmd, args, mockCoreClient) + assert.NoError(t, err) + mockContainerHandler.AssertExpectations(t) + }) + + t.Run("success with workspace id flag set", func(t *testing.T) { + cmd := newAirflowRestartCmd(nil) + cmd.Flag("no-cache").Value.Set("true") + workspaceID := "test-workspace-id" + cmd.Flag("workspace-id").Value.Set(workspaceID) + args := []string{"test-env-file"} + + envObj := astrocore.EnvironmentObject{ + ObjectKey: "test-object-key", + Connection: &astrocore.EnvironmentObjectConnection{Type: "test-conn-type"}, + } + mockCoreClient := new(coreMocks.ClientWithResponsesInterface) + mockCoreClient.On("ListEnvironmentObjectsWithResponse", mock.Anything, mock.Anything, mock.MatchedBy(func(params *astrocore.ListEnvironmentObjectsParams) bool { + return *params.WorkspaceId == workspaceID + })).Return(&astrocore.ListEnvironmentObjectsResponse{ + HTTPResponse: &http.Response{ + StatusCode: 200, + }, + JSON200: &astrocore.EnvironmentObjectsPaginated{ + EnvironmentObjects: []astrocore.EnvironmentObject{envObj}, + }, + }, nil).Once() + + mockContainerHandler := new(mocks.ContainerHandler) + containerHandlerInit = func(airflowHome, envFile, dockerfile, imageName string) (airflow.ContainerHandler, error) { + mockContainerHandler.On("Stop", true).Return(nil).Once() + mockContainerHandler.On("Start", "", "airflow_settings.yaml", "", true, true, 1*time.Minute, map[string]astrocore.EnvironmentObjectConnection{envObj.ObjectKey: *envObj.Connection}).Return(nil).Once() + return mockContainerHandler, nil + } + + err := airflowRestart(cmd, args, mockCoreClient) + assert.NoError(t, err) + mockContainerHandler.AssertExpectations(t) + }) + t.Run("stop failure", func(t *testing.T) { cmd := newAirflowRestartCmd(nil) cmd.Flag("no-cache").Value.Set("true") diff --git a/settings/settings.go b/settings/settings.go index 0cfe9d327..3265590c3 100644 --- a/settings/settings.go +++ b/settings/settings.go @@ -160,7 +160,11 @@ func AddConnections(id string, version uint64, envConns map[string]astrocore.Env conn.ConnSchema = *envConn.Schema } if envConn.Extra != nil { - conn.ConnExtra = *envConn.Extra + extra := make(map[any]any) + for k, v := range *envConn.Extra { + extra[k] = v + } + conn.ConnExtra = extra } connections = append(connections, conn) } diff --git a/settings/settings_test.go b/settings/settings_test.go index fe3388842..0ba8c2ffc 100644 --- a/settings/settings_test.go +++ b/settings/settings_test.go @@ -5,6 +5,7 @@ import ( "os" "testing" + astrocore "github.com/astronomer/astro-cli/astro-client-core" "github.com/astronomer/astro-cli/pkg/fileutil" "github.com/stretchr/testify/assert" ) @@ -75,6 +76,56 @@ func TestAddConnectionsAirflowTwo(t *testing.T) { AddConnections("test-conn-id", 2, nil) } +func ptr[T any](t T) *T { + return &t +} + +func TestAddConnectionsAirflowTwoWithEnvConns(t *testing.T) { + var testExtra map[string]string + + testConn := Connection{ + ConnID: "test-id", + ConnType: "test-type", + ConnHost: "test-host", + ConnSchema: "test-schema", + ConnLogin: "test-login", + ConnPassword: "test-password", + ConnPort: 1, + ConnURI: "test-uri", + ConnExtra: testExtra, + } + settings.Airflow.Connections = []Connection{testConn} + + envConns := map[string]astrocore.EnvironmentObjectConnection{ + "test-env-id": { + Type: "test-env-type", + Host: ptr("test-env-host"), + Port: ptr(2), + Login: ptr("test-env-login"), + Password: ptr("test-env-password"), + Schema: ptr("test-env-schema"), + Extra: &map[string]any{ + "test-extra-key": "test-extra-value", + }, + }, + } + + expectedAddCmd := "airflow connections add 'test-id' --conn-type 'test-type' --conn-host 'test-host' --conn-login 'test-login' --conn-password 'test-password' --conn-schema 'test-schema' --conn-port 1" + expectedDelCmd := "airflow connections delete \"test-id\"" + expectedListCmd := "airflow connections list -o plain" + + expectedEnvAddCmd := "airflow connections add 'test-env-id' --conn-type 'test-env-type' --conn-extra '{\"test-extra-key\": \"test-extra-value\"}' --conn-host 'test-env-host' --conn-login 'test-env-login' --conn-password 'test-env-password' --conn-schema 'test-env-schema' --conn-port 2" + + execAirflowCommand = func(id, airflowCommand string) string { + assert.Contains(t, []string{expectedAddCmd, expectedEnvAddCmd, expectedListCmd, expectedDelCmd}, airflowCommand) + if airflowCommand == expectedListCmd { + return "'test-id' 'test-type' 'test-host' 'test-uri'" + } + return "" + } + AddConnections("test-conn-id", 2, envConns) +} + func TestAddConnectionsAirflowTwoURI(t *testing.T) { testConn := Connection{ ConnURI: "test-uri", From 01c62ee1025b2fbf2048d484fe9b0cfcb2d69383 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 19:10:30 +0000 Subject: [PATCH 07/18] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- cmd/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/.gitignore b/cmd/.gitignore index 1dcb128fa..0c31d2fe3 100755 --- a/cmd/.gitignore +++ b/cmd/.gitignore @@ -1,2 +1,2 @@ -upgrade-test* \ No newline at end of file +upgrade-test* From dc2933fa92c051b3eb48b5f7caf9b3e1a831feb1 Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Fri, 13 Oct 2023 15:21:04 -0400 Subject: [PATCH 08/18] Fix lint issues --- settings/settings.go | 76 ++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/settings/settings.go b/settings/settings.go index 3265590c3..30150efbb 100644 --- a/settings/settings.go +++ b/settings/settings.go @@ -133,41 +133,8 @@ func AddVariables(id string, version uint64) { // AddConnections is a function to add Connections from settings.yaml func AddConnections(id string, version uint64, envConns map[string]astrocore.EnvironmentObjectConnection) { connections := settings.Airflow.Connections - for envConnId, envConn := range envConns { - for _, conn := range connections { - if conn.ConnID == envConnId { - // if connection already exists in settings file, skip it because the file takes precedence - continue - } - } - conn := Connection{ - ConnID: envConnId, - ConnType: envConn.Type, - } - if envConn.Host != nil { - conn.ConnHost = *envConn.Host - } - if envConn.Port != nil { - conn.ConnPort = *envConn.Port - } - if envConn.Login != nil { - conn.ConnLogin = *envConn.Login - } - if envConn.Password != nil { - conn.ConnPassword = *envConn.Password - } - if envConn.Schema != nil { - conn.ConnSchema = *envConn.Schema - } - if envConn.Extra != nil { - extra := make(map[any]any) - for k, v := range *envConn.Extra { - extra[k] = v - } - conn.ConnExtra = extra - } - connections = append(connections, conn) - } + connections = AppendEnvironmentConnections(connections, envConns) + baseCmd := "airflow connections " var baseAddCmd, baseRmCmd, baseListCmd, connIDArg, connTypeArg, connURIArg, connExtraArg, connHostArg, connLoginArg, connPasswordArg, connSchemaArg, connPortArg string if version >= AirflowVersionTwo { @@ -264,6 +231,45 @@ func AddConnections(id string, version uint64, envConns map[string]astrocore.Env } } +func AppendEnvironmentConnections(connections Connections, envConnections map[string]astrocore.EnvironmentObjectConnection) Connections { + for envConnID, envConn := range envConnections { + for i := range connections { + if connections[i].ConnID == envConnID { + // if connection already exists in settings file, skip it because the file takes precedence + continue + } + } + conn := Connection{ + ConnID: envConnID, + ConnType: envConn.Type, + } + if envConn.Host != nil { + conn.ConnHost = *envConn.Host + } + if envConn.Port != nil { + conn.ConnPort = *envConn.Port + } + if envConn.Login != nil { + conn.ConnLogin = *envConn.Login + } + if envConn.Password != nil { + conn.ConnPassword = *envConn.Password + } + if envConn.Schema != nil { + conn.ConnSchema = *envConn.Schema + } + if envConn.Extra != nil { + extra := make(map[any]any) + for k, v := range *envConn.Extra { + extra[k] = v + } + conn.ConnExtra = extra + } + connections = append(connections, conn) + } + return connections +} + // AddPools is a function to add Pools from settings.yaml func AddPools(id string, version uint64) { pools := settings.Airflow.Pools From 0981c062bfc045651079f32d7eefafe3819b7bd7 Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Fri, 13 Oct 2023 15:24:29 -0400 Subject: [PATCH 09/18] Remove new gitignore file --- cmd/.gitignore | 2 -- 1 file changed, 2 deletions(-) delete mode 100755 cmd/.gitignore diff --git a/cmd/.gitignore b/cmd/.gitignore deleted file mode 100755 index 0c31d2fe3..000000000 --- a/cmd/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -upgrade-test* From 0c7723dff68c22f1f4becec839250a6df07d05cc Mon Sep 17 00:00:00 2001 From: David Koenitzer Date: Tue, 17 Oct 2023 09:56:09 -0400 Subject: [PATCH 10/18] empty commit From f478b33726ff4293be4d92289ee41a10b92d194d Mon Sep 17 00:00:00 2001 From: David Koenitzer Date: Tue, 17 Oct 2023 10:30:09 -0400 Subject: [PATCH 11/18] add remove to test --- cmd/config_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/config_test.go b/cmd/config_test.go index 42f70ef40..36f7d413d 100644 --- a/cmd/config_test.go +++ b/cmd/config_test.go @@ -1,6 +1,7 @@ package cmd import ( + "os" "testing" testUtil "github.com/astronomer/astro-cli/pkg/testing" @@ -27,6 +28,7 @@ func TestConfigGetCommandFailure(t *testing.T) { assert.Error(t, err) assert.EqualError(t, err, errInvalidConfigPath.Error()) + err = os.RemoveAll("./.astro") _, err = executeCommand("config", "get", "test") assert.Error(t, err) assert.Contains(t, err.Error(), "You are attempting to get [setting-name] a project config outside of a project directory") From 6dd5d5dfebd437c77673e32551a1eadfbe74f0ce Mon Sep 17 00:00:00 2001 From: David Koenitzer Date: Tue, 17 Oct 2023 10:37:05 -0400 Subject: [PATCH 12/18] fix lint --- cmd/config_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/config_test.go b/cmd/config_test.go index 36f7d413d..0c8377ae5 100644 --- a/cmd/config_test.go +++ b/cmd/config_test.go @@ -29,6 +29,7 @@ func TestConfigGetCommandFailure(t *testing.T) { assert.EqualError(t, err, errInvalidConfigPath.Error()) err = os.RemoveAll("./.astro") + assert.Error(t, err) _, err = executeCommand("config", "get", "test") assert.Error(t, err) assert.Contains(t, err.Error(), "You are attempting to get [setting-name] a project config outside of a project directory") From a14c9f22bf9d86213c5bad3c6faf96331aace2e5 Mon Sep 17 00:00:00 2001 From: David Koenitzer Date: Tue, 17 Oct 2023 11:15:37 -0400 Subject: [PATCH 13/18] empty commit From 753ab9e24cb4a280cda884ec50d5940d190b667d Mon Sep 17 00:00:00 2001 From: David Koenitzer Date: Tue, 17 Oct 2023 11:21:48 -0400 Subject: [PATCH 14/18] put test back --- cmd/config_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmd/config_test.go b/cmd/config_test.go index 0c8377ae5..01cad4040 100644 --- a/cmd/config_test.go +++ b/cmd/config_test.go @@ -1,7 +1,6 @@ package cmd import ( - "os" "testing" testUtil "github.com/astronomer/astro-cli/pkg/testing" @@ -28,7 +27,6 @@ func TestConfigGetCommandFailure(t *testing.T) { assert.Error(t, err) assert.EqualError(t, err, errInvalidConfigPath.Error()) - err = os.RemoveAll("./.astro") assert.Error(t, err) _, err = executeCommand("config", "get", "test") assert.Error(t, err) From fae9b2a0fefe9fd0d243c6434ea9b8f47d3ca469 Mon Sep 17 00:00:00 2001 From: David Koenitzer Date: Tue, 17 Oct 2023 12:16:58 -0400 Subject: [PATCH 15/18] fix test --- cmd/config_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/config_test.go b/cmd/config_test.go index 01cad4040..42f70ef40 100644 --- a/cmd/config_test.go +++ b/cmd/config_test.go @@ -27,7 +27,6 @@ func TestConfigGetCommandFailure(t *testing.T) { assert.Error(t, err) assert.EqualError(t, err, errInvalidConfigPath.Error()) - assert.Error(t, err) _, err = executeCommand("config", "get", "test") assert.Error(t, err) assert.Contains(t, err.Error(), "You are attempting to get [setting-name] a project config outside of a project directory") From 812588a688a805f2003b6824ad14f6f6f1002ca8 Mon Sep 17 00:00:00 2001 From: Kushal Malani Date: Tue, 17 Oct 2023 17:17:30 -0700 Subject: [PATCH 16/18] Fixing test and cleanup test files --- cmd/airflow.go | 10 ---------- cmd/airflow_test.go | 3 +++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/cmd/airflow.go b/cmd/airflow.go index a550fb11d..2fd4df562 100644 --- a/cmd/airflow.go +++ b/cmd/airflow.go @@ -634,11 +634,6 @@ func airflowStart(cmd *cobra.Command, args []string, astroCoreClient astrocore.C envFile = args[0] } - configExists := config.ProjectConfigExists() - if !configExists { - config.CreateProjectConfig(config.WorkingPath) - } - var envConns map[string]astrocore.EnvironmentObjectConnection if !config.CFG.DisableEnvObjects.GetBool() { envConns = environment.ListConnections(workspaceID, deploymentID, astroCoreClient) @@ -759,11 +754,6 @@ func airflowRestart(cmd *cobra.Command, args []string, astroCoreClient astrocore // don't startup browser on restart noBrowser = true - configExists := config.ProjectConfigExists() - if !configExists { - config.CreateProjectConfig(config.WorkingPath) - } - var envConns map[string]astrocore.EnvironmentObjectConnection if !config.CFG.DisableEnvObjects.GetBool() { envConns = environment.ListConnections(workspaceID, deploymentID, astroCoreClient) diff --git a/cmd/airflow_test.go b/cmd/airflow_test.go index 290975196..2dd9930f7 100644 --- a/cmd/airflow_test.go +++ b/cmd/airflow_test.go @@ -181,6 +181,7 @@ func cleanUpInitFiles(t *testing.T) { "plugins", "README.md", ".astro/config.yaml", + ".astro/test_dag_integrity.py", "./astro", "tests/dags/test_dag_example.py", "tests/dags", @@ -597,6 +598,8 @@ func TestAirflowUpgradeTest(t *testing.T) { err := airflowUpgradeTest(cmd, nil) assert.ErrorIs(t, err, errMock) mockContainerHandler.AssertExpectations(t) + // Clean up init files after test + defer func() { cleanUpInitFiles(t) }() }) t.Run("containerHandlerInit failure", func(t *testing.T) { From c7ef122fbf0f48e9a08c4c51c76b9b0ee184d964 Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Wed, 18 Oct 2023 11:00:33 -0400 Subject: [PATCH 17/18] Disable feature by default --- cmd/airflow.go | 12 ++++++++---- config/config.go | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/airflow.go b/cmd/airflow.go index 2fd4df562..8eff27284 100644 --- a/cmd/airflow.go +++ b/cmd/airflow.go @@ -235,8 +235,10 @@ func newAirflowStartCmd(astroCoreClient astrocore.CoreClient) *cobra.Command { cmd.Flags().BoolVarP(&noBrowser, "no-browser", "n", false, "Don't bring up the browser once the Webserver is healthy") cmd.Flags().DurationVar(&waitTime, "wait", 1*time.Minute, "Duration to wait for webserver to get healthy. The default is 5 minutes on M1 architecture and 1 minute for everything else. Use --wait 2m to wait for 2 minutes.") cmd.Flags().StringVarP(&composeFile, "compose-file", "", "", "Location of a custom compose file to use for starting Airflow") - cmd.Flags().StringVarP(&workspaceID, "workspace-id", "w", "", "ID of the Workspace to retrieve environment connections from. If not specified uses the current Workspace.") - cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve environment connections from") + if !config.CFG.DisableEnvObjects.GetBool() { + cmd.Flags().StringVarP(&workspaceID, "workspace-id", "w", "", "ID of the Workspace to retrieve environment connections from. If not specified uses the current Workspace.") + cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve environment connections from") + } return cmd } @@ -339,8 +341,10 @@ func newAirflowRestartCmd(astroCoreClient astrocore.CoreClient) *cobra.Command { cmd.Flags().BoolVarP(&noCache, "no-cache", "", false, "Do not use cache when building container image") cmd.Flags().StringVarP(&customImageName, "image-name", "i", "", "Name of a custom built image to restart airflow with") cmd.Flags().StringVarP(&settingsFile, "settings-file", "s", "airflow_settings.yaml", "Settings or env file to import airflow objects from") - cmd.Flags().StringVarP(&workspaceID, "workspace-id", "w", "", "ID of the Workspace to retrieve environment connections from. If not specified uses the current Workspace.") - cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve environment connections from") + if !config.CFG.DisableEnvObjects.GetBool() { + cmd.Flags().StringVarP(&workspaceID, "workspace-id", "w", "", "ID of the Workspace to retrieve environment connections from. If not specified uses the current Workspace.") + cmd.Flags().StringVarP(&deploymentID, "deployment-id", "d", "", "ID of the Deployment to retrieve environment connections from") + } return cmd } diff --git a/config/config.go b/config/config.go index e604966af..5328ac203 100644 --- a/config/config.go +++ b/config/config.go @@ -83,7 +83,7 @@ var ( PageSize: newCfg("page_size", "20"), UpgradeMessage: newCfg("upgrade_message", "true"), DisableAstroRun: newCfg("disable_astro_run", "false"), - DisableEnvObjects: newCfg("disable_env_objects", "false"), + DisableEnvObjects: newCfg("disable_env_objects", "true"), } // viperHome is the viper object in the users home directory From f10d5e7a78e83ccb2093a0e14ea179d4072eb886 Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Wed, 18 Oct 2023 11:09:44 -0400 Subject: [PATCH 18/18] Enable feature for unit tests --- pkg/testing/testing.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/testing/testing.go b/pkg/testing/testing.go index 2bea2efce..a8235ce3f 100644 --- a/pkg/testing/testing.go +++ b/pkg/testing/testing.go @@ -67,6 +67,7 @@ contexts: workspace: ck05r3bor07h40d02y2hw4n4v organization: test-org-id organization_short_name: test-org-short-name +disable_env_objects: false ` switch platform { case CloudPlatform: