diff --git a/.terraformrc b/.terraformrc
index b7c8b89f..a0aecd98 100644
--- a/.terraformrc
+++ b/.terraformrc
@@ -1,6 +1,6 @@
provider_installation {
dev_overrides {
- "registry.terraform.io/astronomer/astro" = "~/astronomer/terraform-provider-astro/bin"
+ "registry.terraform.io/astronomer/astro" = "/Users/iancmoritz/Work/terraform-provider-astro/bin/"
}
direct {}
}
\ No newline at end of file
diff --git a/Makefile b/Makefile
index f8efb578..d94180d7 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@ dep:
.PHONY: build
build:
- go build -o ${ENVTEST_ASSETS_DIR}
+ go build -o ${ENVTEST_ASSETS_DIR}/terraform-provider-astro
go generate ./...
.PHONY: api_client_gen
@@ -93,4 +93,4 @@ api_client_gen:
@echo "Generating IAM API client..."
oapi-codegen -include-tags=User,Invite,Team,ApiToken -generate=types,client -package=iam "$(CORE_IAM_OPENAPI_SPEC)" > ./internal/clients/iam/api.gen.go
@echo "Generating Platform API client..."
- oapi-codegen -include-tags=Organization,Workspace,Cluster,Options,Deployment,Role -generate=types,client -package=platform "$(CORE_PLATFORM_OPENAPI_SPEC)" > ./internal/clients/platform/api.gen.go
\ No newline at end of file
+ oapi-codegen -include-tags=Organization,Workspace,Cluster,Options,Deployment,Role,Environment -generate=types,client -package=platform "$(CORE_PLATFORM_OPENAPI_SPEC)" > ./internal/clients/platform/api.gen.go
\ No newline at end of file
diff --git a/docs/resources/environment_object.md b/docs/resources/environment_object.md
new file mode 100644
index 00000000..3d25d90d
--- /dev/null
+++ b/docs/resources/environment_object.md
@@ -0,0 +1,67 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "astro_environment_object Resource - astro"
+subcategory: ""
+description: |-
+ Environment Object resource
+---
+
+# astro_environment_object (Resource)
+
+Environment Object resource
+
+
+
+
+## Schema
+
+### Required
+
+- `object_key` (String) Key of the environment object
+- `object_type` (String) Type of the environment object
+- `scope` (String) Scope of the environment object
+
+### Optional
+
+- `airflow_connection` (Attributes) Connection details for the environment object (see [below for nested schema](#nestedatt--airflow_connection))
+- `airflow_variable` (Attributes) Airflow variable details for the environment object (see [below for nested schema](#nestedatt--airflow_variable))
+- `auto_link_deployments` (Boolean) Auto link deployments flag
+- `metrics_export` (Attributes) Metrics export details for the environment object (see [below for nested schema](#nestedatt--metrics_export))
+- `scope_entity_id` (String) Scope entity ID of the environment object
+
+### Read-Only
+
+- `id` (String) Environment Object ID
+
+
+### Nested Schema for `airflow_connection`
+
+Required:
+
+- `host` (String) Host of the connection
+- `login` (String) Login for the connection
+- `password` (String, Sensitive) Password for the connection
+- `port` (Number) Port for the connection
+- `type` (String) Type of the connection
+
+Optional:
+
+- `schema` (String) Schema for the connection
+
+
+
+### Nested Schema for `airflow_variable`
+
+Required:
+
+- `is_secret` (Boolean) Whether the variable is secret
+- `value` (String, Sensitive) Value of the variable
+
+
+
+### Nested Schema for `metrics_export`
+
+Required:
+
+- `endpoint` (String) Endpoint for metrics export
+- `exporter_type` (String) Type of the exporter
diff --git a/internal/clients/iam/api.gen.go b/internal/clients/iam/api.gen.go
index 52949d02..080fde37 100644
--- a/internal/clients/iam/api.gen.go
+++ b/internal/clients/iam/api.gen.go
@@ -50,51 +50,65 @@ const (
// Defines values for CreateTeamRequestOrganizationRole.
const (
- CreateTeamRequestOrganizationRoleORGANIZATIONBILLINGADMIN CreateTeamRequestOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
- CreateTeamRequestOrganizationRoleORGANIZATIONMEMBER CreateTeamRequestOrganizationRole = "ORGANIZATION_MEMBER"
- CreateTeamRequestOrganizationRoleORGANIZATIONOWNER CreateTeamRequestOrganizationRole = "ORGANIZATION_OWNER"
+ CreateTeamRequestOrganizationRoleORGANIZATIONBILLINGADMIN CreateTeamRequestOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
+ CreateTeamRequestOrganizationRoleORGANIZATIONMEMBER CreateTeamRequestOrganizationRole = "ORGANIZATION_MEMBER"
+ CreateTeamRequestOrganizationRoleORGANIZATIONOBSERVEADMIN CreateTeamRequestOrganizationRole = "ORGANIZATION_OBSERVE_ADMIN"
+ CreateTeamRequestOrganizationRoleORGANIZATIONOBSERVEMEMBER CreateTeamRequestOrganizationRole = "ORGANIZATION_OBSERVE_MEMBER"
+ CreateTeamRequestOrganizationRoleORGANIZATIONOWNER CreateTeamRequestOrganizationRole = "ORGANIZATION_OWNER"
)
// Defines values for CreateUserInviteRequestRole.
const (
- CreateUserInviteRequestRoleORGANIZATIONBILLINGADMIN CreateUserInviteRequestRole = "ORGANIZATION_BILLING_ADMIN"
- CreateUserInviteRequestRoleORGANIZATIONMEMBER CreateUserInviteRequestRole = "ORGANIZATION_MEMBER"
- CreateUserInviteRequestRoleORGANIZATIONOWNER CreateUserInviteRequestRole = "ORGANIZATION_OWNER"
+ CreateUserInviteRequestRoleORGANIZATIONBILLINGADMIN CreateUserInviteRequestRole = "ORGANIZATION_BILLING_ADMIN"
+ CreateUserInviteRequestRoleORGANIZATIONMEMBER CreateUserInviteRequestRole = "ORGANIZATION_MEMBER"
+ CreateUserInviteRequestRoleORGANIZATIONOBSERVEADMIN CreateUserInviteRequestRole = "ORGANIZATION_OBSERVE_ADMIN"
+ CreateUserInviteRequestRoleORGANIZATIONOBSERVEMEMBER CreateUserInviteRequestRole = "ORGANIZATION_OBSERVE_MEMBER"
+ CreateUserInviteRequestRoleORGANIZATIONOWNER CreateUserInviteRequestRole = "ORGANIZATION_OWNER"
)
// Defines values for SubjectRolesOrganizationRole.
const (
- SubjectRolesOrganizationRoleORGANIZATIONBILLINGADMIN SubjectRolesOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
- SubjectRolesOrganizationRoleORGANIZATIONMEMBER SubjectRolesOrganizationRole = "ORGANIZATION_MEMBER"
- SubjectRolesOrganizationRoleORGANIZATIONOWNER SubjectRolesOrganizationRole = "ORGANIZATION_OWNER"
+ SubjectRolesOrganizationRoleORGANIZATIONBILLINGADMIN SubjectRolesOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
+ SubjectRolesOrganizationRoleORGANIZATIONMEMBER SubjectRolesOrganizationRole = "ORGANIZATION_MEMBER"
+ SubjectRolesOrganizationRoleORGANIZATIONOBSERVEADMIN SubjectRolesOrganizationRole = "ORGANIZATION_OBSERVE_ADMIN"
+ SubjectRolesOrganizationRoleORGANIZATIONOBSERVEMEMBER SubjectRolesOrganizationRole = "ORGANIZATION_OBSERVE_MEMBER"
+ SubjectRolesOrganizationRoleORGANIZATIONOWNER SubjectRolesOrganizationRole = "ORGANIZATION_OWNER"
)
// Defines values for TeamOrganizationRole.
const (
- TeamOrganizationRoleORGANIZATIONBILLINGADMIN TeamOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
- TeamOrganizationRoleORGANIZATIONMEMBER TeamOrganizationRole = "ORGANIZATION_MEMBER"
- TeamOrganizationRoleORGANIZATIONOWNER TeamOrganizationRole = "ORGANIZATION_OWNER"
+ TeamOrganizationRoleORGANIZATIONBILLINGADMIN TeamOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
+ TeamOrganizationRoleORGANIZATIONMEMBER TeamOrganizationRole = "ORGANIZATION_MEMBER"
+ TeamOrganizationRoleORGANIZATIONOBSERVEADMIN TeamOrganizationRole = "ORGANIZATION_OBSERVE_ADMIN"
+ TeamOrganizationRoleORGANIZATIONOBSERVEMEMBER TeamOrganizationRole = "ORGANIZATION_OBSERVE_MEMBER"
+ TeamOrganizationRoleORGANIZATIONOWNER TeamOrganizationRole = "ORGANIZATION_OWNER"
)
// Defines values for UpdateTeamRolesRequestOrganizationRole.
const (
- UpdateTeamRolesRequestOrganizationRoleORGANIZATIONBILLINGADMIN UpdateTeamRolesRequestOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
- UpdateTeamRolesRequestOrganizationRoleORGANIZATIONMEMBER UpdateTeamRolesRequestOrganizationRole = "ORGANIZATION_MEMBER"
- UpdateTeamRolesRequestOrganizationRoleORGANIZATIONOWNER UpdateTeamRolesRequestOrganizationRole = "ORGANIZATION_OWNER"
+ UpdateTeamRolesRequestOrganizationRoleORGANIZATIONBILLINGADMIN UpdateTeamRolesRequestOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
+ UpdateTeamRolesRequestOrganizationRoleORGANIZATIONMEMBER UpdateTeamRolesRequestOrganizationRole = "ORGANIZATION_MEMBER"
+ UpdateTeamRolesRequestOrganizationRoleORGANIZATIONOBSERVEADMIN UpdateTeamRolesRequestOrganizationRole = "ORGANIZATION_OBSERVE_ADMIN"
+ UpdateTeamRolesRequestOrganizationRoleORGANIZATIONOBSERVEMEMBER UpdateTeamRolesRequestOrganizationRole = "ORGANIZATION_OBSERVE_MEMBER"
+ UpdateTeamRolesRequestOrganizationRoleORGANIZATIONOWNER UpdateTeamRolesRequestOrganizationRole = "ORGANIZATION_OWNER"
)
// Defines values for UpdateUserRolesRequestOrganizationRole.
const (
- UpdateUserRolesRequestOrganizationRoleORGANIZATIONBILLINGADMIN UpdateUserRolesRequestOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
- UpdateUserRolesRequestOrganizationRoleORGANIZATIONMEMBER UpdateUserRolesRequestOrganizationRole = "ORGANIZATION_MEMBER"
- UpdateUserRolesRequestOrganizationRoleORGANIZATIONOWNER UpdateUserRolesRequestOrganizationRole = "ORGANIZATION_OWNER"
+ UpdateUserRolesRequestOrganizationRoleORGANIZATIONBILLINGADMIN UpdateUserRolesRequestOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
+ UpdateUserRolesRequestOrganizationRoleORGANIZATIONMEMBER UpdateUserRolesRequestOrganizationRole = "ORGANIZATION_MEMBER"
+ UpdateUserRolesRequestOrganizationRoleORGANIZATIONOBSERVEADMIN UpdateUserRolesRequestOrganizationRole = "ORGANIZATION_OBSERVE_ADMIN"
+ UpdateUserRolesRequestOrganizationRoleORGANIZATIONOBSERVEMEMBER UpdateUserRolesRequestOrganizationRole = "ORGANIZATION_OBSERVE_MEMBER"
+ UpdateUserRolesRequestOrganizationRoleORGANIZATIONOWNER UpdateUserRolesRequestOrganizationRole = "ORGANIZATION_OWNER"
)
// Defines values for UserOrganizationRole.
const (
- ORGANIZATIONBILLINGADMIN UserOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
- ORGANIZATIONMEMBER UserOrganizationRole = "ORGANIZATION_MEMBER"
- ORGANIZATIONOWNER UserOrganizationRole = "ORGANIZATION_OWNER"
+ ORGANIZATIONBILLINGADMIN UserOrganizationRole = "ORGANIZATION_BILLING_ADMIN"
+ ORGANIZATIONMEMBER UserOrganizationRole = "ORGANIZATION_MEMBER"
+ ORGANIZATIONOBSERVEADMIN UserOrganizationRole = "ORGANIZATION_OBSERVE_ADMIN"
+ ORGANIZATIONOBSERVEMEMBER UserOrganizationRole = "ORGANIZATION_OBSERVE_MEMBER"
+ ORGANIZATIONOWNER UserOrganizationRole = "ORGANIZATION_OWNER"
)
// Defines values for UserStatus.
diff --git a/internal/clients/platform/api.gen.go b/internal/clients/platform/api.gen.go
index e909f417..f2b059c1 100644
--- a/internal/clients/platform/api.gen.go
+++ b/internal/clients/platform/api.gen.go
@@ -112,6 +112,34 @@ const (
CreateDedicatedDeploymentRequestTypeSTANDARD CreateDedicatedDeploymentRequestType = "STANDARD"
)
+// Defines values for CreateEnvironmentObjectLinkRequestScope.
+const (
+ CreateEnvironmentObjectLinkRequestScopeDEPLOYMENT CreateEnvironmentObjectLinkRequestScope = "DEPLOYMENT"
+)
+
+// Defines values for CreateEnvironmentObjectMetricsExportOverridesRequestExporterType.
+const (
+ CreateEnvironmentObjectMetricsExportOverridesRequestExporterTypePROMETHEUS CreateEnvironmentObjectMetricsExportOverridesRequestExporterType = "PROMETHEUS"
+)
+
+// Defines values for CreateEnvironmentObjectMetricsExportRequestExporterType.
+const (
+ CreateEnvironmentObjectMetricsExportRequestExporterTypePROMETHEUS CreateEnvironmentObjectMetricsExportRequestExporterType = "PROMETHEUS"
+)
+
+// Defines values for CreateEnvironmentObjectRequestObjectType.
+const (
+ CreateEnvironmentObjectRequestObjectTypeAIRFLOWVARIABLE CreateEnvironmentObjectRequestObjectType = "AIRFLOW_VARIABLE"
+ CreateEnvironmentObjectRequestObjectTypeCONNECTION CreateEnvironmentObjectRequestObjectType = "CONNECTION"
+ CreateEnvironmentObjectRequestObjectTypeMETRICSEXPORT CreateEnvironmentObjectRequestObjectType = "METRICS_EXPORT"
+)
+
+// Defines values for CreateEnvironmentObjectRequestScope.
+const (
+ CreateEnvironmentObjectRequestScopeDEPLOYMENT CreateEnvironmentObjectRequestScope = "DEPLOYMENT"
+ CreateEnvironmentObjectRequestScopeWORKSPACE CreateEnvironmentObjectRequestScope = "WORKSPACE"
+)
+
// Defines values for CreateGcpClusterRequestCloudProvider.
const (
CreateGcpClusterRequestCloudProviderAWS CreateGcpClusterRequestCloudProvider = "AWS"
@@ -210,6 +238,50 @@ const (
WAKE DeploymentHibernationStatusNextEventType = "WAKE"
)
+// Defines values for EnvironmentObjectObjectType.
+const (
+ EnvironmentObjectObjectTypeAIRFLOWVARIABLE EnvironmentObjectObjectType = "AIRFLOW_VARIABLE"
+ EnvironmentObjectObjectTypeCONNECTION EnvironmentObjectObjectType = "CONNECTION"
+ EnvironmentObjectObjectTypeMETRICSEXPORT EnvironmentObjectObjectType = "METRICS_EXPORT"
+)
+
+// Defines values for EnvironmentObjectScope.
+const (
+ EnvironmentObjectScopeDEPLOYMENT EnvironmentObjectScope = "DEPLOYMENT"
+ EnvironmentObjectScopeWORKSPACE EnvironmentObjectScope = "WORKSPACE"
+)
+
+// Defines values for EnvironmentObjectSourceScope.
+const (
+ EnvironmentObjectSourceScopeDEPLOYMENT EnvironmentObjectSourceScope = "DEPLOYMENT"
+ EnvironmentObjectSourceScopeWORKSPACE EnvironmentObjectSourceScope = "WORKSPACE"
+)
+
+// Defines values for EnvironmentObjectExcludeLinkScope.
+const (
+ EnvironmentObjectExcludeLinkScopeDEPLOYMENT EnvironmentObjectExcludeLinkScope = "DEPLOYMENT"
+)
+
+// Defines values for EnvironmentObjectLinkScope.
+const (
+ EnvironmentObjectLinkScopeDEPLOYMENT EnvironmentObjectLinkScope = "DEPLOYMENT"
+)
+
+// Defines values for EnvironmentObjectMetricsExportExporterType.
+const (
+ EnvironmentObjectMetricsExportExporterTypePROMETHEUS EnvironmentObjectMetricsExportExporterType = "PROMETHEUS"
+)
+
+// Defines values for EnvironmentObjectMetricsExportOverridesExporterType.
+const (
+ EnvironmentObjectMetricsExportOverridesExporterTypePROMETHEUS EnvironmentObjectMetricsExportOverridesExporterType = "PROMETHEUS"
+)
+
+// Defines values for ExcludeLinkEnvironmentObjectRequestScope.
+const (
+ ExcludeLinkEnvironmentObjectRequestScopeDEPLOYMENT ExcludeLinkEnvironmentObjectRequestScope = "DEPLOYMENT"
+)
+
// Defines values for ManagedDomainStatus.
const (
PENDING ManagedDomainStatus = "PENDING"
@@ -288,6 +360,21 @@ const (
UpdateDedicatedDeploymentRequestTypeSTANDARD UpdateDedicatedDeploymentRequestType = "STANDARD"
)
+// Defines values for UpdateEnvironmentObjectLinkRequestScope.
+const (
+ UpdateEnvironmentObjectLinkRequestScopeDEPLOYMENT UpdateEnvironmentObjectLinkRequestScope = "DEPLOYMENT"
+)
+
+// Defines values for UpdateEnvironmentObjectMetricsExportOverridesRequestExporterType.
+const (
+ UpdateEnvironmentObjectMetricsExportOverridesRequestExporterTypePROMETHEUS UpdateEnvironmentObjectMetricsExportOverridesRequestExporterType = "PROMETHEUS"
+)
+
+// Defines values for UpdateEnvironmentObjectMetricsExportRequestExporterType.
+const (
+ UpdateEnvironmentObjectMetricsExportRequestExporterTypePROMETHEUS UpdateEnvironmentObjectMetricsExportRequestExporterType = "PROMETHEUS"
+)
+
// Defines values for UpdateHybridClusterRequestClusterType.
const (
UpdateHybridClusterRequestClusterTypeHYBRID UpdateHybridClusterRequestClusterType = "HYBRID"
@@ -434,14 +521,33 @@ const (
ListDeploymentsParamsSortsUpdatedAtDesc ListDeploymentsParamsSorts = "updatedAt:desc"
)
+// Defines values for ListEnvironmentObjectsParamsSorts.
+const (
+ 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 ListEnvironmentObjectsParamsObjectType.
+const (
+ AIRFLOWVARIABLE ListEnvironmentObjectsParamsObjectType = "AIRFLOW_VARIABLE"
+ CONNECTION ListEnvironmentObjectsParamsObjectType = "CONNECTION"
+ METRICSEXPORT ListEnvironmentObjectsParamsObjectType = "METRICS_EXPORT"
+)
+
// Defines values for ListWorkspacesParamsSorts.
const (
- ListWorkspacesParamsSortsCreatedAtAsc ListWorkspacesParamsSorts = "createdAt:asc"
- ListWorkspacesParamsSortsCreatedAtDesc ListWorkspacesParamsSorts = "createdAt:desc"
- ListWorkspacesParamsSortsNameAsc ListWorkspacesParamsSorts = "name:asc"
- ListWorkspacesParamsSortsNameDesc ListWorkspacesParamsSorts = "name:desc"
- ListWorkspacesParamsSortsUpdatedAtAsc ListWorkspacesParamsSorts = "updatedAt:asc"
- ListWorkspacesParamsSortsUpdatedAtDesc ListWorkspacesParamsSorts = "updatedAt:desc"
+ CreatedAtAsc ListWorkspacesParamsSorts = "createdAt:asc"
+ CreatedAtDesc ListWorkspacesParamsSorts = "createdAt:desc"
+ NameAsc ListWorkspacesParamsSorts = "name:asc"
+ NameDesc ListWorkspacesParamsSorts = "name:desc"
+ UpdatedAtAsc ListWorkspacesParamsSorts = "updatedAt:asc"
+ UpdatedAtDesc ListWorkspacesParamsSorts = "updatedAt:desc"
)
// BasicSubjectProfile defines model for BasicSubjectProfile.
@@ -557,7 +663,8 @@ type ClusterHealthStatusValue string
// ClusterHealthStatusDetail defines model for ClusterHealthStatusDetail.
type ClusterHealthStatusDetail struct {
// Code The health status for a specific component.
- Code string `json:"code"`
+ Code string `json:"code"`
+ Component *string `json:"component,omitempty"`
// Description A description of the component that was assessed.
Description string `json:"description"`
@@ -644,6 +751,63 @@ type ClustersPaginated struct {
TotalCount int `json:"totalCount"`
}
+// ConnectionAuthType defines model for ConnectionAuthType.
+type ConnectionAuthType struct {
+ // AirflowType The type of connection in Airflow
+ AirflowType string `json:"airflowType"`
+
+ // AuthMethodName The name of the auth method used in the connection
+ AuthMethodName string `json:"authMethodName"`
+
+ // Description A description of the connection auth type
+ Description string `json:"description"`
+
+ // GuidePath The URL to the guide for the connection auth type
+ GuidePath *string `json:"guidePath,omitempty"`
+
+ // Id The ID of the connection auth type
+ Id string `json:"id"`
+
+ // Name The name of the connection auth type
+ Name string `json:"name"`
+
+ // Parameters The parameters for the connection auth type
+ Parameters []ConnectionAuthTypeParameter `json:"parameters"`
+
+ // ProviderLogo The URL of the provider logo
+ ProviderLogo *string `json:"providerLogo,omitempty"`
+
+ // ProviderPackageName The name of the provider package
+ ProviderPackageName string `json:"providerPackageName"`
+}
+
+// ConnectionAuthTypeParameter defines model for ConnectionAuthTypeParameter.
+type ConnectionAuthTypeParameter struct {
+ // AirflowParamName The name of the parameter in Airflow
+ AirflowParamName string `json:"airflowParamName"`
+
+ // DataType The data type of the parameter
+ DataType string `json:"dataType"`
+
+ // Description A description of the parameter
+ Description string `json:"description"`
+
+ // Example An example value for the parameter
+ Example *string `json:"example,omitempty"`
+
+ // FriendlyName The UI-friendly name for the parameter
+ FriendlyName string `json:"friendlyName"`
+
+ // IsInExtra Whether or not the parameter is included in the "extra" field
+ IsInExtra bool `json:"isInExtra"`
+
+ // IsRequired Whether the parameter is required
+ IsRequired bool `json:"isRequired"`
+
+ // IsSecret Whether the parameter is a secret
+ IsSecret bool `json:"isSecret"`
+}
+
// CreateAwsClusterRequest defines model for CreateAwsClusterRequest.
type CreateAwsClusterRequest struct {
// CloudProvider The cluster's cloud provider.
@@ -790,7 +954,7 @@ type CreateDedicatedDeploymentRequest struct {
// WorkloadIdentity The Deployment's workload identity.
WorkloadIdentity *string `json:"workloadIdentity,omitempty"`
- // WorkspaceId The ID of the workspace to which the Deployment belongs.
+ // WorkspaceId The ID of the Workspace to which the Deployment belongs.
WorkspaceId string `json:"workspaceId"`
}
@@ -808,6 +972,187 @@ type CreateDeploymentRequest struct {
union json.RawMessage
}
+// CreateEnvironmentObject defines model for CreateEnvironmentObject.
+type CreateEnvironmentObject struct {
+ // Id The ID of the environment object
+ Id string `json:"id"`
+}
+
+// CreateEnvironmentObjectAirflowVariableOverridesRequest defines model for CreateEnvironmentObjectAirflowVariableOverridesRequest.
+type CreateEnvironmentObjectAirflowVariableOverridesRequest struct {
+ // Value The value of the Airflow variable
+ Value *string `json:"value,omitempty"`
+}
+
+// CreateEnvironmentObjectAirflowVariableRequest defines model for CreateEnvironmentObjectAirflowVariableRequest.
+type CreateEnvironmentObjectAirflowVariableRequest struct {
+ // IsSecret Whether the value is a secret or not
+ IsSecret *bool `json:"isSecret,omitempty"`
+
+ // Value The value of the Airflow variable
+ Value *string `json:"value,omitempty"`
+}
+
+// CreateEnvironmentObjectConnectionOverridesRequest defines model for CreateEnvironmentObjectConnectionOverridesRequest.
+type CreateEnvironmentObjectConnectionOverridesRequest struct {
+ // Extra Extra connection details, if any
+ Extra *map[string]interface{} `json:"extra,omitempty"`
+
+ // Host The host address for the connection
+ Host *string `json:"host,omitempty"`
+
+ // Login The username used for the connection
+ Login *string `json:"login,omitempty"`
+
+ // Password The password used for the connection
+ Password *string `json:"password,omitempty"`
+
+ // Port The port for the connection
+ Port *int `json:"port,omitempty"`
+
+ // Schema The schema for the connection
+ Schema *string `json:"schema,omitempty"`
+
+ // Type The type of connection
+ Type *string `json:"type,omitempty"`
+}
+
+// CreateEnvironmentObjectConnectionRequest defines model for CreateEnvironmentObjectConnectionRequest.
+type CreateEnvironmentObjectConnectionRequest struct {
+ // AuthTypeId The ID for the connection auth type
+ AuthTypeId *string `json:"authTypeId,omitempty"`
+
+ // Extra Extra connection details, if any
+ Extra *map[string]interface{} `json:"extra,omitempty"`
+
+ // Host The host address for the connection
+ Host *string `json:"host,omitempty"`
+
+ // Login The username used for the connection
+ Login *string `json:"login,omitempty"`
+
+ // Password The password used for the connection
+ Password *string `json:"password,omitempty"`
+
+ // Port The port for the connection
+ Port *int `json:"port,omitempty"`
+
+ // Schema The schema for the connection
+ Schema *string `json:"schema,omitempty"`
+
+ // Type The type of connection
+ Type string `json:"type"`
+}
+
+// CreateEnvironmentObjectLinkRequest defines model for CreateEnvironmentObjectLinkRequest.
+type CreateEnvironmentObjectLinkRequest struct {
+ Overrides *CreateEnvironmentObjectOverridesRequest `json:"overrides,omitempty"`
+
+ // Scope Scope to link the environment object
+ Scope CreateEnvironmentObjectLinkRequestScope `json:"scope"`
+
+ // ScopeEntityId Entity ID of the scope to link the environment object
+ ScopeEntityId string `json:"scopeEntityId"`
+}
+
+// CreateEnvironmentObjectLinkRequestScope Scope to link the environment object
+type CreateEnvironmentObjectLinkRequestScope string
+
+// CreateEnvironmentObjectMetricsExportOverridesRequest defines model for CreateEnvironmentObjectMetricsExportOverridesRequest.
+type CreateEnvironmentObjectMetricsExportOverridesRequest struct {
+ // BasicToken The bearer token to connect to the remote endpoint
+ BasicToken *string `json:"basicToken,omitempty"`
+
+ // Endpoint The Prometheus endpoint where the metrics are exported
+ Endpoint *string `json:"endpoint,omitempty"`
+
+ // ExporterType The type of exporter
+ ExporterType *CreateEnvironmentObjectMetricsExportOverridesRequestExporterType `json:"exporterType,omitempty"`
+
+ // Headers Add key-value pairs to the HTTP request headers made by Astro when connecting to the remote endpoint
+ Headers *map[string]string `json:"headers,omitempty"`
+
+ // Labels Any key-value pair metrics labels for your export. You can use these to filter your metrics in downstream applications.
+ Labels *map[string]string `json:"labels,omitempty"`
+
+ // Password The password to connect to the remote endpoint
+ Password *string `json:"password,omitempty"`
+
+ // Username The username to connect to the remote endpoint
+ Username *string `json:"username,omitempty"`
+}
+
+// CreateEnvironmentObjectMetricsExportOverridesRequestExporterType The type of exporter
+type CreateEnvironmentObjectMetricsExportOverridesRequestExporterType string
+
+// CreateEnvironmentObjectMetricsExportRequest defines model for CreateEnvironmentObjectMetricsExportRequest.
+type CreateEnvironmentObjectMetricsExportRequest struct {
+ // BasicToken The bearer token to connect to the remote endpoint
+ BasicToken *string `json:"basicToken,omitempty"`
+
+ // Endpoint The Prometheus endpoint where the metrics are exported
+ Endpoint string `json:"endpoint"`
+
+ // ExporterType The type of exporter
+ ExporterType CreateEnvironmentObjectMetricsExportRequestExporterType `json:"exporterType"`
+
+ // Headers Add key-value pairs to the HTTP request headers made by Astro when connecting to the remote endpoint
+ Headers *map[string]string `json:"headers,omitempty"`
+
+ // Labels Any key-value pair metrics labels for your export. You can use these to filter your metrics in downstream applications.
+ Labels *map[string]string `json:"labels,omitempty"`
+
+ // Password The password to connect to the remote endpoint
+ Password *string `json:"password,omitempty"`
+
+ // Username The username to connect to the remote endpoint
+ Username *string `json:"username,omitempty"`
+}
+
+// CreateEnvironmentObjectMetricsExportRequestExporterType The type of exporter
+type CreateEnvironmentObjectMetricsExportRequestExporterType string
+
+// CreateEnvironmentObjectOverridesRequest defines model for CreateEnvironmentObjectOverridesRequest.
+type CreateEnvironmentObjectOverridesRequest struct {
+ AirflowVariable *CreateEnvironmentObjectAirflowVariableOverridesRequest `json:"airflowVariable,omitempty"`
+ Connection *CreateEnvironmentObjectConnectionOverridesRequest `json:"connection,omitempty"`
+ MetricsExport *CreateEnvironmentObjectMetricsExportOverridesRequest `json:"metricsExport,omitempty"`
+}
+
+// CreateEnvironmentObjectRequest defines model for CreateEnvironmentObjectRequest.
+type CreateEnvironmentObjectRequest struct {
+ AirflowVariable *CreateEnvironmentObjectAirflowVariableRequest `json:"airflowVariable,omitempty"`
+
+ // AutoLinkDeployments Whether or not to automatically link Deployments to the environment object. Only applicable for WORKSPACE scope
+ AutoLinkDeployments *bool `json:"autoLinkDeployments,omitempty"`
+ Connection *CreateEnvironmentObjectConnectionRequest `json:"connection,omitempty"`
+
+ // ExcludeLinks The links to exclude from the environment object. Only applicable for WORKSPACE scope
+ ExcludeLinks *[]ExcludeLinkEnvironmentObjectRequest `json:"excludeLinks,omitempty"`
+
+ // Links The Deployments that Astro links to the environment object. Only applicable for WORKSPACE scope
+ Links *[]CreateEnvironmentObjectLinkRequest `json:"links,omitempty"`
+ MetricsExport *CreateEnvironmentObjectMetricsExportRequest `json:"metricsExport,omitempty"`
+
+ // ObjectKey The key for the environment object
+ ObjectKey string `json:"objectKey"`
+
+ // ObjectType The type of environment object
+ ObjectType CreateEnvironmentObjectRequestObjectType `json:"objectType"`
+
+ // Scope The scope of the environment object
+ Scope CreateEnvironmentObjectRequestScope `json:"scope"`
+
+ // ScopeEntityId The ID of the scope entity where the environment object is created
+ ScopeEntityId string `json:"scopeEntityId"`
+}
+
+// CreateEnvironmentObjectRequestObjectType The type of environment object
+type CreateEnvironmentObjectRequestObjectType string
+
+// CreateEnvironmentObjectRequestScope The scope of the environment object
+type CreateEnvironmentObjectRequestScope string
+
// CreateGcpClusterRequest defines model for CreateGcpClusterRequest.
type CreateGcpClusterRequest struct {
// CloudProvider The cluster's cloud provider.
@@ -898,7 +1243,7 @@ type CreateHybridDeploymentRequest struct {
// WorkloadIdentity The Deployment's workload identity.
WorkloadIdentity *string `json:"workloadIdentity,omitempty"`
- // WorkspaceId The ID of the workspace to which the Deployment belongs.
+ // WorkspaceId The ID of the Workspace to which the Deployment belongs.
WorkspaceId string `json:"workspaceId"`
}
@@ -989,7 +1334,7 @@ type CreateStandardDeploymentRequest struct {
// WorkloadIdentity The Deployment's workload identity.
WorkloadIdentity *string `json:"workloadIdentity,omitempty"`
- // WorkspaceId The ID of the workspace to which the Deployment belongs.
+ // WorkspaceId The ID of the Workspace to which the Deployment belongs.
WorkspaceId string `json:"workspaceId"`
}
@@ -1348,6 +1693,222 @@ type DeploymentsPaginated struct {
TotalCount int `json:"totalCount"`
}
+// EnvironmentObject defines model for EnvironmentObject.
+type EnvironmentObject struct {
+ AirflowVariable *EnvironmentObjectAirflowVariable `json:"airflowVariable,omitempty"`
+
+ // AutoLinkDeployments Whether or not to automatically link Deployments to the environment object
+ AutoLinkDeployments *bool `json:"autoLinkDeployments,omitempty"`
+ Connection *EnvironmentObjectConnection `json:"connection,omitempty"`
+
+ // CreatedAt The time when the environment object was created in UTC, formatted as `YYYY-MM-DDTHH:MM:SSZ`
+ CreatedAt *string `json:"createdAt,omitempty"`
+ CreatedBy *BasicSubjectProfile `json:"createdBy,omitempty"`
+
+ // ExcludeLinks The excluded links for the environment object
+ ExcludeLinks *[]EnvironmentObjectExcludeLink `json:"excludeLinks,omitempty"`
+
+ // Id The ID of the environment object
+ Id *string `json:"id,omitempty"`
+
+ // Links The Deployments linked to the environment object
+ Links *[]EnvironmentObjectLink `json:"links,omitempty"`
+ MetricsExport *EnvironmentObjectMetricsExport `json:"metricsExport,omitempty"`
+
+ // ObjectKey The key for the environment object
+ ObjectKey string `json:"objectKey"`
+
+ // ObjectType The type of environment object
+ ObjectType EnvironmentObjectObjectType `json:"objectType"`
+
+ // Scope The scope of the environment object
+ Scope EnvironmentObjectScope `json:"scope"`
+
+ // ScopeEntityId The ID of the scope entity where the environment object is created
+ ScopeEntityId string `json:"scopeEntityId"`
+
+ // SourceScope The source scope of the environment object, if it is resolved from a link
+ SourceScope *EnvironmentObjectSourceScope `json:"sourceScope,omitempty"`
+
+ // SourceScopeEntityId The source scope entity ID of the environment object, if it is resolved from a link
+ SourceScopeEntityId *string `json:"sourceScopeEntityId,omitempty"`
+
+ // UpdatedAt The time when the environment object was updated in UTC, formatted as `YYYY-MM-DDTHH:MM:SSZ`
+ UpdatedAt *string `json:"updatedAt,omitempty"`
+ UpdatedBy *BasicSubjectProfile `json:"updatedBy,omitempty"`
+}
+
+// EnvironmentObjectObjectType The type of environment object
+type EnvironmentObjectObjectType string
+
+// EnvironmentObjectScope The scope of the environment object
+type EnvironmentObjectScope string
+
+// EnvironmentObjectSourceScope The source scope of the environment object, if it is resolved from a link
+type EnvironmentObjectSourceScope string
+
+// EnvironmentObjectAirflowVariable defines model for EnvironmentObjectAirflowVariable.
+type EnvironmentObjectAirflowVariable struct {
+ // IsSecret Whether the value is a secret or not
+ IsSecret bool `json:"isSecret"`
+
+ // Value The value of the Airflow variable. If the value is a secret, the value returned is empty
+ Value string `json:"value"`
+}
+
+// EnvironmentObjectAirflowVariableOverrides defines model for EnvironmentObjectAirflowVariableOverrides.
+type EnvironmentObjectAirflowVariableOverrides struct {
+ // Value The value of the Airflow variable
+ Value string `json:"value"`
+}
+
+// EnvironmentObjectConnection defines model for EnvironmentObjectConnection.
+type EnvironmentObjectConnection struct {
+ ConnectionAuthType *ConnectionAuthType `json:"connectionAuthType,omitempty"`
+
+ // Extra Extra connection details, if any
+ Extra *map[string]interface{} `json:"extra,omitempty"`
+
+ // Host The host address for the connection
+ Host *string `json:"host,omitempty"`
+
+ // Login The username used for the connection
+ Login *string `json:"login,omitempty"`
+
+ // Password The password used for the connection
+ Password *string `json:"password,omitempty"`
+
+ // Port The port for the connection
+ Port *int `json:"port,omitempty"`
+
+ // Schema The schema for the connection
+ Schema *string `json:"schema,omitempty"`
+
+ // Type The type of connection
+ Type string `json:"type"`
+}
+
+// EnvironmentObjectConnectionOverrides defines model for EnvironmentObjectConnectionOverrides.
+type EnvironmentObjectConnectionOverrides struct {
+ // Extra Extra connection details, if any
+ Extra *map[string]interface{} `json:"extra,omitempty"`
+
+ // Host The host address for the connection
+ Host *string `json:"host,omitempty"`
+
+ // Login The username used for the connection
+ Login *string `json:"login,omitempty"`
+
+ // Password The password used for the connection
+ Password *string `json:"password,omitempty"`
+
+ // Port The port for the connection
+ Port *int `json:"port,omitempty"`
+
+ // Schema The schema for the connection
+ Schema *string `json:"schema,omitempty"`
+
+ // Type The type of connection
+ Type *string `json:"type,omitempty"`
+}
+
+// EnvironmentObjectExcludeLink defines model for EnvironmentObjectExcludeLink.
+type EnvironmentObjectExcludeLink struct {
+ // Scope Scope of the excluded entity for environment object
+ Scope EnvironmentObjectExcludeLinkScope `json:"scope"`
+
+ // ScopeEntityId ID for the excluded entity for the environment object
+ ScopeEntityId string `json:"scopeEntityId"`
+}
+
+// EnvironmentObjectExcludeLinkScope Scope of the excluded entity for environment object
+type EnvironmentObjectExcludeLinkScope string
+
+// EnvironmentObjectLink defines model for EnvironmentObjectLink.
+type EnvironmentObjectLink struct {
+ AirflowVariableOverrides *EnvironmentObjectAirflowVariableOverrides `json:"airflowVariableOverrides,omitempty"`
+ ConnectionOverrides *EnvironmentObjectConnectionOverrides `json:"connectionOverrides,omitempty"`
+ MetricsExportOverrides *EnvironmentObjectMetricsExportOverrides `json:"metricsExportOverrides,omitempty"`
+
+ // Scope Scope of the linked entity for the environment object
+ Scope EnvironmentObjectLinkScope `json:"scope"`
+
+ // ScopeEntityId Linked entity ID the environment object
+ ScopeEntityId string `json:"scopeEntityId"`
+}
+
+// EnvironmentObjectLinkScope Scope of the linked entity for the environment object
+type EnvironmentObjectLinkScope string
+
+// EnvironmentObjectMetricsExport defines model for EnvironmentObjectMetricsExport.
+type EnvironmentObjectMetricsExport struct {
+ // BasicToken The bearer token to connect to the remote endpoint
+ BasicToken *string `json:"basicToken,omitempty"`
+
+ // Endpoint The Prometheus endpoint where the metrics are exported
+ Endpoint string `json:"endpoint"`
+
+ // ExporterType The type of exporter
+ ExporterType EnvironmentObjectMetricsExportExporterType `json:"exporterType"`
+
+ // Headers Add key-value pairs to the HTTP request headers made by Astro when connecting to the remote endpoint
+ Headers *map[string]string `json:"headers,omitempty"`
+
+ // Labels Any key-value pair metrics labels for your export. You can use these to filter your metrics in downstream applications.
+ Labels *map[string]string `json:"labels,omitempty"`
+
+ // Password The password to connect to the remote endpoint
+ Password *string `json:"password,omitempty"`
+
+ // Username The username to connect to the remote endpoint
+ Username *string `json:"username,omitempty"`
+}
+
+// EnvironmentObjectMetricsExportExporterType The type of exporter
+type EnvironmentObjectMetricsExportExporterType string
+
+// EnvironmentObjectMetricsExportOverrides defines model for EnvironmentObjectMetricsExportOverrides.
+type EnvironmentObjectMetricsExportOverrides struct {
+ // BasicToken The bearer token to connect to the remote endpoint
+ BasicToken *string `json:"basicToken,omitempty"`
+
+ // Endpoint The Prometheus endpoint where the metrics are exported
+ Endpoint *string `json:"endpoint,omitempty"`
+
+ // ExporterType The type of exporter
+ ExporterType *EnvironmentObjectMetricsExportOverridesExporterType `json:"exporterType,omitempty"`
+
+ // Headers Add key-value pairs to the HTTP request headers made by Astro when connecting to the remote endpoint
+ Headers *map[string]string `json:"headers,omitempty"`
+
+ // Labels Any key-value pair metrics labels for your export. You can use these to filter your metrics in downstream applications.
+ Labels *map[string]string `json:"labels,omitempty"`
+
+ // Password The password to connect to the remote endpoint
+ Password *string `json:"password,omitempty"`
+
+ // Username The username to connect to the remote endpoint
+ Username *string `json:"username,omitempty"`
+}
+
+// EnvironmentObjectMetricsExportOverridesExporterType The type of exporter
+type EnvironmentObjectMetricsExportOverridesExporterType string
+
+// EnvironmentObjectsPaginated defines model for EnvironmentObjectsPaginated.
+type EnvironmentObjectsPaginated struct {
+ // EnvironmentObjects The list of environment objects
+ EnvironmentObjects []EnvironmentObject `json:"environmentObjects"`
+
+ // Limit The maximum number of environment objects in current page
+ Limit int `json:"limit"`
+
+ // Offset The offset of the current page of environment objects
+ Offset int `json:"offset"`
+
+ // TotalCount The total number of environment objects
+ TotalCount int `json:"totalCount"`
+}
+
// Error defines model for Error.
type Error struct {
Message string `json:"message"`
@@ -1355,6 +1916,18 @@ type Error struct {
StatusCode int `json:"statusCode"`
}
+// ExcludeLinkEnvironmentObjectRequest defines model for ExcludeLinkEnvironmentObjectRequest.
+type ExcludeLinkEnvironmentObjectRequest struct {
+ // Scope Scope of the entity to exclude for environment object
+ Scope ExcludeLinkEnvironmentObjectRequestScope `json:"scope"`
+
+ // ScopeEntityId Entity ID to exclude for the environment object
+ ScopeEntityId string `json:"scopeEntityId"`
+}
+
+// ExcludeLinkEnvironmentObjectRequestScope Scope of the entity to exclude for environment object
+type ExcludeLinkEnvironmentObjectRequestScope string
+
// HybridWorkerQueueRequest defines model for HybridWorkerQueueRequest.
type HybridWorkerQueueRequest struct {
// Id The worker queue's ID. If not provided, a new worker queue will be created.
@@ -1726,37 +2299,191 @@ type UpdateDeploymentRequest struct {
union json.RawMessage
}
-// UpdateHybridClusterRequest defines model for UpdateHybridClusterRequest.
-type UpdateHybridClusterRequest struct {
- // ClusterType The cluster's type.
- ClusterType UpdateHybridClusterRequestClusterType `json:"clusterType"`
+// UpdateEnvironmentObjectAirflowVariableOverridesRequest defines model for UpdateEnvironmentObjectAirflowVariableOverridesRequest.
+type UpdateEnvironmentObjectAirflowVariableOverridesRequest struct {
+ // Value The value of the Airflow variable
+ Value *string `json:"value,omitempty"`
+}
- // WorkspaceIds The list of Workspaces that are authorized to the cluster. If this value is not provided, the existing list of Workspaces remains. If this value is '[]' then all workspace cluster mappings are removed.
- WorkspaceIds *[]string `json:"workspaceIds,omitempty"`
+// UpdateEnvironmentObjectAirflowVariableRequest defines model for UpdateEnvironmentObjectAirflowVariableRequest.
+type UpdateEnvironmentObjectAirflowVariableRequest struct {
+ // Value The value of the Airflow variable
+ Value *string `json:"value,omitempty"`
}
-// UpdateHybridClusterRequestClusterType The cluster's type.
-type UpdateHybridClusterRequestClusterType string
+// UpdateEnvironmentObjectConnectionOverridesRequest defines model for UpdateEnvironmentObjectConnectionOverridesRequest.
+type UpdateEnvironmentObjectConnectionOverridesRequest struct {
+ // Extra Extra connection details, if any
+ Extra *map[string]interface{} `json:"extra,omitempty"`
-// UpdateHybridDeploymentRequest defines model for UpdateHybridDeploymentRequest.
-type UpdateHybridDeploymentRequest struct {
- // ContactEmails A list of contact emails for the Deployment.
- ContactEmails *[]string `json:"contactEmails,omitempty"`
+ // Host The host address for the connection
+ Host *string `json:"host,omitempty"`
- // Description The Deployment's description.
- Description *string `json:"description,omitempty"`
+ // Login The username used for the connection
+ Login *string `json:"login,omitempty"`
- // EnvironmentVariables List of environment variables to add to the Deployment.
- EnvironmentVariables []DeploymentEnvironmentVariableRequest `json:"environmentVariables"`
+ // Password The password used for the connection
+ Password *string `json:"password,omitempty"`
- // Executor The Deployment's executor type.
- Executor UpdateHybridDeploymentRequestExecutor `json:"executor"`
+ // Port The port for the connection
+ Port *int `json:"port,omitempty"`
- // IsCicdEnforced Whether the Deployment requires that all deploys are made through CI/CD.
- IsCicdEnforced bool `json:"isCicdEnforced"`
+ // Schema The schema for the connection
+ Schema *string `json:"schema,omitempty"`
- // IsDagDeployEnabled Whether the Deployment has DAG deploys enabled.
- IsDagDeployEnabled bool `json:"isDagDeployEnabled"`
+ // Type The type of connection
+ Type *string `json:"type,omitempty"`
+}
+
+// UpdateEnvironmentObjectConnectionRequest defines model for UpdateEnvironmentObjectConnectionRequest.
+type UpdateEnvironmentObjectConnectionRequest struct {
+ // AuthTypeId The ID for the connection auth type
+ AuthTypeId *string `json:"authTypeId,omitempty"`
+
+ // Extra Extra connection details, if any
+ Extra *map[string]interface{} `json:"extra,omitempty"`
+
+ // Host The host address for the connection
+ Host *string `json:"host,omitempty"`
+
+ // Login The username used for the connection
+ Login *string `json:"login,omitempty"`
+
+ // Password The password used for the connection
+ Password *string `json:"password,omitempty"`
+
+ // Port The port for the connection
+ Port *int `json:"port,omitempty"`
+
+ // Schema The schema for the connection
+ Schema *string `json:"schema,omitempty"`
+
+ // Type The type of connection
+ Type string `json:"type"`
+}
+
+// UpdateEnvironmentObjectLinkRequest defines model for UpdateEnvironmentObjectLinkRequest.
+type UpdateEnvironmentObjectLinkRequest struct {
+ Overrides *UpdateEnvironmentObjectOverridesRequest `json:"overrides,omitempty"`
+
+ // Scope Scope of the entity to link the environment object
+ Scope UpdateEnvironmentObjectLinkRequestScope `json:"scope"`
+
+ // ScopeEntityId Entity ID to link the environment object
+ ScopeEntityId string `json:"scopeEntityId"`
+}
+
+// UpdateEnvironmentObjectLinkRequestScope Scope of the entity to link the environment object
+type UpdateEnvironmentObjectLinkRequestScope string
+
+// UpdateEnvironmentObjectMetricsExportOverridesRequest defines model for UpdateEnvironmentObjectMetricsExportOverridesRequest.
+type UpdateEnvironmentObjectMetricsExportOverridesRequest struct {
+ // BasicToken The bearer token to connect to the remote endpoint
+ BasicToken *string `json:"basicToken,omitempty"`
+
+ // Endpoint The Prometheus endpoint where the metrics are exported
+ Endpoint *string `json:"endpoint,omitempty"`
+
+ // ExporterType The type of exporter
+ ExporterType *UpdateEnvironmentObjectMetricsExportOverridesRequestExporterType `json:"exporterType,omitempty"`
+
+ // Headers Add key-value pairs to the HTTP request headers made by Astro when connecting to the remote endpoint
+ Headers *map[string]string `json:"headers,omitempty"`
+
+ // Labels Any key-value pair metrics labels for your export. You can use these to filter your metrics in downstream applications.
+ Labels *map[string]string `json:"labels,omitempty"`
+
+ // Password The password to connect to the remote endpoint
+ Password *string `json:"password,omitempty"`
+
+ // Username The username to connect to the remote endpoint
+ Username *string `json:"username,omitempty"`
+}
+
+// UpdateEnvironmentObjectMetricsExportOverridesRequestExporterType The type of exporter
+type UpdateEnvironmentObjectMetricsExportOverridesRequestExporterType string
+
+// UpdateEnvironmentObjectMetricsExportRequest defines model for UpdateEnvironmentObjectMetricsExportRequest.
+type UpdateEnvironmentObjectMetricsExportRequest struct {
+ // BasicToken The bearer token to connect to the remote endpoint
+ BasicToken *string `json:"basicToken,omitempty"`
+
+ // Endpoint The Prometheus endpoint where the metrics are exported
+ Endpoint *string `json:"endpoint,omitempty"`
+
+ // ExporterType The type of exporter
+ ExporterType *UpdateEnvironmentObjectMetricsExportRequestExporterType `json:"exporterType,omitempty"`
+
+ // Headers Add key-value pairs to the HTTP request headers made by Astro when connecting to the remote endpoint
+ Headers *map[string]string `json:"headers,omitempty"`
+
+ // Labels Any key-value pair metrics labels for your export. You can use these to filter your metrics in downstream applications.
+ Labels *map[string]string `json:"labels,omitempty"`
+
+ // Password The password to connect to the remote endpoint
+ Password *string `json:"password,omitempty"`
+
+ // Username The username to connect to the remote endpoint
+ Username *string `json:"username,omitempty"`
+}
+
+// UpdateEnvironmentObjectMetricsExportRequestExporterType The type of exporter
+type UpdateEnvironmentObjectMetricsExportRequestExporterType string
+
+// UpdateEnvironmentObjectOverridesRequest defines model for UpdateEnvironmentObjectOverridesRequest.
+type UpdateEnvironmentObjectOverridesRequest struct {
+ AirflowVariable *UpdateEnvironmentObjectAirflowVariableOverridesRequest `json:"airflowVariable,omitempty"`
+ Connection *UpdateEnvironmentObjectConnectionOverridesRequest `json:"connection,omitempty"`
+ MetricsExport *UpdateEnvironmentObjectMetricsExportOverridesRequest `json:"metricsExport,omitempty"`
+}
+
+// UpdateEnvironmentObjectRequest defines model for UpdateEnvironmentObjectRequest.
+type UpdateEnvironmentObjectRequest struct {
+ AirflowVariable *UpdateEnvironmentObjectAirflowVariableRequest `json:"airflowVariable,omitempty"`
+
+ // AutoLinkDeployments Whether or not to automatically link Deployments to the environment object. Only applicable for WORKSPACE scope
+ AutoLinkDeployments *bool `json:"autoLinkDeployments,omitempty"`
+ Connection *UpdateEnvironmentObjectConnectionRequest `json:"connection,omitempty"`
+
+ // ExcludeLinks The links to exclude from the environment object. Only applicable for WORKSPACE scope
+ ExcludeLinks *[]ExcludeLinkEnvironmentObjectRequest `json:"excludeLinks,omitempty"`
+
+ // Links The Deployments that Astro links to the environment object. Only applicable for WORKSPACE scope
+ Links *[]UpdateEnvironmentObjectLinkRequest `json:"links,omitempty"`
+ MetricsExport *UpdateEnvironmentObjectMetricsExportRequest `json:"metricsExport,omitempty"`
+}
+
+// UpdateHybridClusterRequest defines model for UpdateHybridClusterRequest.
+type UpdateHybridClusterRequest struct {
+ // ClusterType The cluster's type.
+ ClusterType UpdateHybridClusterRequestClusterType `json:"clusterType"`
+
+ // WorkspaceIds The list of Workspaces that are authorized to the cluster. If this value is not provided, the existing list of Workspaces remains. If this value is '[]' then all workspace cluster mappings are removed.
+ WorkspaceIds *[]string `json:"workspaceIds,omitempty"`
+}
+
+// UpdateHybridClusterRequestClusterType The cluster's type.
+type UpdateHybridClusterRequestClusterType string
+
+// UpdateHybridDeploymentRequest defines model for UpdateHybridDeploymentRequest.
+type UpdateHybridDeploymentRequest struct {
+ // ContactEmails A list of contact emails for the Deployment.
+ ContactEmails *[]string `json:"contactEmails,omitempty"`
+
+ // Description The Deployment's description.
+ Description *string `json:"description,omitempty"`
+
+ // EnvironmentVariables List of environment variables to add to the Deployment.
+ EnvironmentVariables []DeploymentEnvironmentVariableRequest `json:"environmentVariables"`
+
+ // Executor The Deployment's executor type.
+ Executor UpdateHybridDeploymentRequestExecutor `json:"executor"`
+
+ // IsCicdEnforced Whether the Deployment requires that all deploys are made through CI/CD.
+ IsCicdEnforced bool `json:"isCicdEnforced"`
+
+ // IsDagDeployEnabled Whether the Deployment has DAG deploys enabled.
+ IsDagDeployEnabled bool `json:"isDagDeployEnabled"`
// Name The Deployment's name.
Name string `json:"name"`
@@ -2058,6 +2785,15 @@ type GetOrganizationParams struct {
IsLookUpOnly *bool `form:"isLookUpOnly,omitempty" json:"isLookUpOnly,omitempty"`
}
+// GetOrganizationAuditLogsParams defines parameters for GetOrganizationAuditLogs.
+type GetOrganizationAuditLogsParams struct {
+ // StartDate The start date of the logs.
+ StartDate *time.Time `form:"startDate,omitempty" json:"startDate,omitempty"`
+
+ // EndDate The end date of the logs.
+ EndDate *time.Time `form:"endDate,omitempty" json:"endDate,omitempty"`
+}
+
// GetClusterOptionsParams defines parameters for GetClusterOptions.
type GetClusterOptionsParams struct {
// Provider The cluster's cloud provider.
@@ -2145,6 +2881,42 @@ type ListDeploymentsParams struct {
// ListDeploymentsParamsSorts defines parameters for ListDeployments.
type ListDeploymentsParamsSorts string
+// ListEnvironmentObjectsParams defines parameters for ListEnvironmentObjects.
+type ListEnvironmentObjectsParams struct {
+ // Offset The number of results to skip before returning values.
+ Offset *int `form:"offset,omitempty" json:"offset,omitempty"`
+
+ // Limit The maximum number of results to return.
+ Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
+
+ // Sorts A list of field names to sort by, and whether to show results as ascending or descending. Formatted as `:asc` or `:desc`.
+ Sorts *[]ListEnvironmentObjectsParamsSorts `form:"sorts,omitempty" json:"sorts,omitempty"`
+
+ // WorkspaceId The Workspace ID to filter for. The API returns details for all environment objects belonging only to this specified Workspace.
+ WorkspaceId *string `form:"workspaceId,omitempty" json:"workspaceId,omitempty"`
+
+ // DeploymentId The Deployment ID to filter for. The API returns details for all environment objects belonging only to this specified Deployment.
+ DeploymentId *string `form:"deploymentId,omitempty" json:"deploymentId,omitempty"`
+
+ // ObjectType The environment object type to filter for. The API returns details for all environment objects belonging only to this specified object type.
+ ObjectType *ListEnvironmentObjectsParamsObjectType `form:"objectType,omitempty" json:"objectType,omitempty"`
+
+ // ObjectKey The environment object key to filter for. The API returns details for all environment objects belonging only to the specified object key.
+ ObjectKey *string `form:"objectKey,omitempty" json:"objectKey,omitempty"`
+
+ // ShowSecrets If true, returns the actual values of fields of type secret in the API response.
+ ShowSecrets *bool `form:"showSecrets,omitempty" json:"showSecrets,omitempty"`
+
+ // ResolveLinked Resolve and return the environment objects linked to the specified Deployment or Workspace in the API response.
+ ResolveLinked *bool `form:"resolveLinked,omitempty" json:"resolveLinked,omitempty"`
+}
+
+// ListEnvironmentObjectsParamsSorts defines parameters for ListEnvironmentObjects.
+type ListEnvironmentObjectsParamsSorts string
+
+// ListEnvironmentObjectsParamsObjectType defines parameters for ListEnvironmentObjects.
+type ListEnvironmentObjectsParamsObjectType string
+
// ListWorkspacesParams defines parameters for ListWorkspaces.
type ListWorkspacesParams struct {
// WorkspaceIds A list of IDs for specific Workspaces to list. The API will list information only for Workspaces which have been specified in this list.
@@ -2184,6 +2956,15 @@ type UpdateDeploymentJSONRequestBody = UpdateDeploymentRequest
// UpdateDeploymentHibernationOverrideJSONRequestBody defines body for UpdateDeploymentHibernationOverride for application/json ContentType.
type UpdateDeploymentHibernationOverrideJSONRequestBody = OverrideDeploymentHibernationBody
+// CreateEnvironmentObjectJSONRequestBody defines body for CreateEnvironmentObject for application/json ContentType.
+type CreateEnvironmentObjectJSONRequestBody = CreateEnvironmentObjectRequest
+
+// UpdateEnvironmentObjectJSONRequestBody defines body for UpdateEnvironmentObject for application/json ContentType.
+type UpdateEnvironmentObjectJSONRequestBody = UpdateEnvironmentObjectRequest
+
+// ExcludeLinkingEnvironmentObjectJSONRequestBody defines body for ExcludeLinkingEnvironmentObject for application/json ContentType.
+type ExcludeLinkingEnvironmentObjectJSONRequestBody = ExcludeLinkEnvironmentObjectRequest
+
// CreateWorkspaceJSONRequestBody defines body for CreateWorkspace for application/json ContentType.
type CreateWorkspaceJSONRequestBody = CreateWorkspaceRequest
@@ -2600,6 +3381,9 @@ type ClientInterface interface {
UpdateOrganization(ctx context.Context, organizationId string, body UpdateOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // GetOrganizationAuditLogs request
+ GetOrganizationAuditLogs(ctx context.Context, organizationId string, params *GetOrganizationAuditLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
// GetClusterOptions request
GetClusterOptions(ctx context.Context, organizationId string, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -2652,6 +3436,30 @@ type ClientInterface interface {
UpdateDeploymentHibernationOverride(ctx context.Context, organizationId string, deploymentId string, body UpdateDeploymentHibernationOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // ListEnvironmentObjects request
+ ListEnvironmentObjects(ctx context.Context, organizationId string, params *ListEnvironmentObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // CreateEnvironmentObjectWithBody request with any body
+ CreateEnvironmentObjectWithBody(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)
+
+ // DeleteEnvironmentObject request
+ DeleteEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // GetEnvironmentObject request
+ GetEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // UpdateEnvironmentObjectWithBody request with any body
+ UpdateEnvironmentObjectWithBody(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ UpdateEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, body UpdateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // ExcludeLinkingEnvironmentObjectWithBody request with any body
+ ExcludeLinkingEnvironmentObjectWithBody(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ ExcludeLinkingEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, body ExcludeLinkingEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
// ListWorkspaces request
ListWorkspaces(ctx context.Context, organizationId string, params *ListWorkspacesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -2720,6 +3528,18 @@ func (c *Client) UpdateOrganization(ctx context.Context, organizationId string,
return c.Client.Do(req)
}
+func (c *Client) GetOrganizationAuditLogs(ctx context.Context, organizationId string, params *GetOrganizationAuditLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewGetOrganizationAuditLogsRequest(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) GetClusterOptions(ctx context.Context, organizationId string, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewGetClusterOptionsRequest(c.Server, organizationId, params)
if err != nil {
@@ -2948,6 +3768,114 @@ func (c *Client) UpdateDeploymentHibernationOverride(ctx context.Context, organi
return c.Client.Do(req)
}
+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
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+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
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+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
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+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
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+func (c *Client) GetEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewGetEnvironmentObjectRequest(c.Server, organizationId, environmentObjectId)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+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
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+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
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
+func (c *Client) ExcludeLinkingEnvironmentObjectWithBody(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewExcludeLinkingEnvironmentObjectRequestWithBody(c.Server, organizationId, environmentObjectId, 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) ExcludeLinkingEnvironmentObject(ctx context.Context, organizationId string, environmentObjectId string, body ExcludeLinkingEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewExcludeLinkingEnvironmentObjectRequest(c.Server, organizationId, environmentObjectId, body)
+ if err != nil {
+ return nil, err
+ }
+ 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 {
@@ -3248,8 +4176,8 @@ func NewUpdateOrganizationRequestWithBody(server string, organizationId string,
return req, nil
}
-// NewGetClusterOptionsRequest generates requests for GetClusterOptions
-func NewGetClusterOptionsRequest(server string, organizationId string, params *GetClusterOptionsParams) (*http.Request, error) {
+// NewGetOrganizationAuditLogsRequest generates requests for GetOrganizationAuditLogs
+func NewGetOrganizationAuditLogsRequest(server string, organizationId string, params *GetOrganizationAuditLogsParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3264,7 +4192,7 @@ func NewGetClusterOptionsRequest(server string, organizationId string, params *G
return nil, err
}
- operationPath := fmt.Sprintf("/organizations/%s/cluster-options", pathParam0)
+ operationPath := fmt.Sprintf("/organizations/%s/audit-logs", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3277,9 +4205,9 @@ func NewGetClusterOptionsRequest(server string, organizationId string, params *G
if params != nil {
queryValues := queryURL.Query()
- if params.Provider != nil {
+ if params.StartDate != nil {
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "provider", runtime.ParamLocationQuery, *params.Provider); err != nil {
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startDate", runtime.ParamLocationQuery, *params.StartDate); err != nil {
return nil, err
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
return nil, err
@@ -3293,16 +4221,20 @@ func NewGetClusterOptionsRequest(server string, organizationId string, params *G
}
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, params.Type); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
+ if params.EndDate != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endDate", runtime.ParamLocationQuery, *params.EndDate); err != nil {
+ return nil, err
+ } else if 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()
@@ -3316,8 +4248,8 @@ func NewGetClusterOptionsRequest(server string, organizationId string, params *G
return req, nil
}
-// NewListClustersRequest generates requests for ListClusters
-func NewListClustersRequest(server string, organizationId string, params *ListClustersParams) (*http.Request, error) {
+// NewGetClusterOptionsRequest generates requests for GetClusterOptions
+func NewGetClusterOptionsRequest(server string, organizationId string, params *GetClusterOptionsParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3332,7 +4264,7 @@ func NewListClustersRequest(server string, organizationId string, params *ListCl
return nil, err
}
- operationPath := fmt.Sprintf("/organizations/%s/clusters", pathParam0)
+ operationPath := fmt.Sprintf("/organizations/%s/cluster-options", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3345,22 +4277,6 @@ func NewListClustersRequest(server string, organizationId string, params *ListCl
if params != nil {
queryValues := queryURL.Query()
- if params.Names != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "names", runtime.ParamLocationQuery, *params.Names); err != nil {
- return nil, err
- } else if 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.Provider != nil {
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "provider", runtime.ParamLocationQuery, *params.Provider); err != nil {
@@ -3377,10 +4293,94 @@ func NewListClustersRequest(server string, organizationId string, params *ListCl
}
- if params.Offset != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil {
- return nil, err
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, params.Type); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } 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
+}
+
+// NewListClustersRequest generates requests for ListClusters
+func NewListClustersRequest(server string, organizationId string, params *ListClustersParams) (*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/clusters", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Names != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "names", runtime.ParamLocationQuery, *params.Names); err != nil {
+ return nil, err
+ } else if 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.Provider != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "provider", runtime.ParamLocationQuery, *params.Provider); err != nil {
+ return nil, err
+ } else if 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 {
@@ -4137,8 +5137,8 @@ func NewUpdateDeploymentHibernationOverrideRequestWithBody(server string, organi
return req, nil
}
-// NewListWorkspacesRequest generates requests for ListWorkspaces
-func NewListWorkspacesRequest(server string, organizationId string, params *ListWorkspacesParams) (*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
@@ -4153,7 +5153,7 @@ func NewListWorkspacesRequest(server string, organizationId string, params *List
return nil, err
}
- operationPath := fmt.Sprintf("/organizations/%s/workspaces", pathParam0)
+ operationPath := fmt.Sprintf("/organizations/%s/environment-objects", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4166,9 +5166,9 @@ func NewListWorkspacesRequest(server string, organizationId string, params *List
if params != nil {
queryValues := queryURL.Query()
- if params.WorkspaceIds != nil {
+ if params.Offset != nil {
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workspaceIds", runtime.ParamLocationQuery, *params.WorkspaceIds); 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
@@ -4182,9 +5182,9 @@ func NewListWorkspacesRequest(server string, organizationId string, params *List
}
- if params.Names != nil {
+ if params.Limit != nil {
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "names", runtime.ParamLocationQuery, *params.Names); 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
@@ -4198,9 +5198,9 @@ func NewListWorkspacesRequest(server string, organizationId string, params *List
}
- if params.Offset != nil {
+ if params.Sorts != nil {
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); 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
@@ -4214,9 +5214,9 @@ func NewListWorkspacesRequest(server string, organizationId string, params *List
}
- if params.Limit != nil {
+ if params.WorkspaceId != nil {
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
+ 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
@@ -4230,9 +5230,73 @@ func NewListWorkspacesRequest(server string, organizationId string, params *List
}
- if params.Sorts != nil {
+ if params.DeploymentId != nil {
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sorts", runtime.ParamLocationQuery, *params.Sorts); err != 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)
+ }
+ }
+ }
+
+ }
+
+ if params.ObjectType != nil {
+
+ 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)
+ }
+ }
+ }
+
+ }
+
+ if params.ObjectKey != 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)
+ }
+ }
+ }
+
+ }
+
+ if params.ShowSecrets != nil {
+
+ 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)
+ }
+ }
+ }
+
+ }
+
+ if params.ResolveLinked != nil {
+
+ 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
@@ -4257,19 +5321,19 @@ func NewListWorkspacesRequest(server string, organizationId string, params *List
return req, nil
}
-// NewCreateWorkspaceRequest calls the generic CreateWorkspace builder with application/json body
-func NewCreateWorkspaceRequest(server string, organizationId string, body CreateWorkspaceJSONRequestBody) (*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 NewCreateWorkspaceRequestWithBody(server, organizationId, "application/json", bodyReader)
+ return NewCreateEnvironmentObjectRequestWithBody(server, organizationId, "application/json", bodyReader)
}
-// NewCreateWorkspaceRequestWithBody generates requests for CreateWorkspace with any type of body
-func NewCreateWorkspaceRequestWithBody(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
@@ -4284,7 +5348,7 @@ func NewCreateWorkspaceRequestWithBody(server string, organizationId string, con
return nil, err
}
- operationPath := fmt.Sprintf("/organizations/%s/workspaces", pathParam0)
+ operationPath := fmt.Sprintf("/organizations/%s/environment-objects", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4304,8 +5368,8 @@ func NewCreateWorkspaceRequestWithBody(server string, organizationId string, con
return req, nil
}
-// NewDeleteWorkspaceRequest generates requests for DeleteWorkspace
-func NewDeleteWorkspaceRequest(server string, organizationId string, workspaceId 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
@@ -4317,7 +5381,7 @@ func NewDeleteWorkspaceRequest(server string, organizationId string, workspaceId
var pathParam1 string
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workspaceId", runtime.ParamLocationPath, workspaceId)
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "environmentObjectId", runtime.ParamLocationPath, environmentObjectId)
if err != nil {
return nil, err
}
@@ -4327,7 +5391,7 @@ func NewDeleteWorkspaceRequest(server string, organizationId string, workspaceId
return nil, err
}
- operationPath := fmt.Sprintf("/organizations/%s/workspaces/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/organizations/%s/environment-objects/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4345,8 +5409,8 @@ func NewDeleteWorkspaceRequest(server string, organizationId string, workspaceId
return req, nil
}
-// NewGetWorkspaceRequest generates requests for GetWorkspace
-func NewGetWorkspaceRequest(server string, organizationId string, workspaceId string) (*http.Request, error) {
+// NewGetEnvironmentObjectRequest generates requests for GetEnvironmentObject
+func NewGetEnvironmentObjectRequest(server string, organizationId string, environmentObjectId string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4358,7 +5422,7 @@ func NewGetWorkspaceRequest(server string, organizationId string, workspaceId st
var pathParam1 string
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workspaceId", runtime.ParamLocationPath, workspaceId)
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "environmentObjectId", runtime.ParamLocationPath, environmentObjectId)
if err != nil {
return nil, err
}
@@ -4368,7 +5432,7 @@ func NewGetWorkspaceRequest(server string, organizationId string, workspaceId st
return nil, err
}
- operationPath := fmt.Sprintf("/organizations/%s/workspaces/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/organizations/%s/environment-objects/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4386,19 +5450,19 @@ func NewGetWorkspaceRequest(server string, organizationId string, workspaceId st
return req, nil
}
-// NewUpdateWorkspaceRequest calls the generic UpdateWorkspace builder with application/json body
-func NewUpdateWorkspaceRequest(server string, organizationId string, workspaceId string, body UpdateWorkspaceJSONRequestBody) (*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 NewUpdateWorkspaceRequestWithBody(server, organizationId, workspaceId, "application/json", bodyReader)
+ return NewUpdateEnvironmentObjectRequestWithBody(server, organizationId, environmentObjectId, "application/json", bodyReader)
}
-// NewUpdateWorkspaceRequestWithBody generates requests for UpdateWorkspace with any type of body
-func NewUpdateWorkspaceRequestWithBody(server string, organizationId string, workspaceId string, contentType string, body io.Reader) (*http.Request, error) {
+// 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
@@ -4410,7 +5474,7 @@ func NewUpdateWorkspaceRequestWithBody(server string, organizationId string, wor
var pathParam1 string
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workspaceId", runtime.ParamLocationPath, workspaceId)
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "environmentObjectId", runtime.ParamLocationPath, environmentObjectId)
if err != nil {
return nil, err
}
@@ -4420,7 +5484,7 @@ func NewUpdateWorkspaceRequestWithBody(server string, organizationId string, wor
return nil, err
}
- operationPath := fmt.Sprintf("/organizations/%s/workspaces/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/organizations/%s/environment-objects/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4440,62 +5504,422 @@ func NewUpdateWorkspaceRequestWithBody(server string, organizationId string, wor
return req, nil
}
-func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
- for _, r := range c.RequestEditors {
- if err := r(ctx, req); err != nil {
- return err
- }
- }
- for _, r := range additionalEditors {
- if err := r(ctx, req); err != nil {
- return err
- }
+// NewExcludeLinkingEnvironmentObjectRequest calls the generic ExcludeLinkingEnvironmentObject builder with application/json body
+func NewExcludeLinkingEnvironmentObjectRequest(server string, organizationId string, environmentObjectId string, body ExcludeLinkingEnvironmentObjectJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
}
- return nil
+ bodyReader = bytes.NewReader(buf)
+ return NewExcludeLinkingEnvironmentObjectRequestWithBody(server, organizationId, environmentObjectId, "application/json", bodyReader)
}
-// ClientWithResponses builds on ClientInterface to offer response payloads
-type ClientWithResponses struct {
- ClientInterface
-}
+// NewExcludeLinkingEnvironmentObjectRequestWithBody generates requests for ExcludeLinkingEnvironmentObject with any type of body
+func NewExcludeLinkingEnvironmentObjectRequestWithBody(server string, organizationId string, environmentObjectId string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
-// NewClientWithResponses creates a new ClientWithResponses, which wraps
-// Client with return type handling
-func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
- client, err := NewClient(server, opts...)
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId)
if err != nil {
return nil, err
}
- return &ClientWithResponses{client}, nil
-}
-// WithBaseURL overrides the baseURL.
-func WithBaseURL(baseURL string) ClientOption {
- return func(c *Client) error {
- newBaseURL, err := url.Parse(baseURL)
- if err != nil {
- return err
- }
- c.Server = newBaseURL.String()
- return nil
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "environmentObjectId", runtime.ParamLocationPath, environmentObjectId)
+ if err != nil {
+ return nil, err
}
-}
-// ClientWithResponsesInterface is the interface specification for the client with responses above.
-type ClientWithResponsesInterface interface {
- // ListOrganizationsWithResponse request
- ListOrganizationsWithResponse(ctx context.Context, params *ListOrganizationsParams, reqEditors ...RequestEditorFn) (*ListOrganizationsResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- // GetOrganizationWithResponse request
- GetOrganizationWithResponse(ctx context.Context, organizationId string, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error)
+ operationPath := fmt.Sprintf("/organizations/%s/environment-objects/%s/exclude-linking", pathParam0, pathParam1)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // UpdateOrganizationWithBodyWithResponse request with any body
- UpdateOrganizationWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrganizationResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- UpdateOrganizationWithResponse(ctx context.Context, organizationId string, body UpdateOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrganizationResponse, error)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
- // GetClusterOptionsWithResponse request
- GetClusterOptionsWithResponse(ctx context.Context, organizationId string, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*GetClusterOptionsResponse, error)
+ 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
+
+ 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/workspaces", 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.WorkspaceIds != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workspaceIds", runtime.ParamLocationQuery, *params.WorkspaceIds); err != nil {
+ return nil, err
+ } else if 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.Names != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "names", runtime.ParamLocationQuery, *params.Names); err != nil {
+ return nil, err
+ } else if 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.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.Sorts != 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
+ } 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
+}
+
+// NewCreateWorkspaceRequest calls the generic CreateWorkspace builder with application/json body
+func NewCreateWorkspaceRequest(server string, organizationId string, body CreateWorkspaceJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewCreateWorkspaceRequestWithBody(server, organizationId, "application/json", bodyReader)
+}
+
+// NewCreateWorkspaceRequestWithBody generates requests for CreateWorkspace with any type of body
+func NewCreateWorkspaceRequestWithBody(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/workspaces", 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
+}
+
+// NewDeleteWorkspaceRequest generates requests for DeleteWorkspace
+func NewDeleteWorkspaceRequest(server string, organizationId string, workspaceId 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
+ }
+
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workspaceId", runtime.ParamLocationPath, workspaceId)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/organizations/%s/workspaces/%s", pathParam0, pathParam1)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewGetWorkspaceRequest generates requests for GetWorkspace
+func NewGetWorkspaceRequest(server string, organizationId string, workspaceId 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
+ }
+
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workspaceId", runtime.ParamLocationPath, workspaceId)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/organizations/%s/workspaces/%s", pathParam0, pathParam1)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewUpdateWorkspaceRequest calls the generic UpdateWorkspace builder with application/json body
+func NewUpdateWorkspaceRequest(server string, organizationId string, workspaceId string, body UpdateWorkspaceJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewUpdateWorkspaceRequestWithBody(server, organizationId, workspaceId, "application/json", bodyReader)
+}
+
+// NewUpdateWorkspaceRequestWithBody generates requests for UpdateWorkspace with any type of body
+func NewUpdateWorkspaceRequestWithBody(server string, organizationId string, workspaceId 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
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/organizations/%s/workspaces/%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
+}
+
+func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
+ for _, r := range c.RequestEditors {
+ if err := r(ctx, req); err != nil {
+ return err
+ }
+ }
+ for _, r := range additionalEditors {
+ if err := r(ctx, req); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// ClientWithResponses builds on ClientInterface to offer response payloads
+type ClientWithResponses struct {
+ ClientInterface
+}
+
+// NewClientWithResponses creates a new ClientWithResponses, which wraps
+// Client with return type handling
+func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
+ client, err := NewClient(server, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &ClientWithResponses{client}, nil
+}
+
+// WithBaseURL overrides the baseURL.
+func WithBaseURL(baseURL string) ClientOption {
+ return func(c *Client) error {
+ newBaseURL, err := url.Parse(baseURL)
+ if err != nil {
+ return err
+ }
+ c.Server = newBaseURL.String()
+ return nil
+ }
+}
+
+// ClientWithResponsesInterface is the interface specification for the client with responses above.
+type ClientWithResponsesInterface interface {
+ // ListOrganizationsWithResponse request
+ ListOrganizationsWithResponse(ctx context.Context, params *ListOrganizationsParams, reqEditors ...RequestEditorFn) (*ListOrganizationsResponse, error)
+
+ // GetOrganizationWithResponse request
+ GetOrganizationWithResponse(ctx context.Context, organizationId string, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error)
+
+ // UpdateOrganizationWithBodyWithResponse request with any body
+ UpdateOrganizationWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrganizationResponse, error)
+
+ UpdateOrganizationWithResponse(ctx context.Context, organizationId string, body UpdateOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrganizationResponse, error)
+
+ // GetOrganizationAuditLogsWithResponse request
+ GetOrganizationAuditLogsWithResponse(ctx context.Context, organizationId string, params *GetOrganizationAuditLogsParams, reqEditors ...RequestEditorFn) (*GetOrganizationAuditLogsResponse, error)
+
+ // GetClusterOptionsWithResponse request
+ GetClusterOptionsWithResponse(ctx context.Context, organizationId string, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*GetClusterOptionsResponse, error)
// ListClustersWithResponse request
ListClustersWithResponse(ctx context.Context, organizationId string, params *ListClustersParams, reqEditors ...RequestEditorFn) (*ListClustersResponse, error)
@@ -4546,6 +5970,30 @@ type ClientWithResponsesInterface interface {
UpdateDeploymentHibernationOverrideWithResponse(ctx context.Context, organizationId string, deploymentId string, body UpdateDeploymentHibernationOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentHibernationOverrideResponse, error)
+ // ListEnvironmentObjectsWithResponse request
+ ListEnvironmentObjectsWithResponse(ctx context.Context, organizationId string, params *ListEnvironmentObjectsParams, reqEditors ...RequestEditorFn) (*ListEnvironmentObjectsResponse, error)
+
+ // CreateEnvironmentObjectWithBodyWithResponse request with any body
+ CreateEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEnvironmentObjectResponse, error)
+
+ CreateEnvironmentObjectWithResponse(ctx context.Context, organizationId string, body CreateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEnvironmentObjectResponse, error)
+
+ // DeleteEnvironmentObjectWithResponse request
+ DeleteEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*DeleteEnvironmentObjectResponse, error)
+
+ // GetEnvironmentObjectWithResponse request
+ GetEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*GetEnvironmentObjectResponse, error)
+
+ // UpdateEnvironmentObjectWithBodyWithResponse request with any body
+ UpdateEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateEnvironmentObjectResponse, error)
+
+ UpdateEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, body UpdateEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateEnvironmentObjectResponse, error)
+
+ // ExcludeLinkingEnvironmentObjectWithBodyWithResponse request with any body
+ ExcludeLinkingEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExcludeLinkingEnvironmentObjectResponse, error)
+
+ ExcludeLinkingEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, body ExcludeLinkingEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*ExcludeLinkingEnvironmentObjectResponse, error)
+
// ListWorkspacesWithResponse request
ListWorkspacesWithResponse(ctx context.Context, organizationId string, params *ListWorkspacesParams, reqEditors ...RequestEditorFn) (*ListWorkspacesResponse, error)
@@ -4646,6 +6094,27 @@ func (r UpdateOrganizationResponse) StatusCode() int {
return 0
}
+type GetOrganizationAuditLogsResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r GetOrganizationAuditLogsResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r GetOrganizationAuditLogsResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
type GetClusterOptionsResponse struct {
Body []byte
HTTPResponse *http.Response
@@ -4746,17 +6215,176 @@ func (r DeleteClusterResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r DeleteClusterResponse) StatusCode() int {
+func (r DeleteClusterResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type GetClusterResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *Cluster
+ JSON400 *Error
+ JSON401 *Error
+ JSON403 *Error
+ JSON404 *Error
+ JSON500 *Error
+}
+
+// Status returns HTTPResponse.Status
+func (r GetClusterResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r GetClusterResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type UpdateClusterResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *Cluster
+ JSON400 *Error
+ JSON401 *Error
+ JSON403 *Error
+ JSON404 *Error
+ JSON412 *Error
+ JSON500 *Error
+}
+
+// Status returns HTTPResponse.Status
+func (r UpdateClusterResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r UpdateClusterResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type GetDeploymentOptionsResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *DeploymentOptions
+ JSON400 *Error
+ JSON401 *Error
+ JSON403 *Error
+ JSON500 *Error
+}
+
+// Status returns HTTPResponse.Status
+func (r GetDeploymentOptionsResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r GetDeploymentOptionsResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ 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 CreateDeploymentResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *Deployment
+ JSON400 *Error
+ JSON401 *Error
+ JSON403 *Error
+ JSON500 *Error
+}
+
+// Status returns HTTPResponse.Status
+func (r CreateDeploymentResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r CreateDeploymentResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type DeleteDeploymentResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON400 *Error
+ JSON401 *Error
+ JSON403 *Error
+ JSON404 *Error
+ JSON500 *Error
+}
+
+// Status returns HTTPResponse.Status
+func (r DeleteDeploymentResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r DeleteDeploymentResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type GetClusterResponse struct {
+type GetDeploymentResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *Cluster
+ JSON200 *Deployment
JSON400 *Error
JSON401 *Error
JSON403 *Error
@@ -4765,7 +6393,7 @@ type GetClusterResponse struct {
}
// Status returns HTTPResponse.Status
-func (r GetClusterResponse) Status() string {
+func (r GetDeploymentResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -4773,27 +6401,26 @@ func (r GetClusterResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r GetClusterResponse) StatusCode() int {
+func (r GetDeploymentResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type UpdateClusterResponse struct {
+type UpdateDeploymentResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *Cluster
+ JSON200 *Deployment
JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON404 *Error
- JSON412 *Error
JSON500 *Error
}
// Status returns HTTPResponse.Status
-func (r UpdateClusterResponse) Status() string {
+func (r UpdateDeploymentResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -4801,25 +6428,22 @@ func (r UpdateClusterResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r UpdateClusterResponse) StatusCode() int {
+func (r UpdateDeploymentResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type GetDeploymentOptionsResponse struct {
+type DeleteDeploymentHibernationOverrideResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *DeploymentOptions
- JSON400 *Error
- JSON401 *Error
- JSON403 *Error
- JSON500 *Error
+ JSON4XX *Error
+ JSON5XX *Error
}
// Status returns HTTPResponse.Status
-func (r GetDeploymentOptionsResponse) Status() string {
+func (r DeleteDeploymentHibernationOverrideResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -4827,25 +6451,23 @@ func (r GetDeploymentOptionsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r GetDeploymentOptionsResponse) StatusCode() int {
+func (r DeleteDeploymentHibernationOverrideResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type ListDeploymentsResponse struct {
+type UpdateDeploymentHibernationOverrideResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *DeploymentsPaginated
- JSON400 *Error
- JSON401 *Error
- JSON403 *Error
- JSON500 *Error
+ JSON200 *DeploymentHibernationOverride
+ JSON4XX *Error
+ JSON5XX *Error
}
// Status returns HTTPResponse.Status
-func (r ListDeploymentsResponse) Status() string {
+func (r UpdateDeploymentHibernationOverrideResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -4853,25 +6475,26 @@ func (r ListDeploymentsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r ListDeploymentsResponse) StatusCode() int {
+func (r UpdateDeploymentHibernationOverrideResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type CreateDeploymentResponse struct {
+type ListEnvironmentObjectsResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *Deployment
- JSON400 *Error
+ JSON200 *EnvironmentObjectsPaginated
JSON401 *Error
JSON403 *Error
+ JSON404 *Error
+ JSON405 *Error
JSON500 *Error
}
// Status returns HTTPResponse.Status
-func (r CreateDeploymentResponse) Status() string {
+func (r ListEnvironmentObjectsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -4879,25 +6502,27 @@ func (r CreateDeploymentResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r CreateDeploymentResponse) StatusCode() int {
+func (r ListEnvironmentObjectsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type DeleteDeploymentResponse struct {
+type CreateEnvironmentObjectResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON400 *Error
+ JSON200 *CreateEnvironmentObject
JSON401 *Error
JSON403 *Error
JSON404 *Error
+ JSON405 *Error
+ JSON409 *Error
JSON500 *Error
}
// Status returns HTTPResponse.Status
-func (r DeleteDeploymentResponse) Status() string {
+func (r CreateEnvironmentObjectResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -4905,26 +6530,26 @@ func (r DeleteDeploymentResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r DeleteDeploymentResponse) StatusCode() int {
+func (r CreateEnvironmentObjectResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type GetDeploymentResponse struct {
+type DeleteEnvironmentObjectResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *Deployment
- JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON404 *Error
+ JSON405 *Error
+ JSON409 *Error
JSON500 *Error
}
// Status returns HTTPResponse.Status
-func (r GetDeploymentResponse) Status() string {
+func (r DeleteEnvironmentObjectResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -4932,26 +6557,26 @@ func (r GetDeploymentResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r GetDeploymentResponse) StatusCode() int {
+func (r DeleteEnvironmentObjectResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type UpdateDeploymentResponse struct {
+type GetEnvironmentObjectResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *Deployment
- JSON400 *Error
+ JSON200 *EnvironmentObject
JSON401 *Error
JSON403 *Error
JSON404 *Error
+ JSON405 *Error
JSON500 *Error
}
// Status returns HTTPResponse.Status
-func (r UpdateDeploymentResponse) Status() string {
+func (r GetEnvironmentObjectResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -4959,22 +6584,27 @@ func (r UpdateDeploymentResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r UpdateDeploymentResponse) StatusCode() int {
+func (r GetEnvironmentObjectResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type DeleteDeploymentHibernationOverrideResponse struct {
+type UpdateEnvironmentObjectResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON4XX *Error
- JSON5XX *Error
+ JSON200 *EnvironmentObject
+ JSON401 *Error
+ JSON403 *Error
+ JSON404 *Error
+ JSON405 *Error
+ JSON409 *Error
+ JSON500 *Error
}
// Status returns HTTPResponse.Status
-func (r DeleteDeploymentHibernationOverrideResponse) Status() string {
+func (r UpdateEnvironmentObjectResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -4982,23 +6612,26 @@ func (r DeleteDeploymentHibernationOverrideResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r DeleteDeploymentHibernationOverrideResponse) StatusCode() int {
+func (r UpdateEnvironmentObjectResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type UpdateDeploymentHibernationOverrideResponse struct {
+type ExcludeLinkingEnvironmentObjectResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *DeploymentHibernationOverride
- JSON4XX *Error
- JSON5XX *Error
+ JSON401 *Error
+ JSON403 *Error
+ JSON404 *Error
+ JSON405 *Error
+ JSON409 *Error
+ JSON500 *Error
}
// Status returns HTTPResponse.Status
-func (r UpdateDeploymentHibernationOverrideResponse) Status() string {
+func (r ExcludeLinkingEnvironmentObjectResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -5006,7 +6639,7 @@ func (r UpdateDeploymentHibernationOverrideResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r UpdateDeploymentHibernationOverrideResponse) StatusCode() int {
+func (r ExcludeLinkingEnvironmentObjectResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
@@ -5178,252 +6811,592 @@ func (c *ClientWithResponses) UpdateOrganizationWithResponse(ctx context.Context
if err != nil {
return nil, err
}
- return ParseUpdateOrganizationResponse(rsp)
+ return ParseUpdateOrganizationResponse(rsp)
+}
+
+// GetOrganizationAuditLogsWithResponse request returning *GetOrganizationAuditLogsResponse
+func (c *ClientWithResponses) GetOrganizationAuditLogsWithResponse(ctx context.Context, organizationId string, params *GetOrganizationAuditLogsParams, reqEditors ...RequestEditorFn) (*GetOrganizationAuditLogsResponse, error) {
+ rsp, err := c.GetOrganizationAuditLogs(ctx, organizationId, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetOrganizationAuditLogsResponse(rsp)
+}
+
+// GetClusterOptionsWithResponse request returning *GetClusterOptionsResponse
+func (c *ClientWithResponses) GetClusterOptionsWithResponse(ctx context.Context, organizationId string, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*GetClusterOptionsResponse, error) {
+ rsp, err := c.GetClusterOptions(ctx, organizationId, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetClusterOptionsResponse(rsp)
+}
+
+// ListClustersWithResponse request returning *ListClustersResponse
+func (c *ClientWithResponses) ListClustersWithResponse(ctx context.Context, organizationId string, params *ListClustersParams, reqEditors ...RequestEditorFn) (*ListClustersResponse, error) {
+ rsp, err := c.ListClusters(ctx, organizationId, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseListClustersResponse(rsp)
+}
+
+// CreateClusterWithBodyWithResponse request with arbitrary body returning *CreateClusterResponse
+func (c *ClientWithResponses) CreateClusterWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error) {
+ rsp, err := c.CreateClusterWithBody(ctx, organizationId, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateClusterResponse(rsp)
+}
+
+func (c *ClientWithResponses) CreateClusterWithResponse(ctx context.Context, organizationId string, body CreateClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error) {
+ rsp, err := c.CreateCluster(ctx, organizationId, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseCreateClusterResponse(rsp)
+}
+
+// DeleteClusterWithResponse request returning *DeleteClusterResponse
+func (c *ClientWithResponses) DeleteClusterWithResponse(ctx context.Context, organizationId string, clusterId string, reqEditors ...RequestEditorFn) (*DeleteClusterResponse, error) {
+ rsp, err := c.DeleteCluster(ctx, organizationId, clusterId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseDeleteClusterResponse(rsp)
+}
+
+// GetClusterWithResponse request returning *GetClusterResponse
+func (c *ClientWithResponses) GetClusterWithResponse(ctx context.Context, organizationId string, clusterId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error) {
+ rsp, err := c.GetCluster(ctx, organizationId, clusterId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetClusterResponse(rsp)
+}
+
+// UpdateClusterWithBodyWithResponse request with arbitrary body returning *UpdateClusterResponse
+func (c *ClientWithResponses) UpdateClusterWithBodyWithResponse(ctx context.Context, organizationId string, clusterId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateClusterResponse, error) {
+ rsp, err := c.UpdateClusterWithBody(ctx, organizationId, clusterId, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateClusterResponse(rsp)
+}
+
+func (c *ClientWithResponses) UpdateClusterWithResponse(ctx context.Context, organizationId string, clusterId string, body UpdateClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateClusterResponse, error) {
+ rsp, err := c.UpdateCluster(ctx, organizationId, clusterId, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateClusterResponse(rsp)
+}
+
+// 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 ParseGetDeploymentOptionsResponse(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)
+}
+
+// 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 ParseCreateDeploymentResponse(rsp)
+}
+
+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 ParseCreateDeploymentResponse(rsp)
+}
+
+// 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 ParseDeleteDeploymentResponse(rsp)
+}
+
+// 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 ParseGetDeploymentResponse(rsp)
+}
+
+// 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 ParseUpdateDeploymentResponse(rsp)
+}
+
+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 ParseUpdateDeploymentResponse(rsp)
+}
+
+// DeleteDeploymentHibernationOverrideWithResponse request returning *DeleteDeploymentHibernationOverrideResponse
+func (c *ClientWithResponses) DeleteDeploymentHibernationOverrideWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*DeleteDeploymentHibernationOverrideResponse, error) {
+ rsp, err := c.DeleteDeploymentHibernationOverride(ctx, organizationId, deploymentId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseDeleteDeploymentHibernationOverrideResponse(rsp)
+}
+
+// UpdateDeploymentHibernationOverrideWithBodyWithResponse request with arbitrary body returning *UpdateDeploymentHibernationOverrideResponse
+func (c *ClientWithResponses) UpdateDeploymentHibernationOverrideWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentHibernationOverrideResponse, error) {
+ rsp, err := c.UpdateDeploymentHibernationOverrideWithBody(ctx, organizationId, deploymentId, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateDeploymentHibernationOverrideResponse(rsp)
+}
+
+func (c *ClientWithResponses) UpdateDeploymentHibernationOverrideWithResponse(ctx context.Context, organizationId string, deploymentId string, body UpdateDeploymentHibernationOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentHibernationOverrideResponse, error) {
+ rsp, err := c.UpdateDeploymentHibernationOverride(ctx, organizationId, deploymentId, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseUpdateDeploymentHibernationOverrideResponse(rsp)
}
-// GetClusterOptionsWithResponse request returning *GetClusterOptionsResponse
-func (c *ClientWithResponses) GetClusterOptionsWithResponse(ctx context.Context, organizationId string, params *GetClusterOptionsParams, reqEditors ...RequestEditorFn) (*GetClusterOptionsResponse, error) {
- rsp, err := c.GetClusterOptions(ctx, organizationId, params, 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 ParseGetClusterOptionsResponse(rsp)
+ return ParseListEnvironmentObjectsResponse(rsp)
}
-// ListClustersWithResponse request returning *ListClustersResponse
-func (c *ClientWithResponses) ListClustersWithResponse(ctx context.Context, organizationId string, params *ListClustersParams, reqEditors ...RequestEditorFn) (*ListClustersResponse, error) {
- rsp, err := c.ListClusters(ctx, organizationId, params, 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 ParseListClustersResponse(rsp)
+ return ParseCreateEnvironmentObjectResponse(rsp)
}
-// CreateClusterWithBodyWithResponse request with arbitrary body returning *CreateClusterResponse
-func (c *ClientWithResponses) CreateClusterWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error) {
- rsp, err := c.CreateClusterWithBody(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 ParseCreateClusterResponse(rsp)
+ return ParseCreateEnvironmentObjectResponse(rsp)
}
-func (c *ClientWithResponses) CreateClusterWithResponse(ctx context.Context, organizationId string, body CreateClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error) {
- rsp, err := c.CreateCluster(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 ParseCreateClusterResponse(rsp)
+ return ParseDeleteEnvironmentObjectResponse(rsp)
}
-// DeleteClusterWithResponse request returning *DeleteClusterResponse
-func (c *ClientWithResponses) DeleteClusterWithResponse(ctx context.Context, organizationId string, clusterId string, reqEditors ...RequestEditorFn) (*DeleteClusterResponse, error) {
- rsp, err := c.DeleteCluster(ctx, organizationId, clusterId, reqEditors...)
+// GetEnvironmentObjectWithResponse request returning *GetEnvironmentObjectResponse
+func (c *ClientWithResponses) GetEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, reqEditors ...RequestEditorFn) (*GetEnvironmentObjectResponse, error) {
+ rsp, err := c.GetEnvironmentObject(ctx, organizationId, environmentObjectId, reqEditors...)
if err != nil {
return nil, err
}
- return ParseDeleteClusterResponse(rsp)
+ return ParseGetEnvironmentObjectResponse(rsp)
}
-// GetClusterWithResponse request returning *GetClusterResponse
-func (c *ClientWithResponses) GetClusterWithResponse(ctx context.Context, organizationId string, clusterId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error) {
- rsp, err := c.GetCluster(ctx, organizationId, clusterId, 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 ParseGetClusterResponse(rsp)
+ return ParseUpdateEnvironmentObjectResponse(rsp)
}
-// UpdateClusterWithBodyWithResponse request with arbitrary body returning *UpdateClusterResponse
-func (c *ClientWithResponses) UpdateClusterWithBodyWithResponse(ctx context.Context, organizationId string, clusterId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateClusterResponse, error) {
- rsp, err := c.UpdateClusterWithBody(ctx, organizationId, clusterId, contentType, body, 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 ParseUpdateClusterResponse(rsp)
+ return ParseUpdateEnvironmentObjectResponse(rsp)
}
-func (c *ClientWithResponses) UpdateClusterWithResponse(ctx context.Context, organizationId string, clusterId string, body UpdateClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateClusterResponse, error) {
- rsp, err := c.UpdateCluster(ctx, organizationId, clusterId, body, reqEditors...)
+// ExcludeLinkingEnvironmentObjectWithBodyWithResponse request with arbitrary body returning *ExcludeLinkingEnvironmentObjectResponse
+func (c *ClientWithResponses) ExcludeLinkingEnvironmentObjectWithBodyWithResponse(ctx context.Context, organizationId string, environmentObjectId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExcludeLinkingEnvironmentObjectResponse, error) {
+ rsp, err := c.ExcludeLinkingEnvironmentObjectWithBody(ctx, organizationId, environmentObjectId, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseUpdateClusterResponse(rsp)
+ return ParseExcludeLinkingEnvironmentObjectResponse(rsp)
}
-// 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...)
+func (c *ClientWithResponses) ExcludeLinkingEnvironmentObjectWithResponse(ctx context.Context, organizationId string, environmentObjectId string, body ExcludeLinkingEnvironmentObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*ExcludeLinkingEnvironmentObjectResponse, error) {
+ rsp, err := c.ExcludeLinkingEnvironmentObject(ctx, organizationId, environmentObjectId, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseGetDeploymentOptionsResponse(rsp)
+ return ParseExcludeLinkingEnvironmentObjectResponse(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...)
+// 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...)
if err != nil {
return nil, err
}
- return ParseListDeploymentsResponse(rsp)
+ return ParseListWorkspacesResponse(rsp)
}
-// 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...)
+// CreateWorkspaceWithBodyWithResponse request with arbitrary body returning *CreateWorkspaceResponse
+func (c *ClientWithResponses) CreateWorkspaceWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) {
+ rsp, err := c.CreateWorkspaceWithBody(ctx, organizationId, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseCreateDeploymentResponse(rsp)
+ return ParseCreateWorkspaceResponse(rsp)
}
-func (c *ClientWithResponses) CreateDeploymentWithResponse(ctx context.Context, organizationId string, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error) {
- rsp, err := c.CreateDeployment(ctx, organizationId, body, reqEditors...)
+func (c *ClientWithResponses) CreateWorkspaceWithResponse(ctx context.Context, organizationId string, body CreateWorkspaceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) {
+ rsp, err := c.CreateWorkspace(ctx, organizationId, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseCreateDeploymentResponse(rsp)
+ return ParseCreateWorkspaceResponse(rsp)
}
-// 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...)
+// DeleteWorkspaceWithResponse request returning *DeleteWorkspaceResponse
+func (c *ClientWithResponses) DeleteWorkspaceWithResponse(ctx context.Context, organizationId string, workspaceId string, reqEditors ...RequestEditorFn) (*DeleteWorkspaceResponse, error) {
+ rsp, err := c.DeleteWorkspace(ctx, organizationId, workspaceId, reqEditors...)
if err != nil {
return nil, err
}
- return ParseDeleteDeploymentResponse(rsp)
+ return ParseDeleteWorkspaceResponse(rsp)
}
-// 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...)
+// GetWorkspaceWithResponse request returning *GetWorkspaceResponse
+func (c *ClientWithResponses) GetWorkspaceWithResponse(ctx context.Context, organizationId string, workspaceId string, reqEditors ...RequestEditorFn) (*GetWorkspaceResponse, error) {
+ rsp, err := c.GetWorkspace(ctx, organizationId, workspaceId, reqEditors...)
if err != nil {
return nil, err
}
- return ParseGetDeploymentResponse(rsp)
+ return ParseGetWorkspaceResponse(rsp)
}
-// 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...)
+// UpdateWorkspaceWithBodyWithResponse request with arbitrary body returning *UpdateWorkspaceResponse
+func (c *ClientWithResponses) UpdateWorkspaceWithBodyWithResponse(ctx context.Context, organizationId string, workspaceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateWorkspaceResponse, error) {
+ rsp, err := c.UpdateWorkspaceWithBody(ctx, organizationId, workspaceId, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseUpdateDeploymentResponse(rsp)
+ return ParseUpdateWorkspaceResponse(rsp)
}
-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...)
+func (c *ClientWithResponses) UpdateWorkspaceWithResponse(ctx context.Context, organizationId string, workspaceId string, body UpdateWorkspaceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateWorkspaceResponse, error) {
+ rsp, err := c.UpdateWorkspace(ctx, organizationId, workspaceId, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseUpdateDeploymentResponse(rsp)
+ return ParseUpdateWorkspaceResponse(rsp)
}
-// DeleteDeploymentHibernationOverrideWithResponse request returning *DeleteDeploymentHibernationOverrideResponse
-func (c *ClientWithResponses) DeleteDeploymentHibernationOverrideWithResponse(ctx context.Context, organizationId string, deploymentId string, reqEditors ...RequestEditorFn) (*DeleteDeploymentHibernationOverrideResponse, error) {
- rsp, err := c.DeleteDeploymentHibernationOverride(ctx, organizationId, deploymentId, reqEditors...)
+// ParseListOrganizationsResponse parses an HTTP response from a ListOrganizationsWithResponse call
+func ParseListOrganizationsResponse(rsp *http.Response) (*ListOrganizationsResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseDeleteDeploymentHibernationOverrideResponse(rsp)
+
+ response := &ListOrganizationsResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest OrganizationsPaginated
+ if 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
}
-// UpdateDeploymentHibernationOverrideWithBodyWithResponse request with arbitrary body returning *UpdateDeploymentHibernationOverrideResponse
-func (c *ClientWithResponses) UpdateDeploymentHibernationOverrideWithBodyWithResponse(ctx context.Context, organizationId string, deploymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentHibernationOverrideResponse, error) {
- rsp, err := c.UpdateDeploymentHibernationOverrideWithBody(ctx, organizationId, deploymentId, contentType, body, reqEditors...)
+// ParseGetOrganizationResponse parses an HTTP response from a GetOrganizationWithResponse call
+func ParseGetOrganizationResponse(rsp *http.Response) (*GetOrganizationResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseUpdateDeploymentHibernationOverrideResponse(rsp)
+
+ response := &GetOrganizationResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest Organization
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest 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
}
-func (c *ClientWithResponses) UpdateDeploymentHibernationOverrideWithResponse(ctx context.Context, organizationId string, deploymentId string, body UpdateDeploymentHibernationOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentHibernationOverrideResponse, error) {
- rsp, err := c.UpdateDeploymentHibernationOverride(ctx, organizationId, deploymentId, body, reqEditors...)
+// ParseUpdateOrganizationResponse parses an HTTP response from a UpdateOrganizationWithResponse call
+func ParseUpdateOrganizationResponse(rsp *http.Response) (*UpdateOrganizationResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseUpdateDeploymentHibernationOverrideResponse(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...)
- if err != nil {
- return nil, err
+ response := &UpdateOrganizationResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest Organization
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ var dest 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 ParseListWorkspacesResponse(rsp)
-}
-// CreateWorkspaceWithBodyWithResponse request with arbitrary body returning *CreateWorkspaceResponse
-func (c *ClientWithResponses) CreateWorkspaceWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) {
- rsp, err := c.CreateWorkspaceWithBody(ctx, organizationId, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
- }
- return ParseCreateWorkspaceResponse(rsp)
+ return response, nil
}
-func (c *ClientWithResponses) CreateWorkspaceWithResponse(ctx context.Context, organizationId string, body CreateWorkspaceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) {
- rsp, err := c.CreateWorkspace(ctx, organizationId, body, reqEditors...)
+// ParseGetOrganizationAuditLogsResponse parses an HTTP response from a GetOrganizationAuditLogsWithResponse call
+func ParseGetOrganizationAuditLogsResponse(rsp *http.Response) (*GetOrganizationAuditLogsResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseCreateWorkspaceResponse(rsp)
-}
-// DeleteWorkspaceWithResponse request returning *DeleteWorkspaceResponse
-func (c *ClientWithResponses) DeleteWorkspaceWithResponse(ctx context.Context, organizationId string, workspaceId string, reqEditors ...RequestEditorFn) (*DeleteWorkspaceResponse, error) {
- rsp, err := c.DeleteWorkspace(ctx, organizationId, workspaceId, reqEditors...)
- if err != nil {
- return nil, err
+ response := &GetOrganizationAuditLogsResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseDeleteWorkspaceResponse(rsp)
+
+ return response, nil
}
-// GetWorkspaceWithResponse request returning *GetWorkspaceResponse
-func (c *ClientWithResponses) GetWorkspaceWithResponse(ctx context.Context, organizationId string, workspaceId string, reqEditors ...RequestEditorFn) (*GetWorkspaceResponse, error) {
- rsp, err := c.GetWorkspace(ctx, organizationId, workspaceId, reqEditors...)
+// 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
}
- return ParseGetWorkspaceResponse(rsp)
-}
-// UpdateWorkspaceWithBodyWithResponse request with arbitrary body returning *UpdateWorkspaceResponse
-func (c *ClientWithResponses) UpdateWorkspaceWithBodyWithResponse(ctx context.Context, organizationId string, workspaceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateWorkspaceResponse, error) {
- rsp, err := c.UpdateWorkspaceWithBody(ctx, organizationId, workspaceId, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
+ response := &GetClusterOptionsResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseUpdateWorkspaceResponse(rsp)
-}
-func (c *ClientWithResponses) UpdateWorkspaceWithResponse(ctx context.Context, organizationId string, workspaceId string, body UpdateWorkspaceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateWorkspaceResponse, error) {
- rsp, err := c.UpdateWorkspace(ctx, organizationId, workspaceId, body, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest []ClusterOptions
+ if 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 ParseUpdateWorkspaceResponse(rsp)
+
+ return response, nil
}
-// ParseListOrganizationsResponse parses an HTTP response from a ListOrganizationsWithResponse call
-func ParseListOrganizationsResponse(rsp *http.Response) (*ListOrganizationsResponse, error) {
+// ParseListClustersResponse parses an HTTP response from a ListClustersWithResponse call
+func ParseListClustersResponse(rsp *http.Response) (*ListClustersResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &ListOrganizationsResponse{
+ response := &ListClustersResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest OrganizationsPaginated
+ var dest ClustersPaginated
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -5462,22 +7435,22 @@ func ParseListOrganizationsResponse(rsp *http.Response) (*ListOrganizationsRespo
return response, nil
}
-// ParseGetOrganizationResponse parses an HTTP response from a GetOrganizationWithResponse call
-func ParseGetOrganizationResponse(rsp *http.Response) (*GetOrganizationResponse, error) {
+// ParseCreateClusterResponse parses an HTTP response from a CreateClusterWithResponse call
+func ParseCreateClusterResponse(rsp *http.Response) (*CreateClusterResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &GetOrganizationResponse{
+ response := &CreateClusterResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest Organization
+ var dest Cluster
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -5511,6 +7484,13 @@ func ParseGetOrganizationResponse(rsp *http.Response) (*GetOrganizationResponse,
}
response.JSON404 = &dest
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 412:
+ var dest Error
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON412 = &dest
+
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
@@ -5523,22 +7503,76 @@ func ParseGetOrganizationResponse(rsp *http.Response) (*GetOrganizationResponse,
return response, nil
}
-// ParseUpdateOrganizationResponse parses an HTTP response from a UpdateOrganizationWithResponse call
-func ParseUpdateOrganizationResponse(rsp *http.Response) (*UpdateOrganizationResponse, error) {
+// ParseDeleteClusterResponse parses an HTTP response from a DeleteClusterWithResponse call
+func ParseDeleteClusterResponse(rsp *http.Response) (*DeleteClusterResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &UpdateOrganizationResponse{
+ response := &DeleteClusterResponse{
+ 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 {
+ 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
+}
+
+// ParseGetClusterResponse parses an HTTP response from a GetClusterWithResponse call
+func ParseGetClusterResponse(rsp *http.Response) (*GetClusterResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &GetClusterResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest Organization
+ var dest Cluster
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -5584,22 +7618,22 @@ func ParseUpdateOrganizationResponse(rsp *http.Response) (*UpdateOrganizationRes
return response, nil
}
-// ParseGetClusterOptionsResponse parses an HTTP response from a GetClusterOptionsWithResponse call
-func ParseGetClusterOptionsResponse(rsp *http.Response) (*GetClusterOptionsResponse, error) {
+// ParseUpdateClusterResponse parses an HTTP response from a UpdateClusterWithResponse call
+func ParseUpdateClusterResponse(rsp *http.Response) (*UpdateClusterResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &GetClusterOptionsResponse{
+ response := &UpdateClusterResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest []ClusterOptions
+ var dest Cluster
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -5633,6 +7667,13 @@ func ParseGetClusterOptionsResponse(rsp *http.Response) (*GetClusterOptionsRespo
}
response.JSON404 = &dest
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 412:
+ var dest Error
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON412 = &dest
+
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
@@ -5645,22 +7686,76 @@ func ParseGetClusterOptionsResponse(rsp *http.Response) (*GetClusterOptionsRespo
return response, nil
}
-// ParseListClustersResponse parses an HTTP response from a ListClustersWithResponse call
-func ParseListClustersResponse(rsp *http.Response) (*ListClustersResponse, 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 := &GetDeploymentOptionsResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest DeploymentOptions
+ if 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
+}
+
+// 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 := &ListClustersResponse{
+ response := &ListDeploymentsResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest ClustersPaginated
+ var dest DeploymentsPaginated
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -5699,22 +7794,22 @@ func ParseListClustersResponse(rsp *http.Response) (*ListClustersResponse, error
return response, nil
}
-// ParseCreateClusterResponse parses an HTTP response from a CreateClusterWithResponse call
-func ParseCreateClusterResponse(rsp *http.Response) (*CreateClusterResponse, 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 := &CreateClusterResponse{
+ response := &CreateDeploymentResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest Cluster
+ var dest Deployment
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -5741,20 +7836,6 @@ func ParseCreateClusterResponse(rsp *http.Response) (*CreateClusterResponse, 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 == 412:
- var dest Error
- if err := json.Unmarshal(bodyBytes, &dest); err != nil {
- return nil, err
- }
- response.JSON412 = &dest
-
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
@@ -5767,15 +7848,15 @@ func ParseCreateClusterResponse(rsp *http.Response) (*CreateClusterResponse, err
return response, nil
}
-// ParseDeleteClusterResponse parses an HTTP response from a DeleteClusterWithResponse call
-func ParseDeleteClusterResponse(rsp *http.Response) (*DeleteClusterResponse, 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 := &DeleteClusterResponse{
+ response := &DeleteDeploymentResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
@@ -5821,22 +7902,22 @@ func ParseDeleteClusterResponse(rsp *http.Response) (*DeleteClusterResponse, err
return response, nil
}
-// ParseGetClusterResponse parses an HTTP response from a GetClusterWithResponse call
-func ParseGetClusterResponse(rsp *http.Response) (*GetClusterResponse, 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 := &GetClusterResponse{
+ response := &GetDeploymentResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest Cluster
+ var dest Deployment
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -5882,22 +7963,22 @@ func ParseGetClusterResponse(rsp *http.Response) (*GetClusterResponse, error) {
return response, nil
}
-// ParseUpdateClusterResponse parses an HTTP response from a UpdateClusterWithResponse call
-func ParseUpdateClusterResponse(rsp *http.Response) (*UpdateClusterResponse, 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 := &UpdateClusterResponse{
+ response := &UpdateDeploymentResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest Cluster
+ var dest Deployment
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -5931,13 +8012,6 @@ func ParseUpdateClusterResponse(rsp *http.Response) (*UpdateClusterResponse, err
}
response.JSON404 = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 412:
- var dest Error
- if err := json.Unmarshal(bodyBytes, &dest); err != nil {
- return nil, err
- }
- response.JSON412 = &dest
-
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
@@ -5950,101 +8024,127 @@ func ParseUpdateClusterResponse(rsp *http.Response) (*UpdateClusterResponse, err
return response, nil
}
-// ParseGetDeploymentOptionsResponse parses an HTTP response from a GetDeploymentOptionsWithResponse call
-func ParseGetDeploymentOptionsResponse(rsp *http.Response) (*GetDeploymentOptionsResponse, error) {
+// ParseDeleteDeploymentHibernationOverrideResponse parses an HTTP response from a DeleteDeploymentHibernationOverrideWithResponse call
+func ParseDeleteDeploymentHibernationOverrideResponse(rsp *http.Response) (*DeleteDeploymentHibernationOverrideResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &GetDeploymentOptionsResponse{
+ response := &DeleteDeploymentHibernationOverrideResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest DeploymentOptions
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode/100 == 4:
+ var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON200 = &dest
+ response.JSON4XX = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode/100 == 5:
var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON400 = &dest
+ response.JSON5XX = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
- var dest Error
+ }
+
+ return response, nil
+}
+
+// ParseUpdateDeploymentHibernationOverrideResponse parses an HTTP response from a UpdateDeploymentHibernationOverrideWithResponse call
+func ParseUpdateDeploymentHibernationOverrideResponse(rsp *http.Response) (*UpdateDeploymentHibernationOverrideResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &UpdateDeploymentHibernationOverrideResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest DeploymentHibernationOverride
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON401 = &dest
+ response.JSON200 = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode/100 == 4:
var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON403 = &dest
+ response.JSON4XX = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode/100 == 5:
var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON500 = &dest
+ response.JSON5XX = &dest
}
return response, nil
}
-// ParseListDeploymentsResponse parses an HTTP response from a ListDeploymentsWithResponse call
-func ParseListDeploymentsResponse(rsp *http.Response) (*ListDeploymentsResponse, 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 := &ListDeploymentsResponse{
+ response := &ListEnvironmentObjectsResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest DeploymentsPaginated
+ 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:
+ 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.JSON400 = &dest
+ response.JSON401 = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ 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.JSON401 = &dest
+ response.JSON403 = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ 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.JSON403 = &dest
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405:
+ var dest Error
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON405 = &dest
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
var dest Error
@@ -6058,47 +8158,61 @@ func ParseListDeploymentsResponse(rsp *http.Response) (*ListDeploymentsResponse,
return response, nil
}
-// ParseCreateDeploymentResponse parses an HTTP response from a CreateDeploymentWithResponse call
-func ParseCreateDeploymentResponse(rsp *http.Response) (*CreateDeploymentResponse, 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 := &CreateDeploymentResponse{
+ response := &CreateEnvironmentObjectResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest Deployment
+ 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:
+ 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.JSON400 = &dest
+ response.JSON401 = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
+ 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.JSON401 = &dest
+ response.JSON403 = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
+ 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.JSON403 = &dest
+ response.JSON404 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405:
+ var dest Error
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON405 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 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
@@ -6112,27 +8226,20 @@ func ParseCreateDeploymentResponse(rsp *http.Response) (*CreateDeploymentRespons
return response, nil
}
-// ParseDeleteDeploymentResponse parses an HTTP response from a DeleteDeploymentWithResponse call
-func ParseDeleteDeploymentResponse(rsp *http.Response) (*DeleteDeploymentResponse, 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 := &DeleteDeploymentResponse{
+ 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 {
@@ -6154,6 +8261,20 @@ func ParseDeleteDeploymentResponse(rsp *http.Response) (*DeleteDeploymentRespons
}
response.JSON404 = &dest
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405:
+ var dest Error
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON405 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 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 {
@@ -6166,34 +8287,27 @@ func ParseDeleteDeploymentResponse(rsp *http.Response) (*DeleteDeploymentRespons
return response, nil
}
-// ParseGetDeploymentResponse parses an HTTP response from a GetDeploymentWithResponse call
-func ParseGetDeploymentResponse(rsp *http.Response) (*GetDeploymentResponse, error) {
+// ParseGetEnvironmentObjectResponse parses an HTTP response from a GetEnvironmentObjectWithResponse call
+func ParseGetEnvironmentObjectResponse(rsp *http.Response) (*GetEnvironmentObjectResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &GetDeploymentResponse{
+ response := &GetEnvironmentObjectResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest Deployment
+ var dest EnvironmentObject
if 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 {
@@ -6215,6 +8329,13 @@ func ParseGetDeploymentResponse(rsp *http.Response) (*GetDeploymentResponse, err
}
response.JSON404 = &dest
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405:
+ var dest Error
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON405 = &dest
+
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
@@ -6227,34 +8348,27 @@ func ParseGetDeploymentResponse(rsp *http.Response) (*GetDeploymentResponse, err
return response, nil
}
-// ParseUpdateDeploymentResponse parses an HTTP response from a UpdateDeploymentWithResponse call
-func ParseUpdateDeploymentResponse(rsp *http.Response) (*UpdateDeploymentResponse, 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 := &UpdateDeploymentResponse{
+ response := &UpdateEnvironmentObjectResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest Deployment
+ var dest EnvironmentObject
if 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 {
@@ -6276,6 +8390,20 @@ func ParseUpdateDeploymentResponse(rsp *http.Response) (*UpdateDeploymentRespons
}
response.JSON404 = &dest
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405:
+ var dest Error
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON405 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 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 {
@@ -6288,73 +8416,61 @@ func ParseUpdateDeploymentResponse(rsp *http.Response) (*UpdateDeploymentRespons
return response, nil
}
-// ParseDeleteDeploymentHibernationOverrideResponse parses an HTTP response from a DeleteDeploymentHibernationOverrideWithResponse call
-func ParseDeleteDeploymentHibernationOverrideResponse(rsp *http.Response) (*DeleteDeploymentHibernationOverrideResponse, error) {
+// ParseExcludeLinkingEnvironmentObjectResponse parses an HTTP response from a ExcludeLinkingEnvironmentObjectWithResponse call
+func ParseExcludeLinkingEnvironmentObjectResponse(rsp *http.Response) (*ExcludeLinkingEnvironmentObjectResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &DeleteDeploymentHibernationOverrideResponse{
+ response := &ExcludeLinkingEnvironmentObjectResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode/100 == 4:
+ 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.JSON4XX = &dest
+ response.JSON401 = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode/100 == 5:
+ 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.JSON5XX = &dest
-
- }
-
- return response, nil
-}
-
-// ParseUpdateDeploymentHibernationOverrideResponse parses an HTTP response from a UpdateDeploymentHibernationOverrideWithResponse call
-func ParseUpdateDeploymentHibernationOverrideResponse(rsp *http.Response) (*UpdateDeploymentHibernationOverrideResponse, error) {
- bodyBytes, err := io.ReadAll(rsp.Body)
- defer func() { _ = rsp.Body.Close() }()
- if err != nil {
- return nil, err
- }
+ response.JSON403 = &dest
- response := &UpdateDeploymentHibernationOverrideResponse{
- Body: bodyBytes,
- HTTPResponse: rsp,
- }
+ 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
- switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest DeploymentHibernationOverride
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405:
+ var dest Error
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON200 = &dest
+ response.JSON405 = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode/100 == 4:
+ 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.JSON4XX = &dest
+ response.JSON409 = &dest
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode/100 == 5:
+ 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.JSON5XX = &dest
+ response.JSON500 = &dest
}
diff --git a/internal/provider/datasources/data_source_environment_object.go b/internal/provider/datasources/data_source_environment_object.go
new file mode 100644
index 00000000..52869145
--- /dev/null
+++ b/internal/provider/datasources/data_source_environment_object.go
@@ -0,0 +1,108 @@
+package datasources
+
+// Temportary disable file
+var _ = true
+
+// import (
+// "context"
+// "fmt"
+
+// "github.com/astronomer/terraform-provider-astro/internal/clients"
+// "github.com/astronomer/terraform-provider-astro/internal/clients/platform"
+// "github.com/astronomer/terraform-provider-astro/internal/provider/models"
+// "github.com/astronomer/terraform-provider-astro/internal/provider/schemas"
+// "github.com/astronomer/terraform-provider-astro/internal/utils"
+// "github.com/hashicorp/terraform-plugin-framework/datasource"
+// "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
+// "github.com/hashicorp/terraform-plugin-log/tflog"
+// )
+
+// // // Ensure provider defined types fully satisfy framework interfaces.
+// // var _ datasource.DataSource = &environmentObjectDataSource{}
+// // var _ datasource.DataSourceWithConfigure = &environmentObjectDataSource{}
+
+// // func NewEnvironmentObjectDataSource() datasource.DataSource {
+// // return &environmentObjectDataSource{}
+// // }
+
+// // // environmentObjectDataSource defines the data source implementation.
+// // type environmentObjectDataSource struct {
+// // PlatformClient platform.ClientWithResponsesInterface
+// // OrganizationId string
+// // }
+
+// // func (d *environmentObjectDataSource) Metadata(
+// // ctx context.Context,
+// // req datasource.MetadataRequest,
+// // resp *datasource.MetadataResponse,
+// // ) {
+// // resp.TypeName = req.ProviderTypeName + "_environment_object"
+// // }
+
+// // func (d *environmentObjectDataSource) Schema(
+// // ctx context.Context,
+// // req datasource.SchemaRequest,
+// // resp *datasource.SchemaResponse,
+// // ) {
+// // resp.Schema = schema.Schema{
+// // MarkdownDescription: "Environment Object data source",
+// // Attributes: schemas.EnvironmentObjectDataSourceSchemaAttributes(),
+// // }
+// // }
+
+// // func (d *environmentObjectDataSource) Configure(
+// // ctx context.Context,
+// // req datasource.ConfigureRequest,
+// // resp *datasource.ConfigureResponse,
+// // ) {
+// // if req.ProviderData == nil {
+// // return
+// // }
+
+// // apiClients, ok := req.ProviderData.(models.ApiClientsModel)
+// // if !ok {
+// // utils.DataSourceApiClientConfigureError(ctx, req, resp)
+// // return
+// // }
+
+// // d.PlatformClient = apiClients.PlatformClient
+// // }
+
+// // func (d *environmentObjectDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
+// // var data models.EnvironmentObjectDataSource
+
+// // resp.Diagnostics.Append(req.Config.Get(ctx, &data)...)
+// // if resp.Diagnostics.HasError() {
+// // return
+// // }
+
+// // envObject, err := d.PlatformClient.GetEnvironmentObjectWithResponse(ctx,
+// // d.OrganizationId,
+// // data.Id.ValueString())
+// // if err != nil {
+// // tflog.Error(ctx, "Failed to get environment object", map[string]interface{}{"error": err})
+// // resp.Diagnostics.AddError(
+// // "Client Error",
+// // fmt.Sprintf("Unable to read environment object, got error: %s", err),
+// // )
+// // return
+// // }
+// // _, diagnostic := clients.NormalizeAPIError(ctx, envObject.HTTPResponse, envObject.Body)
+// // if diagnostic != nil {
+// // resp.Diagnostics.Append(diagnostic)
+// // return
+// // }
+// // if envObject.JSON200 == nil {
+// // tflog.Error(ctx, "failed to get environment object", map[string]interface{}{"error": "nil response"})
+// // resp.Diagnostics.AddError("Client Error", "Unable to read environment object, got nil response")
+// // return
+// // }
+
+// // diags := data.ReadFromResponse(ctx, envObject.JSON200)
+// // if diags.HasError() {
+// // resp.Diagnostics.Append(diags...)
+// // return
+// // }
+
+// // resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)
+// // }
diff --git a/internal/provider/models/environment_object.go b/internal/provider/models/environment_object.go
new file mode 100644
index 00000000..0fb10526
--- /dev/null
+++ b/internal/provider/models/environment_object.go
@@ -0,0 +1,98 @@
+package models
+
+import (
+ "context"
+
+ "github.com/astronomer/terraform-provider-astro/internal/clients/platform"
+ "github.com/hashicorp/terraform-plugin-framework/diag"
+ "github.com/hashicorp/terraform-plugin-framework/types"
+)
+
+type EnvironmentObjectConnection struct {
+ Host types.String `tfsdk:"host"`
+ Login types.String `tfsdk:"login"`
+ Password types.String `tfsdk:"password"`
+ Port types.Int64 `tfsdk:"port"`
+ Schema types.String `tfsdk:"schema"`
+ Type types.String `tfsdk:"type"`
+}
+
+type EnvironmentObjectAirflowVariable struct {
+ IsSecret types.Bool `tfsdk:"is_secret"`
+ Value types.String `tfsdk:"value"`
+}
+
+type EnvironmentObjectMetricsExport struct {
+ Endpoint types.String `tfsdk:"endpoint"`
+ ExporterType types.String `tfsdk:"exporter_type"`
+}
+
+type EnvironmentObjectExcludeLink struct {
+ ScopeEntityId types.String `tfsdk:"scope_entity_id"`
+ Scope types.String `tfsdk:"scope"`
+}
+
+type EnvironmentObjectResource struct {
+ Id types.String `tfsdk:"id"`
+ ObjectKey types.String `tfsdk:"object_key"`
+ ObjectType types.String `tfsdk:"object_type"`
+ Scope types.String `tfsdk:"scope"`
+ ScopeEntityId types.String `tfsdk:"scope_entity_id"`
+ // Optional fields for CONNECTION, AIRFLOW_VARIABLE, and METRICS_EXPORT type
+ Connection *EnvironmentObjectConnection `tfsdk:"airflow_connection"`
+ AirflowVariable *EnvironmentObjectAirflowVariable `tfsdk:"airflow_variable"`
+ MetricsExport *EnvironmentObjectMetricsExport `tfsdk:"metrics_export"`
+ // Optional fields for WORKSPACE scope
+ AutoLinkDeployments types.Bool `tfsdk:"auto_link_deployments"`
+ // TODO: Handle ExcludeLinks and Links later
+ // ExcludeLinks types.Set `tfsdk:"exclude_links"`
+ // Links types.Set `tfsdk:"links"`
+}
+
+func (data *EnvironmentObjectResource) ReadFromResponse(ctx context.Context, envObject *platform.EnvironmentObject) diag.Diagnostics {
+ var diags diag.Diagnostics
+
+ // Id is not returned for resolved environment objects
+ if envObject.Id != nil {
+ data.Id = types.StringValue(*envObject.Id)
+ }
+ data.ObjectKey = types.StringValue(envObject.ObjectKey)
+ data.ObjectType = types.StringValue(string(envObject.ObjectType))
+ data.Scope = types.StringValue(string(envObject.Scope))
+ data.ScopeEntityId = types.StringValue(envObject.ScopeEntityId)
+
+ // Set one of the optional fields
+ switch envObject.ObjectType {
+ case platform.EnvironmentObjectObjectTypeCONNECTION:
+ if envObject.Connection != nil {
+ data.Connection = &EnvironmentObjectConnection{
+ Host: types.StringValue(*envObject.Connection.Host),
+ Login: types.StringValue(*envObject.Connection.Login),
+ Password: types.StringValue(*envObject.Connection.Password),
+ Port: types.Int64Value(int64(*envObject.Connection.Port)),
+ Schema: types.StringValue(*envObject.Connection.Schema),
+ Type: types.StringValue(envObject.Connection.Type),
+ }
+ }
+ case platform.EnvironmentObjectObjectTypeAIRFLOWVARIABLE:
+ if envObject.AirflowVariable != nil {
+ data.AirflowVariable = &EnvironmentObjectAirflowVariable{
+ IsSecret: types.BoolValue(envObject.AirflowVariable.IsSecret),
+ Value: types.StringValue(envObject.AirflowVariable.Value),
+ }
+ }
+ case platform.EnvironmentObjectObjectTypeMETRICSEXPORT:
+ if envObject.MetricsExport != nil {
+ data.MetricsExport = &EnvironmentObjectMetricsExport{
+ Endpoint: types.StringValue(envObject.MetricsExport.Endpoint),
+ ExporterType: types.StringValue(string(envObject.MetricsExport.ExporterType)),
+ }
+ }
+ }
+
+ if envObject.AutoLinkDeployments != nil {
+ data.AutoLinkDeployments = types.BoolValue(*envObject.AutoLinkDeployments)
+ }
+
+ return diags
+}
diff --git a/internal/provider/provider.go b/internal/provider/provider.go
index 161153c4..bda84b54 100644
--- a/internal/provider/provider.go
+++ b/internal/provider/provider.go
@@ -129,6 +129,7 @@ func (p *AstroProvider) Resources(ctx context.Context) []func() resource.Resourc
resources.NewTeamResource,
resources.NewUserRolesResource,
resources.NewUserInviteResource,
+ resources.NewEnvironmentObjectResource,
}
}
diff --git a/internal/provider/resources/resource_environment_object.go b/internal/provider/resources/resource_environment_object.go
new file mode 100644
index 00000000..99fe2edb
--- /dev/null
+++ b/internal/provider/resources/resource_environment_object.go
@@ -0,0 +1,336 @@
+package resources
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/hashicorp/terraform-plugin-framework/path"
+ "github.com/hashicorp/terraform-plugin-framework/resource"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema"
+ "github.com/hashicorp/terraform-plugin-log/tflog"
+
+ "github.com/astronomer/terraform-provider-astro/internal/clients"
+ "github.com/astronomer/terraform-provider-astro/internal/clients/platform"
+ "github.com/astronomer/terraform-provider-astro/internal/provider/models"
+ "github.com/astronomer/terraform-provider-astro/internal/provider/schemas"
+ "github.com/astronomer/terraform-provider-astro/internal/utils"
+)
+
+// Ensure provider defined types fully satisfy framework interfaces.
+var _ resource.Resource = &EnvironmentObjectResource{}
+var _ resource.ResourceWithImportState = &EnvironmentObjectResource{}
+var _ resource.ResourceWithConfigure = &EnvironmentObjectResource{}
+var _ resource.ResourceWithValidateConfig = &EnvironmentObjectResource{}
+
+func NewEnvironmentObjectResource() resource.Resource {
+ return &EnvironmentObjectResource{}
+}
+
+// EnvironmentObjectResource defines the resource implementation.
+type EnvironmentObjectResource struct {
+ platformClient *platform.ClientWithResponses
+ organizationId string
+}
+
+func (r *EnvironmentObjectResource) Metadata(
+ ctx context.Context,
+ req resource.MetadataRequest,
+ resp *resource.MetadataResponse,
+) {
+ resp.TypeName = req.ProviderTypeName + "_environment_object"
+}
+
+func (r *EnvironmentObjectResource) Schema(
+ ctx context.Context,
+ req resource.SchemaRequest,
+ resp *resource.SchemaResponse,
+) {
+ resp.Schema = schema.Schema{
+ MarkdownDescription: "Environment Object resource",
+ Attributes: schemas.EnvironmentObjectResourceSchemaAttributes(),
+ }
+}
+
+func (r *EnvironmentObjectResource) Configure(
+ ctx context.Context,
+ req resource.ConfigureRequest,
+ resp *resource.ConfigureResponse,
+) {
+ // Prevent panic if the provider has not been configured.
+ if req.ProviderData == nil {
+ return
+ }
+
+ apiClients, ok := req.ProviderData.(models.ApiClientsModel)
+ if !ok {
+ utils.ResourceApiClientConfigureError(ctx, req, resp)
+ return
+ }
+
+ r.platformClient = apiClients.PlatformClient
+ r.organizationId = apiClients.OrganizationId
+}
+
+func (r *EnvironmentObjectResource) Create(
+ ctx context.Context,
+ req resource.CreateRequest,
+ resp *resource.CreateResponse,
+) {
+ var data models.EnvironmentObjectResource
+
+ // Read Terraform plan data into the model
+ resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)
+ if resp.Diagnostics.HasError() {
+ return
+ }
+
+ // Begin building the request
+ createEnvObjectRequest := platform.CreateEnvironmentObjectRequest{
+ ObjectKey: data.ObjectKey.ValueString(),
+ Scope: platform.CreateEnvironmentObjectRequestScope(data.Scope.ValueString()),
+ ScopeEntityId: data.ScopeEntityId.ValueString(),
+ }
+
+ createEnvObjectRequest.ObjectType = platform.CreateEnvironmentObjectRequestObjectType(data.ObjectType.ValueString())
+
+ // Handle the different object types
+ switch createEnvObjectRequest.ObjectType {
+ case platform.CreateEnvironmentObjectRequestObjectTypeCONNECTION:
+ // Convert port to int instead of required int64
+ port := int(data.Connection.Port.ValueInt64())
+ createEnvObjectRequest.Connection = &platform.CreateEnvironmentObjectConnectionRequest{
+ Host: data.Connection.Host.ValueStringPointer(),
+ Login: data.Connection.Login.ValueStringPointer(),
+ Password: data.Connection.Password.ValueStringPointer(),
+ Port: &port,
+ Schema: data.Connection.Schema.ValueStringPointer(),
+ Type: data.Connection.Type.ValueString(),
+ }
+ case platform.CreateEnvironmentObjectRequestObjectTypeAIRFLOWVARIABLE:
+ createEnvObjectRequest.ObjectType = platform.CreateEnvironmentObjectRequestObjectTypeAIRFLOWVARIABLE
+ createEnvObjectRequest.AirflowVariable = &platform.CreateEnvironmentObjectAirflowVariableRequest{
+ IsSecret: data.AirflowVariable.IsSecret.ValueBoolPointer(),
+ Value: data.AirflowVariable.Value.ValueStringPointer(),
+ }
+ case platform.CreateEnvironmentObjectRequestObjectTypeMETRICSEXPORT:
+ createEnvObjectRequest.ObjectType = platform.CreateEnvironmentObjectRequestObjectTypeMETRICSEXPORT
+ createEnvObjectRequest.MetricsExport = &platform.CreateEnvironmentObjectMetricsExportRequest{
+ Endpoint: data.MetricsExport.Endpoint.ValueString(),
+ ExporterType: platform.CreateEnvironmentObjectMetricsExportRequestExporterType(data.MetricsExport.ExporterType.ValueString()),
+ }
+ }
+
+ // Handle AutoLinkDeployments
+ createEnvObjectRequest.AutoLinkDeployments = data.AutoLinkDeployments.ValueBoolPointer()
+
+ // TODO: Handle Links and ExcludeLinks later
+
+ // End building the request
+
+ // Make environment object request
+ createEnvObjectResp, err := r.platformClient.CreateEnvironmentObjectWithResponse(
+ ctx,
+ r.organizationId,
+ createEnvObjectRequest,
+ )
+ if err != nil {
+ tflog.Error(ctx, "failed to create environment object", map[string]interface{}{"error": err})
+ resp.Diagnostics.AddError(
+ "Client Error",
+ fmt.Sprintf("Unable to create environment object, got error: %s", err),
+ )
+ return
+ }
+
+ _, diagnostic := clients.NormalizeAPIError(ctx, createEnvObjectResp.HTTPResponse, createEnvObjectResp.Body)
+ if diagnostic != nil {
+ resp.Diagnostics.Append(diagnostic)
+ return
+ }
+
+ envObjectId := createEnvObjectResp.JSON200.Id
+
+ // TODO: REmove this GET request and instead use the response from the create request
+ // when it finally returns the full object
+ envObject, err := r.platformClient.GetEnvironmentObjectWithResponse(
+ ctx,
+ r.organizationId,
+ envObjectId,
+ )
+ if err != nil {
+ tflog.Error(ctx, "failed to get environment object", map[string]interface{}{"error": err})
+ resp.Diagnostics.AddError(
+ "Client Error",
+ fmt.Sprintf("Unable to get environment object, got error: %s", err),
+ )
+ return
+ }
+
+ diags := data.ReadFromResponse(ctx, envObject.JSON200)
+ if diags.HasError() {
+ resp.Diagnostics.Append(diags...)
+ return
+ }
+
+ tflog.Trace(ctx, fmt.Sprintf("created an environment object resource: %v", data.Id.ValueString()))
+
+ // Save data into Terraform state
+ resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)
+}
+
+func (r *EnvironmentObjectResource) Read(
+ ctx context.Context,
+ req resource.ReadRequest,
+ resp *resource.ReadResponse,
+) {
+ var data models.EnvironmentObjectResource
+
+ // Read Terraform prior state data into the model
+ resp.Diagnostics.Append(req.State.Get(ctx, &data)...)
+ if resp.Diagnostics.HasError() {
+ return
+ }
+
+ // Get environment object request
+ envObject, err := r.platformClient.GetEnvironmentObjectWithResponse(
+ ctx,
+ r.organizationId,
+ data.Id.ValueString(),
+ )
+ if err != nil {
+ tflog.Error(ctx, "failed to get environment object", map[string]interface{}{"error": err})
+ resp.Diagnostics.AddError(
+ "Client Error",
+ fmt.Sprintf("Unable to get environment object, got error: %s", err),
+ )
+ return
+ }
+
+ _, diagnostic := clients.NormalizeAPIError(ctx, envObject.HTTPResponse, envObject.Body)
+ if diagnostic != nil {
+ resp.Diagnostics.Append(diagnostic)
+ return
+ }
+
+ diags := data.ReadFromResponse(ctx, envObject.JSON200)
+ if diags.HasError() {
+ resp.Diagnostics.Append(diags...)
+ return
+ }
+
+ tflog.Trace(ctx, fmt.Sprintf("read an environment object resource: %v", data.Id.ValueString()))
+
+ // Save data into Terraform state
+ resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)
+}
+
+func (r *EnvironmentObjectResource) Update(
+ ctx context.Context,
+ req resource.UpdateRequest,
+ resp *resource.UpdateResponse,
+) {
+ // var data models.EnvironmentObjectResource
+
+ // // Read Terraform plan data into the model
+ // resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)
+ // if resp.Diagnostics.HasError() {
+ // return
+ // }
+
+ // // Update environment object request
+ // envObject, err := r.platformClient.UpdateEnvironmentObjectWithResponse(
+ // ctx,
+ // r.organizationId,
+ // data.Id.ValueString(),
+ // platform.UpdateEnvironmentObjectRequest{},
+ // )
+ // if err != nil {
+ // tflog.Error(ctx, "failed to update environment object", map[string]interface{}{"error": err})
+ // resp.Diagnostics.AddError(
+ // "Client Error",
+ // fmt.Sprintf("Unable to update environment object, got error: %s", err),
+ // )
+ // return
+ // }
+
+ // _, diagnostic := clients.NormalizeAPIError(ctx, envObject.HTTPResponse, envObject.Body)
+ // if diagnostic != nil {
+ // resp.Diagnostics.Append(diagnostic)
+ // return
+ // }
+
+ // diags := data.ReadFromResponse(ctx, envObject.JSON200)
+ // if diags.HasError() {
+ // resp.Diagnostics.Append(diags...)
+ // return
+ // }
+
+ // tflog.Trace(ctx, fmt.Sprintf("updated an environment object resource: %v", data.Id.ValueString()))
+
+ // // Save updated data into Terraform state
+ // resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)
+}
+
+func (r *EnvironmentObjectResource) Delete(
+ ctx context.Context,
+ req resource.DeleteRequest,
+ resp *resource.DeleteResponse,
+) {
+ // var data models.EnvironmentObjectResource
+
+ // // Read Terraform prior state data into the model
+ // resp.Diagnostics.Append(req.State.Get(ctx, &data)...)
+
+ // if resp.Diagnostics.HasError() {
+ // return
+ // }
+
+ // // Delete environment object request
+ // envObject, err := r.platformClient.DeleteEnvironmentObjectWithResponse(
+ // ctx,
+ // r.organizationId,
+ // data.Id.ValueString(),
+ // )
+ // if err != nil {
+ // tflog.Error(ctx, "failed to delete environment object", map[string]interface{}{"error": err})
+ // resp.Diagnostics.AddError(
+ // "Client Error",
+ // fmt.Sprintf("Unable to delete environment object, got error: %s", err),
+ // )
+ // return
+ // }
+
+ // statusCode, diagnostic := clients.NormalizeAPIError(ctx, envObject.HTTPResponse, envObject.Body)
+ // // It is recommended to ignore 404 Resource Not Found errors when deleting a resource
+ // if statusCode != http.StatusNotFound && diagnostic != nil {
+ // resp.Diagnostics.Append(diagnostic)
+ // return
+ // }
+
+ // tflog.Trace(ctx, fmt.Sprintf("deleted an environment object resource: %v", data.Id.ValueString()))
+}
+
+func (r *EnvironmentObjectResource) ImportState(
+ ctx context.Context,
+ req resource.ImportStateRequest,
+ resp *resource.ImportStateResponse,
+) {
+ resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
+}
+
+// ValidateConfig validates the configuration of the resource as a whole before any operations are performed.
+// This is a good place to check for any conflicting settings.
+func (r *EnvironmentObjectResource) ValidateConfig(
+ ctx context.Context,
+ req resource.ValidateConfigRequest,
+ resp *resource.ValidateConfigResponse,
+) {
+ var data models.EnvironmentObjectResource
+
+ resp.Diagnostics.Append(req.Config.Get(ctx, &data)...)
+ if resp.Diagnostics.HasError() {
+ return
+ }
+
+ // Add any specific validation logic here
+}
diff --git a/internal/provider/schemas/environment_object.go b/internal/provider/schemas/environment_object.go
new file mode 100644
index 00000000..ea46125b
--- /dev/null
+++ b/internal/provider/schemas/environment_object.go
@@ -0,0 +1,176 @@
+package schemas
+
+import (
+ resourceSchema "github.com/hashicorp/terraform-plugin-framework/resource/schema"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
+)
+
+// func EnvironmentObjectDataSourceSchemaAttributes() map[string]datasourceSchema.Attribute {
+// return map[string]datasourceSchema.Attribute{
+// "id": datasourceSchema.StringAttribute{
+// MarkdownDescription: "Environment Object identifier",
+// Required: true,
+// },
+// "object_key": datasourceSchema.StringAttribute{
+// MarkdownDescription: "Key of the environment object",
+// Computed: true,
+// },
+// "object_type": datasourceSchema.StringAttribute{
+// MarkdownDescription: "Type of the environment object",
+// Computed: true,
+// },
+// "scope": datasourceSchema.StringAttribute{
+// MarkdownDescription: "Scope of the environment object",
+// Computed: true,
+// },
+// "scope_entity_id": datasourceSchema.StringAttribute{
+// MarkdownDescription: "Scope entity ID of the environment object",
+// Computed: true,
+// },
+// "connection": datasourceSchema.ObjectAttribute{
+// MarkdownDescription: "Connection details for the environment object",
+// Computed: true,
+// AttributeTypes: map[string]attr.Type{
+// "host": types.StringType,
+// "login": types.StringType,
+// "password": types.StringType,
+// "port": types.Int64Type,
+// "schema": types.StringType,
+// "type": types.StringType,
+// },
+// },
+// "airflow_variable": datasourceSchema.ObjectAttribute{
+// MarkdownDescription: "Airflow variable details for the environment object",
+// Computed: true,
+// AttributeTypes: map[string]attr.Type{
+// "is_secret": types.BoolType,
+// "value": types.StringType,
+// },
+// },
+// "auto_link_deployments": datasourceSchema.BoolAttribute{
+// MarkdownDescription: "Auto link deployments flag",
+// Computed: true,
+// },
+// "exclude_links": datasourceSchema.SetAttribute{
+// MarkdownDescription: "Links to exclude",
+// Computed: true,
+// ElementType: types.StringType,
+// },
+// "links": datasourceSchema.SetAttribute{
+// MarkdownDescription: "Links associated with the environment object",
+// Computed: true,
+// ElementType: types.StringType,
+// },
+// "metrics_export": datasourceSchema.ObjectAttribute{
+// MarkdownDescription: "Metrics export details for the environment object",
+// Computed: true,
+// AttributeTypes: map[string]attr.Type{
+// "endpoint": types.StringType,
+// "exporter_type": types.StringType,
+// },
+// },
+// }
+// }
+
+func EnvironmentObjectResourceSchemaAttributes() map[string]resourceSchema.Attribute {
+ return map[string]resourceSchema.Attribute{
+ "id": resourceSchema.StringAttribute{
+ MarkdownDescription: "Environment Object ID",
+ Computed: true,
+ PlanModifiers: []planmodifier.String{
+ stringplanmodifier.UseStateForUnknown(),
+ },
+ },
+ "object_key": resourceSchema.StringAttribute{
+ MarkdownDescription: "Key of the environment object",
+ Required: true,
+ },
+ "object_type": resourceSchema.StringAttribute{
+ MarkdownDescription: "Type of the environment object",
+ Required: true,
+ },
+ "scope": resourceSchema.StringAttribute{
+ MarkdownDescription: "Scope of the environment object",
+ Required: true,
+ },
+ "scope_entity_id": resourceSchema.StringAttribute{
+ MarkdownDescription: "Scope entity ID of the environment object",
+ Optional: true,
+ },
+ "airflow_connection": resourceSchema.SingleNestedAttribute{
+ MarkdownDescription: "Connection details for the environment object",
+ Optional: true,
+ Attributes: map[string]resourceSchema.Attribute{
+ "host": resourceSchema.StringAttribute{
+ MarkdownDescription: "Host of the connection",
+ Required: true,
+ },
+ "login": resourceSchema.StringAttribute{
+ MarkdownDescription: "Login for the connection",
+ Required: true,
+ },
+ "password": resourceSchema.StringAttribute{
+ MarkdownDescription: "Password for the connection",
+ Required: true,
+ Sensitive: true,
+ },
+ "port": resourceSchema.Int64Attribute{
+ MarkdownDescription: "Port for the connection",
+ Required: true,
+ },
+ "schema": resourceSchema.StringAttribute{
+ MarkdownDescription: "Schema for the connection",
+ Optional: true,
+ },
+ "type": resourceSchema.StringAttribute{
+ MarkdownDescription: "Type of the connection",
+ Required: true,
+ },
+ },
+ },
+ "airflow_variable": resourceSchema.SingleNestedAttribute{
+ MarkdownDescription: "Airflow variable details for the environment object",
+ Optional: true,
+ Attributes: map[string]resourceSchema.Attribute{
+ "is_secret": resourceSchema.BoolAttribute{
+ MarkdownDescription: "Whether the variable is secret",
+ Required: true,
+ },
+ "value": resourceSchema.StringAttribute{
+ MarkdownDescription: "Value of the variable",
+ Required: true,
+ Sensitive: true,
+ },
+ },
+ },
+ "metrics_export": resourceSchema.SingleNestedAttribute{
+ MarkdownDescription: "Metrics export details for the environment object",
+ Optional: true,
+ Attributes: map[string]resourceSchema.Attribute{
+ "endpoint": resourceSchema.StringAttribute{
+ MarkdownDescription: "Endpoint for metrics export",
+ Required: true,
+ },
+ "exporter_type": resourceSchema.StringAttribute{
+ MarkdownDescription: "Type of the exporter",
+ Required: true,
+ },
+ },
+ },
+ "auto_link_deployments": resourceSchema.BoolAttribute{
+ MarkdownDescription: "Auto link deployments flag",
+ Optional: true,
+ },
+ // "exclude_links": resourceSchema.SetAttribute{
+ // MarkdownDescription: "Links to exclude",
+ // Optional: true,
+ // ElementType: types.StringType,
+ // },
+ // "links": resourceSchema.SetAttribute{
+ // MarkdownDescription: "Links associated with the environment object",
+ // Optional: true,
+ // ElementType: types.StringType,
+ // },
+ }
+}
diff --git a/tf4/main.tf b/tf4/main.tf
new file mode 100644
index 00000000..d9fbae0e
--- /dev/null
+++ b/tf4/main.tf
@@ -0,0 +1,41 @@
+terraform {
+ required_providers {
+ astro = {
+ source = "astronomer/astro"
+ }
+ }
+}
+
+provider "astro" {
+ organization_id = "clsaoc8id051901jsmvivh82z"
+}
+
+resource "astro_workspace" "tf_example" {
+ name = "tfexample"
+ description = "my terraform workspace workspace"
+ cicd_enforced_default = true
+}
+
+resource "astro_environment_object" "tf_example" {
+ object_key = "tfenvobjectexampleobjkey"
+ object_type = "AIRFLOW_VARIABLE"
+ scope = "WORKSPACE"
+ scope_entity_id = astro_workspace.tf_example.id
+ airflow_variable = {
+ value = "tfenvobjectexamplevalue"
+ is_secret = false
+ }
+ auto_link_deployments = true
+}
+
+resource "astro_environment_object" "tf_example_2" {
+ object_key = "tfenvobjectexampleobjkey2"
+ object_type = "AIRFLOW_VARIABLE"
+ scope = "WORKSPACE"
+ scope_entity_id = astro_workspace.tf_example.id
+ airflow_variable = {
+ value = "tfenvobjectexamplevalue"
+ is_secret = true
+ }
+ auto_link_deployments = false
+}