From 99b65de7a6ef3ffdbea4cca39f6ae5165e7dd066 Mon Sep 17 00:00:00 2001 From: Omer Lachish Date: Fri, 27 Dec 2024 18:04:34 +0100 Subject: [PATCH] generate sdk --- .../products/sharing/resource_share.go | 1 - internal/service/apps_tf/legacy_model.go | 354 +- internal/service/apps_tf/model.go | 356 ++- internal/service/billing_tf/legacy_model.go | 377 ++- internal/service/billing_tf/model.go | 377 ++- internal/service/catalog_tf/legacy_model.go | 2842 ++++++++++------- internal/service/catalog_tf/model.go | 2842 ++++++++++------- .../service/cleanrooms_tf/legacy_model.go | 371 ++- internal/service/cleanrooms_tf/model.go | 371 ++- internal/service/compute_tf/legacy_model.go | 2307 ++++++++----- internal/service/compute_tf/model.go | 2307 ++++++++----- .../service/dashboards_tf/legacy_model.go | 494 +-- internal/service/dashboards_tf/model.go | 494 +-- internal/service/files_tf/legacy_model.go | 247 +- internal/service/files_tf/model.go | 247 +- internal/service/iam_tf/legacy_model.go | 647 ++-- internal/service/iam_tf/model.go | 647 ++-- internal/service/jobs_tf/legacy_model.go | 2046 ++++++++---- internal/service/jobs_tf/model.go | 2046 ++++++++---- .../service/marketplace_tf/legacy_model.go | 1120 ++++--- internal/service/marketplace_tf/model.go | 1120 ++++--- internal/service/ml_tf/legacy_model.go | 1525 +++++---- internal/service/ml_tf/model.go | 1525 +++++---- internal/service/oauth2_tf/legacy_model.go | 446 +-- internal/service/oauth2_tf/model.go | 446 +-- internal/service/pipelines_tf/legacy_model.go | 1021 ++++-- internal/service/pipelines_tf/model.go | 1021 ++++-- .../service/provisioning_tf/legacy_model.go | 616 ++-- internal/service/provisioning_tf/model.go | 616 ++-- internal/service/serving_tf/legacy_model.go | 969 ++++-- internal/service/serving_tf/model.go | 969 ++++-- internal/service/settings_tf/legacy_model.go | 1355 +++++--- internal/service/settings_tf/model.go | 1355 +++++--- internal/service/sharing_tf/legacy_model.go | 573 ++-- internal/service/sharing_tf/model.go | 573 ++-- internal/service/sql_tf/legacy_model.go | 2062 +++++++----- internal/service/sql_tf/model.go | 2062 +++++++----- .../service/vectorsearch_tf/legacy_model.go | 450 ++- internal/service/vectorsearch_tf/model.go | 450 ++- internal/service/workspace_tf/legacy_model.go | 677 ++-- internal/service/workspace_tf/model.go | 677 ++-- 41 files changed, 26169 insertions(+), 14832 deletions(-) diff --git a/internal/providers/pluginfw/products/sharing/resource_share.go b/internal/providers/pluginfw/products/sharing/resource_share.go index ca0ac7ada..19b24485e 100644 --- a/internal/providers/pluginfw/products/sharing/resource_share.go +++ b/internal/providers/pluginfw/products/sharing/resource_share.go @@ -156,7 +156,6 @@ func (r *ShareResource) Schema(ctx context.Context, req resource.SchemaRequest, c.SetRequired("object", "partition", "value", "op") c.SetRequired("object", "partition", "value", "name") - c.SetOptional("owner") return c }) resp.Schema = schema.Schema{ diff --git a/internal/service/apps_tf/legacy_model.go b/internal/service/apps_tf/legacy_model.go index 7b956959f..109429833 100755 --- a/internal/service/apps_tf/legacy_model.go +++ b/internal/service/apps_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -24,41 +25,41 @@ import ( type App_SdkV2 struct { // The active deployment of the app. A deployment is considered active when // it has been deployed to the app compute. - ActiveDeployment types.List `tfsdk:"active_deployment" tf:"computed,object"` + ActiveDeployment types.List `tfsdk:"active_deployment" tf:"object"` - AppStatus types.List `tfsdk:"app_status" tf:"computed,object"` + AppStatus types.List `tfsdk:"app_status" tf:"object"` - ComputeStatus types.List `tfsdk:"compute_status" tf:"computed,object"` + ComputeStatus types.List `tfsdk:"compute_status" tf:"object"` // The creation time of the app. Formatted timestamp in ISO 6801. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // The email of the user that created the app. - Creator types.String `tfsdk:"creator" tf:"computed"` + Creator types.String `tfsdk:"creator" tf:""` // The default workspace file system path of the source code from which app // deployment are created. This field tracks the workspace source code path // of the last active deployment. - DefaultSourceCodePath types.String `tfsdk:"default_source_code_path" tf:"computed"` + DefaultSourceCodePath types.String `tfsdk:"default_source_code_path" tf:""` // The description of the app. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The name of the app. The name must contain only lowercase alphanumeric // characters and hyphens. It must be unique within the workspace. Name types.String `tfsdk:"name" tf:""` // The pending deployment of the app. A deployment is considered pending // when it is being prepared for deployment to the app compute. - PendingDeployment types.List `tfsdk:"pending_deployment" tf:"computed,object"` + PendingDeployment types.List `tfsdk:"pending_deployment" tf:"object"` // Resources for the app. - Resources types.List `tfsdk:"resources" tf:"optional"` + Resources types.List `tfsdk:"resources" tf:""` - ServicePrincipalClientId types.String `tfsdk:"service_principal_client_id" tf:"computed"` + ServicePrincipalClientId types.String `tfsdk:"service_principal_client_id" tf:""` - ServicePrincipalId types.Int64 `tfsdk:"service_principal_id" tf:"computed"` + ServicePrincipalId types.Int64 `tfsdk:"service_principal_id" tf:""` - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"computed"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // The update time of the app. Formatted timestamp in ISO 6801. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // The email of the user that last updated the app. - Updater types.String `tfsdk:"updater" tf:"computed"` + Updater types.String `tfsdk:"updater" tf:""` // The URL of the app once it is deployed. - Url types.String `tfsdk:"url" tf:"computed"` + Url types.String `tfsdk:"url" tf:""` } func (newState *App_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan App_SdkV2) { @@ -67,6 +68,30 @@ func (newState *App_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan App_SdkV func (newState *App_SdkV2) SyncEffectiveFieldsDuringRead(existingState App_SdkV2) { } +func (c App_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "active_deployment")...) + AppDeployment_SdkV2{}.ToSchema(cs, append(path, "active_deployment")...) + cs.SetComputed(append(path, "app_status")...) + ApplicationStatus_SdkV2{}.ToSchema(cs, append(path, "app_status")...) + cs.SetComputed(append(path, "compute_status")...) + ComputeStatus_SdkV2{}.ToSchema(cs, append(path, "compute_status")...) + cs.SetComputed(append(path, "create_time")...) + cs.SetComputed(append(path, "creator")...) + cs.SetComputed(append(path, "default_source_code_path")...) + cs.SetRequired(append(path, "name")...) + cs.SetComputed(append(path, "pending_deployment")...) + AppDeployment_SdkV2{}.ToSchema(cs, append(path, "pending_deployment")...) + AppResource_SdkV2{}.ToSchema(cs, append(path, "resources")...) + cs.SetComputed(append(path, "service_principal_client_id")...) + cs.SetComputed(append(path, "service_principal_id")...) + cs.SetComputed(append(path, "service_principal_name")...) + cs.SetComputed(append(path, "update_time")...) + cs.SetComputed(append(path, "updater")...) + cs.SetComputed(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in App. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -276,13 +301,13 @@ func (o *App_SdkV2) SetResources(ctx context.Context, v []AppResource_SdkV2) { type AppAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AppAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppAccessControlRequest_SdkV2) { @@ -291,6 +316,11 @@ func (newState *AppAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *AppAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppAccessControlRequest_SdkV2) { } +func (c AppAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -330,15 +360,15 @@ func (o AppAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { type AppAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AppAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppAccessControlResponse_SdkV2) { @@ -347,6 +377,12 @@ func (newState *AppAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *AppAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppAccessControlResponse_SdkV2) { } +func (c AppAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -418,15 +454,15 @@ func (o *AppAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, type AppDeployment_SdkV2 struct { // The creation time of the deployment. Formatted timestamp in ISO 6801. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // The email of the user creates the deployment. - Creator types.String `tfsdk:"creator" tf:"computed"` + Creator types.String `tfsdk:"creator" tf:""` // The deployment artifacts for an app. - DeploymentArtifacts types.List `tfsdk:"deployment_artifacts" tf:"computed,object"` + DeploymentArtifacts types.List `tfsdk:"deployment_artifacts" tf:"object"` // The unique id of the deployment. - DeploymentId types.String `tfsdk:"deployment_id" tf:"optional"` + DeploymentId types.String `tfsdk:"deployment_id" tf:""` // The mode of which the deployment will manage the source code. - Mode types.String `tfsdk:"mode" tf:"optional"` + Mode types.String `tfsdk:"mode" tf:""` // The workspace file system path of the source code used to create the app // deployment. This is different from // `deployment_artifacts.source_code_path`, which is the path used by the @@ -434,11 +470,11 @@ type AppDeployment_SdkV2 struct { // the app in the workspace during deployment creation, whereas the latter // provides a system generated stable snapshotted source code path used by // the deployment. - SourceCodePath types.String `tfsdk:"source_code_path" tf:"optional"` + SourceCodePath types.String `tfsdk:"source_code_path" tf:""` // Status and status message of the deployment - Status types.List `tfsdk:"status" tf:"computed,object"` + Status types.List `tfsdk:"status" tf:"object"` // The update time of the deployment. Formatted timestamp in ISO 6801. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *AppDeployment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppDeployment_SdkV2) { @@ -447,6 +483,18 @@ func (newState *AppDeployment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *AppDeployment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppDeployment_SdkV2) { } +func (c AppDeployment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + cs.SetComputed(append(path, "creator")...) + cs.SetComputed(append(path, "deployment_artifacts")...) + AppDeploymentArtifacts_SdkV2{}.ToSchema(cs, append(path, "deployment_artifacts")...) + cs.SetComputed(append(path, "status")...) + AppDeploymentStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppDeployment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -554,7 +602,7 @@ func (o *AppDeployment_SdkV2) SetStatus(ctx context.Context, v AppDeploymentStat type AppDeploymentArtifacts_SdkV2 struct { // The snapshotted workspace file system path of the source code loaded by // the deployed app. - SourceCodePath types.String `tfsdk:"source_code_path" tf:"optional"` + SourceCodePath types.String `tfsdk:"source_code_path" tf:""` } func (newState *AppDeploymentArtifacts_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppDeploymentArtifacts_SdkV2) { @@ -563,6 +611,11 @@ func (newState *AppDeploymentArtifacts_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *AppDeploymentArtifacts_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppDeploymentArtifacts_SdkV2) { } +func (c AppDeploymentArtifacts_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppDeploymentArtifacts. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -596,9 +649,9 @@ func (o AppDeploymentArtifacts_SdkV2) Type(ctx context.Context) attr.Type { type AppDeploymentStatus_SdkV2 struct { // Message corresponding with the deployment state. - Message types.String `tfsdk:"message" tf:"computed"` + Message types.String `tfsdk:"message" tf:""` // State of the deployment. - State types.String `tfsdk:"state" tf:"computed"` + State types.String `tfsdk:"state" tf:""` } func (newState *AppDeploymentStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppDeploymentStatus_SdkV2) { @@ -607,6 +660,13 @@ func (newState *AppDeploymentStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *AppDeploymentStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppDeploymentStatus_SdkV2) { } +func (c AppDeploymentStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "message")...) + cs.SetComputed(append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppDeploymentStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -641,11 +701,11 @@ func (o AppDeploymentStatus_SdkV2) Type(ctx context.Context) attr.Type { } type AppPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *AppPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermission_SdkV2) { @@ -654,6 +714,11 @@ func (newState *AppPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *AppPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppPermission_SdkV2) { } +func (c AppPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -720,11 +785,11 @@ func (o *AppPermission_SdkV2) SetInheritedFromObject(ctx context.Context, v []ty } type AppPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *AppPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermissions_SdkV2) { @@ -733,6 +798,12 @@ func (newState *AppPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *AppPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppPermissions_SdkV2) { } +func (c AppPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -799,9 +870,9 @@ func (o *AppPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []App } type AppPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *AppPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermissionsDescription_SdkV2) { @@ -810,6 +881,11 @@ func (newState *AppPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *AppPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppPermissionsDescription_SdkV2) { } +func (c AppPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -844,7 +920,7 @@ func (o AppPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { } type AppPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The app for which to get or manage permissions. AppName types.String `tfsdk:"-"` } @@ -855,6 +931,13 @@ func (newState *AppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *AppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppPermissionsRequest_SdkV2) { } +func (c AppPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "app_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -920,17 +1003,17 @@ func (o *AppPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, type AppResource_SdkV2 struct { // Description of the App Resource. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - Job types.List `tfsdk:"job" tf:"optional,object"` + Job types.List `tfsdk:"job" tf:"object"` // Name of the App Resource. Name types.String `tfsdk:"name" tf:""` - Secret types.List `tfsdk:"secret" tf:"optional,object"` + Secret types.List `tfsdk:"secret" tf:"object"` - ServingEndpoint types.List `tfsdk:"serving_endpoint" tf:"optional,object"` + ServingEndpoint types.List `tfsdk:"serving_endpoint" tf:"object"` - SqlWarehouse types.List `tfsdk:"sql_warehouse" tf:"optional,object"` + SqlWarehouse types.List `tfsdk:"sql_warehouse" tf:"object"` } func (newState *AppResource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppResource_SdkV2) { @@ -939,6 +1022,16 @@ func (newState *AppResource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AppResource_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResource_SdkV2) { } +func (c AppResource_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppResourceJob_SdkV2{}.ToSchema(cs, append(path, "job")...) + cs.SetRequired(append(path, "name")...) + AppResourceSecret_SdkV2{}.ToSchema(cs, append(path, "secret")...) + AppResourceServingEndpoint_SdkV2{}.ToSchema(cs, append(path, "serving_endpoint")...) + AppResourceSqlWarehouse_SdkV2{}.ToSchema(cs, append(path, "sql_warehouse")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1111,6 +1204,13 @@ func (newState *AppResourceJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *AppResourceJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResourceJob_SdkV2) { } +func (c AppResourceJob_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "permission")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1160,6 +1260,14 @@ func (newState *AppResourceSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *AppResourceSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResourceSecret_SdkV2) { } +func (c AppResourceSecret_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "permission")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1209,6 +1317,13 @@ func (newState *AppResourceServingEndpoint_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *AppResourceServingEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResourceServingEndpoint_SdkV2) { } +func (c AppResourceServingEndpoint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "permission")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceServingEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1256,6 +1371,13 @@ func (newState *AppResourceSqlWarehouse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *AppResourceSqlWarehouse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResourceSqlWarehouse_SdkV2) { } +func (c AppResourceSqlWarehouse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "permission")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceSqlWarehouse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1291,9 +1413,9 @@ func (o AppResourceSqlWarehouse_SdkV2) Type(ctx context.Context) attr.Type { type ApplicationStatus_SdkV2 struct { // Application status message - Message types.String `tfsdk:"message" tf:"computed"` + Message types.String `tfsdk:"message" tf:""` // State of the application. - State types.String `tfsdk:"state" tf:"computed"` + State types.String `tfsdk:"state" tf:""` } func (newState *ApplicationStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApplicationStatus_SdkV2) { @@ -1302,6 +1424,13 @@ func (newState *ApplicationStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ApplicationStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ApplicationStatus_SdkV2) { } +func (c ApplicationStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "message")...) + cs.SetComputed(append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ApplicationStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1337,9 +1466,9 @@ func (o ApplicationStatus_SdkV2) Type(ctx context.Context) attr.Type { type ComputeStatus_SdkV2 struct { // Compute status message - Message types.String `tfsdk:"message" tf:"computed"` + Message types.String `tfsdk:"message" tf:""` // State of the app compute. - State types.String `tfsdk:"state" tf:"computed"` + State types.String `tfsdk:"state" tf:""` } func (newState *ComputeStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComputeStatus_SdkV2) { @@ -1348,6 +1477,13 @@ func (newState *ComputeStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ComputeStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComputeStatus_SdkV2) { } +func (c ComputeStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "message")...) + cs.SetComputed(append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComputeStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1383,17 +1519,11 @@ func (o ComputeStatus_SdkV2) Type(ctx context.Context) attr.Type { // Create an app deployment type CreateAppDeploymentRequest_SdkV2 struct { - AppDeployment types.List `tfsdk:"app_deployment" tf:"optional,object"` + AppDeployment types.List `tfsdk:"app_deployment" tf:"object"` // The name of the app. AppName types.String `tfsdk:"-"` } -func (newState *CreateAppDeploymentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAppDeploymentRequest_SdkV2) { -} - -func (newState *CreateAppDeploymentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAppDeploymentRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAppDeploymentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1459,13 +1589,9 @@ func (o *CreateAppDeploymentRequest_SdkV2) SetAppDeployment(ctx context.Context, // Create an app type CreateAppRequest_SdkV2 struct { - App types.List `tfsdk:"app" tf:"optional,object"` -} - -func (newState *CreateAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAppRequest_SdkV2) { -} - -func (newState *CreateAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAppRequest_SdkV2) { + App types.List `tfsdk:"app" tf:"object"` + // If true, the app will not be started after creation. + NoCompute types.Bool `tfsdk:"-"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAppRequest. @@ -1488,7 +1614,8 @@ func (o CreateAppRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.Obj return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "app": o.App, + "app": o.App, + "no_compute": o.NoCompute, }) } @@ -1499,6 +1626,7 @@ func (o CreateAppRequest_SdkV2) Type(ctx context.Context) attr.Type { "app": basetypes.ListType{ ElemType: App_SdkV2{}.Type(ctx), }, + "no_compute": types.BoolType, }, } } @@ -1535,12 +1663,6 @@ type DeleteAppRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAppRequest_SdkV2) { -} - -func (newState *DeleteAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAppRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1580,12 +1702,6 @@ type GetAppDeploymentRequest_SdkV2 struct { DeploymentId types.String `tfsdk:"-"` } -func (newState *GetAppDeploymentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppDeploymentRequest_SdkV2) { -} - -func (newState *GetAppDeploymentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppDeploymentRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppDeploymentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1625,12 +1741,6 @@ type GetAppPermissionLevelsRequest_SdkV2 struct { AppName types.String `tfsdk:"-"` } -func (newState *GetAppPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetAppPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1664,7 +1774,7 @@ func (o GetAppPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type type GetAppPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetAppPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppPermissionLevelsResponse_SdkV2) { @@ -1673,6 +1783,12 @@ func (newState *GetAppPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringC func (newState *GetAppPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppPermissionLevelsResponse_SdkV2) { } +func (c GetAppPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1740,12 +1856,6 @@ type GetAppPermissionsRequest_SdkV2 struct { AppName types.String `tfsdk:"-"` } -func (newState *GetAppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppPermissionsRequest_SdkV2) { -} - -func (newState *GetAppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1783,12 +1893,6 @@ type GetAppRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppRequest_SdkV2) { -} - -func (newState *GetAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1831,12 +1935,6 @@ type ListAppDeploymentsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAppDeploymentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppDeploymentsRequest_SdkV2) { -} - -func (newState *ListAppDeploymentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAppDeploymentsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppDeploymentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1874,9 +1972,9 @@ func (o ListAppDeploymentsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListAppDeploymentsResponse_SdkV2 struct { // Deployment history of the app. - AppDeployments types.List `tfsdk:"app_deployments" tf:"optional"` + AppDeployments types.List `tfsdk:"app_deployments" tf:""` // Pagination token to request the next page of apps. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListAppDeploymentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppDeploymentsResponse_SdkV2) { @@ -1885,6 +1983,12 @@ func (newState *ListAppDeploymentsResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ListAppDeploymentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAppDeploymentsResponse_SdkV2) { } +func (c ListAppDeploymentsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppDeployment_SdkV2{}.ToSchema(cs, append(path, "app_deployments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppDeploymentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1957,12 +2061,6 @@ type ListAppsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAppsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppsRequest_SdkV2) { -} - -func (newState *ListAppsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAppsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1997,9 +2095,9 @@ func (o ListAppsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListAppsResponse_SdkV2 struct { - Apps types.List `tfsdk:"apps" tf:"optional"` + Apps types.List `tfsdk:"apps" tf:""` // Pagination token to request the next page of apps. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListAppsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppsResponse_SdkV2) { @@ -2008,6 +2106,12 @@ func (newState *ListAppsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ListAppsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAppsResponse_SdkV2) { } +func (c ListAppsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + App_SdkV2{}.ToSchema(cs, append(path, "apps")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2082,6 +2186,12 @@ func (newState *StartAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *StartAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartAppRequest_SdkV2) { } +func (c StartAppRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2124,6 +2234,12 @@ func (newState *StopAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *StopAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopAppRequest_SdkV2) { } +func (c StopAppRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2157,18 +2273,12 @@ func (o StopAppRequest_SdkV2) Type(ctx context.Context) attr.Type { // Update an app type UpdateAppRequest_SdkV2 struct { - App types.List `tfsdk:"app" tf:"optional,object"` + App types.List `tfsdk:"app" tf:"object"` // The name of the app. The name must contain only lowercase alphanumeric // characters and hyphens. It must be unique within the workspace. Name types.String `tfsdk:"-"` } -func (newState *UpdateAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAppRequest_SdkV2) { -} - -func (newState *UpdateAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAppRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/apps_tf/model.go b/internal/service/apps_tf/model.go index 031b9ff04..1476fd021 100755 --- a/internal/service/apps_tf/model.go +++ b/internal/service/apps_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -24,41 +25,41 @@ import ( type App struct { // The active deployment of the app. A deployment is considered active when // it has been deployed to the app compute. - ActiveDeployment types.Object `tfsdk:"active_deployment" tf:"computed,object"` + ActiveDeployment types.Object `tfsdk:"active_deployment" tf:"object"` - AppStatus types.Object `tfsdk:"app_status" tf:"computed,object"` + AppStatus types.Object `tfsdk:"app_status" tf:"object"` - ComputeStatus types.Object `tfsdk:"compute_status" tf:"computed,object"` + ComputeStatus types.Object `tfsdk:"compute_status" tf:"object"` // The creation time of the app. Formatted timestamp in ISO 6801. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // The email of the user that created the app. - Creator types.String `tfsdk:"creator" tf:"computed"` + Creator types.String `tfsdk:"creator" tf:""` // The default workspace file system path of the source code from which app // deployment are created. This field tracks the workspace source code path // of the last active deployment. - DefaultSourceCodePath types.String `tfsdk:"default_source_code_path" tf:"computed"` + DefaultSourceCodePath types.String `tfsdk:"default_source_code_path" tf:""` // The description of the app. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The name of the app. The name must contain only lowercase alphanumeric // characters and hyphens. It must be unique within the workspace. Name types.String `tfsdk:"name" tf:""` // The pending deployment of the app. A deployment is considered pending // when it is being prepared for deployment to the app compute. - PendingDeployment types.Object `tfsdk:"pending_deployment" tf:"computed,object"` + PendingDeployment types.Object `tfsdk:"pending_deployment" tf:"object"` // Resources for the app. - Resources types.List `tfsdk:"resources" tf:"optional"` + Resources types.List `tfsdk:"resources" tf:""` - ServicePrincipalClientId types.String `tfsdk:"service_principal_client_id" tf:"computed"` + ServicePrincipalClientId types.String `tfsdk:"service_principal_client_id" tf:""` - ServicePrincipalId types.Int64 `tfsdk:"service_principal_id" tf:"computed"` + ServicePrincipalId types.Int64 `tfsdk:"service_principal_id" tf:""` - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"computed"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // The update time of the app. Formatted timestamp in ISO 6801. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // The email of the user that last updated the app. - Updater types.String `tfsdk:"updater" tf:"computed"` + Updater types.String `tfsdk:"updater" tf:""` // The URL of the app once it is deployed. - Url types.String `tfsdk:"url" tf:"computed"` + Url types.String `tfsdk:"url" tf:""` } func (newState *App) SyncEffectiveFieldsDuringCreateOrUpdate(plan App) { @@ -67,6 +68,30 @@ func (newState *App) SyncEffectiveFieldsDuringCreateOrUpdate(plan App) { func (newState *App) SyncEffectiveFieldsDuringRead(existingState App) { } +func (c App) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "active_deployment")...) + AppDeployment{}.ToSchema(cs, append(path, "active_deployment")...) + cs.SetComputed(append(path, "app_status")...) + ApplicationStatus{}.ToSchema(cs, append(path, "app_status")...) + cs.SetComputed(append(path, "compute_status")...) + ComputeStatus{}.ToSchema(cs, append(path, "compute_status")...) + cs.SetComputed(append(path, "create_time")...) + cs.SetComputed(append(path, "creator")...) + cs.SetComputed(append(path, "default_source_code_path")...) + cs.SetRequired(append(path, "name")...) + cs.SetComputed(append(path, "pending_deployment")...) + AppDeployment{}.ToSchema(cs, append(path, "pending_deployment")...) + AppResource{}.ToSchema(cs, append(path, "resources")...) + cs.SetComputed(append(path, "service_principal_client_id")...) + cs.SetComputed(append(path, "service_principal_id")...) + cs.SetComputed(append(path, "service_principal_name")...) + cs.SetComputed(append(path, "update_time")...) + cs.SetComputed(append(path, "updater")...) + cs.SetComputed(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in App. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -276,13 +301,13 @@ func (o *App) SetResources(ctx context.Context, v []AppResource) { type AppAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AppAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppAccessControlRequest) { @@ -291,6 +316,11 @@ func (newState *AppAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *AppAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState AppAccessControlRequest) { } +func (c AppAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -330,15 +360,15 @@ func (o AppAccessControlRequest) Type(ctx context.Context) attr.Type { type AppAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AppAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppAccessControlResponse) { @@ -347,6 +377,12 @@ func (newState *AppAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *AppAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState AppAccessControlResponse) { } +func (c AppAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -418,15 +454,15 @@ func (o *AppAccessControlResponse) SetAllPermissions(ctx context.Context, v []Ap type AppDeployment struct { // The creation time of the deployment. Formatted timestamp in ISO 6801. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // The email of the user creates the deployment. - Creator types.String `tfsdk:"creator" tf:"computed"` + Creator types.String `tfsdk:"creator" tf:""` // The deployment artifacts for an app. - DeploymentArtifacts types.Object `tfsdk:"deployment_artifacts" tf:"computed,object"` + DeploymentArtifacts types.Object `tfsdk:"deployment_artifacts" tf:"object"` // The unique id of the deployment. - DeploymentId types.String `tfsdk:"deployment_id" tf:"optional"` + DeploymentId types.String `tfsdk:"deployment_id" tf:""` // The mode of which the deployment will manage the source code. - Mode types.String `tfsdk:"mode" tf:"optional"` + Mode types.String `tfsdk:"mode" tf:""` // The workspace file system path of the source code used to create the app // deployment. This is different from // `deployment_artifacts.source_code_path`, which is the path used by the @@ -434,11 +470,11 @@ type AppDeployment struct { // the app in the workspace during deployment creation, whereas the latter // provides a system generated stable snapshotted source code path used by // the deployment. - SourceCodePath types.String `tfsdk:"source_code_path" tf:"optional"` + SourceCodePath types.String `tfsdk:"source_code_path" tf:""` // Status and status message of the deployment - Status types.Object `tfsdk:"status" tf:"computed,object"` + Status types.Object `tfsdk:"status" tf:"object"` // The update time of the deployment. Formatted timestamp in ISO 6801. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *AppDeployment) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppDeployment) { @@ -447,6 +483,18 @@ func (newState *AppDeployment) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppD func (newState *AppDeployment) SyncEffectiveFieldsDuringRead(existingState AppDeployment) { } +func (c AppDeployment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + cs.SetComputed(append(path, "creator")...) + cs.SetComputed(append(path, "deployment_artifacts")...) + AppDeploymentArtifacts{}.ToSchema(cs, append(path, "deployment_artifacts")...) + cs.SetComputed(append(path, "status")...) + AppDeploymentStatus{}.ToSchema(cs, append(path, "status")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppDeployment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -554,7 +602,7 @@ func (o *AppDeployment) SetStatus(ctx context.Context, v AppDeploymentStatus) { type AppDeploymentArtifacts struct { // The snapshotted workspace file system path of the source code loaded by // the deployed app. - SourceCodePath types.String `tfsdk:"source_code_path" tf:"optional"` + SourceCodePath types.String `tfsdk:"source_code_path" tf:""` } func (newState *AppDeploymentArtifacts) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppDeploymentArtifacts) { @@ -563,6 +611,11 @@ func (newState *AppDeploymentArtifacts) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *AppDeploymentArtifacts) SyncEffectiveFieldsDuringRead(existingState AppDeploymentArtifacts) { } +func (c AppDeploymentArtifacts) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppDeploymentArtifacts. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -596,9 +649,9 @@ func (o AppDeploymentArtifacts) Type(ctx context.Context) attr.Type { type AppDeploymentStatus struct { // Message corresponding with the deployment state. - Message types.String `tfsdk:"message" tf:"computed"` + Message types.String `tfsdk:"message" tf:""` // State of the deployment. - State types.String `tfsdk:"state" tf:"computed"` + State types.String `tfsdk:"state" tf:""` } func (newState *AppDeploymentStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppDeploymentStatus) { @@ -607,6 +660,13 @@ func (newState *AppDeploymentStatus) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *AppDeploymentStatus) SyncEffectiveFieldsDuringRead(existingState AppDeploymentStatus) { } +func (c AppDeploymentStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "message")...) + cs.SetComputed(append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppDeploymentStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -641,11 +701,11 @@ func (o AppDeploymentStatus) Type(ctx context.Context) attr.Type { } type AppPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *AppPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermission) { @@ -654,6 +714,11 @@ func (newState *AppPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppP func (newState *AppPermission) SyncEffectiveFieldsDuringRead(existingState AppPermission) { } +func (c AppPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -720,11 +785,11 @@ func (o *AppPermission) SetInheritedFromObject(ctx context.Context, v []types.St } type AppPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *AppPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermissions) { @@ -733,6 +798,12 @@ func (newState *AppPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan App func (newState *AppPermissions) SyncEffectiveFieldsDuringRead(existingState AppPermissions) { } +func (c AppPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -799,9 +870,9 @@ func (o *AppPermissions) SetAccessControlList(ctx context.Context, v []AppAccess } type AppPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *AppPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermissionsDescription) { @@ -810,6 +881,11 @@ func (newState *AppPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpda func (newState *AppPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState AppPermissionsDescription) { } +func (c AppPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -844,7 +920,7 @@ func (o AppPermissionsDescription) Type(ctx context.Context) attr.Type { } type AppPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The app for which to get or manage permissions. AppName types.String `tfsdk:"-"` } @@ -855,6 +931,13 @@ func (newState *AppPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *AppPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState AppPermissionsRequest) { } +func (c AppPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "app_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -920,17 +1003,17 @@ func (o *AppPermissionsRequest) SetAccessControlList(ctx context.Context, v []Ap type AppResource struct { // Description of the App Resource. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - Job types.Object `tfsdk:"job" tf:"optional,object"` + Job types.Object `tfsdk:"job" tf:"object"` // Name of the App Resource. Name types.String `tfsdk:"name" tf:""` - Secret types.Object `tfsdk:"secret" tf:"optional,object"` + Secret types.Object `tfsdk:"secret" tf:"object"` - ServingEndpoint types.Object `tfsdk:"serving_endpoint" tf:"optional,object"` + ServingEndpoint types.Object `tfsdk:"serving_endpoint" tf:"object"` - SqlWarehouse types.Object `tfsdk:"sql_warehouse" tf:"optional,object"` + SqlWarehouse types.Object `tfsdk:"sql_warehouse" tf:"object"` } func (newState *AppResource) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppResource) { @@ -939,6 +1022,16 @@ func (newState *AppResource) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppRes func (newState *AppResource) SyncEffectiveFieldsDuringRead(existingState AppResource) { } +func (c AppResource) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppResourceJob{}.ToSchema(cs, append(path, "job")...) + cs.SetRequired(append(path, "name")...) + AppResourceSecret{}.ToSchema(cs, append(path, "secret")...) + AppResourceServingEndpoint{}.ToSchema(cs, append(path, "serving_endpoint")...) + AppResourceSqlWarehouse{}.ToSchema(cs, append(path, "sql_warehouse")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1111,6 +1204,13 @@ func (newState *AppResourceJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan App func (newState *AppResourceJob) SyncEffectiveFieldsDuringRead(existingState AppResourceJob) { } +func (c AppResourceJob) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "permission")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1160,6 +1260,14 @@ func (newState *AppResourceSecret) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AppResourceSecret) SyncEffectiveFieldsDuringRead(existingState AppResourceSecret) { } +func (c AppResourceSecret) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "permission")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1209,6 +1317,13 @@ func (newState *AppResourceServingEndpoint) SyncEffectiveFieldsDuringCreateOrUpd func (newState *AppResourceServingEndpoint) SyncEffectiveFieldsDuringRead(existingState AppResourceServingEndpoint) { } +func (c AppResourceServingEndpoint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "permission")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceServingEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1256,6 +1371,13 @@ func (newState *AppResourceSqlWarehouse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *AppResourceSqlWarehouse) SyncEffectiveFieldsDuringRead(existingState AppResourceSqlWarehouse) { } +func (c AppResourceSqlWarehouse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "permission")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceSqlWarehouse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1291,9 +1413,9 @@ func (o AppResourceSqlWarehouse) Type(ctx context.Context) attr.Type { type ApplicationStatus struct { // Application status message - Message types.String `tfsdk:"message" tf:"computed"` + Message types.String `tfsdk:"message" tf:""` // State of the application. - State types.String `tfsdk:"state" tf:"computed"` + State types.String `tfsdk:"state" tf:""` } func (newState *ApplicationStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApplicationStatus) { @@ -1302,6 +1424,13 @@ func (newState *ApplicationStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ApplicationStatus) SyncEffectiveFieldsDuringRead(existingState ApplicationStatus) { } +func (c ApplicationStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "message")...) + cs.SetComputed(append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ApplicationStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1337,9 +1466,9 @@ func (o ApplicationStatus) Type(ctx context.Context) attr.Type { type ComputeStatus struct { // Compute status message - Message types.String `tfsdk:"message" tf:"computed"` + Message types.String `tfsdk:"message" tf:""` // State of the app compute. - State types.String `tfsdk:"state" tf:"computed"` + State types.String `tfsdk:"state" tf:""` } func (newState *ComputeStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComputeStatus) { @@ -1348,6 +1477,13 @@ func (newState *ComputeStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan Comp func (newState *ComputeStatus) SyncEffectiveFieldsDuringRead(existingState ComputeStatus) { } +func (c ComputeStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "message")...) + cs.SetComputed(append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComputeStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1383,17 +1519,11 @@ func (o ComputeStatus) Type(ctx context.Context) attr.Type { // Create an app deployment type CreateAppDeploymentRequest struct { - AppDeployment types.Object `tfsdk:"app_deployment" tf:"optional,object"` + AppDeployment types.Object `tfsdk:"app_deployment" tf:"object"` // The name of the app. AppName types.String `tfsdk:"-"` } -func (newState *CreateAppDeploymentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAppDeploymentRequest) { -} - -func (newState *CreateAppDeploymentRequest) SyncEffectiveFieldsDuringRead(existingState CreateAppDeploymentRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAppDeploymentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1459,13 +1589,9 @@ func (o *CreateAppDeploymentRequest) SetAppDeployment(ctx context.Context, v App // Create an app type CreateAppRequest struct { - App types.Object `tfsdk:"app" tf:"optional,object"` -} - -func (newState *CreateAppRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAppRequest) { -} - -func (newState *CreateAppRequest) SyncEffectiveFieldsDuringRead(existingState CreateAppRequest) { + App types.Object `tfsdk:"app" tf:"object"` + // If true, the app will not be started after creation. + NoCompute types.Bool `tfsdk:"-"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAppRequest. @@ -1488,7 +1614,8 @@ func (o CreateAppRequest) ToObjectValue(ctx context.Context) basetypes.ObjectVal return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "app": o.App, + "app": o.App, + "no_compute": o.NoCompute, }) } @@ -1496,7 +1623,8 @@ func (o CreateAppRequest) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o CreateAppRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "app": App{}.Type(ctx), + "app": App{}.Type(ctx), + "no_compute": types.BoolType, }, } } @@ -1535,12 +1663,6 @@ type DeleteAppRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteAppRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAppRequest) { -} - -func (newState *DeleteAppRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAppRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1580,12 +1702,6 @@ type GetAppDeploymentRequest struct { DeploymentId types.String `tfsdk:"-"` } -func (newState *GetAppDeploymentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppDeploymentRequest) { -} - -func (newState *GetAppDeploymentRequest) SyncEffectiveFieldsDuringRead(existingState GetAppDeploymentRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppDeploymentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1625,12 +1741,6 @@ type GetAppPermissionLevelsRequest struct { AppName types.String `tfsdk:"-"` } -func (newState *GetAppPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppPermissionLevelsRequest) { -} - -func (newState *GetAppPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetAppPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1664,7 +1774,7 @@ func (o GetAppPermissionLevelsRequest) Type(ctx context.Context) attr.Type { type GetAppPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetAppPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppPermissionLevelsResponse) { @@ -1673,6 +1783,12 @@ func (newState *GetAppPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateO func (newState *GetAppPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetAppPermissionLevelsResponse) { } +func (c GetAppPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1740,12 +1856,6 @@ type GetAppPermissionsRequest struct { AppName types.String `tfsdk:"-"` } -func (newState *GetAppPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppPermissionsRequest) { -} - -func (newState *GetAppPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetAppPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1783,12 +1893,6 @@ type GetAppRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetAppRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppRequest) { -} - -func (newState *GetAppRequest) SyncEffectiveFieldsDuringRead(existingState GetAppRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1831,12 +1935,6 @@ type ListAppDeploymentsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAppDeploymentsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppDeploymentsRequest) { -} - -func (newState *ListAppDeploymentsRequest) SyncEffectiveFieldsDuringRead(existingState ListAppDeploymentsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppDeploymentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1874,9 +1972,9 @@ func (o ListAppDeploymentsRequest) Type(ctx context.Context) attr.Type { type ListAppDeploymentsResponse struct { // Deployment history of the app. - AppDeployments types.List `tfsdk:"app_deployments" tf:"optional"` + AppDeployments types.List `tfsdk:"app_deployments" tf:""` // Pagination token to request the next page of apps. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListAppDeploymentsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppDeploymentsResponse) { @@ -1885,6 +1983,12 @@ func (newState *ListAppDeploymentsResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListAppDeploymentsResponse) SyncEffectiveFieldsDuringRead(existingState ListAppDeploymentsResponse) { } +func (c ListAppDeploymentsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AppDeployment{}.ToSchema(cs, append(path, "app_deployments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppDeploymentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1957,12 +2061,6 @@ type ListAppsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAppsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppsRequest) { -} - -func (newState *ListAppsRequest) SyncEffectiveFieldsDuringRead(existingState ListAppsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1997,9 +2095,9 @@ func (o ListAppsRequest) Type(ctx context.Context) attr.Type { } type ListAppsResponse struct { - Apps types.List `tfsdk:"apps" tf:"optional"` + Apps types.List `tfsdk:"apps" tf:""` // Pagination token to request the next page of apps. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListAppsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppsResponse) { @@ -2008,6 +2106,12 @@ func (newState *ListAppsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan L func (newState *ListAppsResponse) SyncEffectiveFieldsDuringRead(existingState ListAppsResponse) { } +func (c ListAppsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + App{}.ToSchema(cs, append(path, "apps")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2082,6 +2186,12 @@ func (newState *StartAppRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan St func (newState *StartAppRequest) SyncEffectiveFieldsDuringRead(existingState StartAppRequest) { } +func (c StartAppRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2124,6 +2234,12 @@ func (newState *StopAppRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sto func (newState *StopAppRequest) SyncEffectiveFieldsDuringRead(existingState StopAppRequest) { } +func (c StopAppRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2157,18 +2273,12 @@ func (o StopAppRequest) Type(ctx context.Context) attr.Type { // Update an app type UpdateAppRequest struct { - App types.Object `tfsdk:"app" tf:"optional,object"` + App types.Object `tfsdk:"app" tf:"object"` // The name of the app. The name must contain only lowercase alphanumeric // characters and hyphens. It must be unique within the workspace. Name types.String `tfsdk:"-"` } -func (newState *UpdateAppRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAppRequest) { -} - -func (newState *UpdateAppRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAppRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAppRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/billing_tf/legacy_model.go b/internal/service/billing_tf/legacy_model.go index ab728eed7..f8f75900b 100755 --- a/internal/service/billing_tf/legacy_model.go +++ b/internal/service/billing_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -23,11 +24,11 @@ import ( type ActionConfiguration_SdkV2 struct { // Databricks action configuration ID. - ActionConfigurationId types.String `tfsdk:"action_configuration_id" tf:"optional"` + ActionConfigurationId types.String `tfsdk:"action_configuration_id" tf:""` // The type of the action. - ActionType types.String `tfsdk:"action_type" tf:"optional"` + ActionType types.String `tfsdk:"action_type" tf:""` // Target for the action. For example, an email address. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` } func (newState *ActionConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ActionConfiguration_SdkV2) { @@ -36,6 +37,11 @@ func (newState *ActionConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ActionConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState ActionConfiguration_SdkV2) { } +func (c ActionConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ActionConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -74,20 +80,20 @@ func (o ActionConfiguration_SdkV2) Type(ctx context.Context) attr.Type { type AlertConfiguration_SdkV2 struct { // Configured actions for this alert. These define what happens when an // alert enters a triggered state. - ActionConfigurations types.List `tfsdk:"action_configurations" tf:"optional"` + ActionConfigurations types.List `tfsdk:"action_configurations" tf:""` // Databricks alert configuration ID. - AlertConfigurationId types.String `tfsdk:"alert_configuration_id" tf:"optional"` + AlertConfigurationId types.String `tfsdk:"alert_configuration_id" tf:""` // The threshold for the budget alert to determine if it is in a triggered // state. The number is evaluated based on `quantity_type`. - QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:"optional"` + QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:""` // The way to calculate cost for this budget alert. This is what // `quantity_threshold` is measured in. - QuantityType types.String `tfsdk:"quantity_type" tf:"optional"` + QuantityType types.String `tfsdk:"quantity_type" tf:""` // The time window of usage data for the budget. - TimePeriod types.String `tfsdk:"time_period" tf:"optional"` + TimePeriod types.String `tfsdk:"time_period" tf:""` // The evaluation method to determine when this budget alert is in a // triggered state. - TriggerType types.String `tfsdk:"trigger_type" tf:"optional"` + TriggerType types.String `tfsdk:"trigger_type" tf:""` } func (newState *AlertConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConfiguration_SdkV2) { @@ -96,6 +102,12 @@ func (newState *AlertConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *AlertConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertConfiguration_SdkV2) { } +func (c AlertConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ActionConfiguration_SdkV2{}.ToSchema(cs, append(path, "action_configurations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -169,23 +181,23 @@ func (o *AlertConfiguration_SdkV2) SetActionConfigurations(ctx context.Context, type BudgetConfiguration_SdkV2 struct { // Databricks account ID. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Alerts to configure when this budget is in a triggered state. Budgets // must have exactly one alert configuration. - AlertConfigurations types.List `tfsdk:"alert_configurations" tf:"optional"` + AlertConfigurations types.List `tfsdk:"alert_configurations" tf:""` // Databricks budget configuration ID. - BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:"optional"` + BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:""` // Creation time of this budget configuration. - CreateTime types.Int64 `tfsdk:"create_time" tf:"optional"` + CreateTime types.Int64 `tfsdk:"create_time" tf:""` // Human-readable name of budget configuration. Max Length: 128 - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Configured filters for this budget. These are applied to your account's // usage to limit the scope of what is considered for this budget. Leave // empty to include all usage for this account. All provided filters must be // matched for usage to be included. - Filter types.List `tfsdk:"filter" tf:"optional,object"` + Filter types.List `tfsdk:"filter" tf:"object"` // Update time of this budget configuration. - UpdateTime types.Int64 `tfsdk:"update_time" tf:"optional"` + UpdateTime types.Int64 `tfsdk:"update_time" tf:""` } func (newState *BudgetConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfiguration_SdkV2) { @@ -194,6 +206,13 @@ func (newState *BudgetConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *BudgetConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfiguration_SdkV2) { } +func (c BudgetConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertConfiguration_SdkV2{}.ToSchema(cs, append(path, "alert_configurations")...) + BudgetConfigurationFilter_SdkV2{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -300,9 +319,9 @@ type BudgetConfigurationFilter_SdkV2 struct { // A list of tag keys and values that will limit the budget to usage that // includes those specific custom tags. Tags are case-sensitive and should // be entered exactly as they appear in your usage data. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // If provided, usage must match with the provided Databricks workspace IDs. - WorkspaceId types.List `tfsdk:"workspace_id" tf:"optional,object"` + WorkspaceId types.List `tfsdk:"workspace_id" tf:"object"` } func (newState *BudgetConfigurationFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilter_SdkV2) { @@ -311,6 +330,13 @@ func (newState *BudgetConfigurationFilter_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *BudgetConfigurationFilter_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilter_SdkV2) { } +func (c BudgetConfigurationFilter_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfigurationFilterTagClause_SdkV2{}.ToSchema(cs, append(path, "tags")...) + BudgetConfigurationFilterWorkspaceIdClause_SdkV2{}.ToSchema(cs, append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -404,9 +430,9 @@ func (o *BudgetConfigurationFilter_SdkV2) SetWorkspaceId(ctx context.Context, v } type BudgetConfigurationFilterClause_SdkV2 struct { - Operator types.String `tfsdk:"operator" tf:"optional"` + Operator types.String `tfsdk:"operator" tf:""` - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *BudgetConfigurationFilterClause_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterClause_SdkV2) { @@ -415,6 +441,11 @@ func (newState *BudgetConfigurationFilterClause_SdkV2) SyncEffectiveFieldsDuring func (newState *BudgetConfigurationFilterClause_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilterClause_SdkV2) { } +func (c BudgetConfigurationFilterClause_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilterClause. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -479,9 +510,9 @@ func (o *BudgetConfigurationFilterClause_SdkV2) SetValues(ctx context.Context, v } type BudgetConfigurationFilterTagClause_SdkV2 struct { - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` - Value types.List `tfsdk:"value" tf:"optional,object"` + Value types.List `tfsdk:"value" tf:"object"` } func (newState *BudgetConfigurationFilterTagClause_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterTagClause_SdkV2) { @@ -490,6 +521,12 @@ func (newState *BudgetConfigurationFilterTagClause_SdkV2) SyncEffectiveFieldsDur func (newState *BudgetConfigurationFilterTagClause_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilterTagClause_SdkV2) { } +func (c BudgetConfigurationFilterTagClause_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfigurationFilterClause_SdkV2{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilterTagClause. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -554,9 +591,9 @@ func (o *BudgetConfigurationFilterTagClause_SdkV2) SetValue(ctx context.Context, } type BudgetConfigurationFilterWorkspaceIdClause_SdkV2 struct { - Operator types.String `tfsdk:"operator" tf:"optional"` + Operator types.String `tfsdk:"operator" tf:""` - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *BudgetConfigurationFilterWorkspaceIdClause_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterWorkspaceIdClause_SdkV2) { @@ -565,6 +602,11 @@ func (newState *BudgetConfigurationFilterWorkspaceIdClause_SdkV2) SyncEffectiveF func (newState *BudgetConfigurationFilterWorkspaceIdClause_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilterWorkspaceIdClause_SdkV2) { } +func (c BudgetConfigurationFilterWorkspaceIdClause_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilterWorkspaceIdClause. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -632,10 +674,10 @@ type CreateBillingUsageDashboardRequest_SdkV2 struct { // Workspace level usage dashboard shows usage data for the specified // workspace ID. Global level usage dashboard shows usage data for all // workspaces in the account. - DashboardType types.String `tfsdk:"dashboard_type" tf:"optional"` + DashboardType types.String `tfsdk:"dashboard_type" tf:""` // The workspace ID of the workspace in which the usage dashboard is // created. - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` } func (newState *CreateBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBillingUsageDashboardRequest_SdkV2) { @@ -644,6 +686,11 @@ func (newState *CreateBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDur func (newState *CreateBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBillingUsageDashboardRequest_SdkV2) { } +func (c CreateBillingUsageDashboardRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBillingUsageDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -679,7 +726,7 @@ func (o CreateBillingUsageDashboardRequest_SdkV2) Type(ctx context.Context) attr type CreateBillingUsageDashboardResponse_SdkV2 struct { // The unique id of the usage dashboard. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` } func (newState *CreateBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBillingUsageDashboardResponse_SdkV2) { @@ -688,6 +735,11 @@ func (newState *CreateBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDu func (newState *CreateBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBillingUsageDashboardResponse_SdkV2) { } +func (c CreateBillingUsageDashboardResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBillingUsageDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -721,17 +773,17 @@ func (o CreateBillingUsageDashboardResponse_SdkV2) Type(ctx context.Context) att type CreateBudgetConfigurationBudget_SdkV2 struct { // Databricks account ID. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Alerts to configure when this budget is in a triggered state. Budgets // must have exactly one alert configuration. - AlertConfigurations types.List `tfsdk:"alert_configurations" tf:"optional"` + AlertConfigurations types.List `tfsdk:"alert_configurations" tf:""` // Human-readable name of budget configuration. Max Length: 128 - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Configured filters for this budget. These are applied to your account's // usage to limit the scope of what is considered for this budget. Leave // empty to include all usage for this account. All provided filters must be // matched for usage to be included. - Filter types.List `tfsdk:"filter" tf:"optional,object"` + Filter types.List `tfsdk:"filter" tf:"object"` } func (newState *CreateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudget_SdkV2) { @@ -740,6 +792,13 @@ func (newState *CreateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuring func (newState *CreateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationBudget_SdkV2) { } +func (c CreateBudgetConfigurationBudget_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2{}.ToSchema(cs, append(path, "alert_configurations")...) + BudgetConfigurationFilter_SdkV2{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationBudget. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -838,9 +897,9 @@ func (o *CreateBudgetConfigurationBudget_SdkV2) SetFilter(ctx context.Context, v type CreateBudgetConfigurationBudgetActionConfigurations_SdkV2 struct { // The type of the action. - ActionType types.String `tfsdk:"action_type" tf:"optional"` + ActionType types.String `tfsdk:"action_type" tf:""` // Target for the action. For example, an email address. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` } func (newState *CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) { @@ -849,6 +908,11 @@ func (newState *CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) SyncE func (newState *CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) { } +func (c CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationBudgetActionConfigurations. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -885,18 +949,18 @@ func (o CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) Type(ctx cont type CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2 struct { // Configured actions for this alert. These define what happens when an // alert enters a triggered state. - ActionConfigurations types.List `tfsdk:"action_configurations" tf:"optional"` + ActionConfigurations types.List `tfsdk:"action_configurations" tf:""` // The threshold for the budget alert to determine if it is in a triggered // state. The number is evaluated based on `quantity_type`. - QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:"optional"` + QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:""` // The way to calculate cost for this budget alert. This is what // `quantity_threshold` is measured in. - QuantityType types.String `tfsdk:"quantity_type" tf:"optional"` + QuantityType types.String `tfsdk:"quantity_type" tf:""` // The time window of usage data for the budget. - TimePeriod types.String `tfsdk:"time_period" tf:"optional"` + TimePeriod types.String `tfsdk:"time_period" tf:""` // The evaluation method to determine when this budget alert is in a // triggered state. - TriggerType types.String `tfsdk:"trigger_type" tf:"optional"` + TriggerType types.String `tfsdk:"trigger_type" tf:""` } func (newState *CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) { @@ -905,6 +969,12 @@ func (newState *CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) SyncEf func (newState *CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) { } +func (c CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateBudgetConfigurationBudgetActionConfigurations_SdkV2{}.ToSchema(cs, append(path, "action_configurations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationBudgetAlertConfigurations. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -985,6 +1055,13 @@ func (newState *CreateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDurin func (newState *CreateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationRequest_SdkV2) { } +func (c CreateBudgetConfigurationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "budget")...) + CreateBudgetConfigurationBudget_SdkV2{}.ToSchema(cs, append(path, "budget")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1048,7 +1125,7 @@ func (o *CreateBudgetConfigurationRequest_SdkV2) SetBudget(ctx context.Context, type CreateBudgetConfigurationResponse_SdkV2 struct { // The created budget configuration. - Budget types.List `tfsdk:"budget" tf:"optional,object"` + Budget types.List `tfsdk:"budget" tf:"object"` } func (newState *CreateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationResponse_SdkV2) { @@ -1057,6 +1134,12 @@ func (newState *CreateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuri func (newState *CreateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationResponse_SdkV2) { } +func (c CreateBudgetConfigurationResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfiguration_SdkV2{}.ToSchema(cs, append(path, "budget")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1121,7 +1204,7 @@ func (o *CreateBudgetConfigurationResponse_SdkV2) SetBudget(ctx context.Context, type CreateLogDeliveryConfigurationParams_SdkV2 struct { // The optional human-readable name of the log delivery configuration. // Defaults to empty. - ConfigName types.String `tfsdk:"config_name" tf:"optional"` + ConfigName types.String `tfsdk:"config_name" tf:""` // The ID for a method:credentials/create that represents the AWS IAM role // with policy and trust relationship as described in the main billable // usage documentation page. See [Configure billable usage delivery]. @@ -1132,12 +1215,12 @@ type CreateLogDeliveryConfigurationParams_SdkV2 struct { // empty, which means that logs are delivered to the root of the bucket. // This must be a valid S3 object key. This must not start or end with a // slash character. - DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:"optional"` + DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:""` // This field applies only if `log_type` is `BILLABLE_USAGE`. This is the // optional start month and year for delivery, specified in `YYYY-MM` // format. Defaults to current year and month. `BILLABLE_USAGE` logs are not // available for usage before March 2019 (`2019-03`). - DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:"optional"` + DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:""` // Log delivery type. Supported values are: // // * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the @@ -1167,7 +1250,7 @@ type CreateLogDeliveryConfigurationParams_SdkV2 struct { // the configuration](#operation/patch-log-delivery-config-status) later. // Deletion of a configuration is not supported, so disable a log delivery // configuration that is no longer needed. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The ID for a method:storage/create that represents the S3 bucket with // bucket policy as described in the main billable usage documentation page. // See [Configure billable usage delivery]. @@ -1187,7 +1270,7 @@ type CreateLogDeliveryConfigurationParams_SdkV2 struct { // delivery won't include account level logs. For some types of Databricks // deployments there is only one workspace per account ID, so this field is // unnecessary. - WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:"optional"` + WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:""` } func (newState *CreateLogDeliveryConfigurationParams_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateLogDeliveryConfigurationParams_SdkV2) { @@ -1196,6 +1279,15 @@ func (newState *CreateLogDeliveryConfigurationParams_SdkV2) SyncEffectiveFieldsD func (newState *CreateLogDeliveryConfigurationParams_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateLogDeliveryConfigurationParams_SdkV2) { } +func (c CreateLogDeliveryConfigurationParams_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credentials_id")...) + cs.SetRequired(append(path, "log_type")...) + cs.SetRequired(append(path, "output_format")...) + cs.SetRequired(append(path, "storage_configuration_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateLogDeliveryConfigurationParams. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1279,12 +1371,6 @@ type DeleteBudgetConfigurationRequest_SdkV2 struct { BudgetId types.String `tfsdk:"-"` } -func (newState *DeleteBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteBudgetConfigurationRequest_SdkV2) { -} - -func (newState *DeleteBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteBudgetConfigurationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteBudgetConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1325,6 +1411,11 @@ func (newState *DeleteBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuri func (newState *DeleteBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteBudgetConfigurationResponse_SdkV2) { } +func (c DeleteBudgetConfigurationResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteBudgetConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1366,12 +1457,6 @@ type DownloadRequest_SdkV2 struct { StartMonth types.String `tfsdk:"-"` } -func (newState *DownloadRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadRequest_SdkV2) { -} - -func (newState *DownloadRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DownloadRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1411,12 +1496,6 @@ type DownloadResponse_SdkV2 struct { Contents types.Object `tfsdk:"-"` } -func (newState *DownloadResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadResponse_SdkV2) { -} - -func (newState *DownloadResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DownloadResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1459,12 +1538,6 @@ type GetBillingUsageDashboardRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *GetBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBillingUsageDashboardRequest_SdkV2) { -} - -func (newState *GetBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBillingUsageDashboardRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBillingUsageDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1500,9 +1573,9 @@ func (o GetBillingUsageDashboardRequest_SdkV2) Type(ctx context.Context) attr.Ty type GetBillingUsageDashboardResponse_SdkV2 struct { // The unique id of the usage dashboard. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The URL of the usage dashboard. - DashboardUrl types.String `tfsdk:"dashboard_url" tf:"optional"` + DashboardUrl types.String `tfsdk:"dashboard_url" tf:""` } func (newState *GetBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBillingUsageDashboardResponse_SdkV2) { @@ -1511,6 +1584,11 @@ func (newState *GetBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDurin func (newState *GetBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBillingUsageDashboardResponse_SdkV2) { } +func (c GetBillingUsageDashboardResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBillingUsageDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1550,12 +1628,6 @@ type GetBudgetConfigurationRequest_SdkV2 struct { BudgetId types.String `tfsdk:"-"` } -func (newState *GetBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBudgetConfigurationRequest_SdkV2) { -} - -func (newState *GetBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBudgetConfigurationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBudgetConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1588,7 +1660,7 @@ func (o GetBudgetConfigurationRequest_SdkV2) Type(ctx context.Context) attr.Type } type GetBudgetConfigurationResponse_SdkV2 struct { - Budget types.List `tfsdk:"budget" tf:"optional,object"` + Budget types.List `tfsdk:"budget" tf:"object"` } func (newState *GetBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBudgetConfigurationResponse_SdkV2) { @@ -1597,6 +1669,12 @@ func (newState *GetBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringC func (newState *GetBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBudgetConfigurationResponse_SdkV2) { } +func (c GetBudgetConfigurationResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfiguration_SdkV2{}.ToSchema(cs, append(path, "budget")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBudgetConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1664,12 +1742,6 @@ type GetLogDeliveryRequest_SdkV2 struct { LogDeliveryConfigurationId types.String `tfsdk:"-"` } -func (newState *GetLogDeliveryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLogDeliveryRequest_SdkV2) { -} - -func (newState *GetLogDeliveryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetLogDeliveryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLogDeliveryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1709,12 +1781,6 @@ type ListBudgetConfigurationsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListBudgetConfigurationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListBudgetConfigurationsRequest_SdkV2) { -} - -func (newState *ListBudgetConfigurationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListBudgetConfigurationsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListBudgetConfigurationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1747,10 +1813,10 @@ func (o ListBudgetConfigurationsRequest_SdkV2) Type(ctx context.Context) attr.Ty } type ListBudgetConfigurationsResponse_SdkV2 struct { - Budgets types.List `tfsdk:"budgets" tf:"optional"` + Budgets types.List `tfsdk:"budgets" tf:""` // Token which can be sent as `page_token` to retrieve the next page of // results. If this field is omitted, there are no subsequent budgets. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListBudgetConfigurationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListBudgetConfigurationsResponse_SdkV2) { @@ -1759,6 +1825,12 @@ func (newState *ListBudgetConfigurationsResponse_SdkV2) SyncEffectiveFieldsDurin func (newState *ListBudgetConfigurationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListBudgetConfigurationsResponse_SdkV2) { } +func (c ListBudgetConfigurationsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfiguration_SdkV2{}.ToSchema(cs, append(path, "budgets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListBudgetConfigurationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1832,12 +1904,6 @@ type ListLogDeliveryRequest_SdkV2 struct { StorageConfigurationId types.String `tfsdk:"-"` } -func (newState *ListLogDeliveryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListLogDeliveryRequest_SdkV2) { -} - -func (newState *ListLogDeliveryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListLogDeliveryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListLogDeliveryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1875,33 +1941,33 @@ func (o ListLogDeliveryRequest_SdkV2) Type(ctx context.Context) attr.Type { type LogDeliveryConfiguration_SdkV2 struct { // The Databricks account ID that hosts the log delivery configuration. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Databricks log delivery configuration ID. - ConfigId types.String `tfsdk:"config_id" tf:"optional"` + ConfigId types.String `tfsdk:"config_id" tf:""` // The optional human-readable name of the log delivery configuration. // Defaults to empty. - ConfigName types.String `tfsdk:"config_name" tf:"optional"` + ConfigName types.String `tfsdk:"config_name" tf:""` // Time in epoch milliseconds when the log delivery configuration was // created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // The ID for a method:credentials/create that represents the AWS IAM role // with policy and trust relationship as described in the main billable // usage documentation page. See [Configure billable usage delivery]. // // [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The optional delivery path prefix within Amazon S3 storage. Defaults to // empty, which means that logs are delivered to the root of the bucket. // This must be a valid S3 object key. This must not start or end with a // slash character. - DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:"optional"` + DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:""` // This field applies only if `log_type` is `BILLABLE_USAGE`. This is the // optional start month and year for delivery, specified in `YYYY-MM` // format. Defaults to current year and month. `BILLABLE_USAGE` logs are not // available for usage before March 2019 (`2019-03`). - DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:"optional"` + DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:""` // Databricks log delivery status. - LogDeliveryStatus types.List `tfsdk:"log_delivery_status" tf:"optional,object"` + LogDeliveryStatus types.List `tfsdk:"log_delivery_status" tf:"object"` // Log delivery type. Supported values are: // // * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the @@ -1914,7 +1980,7 @@ type LogDeliveryConfiguration_SdkV2 struct { // [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html // [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html // [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html - LogType types.String `tfsdk:"log_type" tf:"optional"` + LogType types.String `tfsdk:"log_type" tf:""` // The file type of log delivery. // // * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the @@ -1925,22 +1991,22 @@ type LogDeliveryConfiguration_SdkV2 struct { // // [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html // [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html - OutputFormat types.String `tfsdk:"output_format" tf:"optional"` + OutputFormat types.String `tfsdk:"output_format" tf:""` // Status of log delivery configuration. Set to `ENABLED` (enabled) or // `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable // the configuration](#operation/patch-log-delivery-config-status) later. // Deletion of a configuration is not supported, so disable a log delivery // configuration that is no longer needed. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The ID for a method:storage/create that represents the S3 bucket with // bucket policy as described in the main billable usage documentation page. // See [Configure billable usage delivery]. // // [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // Time in epoch milliseconds when the log delivery configuration was // updated. - UpdateTime types.Int64 `tfsdk:"update_time" tf:"optional"` + UpdateTime types.Int64 `tfsdk:"update_time" tf:""` // Optional filter that specifies workspace IDs to deliver logs for. By // default the workspace filter is empty and log delivery applies at the // account level, delivering workspace-level logs for all workspaces in your @@ -1954,7 +2020,7 @@ type LogDeliveryConfiguration_SdkV2 struct { // delivery won't include account level logs. For some types of Databricks // deployments there is only one workspace per account ID, so this field is // unnecessary. - WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:"optional"` + WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:""` } func (newState *LogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogDeliveryConfiguration_SdkV2) { @@ -1963,6 +2029,12 @@ func (newState *LogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *LogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogDeliveryConfiguration_SdkV2) { } +func (c LogDeliveryConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LogDeliveryStatus_SdkV2{}.ToSchema(cs, append(path, "log_delivery_status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogDeliveryConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2082,13 +2154,13 @@ func (o *LogDeliveryConfiguration_SdkV2) SetWorkspaceIdsFilter(ctx context.Conte // Databricks log delivery status. type LogDeliveryStatus_SdkV2 struct { // The UTC time for the latest log delivery attempt. - LastAttemptTime types.String `tfsdk:"last_attempt_time" tf:"optional"` + LastAttemptTime types.String `tfsdk:"last_attempt_time" tf:""` // The UTC time for the latest successful log delivery. - LastSuccessfulAttemptTime types.String `tfsdk:"last_successful_attempt_time" tf:"optional"` + LastSuccessfulAttemptTime types.String `tfsdk:"last_successful_attempt_time" tf:""` // Informative message about the latest log delivery attempt. If the log // delivery fails with USER_FAILURE, error details will be provided for // fixing misconfigurations in cloud permissions. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // The status string for log delivery. Possible values are: * `CREATED`: // There were no log delivery attempts since the config was created. * // `SUCCEEDED`: The latest attempt of log delivery has succeeded completely. @@ -2099,7 +2171,7 @@ type LogDeliveryStatus_SdkV2 struct { // `NOT_FOUND`: The log delivery status as the configuration has been // disabled since the release of this feature or there are no workspaces in // the account. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *LogDeliveryStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogDeliveryStatus_SdkV2) { @@ -2108,6 +2180,11 @@ func (newState *LogDeliveryStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *LogDeliveryStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogDeliveryStatus_SdkV2) { } +func (c LogDeliveryStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogDeliveryStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2148,12 +2225,6 @@ func (o LogDeliveryStatus_SdkV2) Type(ctx context.Context) attr.Type { type PatchStatusResponse_SdkV2 struct { } -func (newState *PatchStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchStatusResponse_SdkV2) { -} - -func (newState *PatchStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PatchStatusResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2183,19 +2254,19 @@ func (o PatchStatusResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateBudgetConfigurationBudget_SdkV2 struct { // Databricks account ID. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Alerts to configure when this budget is in a triggered state. Budgets // must have exactly one alert configuration. - AlertConfigurations types.List `tfsdk:"alert_configurations" tf:"optional"` + AlertConfigurations types.List `tfsdk:"alert_configurations" tf:""` // Databricks budget configuration ID. - BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:"optional"` + BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:""` // Human-readable name of budget configuration. Max Length: 128 - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Configured filters for this budget. These are applied to your account's // usage to limit the scope of what is considered for this budget. Leave // empty to include all usage for this account. All provided filters must be // matched for usage to be included. - Filter types.List `tfsdk:"filter" tf:"optional,object"` + Filter types.List `tfsdk:"filter" tf:"object"` } func (newState *UpdateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationBudget_SdkV2) { @@ -2204,6 +2275,13 @@ func (newState *UpdateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuring func (newState *UpdateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationBudget_SdkV2) { } +func (c UpdateBudgetConfigurationBudget_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertConfiguration_SdkV2{}.ToSchema(cs, append(path, "alert_configurations")...) + BudgetConfigurationFilter_SdkV2{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateBudgetConfigurationBudget. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2316,6 +2394,14 @@ func (newState *UpdateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDurin func (newState *UpdateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationRequest_SdkV2) { } +func (c UpdateBudgetConfigurationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "budget")...) + UpdateBudgetConfigurationBudget_SdkV2{}.ToSchema(cs, append(path, "budget")...) + cs.SetRequired(append(path, "budget_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateBudgetConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2381,7 +2467,7 @@ func (o *UpdateBudgetConfigurationRequest_SdkV2) SetBudget(ctx context.Context, type UpdateBudgetConfigurationResponse_SdkV2 struct { // The updated budget. - Budget types.List `tfsdk:"budget" tf:"optional,object"` + Budget types.List `tfsdk:"budget" tf:"object"` } func (newState *UpdateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationResponse_SdkV2) { @@ -2390,6 +2476,12 @@ func (newState *UpdateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuri func (newState *UpdateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationResponse_SdkV2) { } +func (c UpdateBudgetConfigurationResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfiguration_SdkV2{}.ToSchema(cs, append(path, "budget")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateBudgetConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2468,6 +2560,13 @@ func (newState *UpdateLogDeliveryConfigurationStatusRequest_SdkV2) SyncEffective func (newState *UpdateLogDeliveryConfigurationStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateLogDeliveryConfigurationStatusRequest_SdkV2) { } +func (c UpdateLogDeliveryConfigurationStatusRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "log_delivery_configuration_id")...) + cs.SetRequired(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateLogDeliveryConfigurationStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2502,7 +2601,7 @@ func (o UpdateLogDeliveryConfigurationStatusRequest_SdkV2) Type(ctx context.Cont } type WrappedCreateLogDeliveryConfiguration_SdkV2 struct { - LogDeliveryConfiguration types.List `tfsdk:"log_delivery_configuration" tf:"optional,object"` + LogDeliveryConfiguration types.List `tfsdk:"log_delivery_configuration" tf:"object"` } func (newState *WrappedCreateLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedCreateLogDeliveryConfiguration_SdkV2) { @@ -2511,6 +2610,12 @@ func (newState *WrappedCreateLogDeliveryConfiguration_SdkV2) SyncEffectiveFields func (newState *WrappedCreateLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState WrappedCreateLogDeliveryConfiguration_SdkV2) { } +func (c WrappedCreateLogDeliveryConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateLogDeliveryConfigurationParams_SdkV2{}.ToSchema(cs, append(path, "log_delivery_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WrappedCreateLogDeliveryConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2573,7 +2678,7 @@ func (o *WrappedCreateLogDeliveryConfiguration_SdkV2) SetLogDeliveryConfiguratio } type WrappedLogDeliveryConfiguration_SdkV2 struct { - LogDeliveryConfiguration types.List `tfsdk:"log_delivery_configuration" tf:"optional,object"` + LogDeliveryConfiguration types.List `tfsdk:"log_delivery_configuration" tf:"object"` } func (newState *WrappedLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedLogDeliveryConfiguration_SdkV2) { @@ -2582,6 +2687,12 @@ func (newState *WrappedLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuring func (newState *WrappedLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState WrappedLogDeliveryConfiguration_SdkV2) { } +func (c WrappedLogDeliveryConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LogDeliveryConfiguration_SdkV2{}.ToSchema(cs, append(path, "log_delivery_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WrappedLogDeliveryConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2644,7 +2755,7 @@ func (o *WrappedLogDeliveryConfiguration_SdkV2) SetLogDeliveryConfiguration(ctx } type WrappedLogDeliveryConfigurations_SdkV2 struct { - LogDeliveryConfigurations types.List `tfsdk:"log_delivery_configurations" tf:"optional"` + LogDeliveryConfigurations types.List `tfsdk:"log_delivery_configurations" tf:""` } func (newState *WrappedLogDeliveryConfigurations_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedLogDeliveryConfigurations_SdkV2) { @@ -2653,6 +2764,12 @@ func (newState *WrappedLogDeliveryConfigurations_SdkV2) SyncEffectiveFieldsDurin func (newState *WrappedLogDeliveryConfigurations_SdkV2) SyncEffectiveFieldsDuringRead(existingState WrappedLogDeliveryConfigurations_SdkV2) { } +func (c WrappedLogDeliveryConfigurations_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LogDeliveryConfiguration_SdkV2{}.ToSchema(cs, append(path, "log_delivery_configurations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WrappedLogDeliveryConfigurations. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/billing_tf/model.go b/internal/service/billing_tf/model.go index 3073e7c70..f7558a3a0 100755 --- a/internal/service/billing_tf/model.go +++ b/internal/service/billing_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -23,11 +24,11 @@ import ( type ActionConfiguration struct { // Databricks action configuration ID. - ActionConfigurationId types.String `tfsdk:"action_configuration_id" tf:"optional"` + ActionConfigurationId types.String `tfsdk:"action_configuration_id" tf:""` // The type of the action. - ActionType types.String `tfsdk:"action_type" tf:"optional"` + ActionType types.String `tfsdk:"action_type" tf:""` // Target for the action. For example, an email address. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` } func (newState *ActionConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan ActionConfiguration) { @@ -36,6 +37,11 @@ func (newState *ActionConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ActionConfiguration) SyncEffectiveFieldsDuringRead(existingState ActionConfiguration) { } +func (c ActionConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ActionConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -74,20 +80,20 @@ func (o ActionConfiguration) Type(ctx context.Context) attr.Type { type AlertConfiguration struct { // Configured actions for this alert. These define what happens when an // alert enters a triggered state. - ActionConfigurations types.List `tfsdk:"action_configurations" tf:"optional"` + ActionConfigurations types.List `tfsdk:"action_configurations" tf:""` // Databricks alert configuration ID. - AlertConfigurationId types.String `tfsdk:"alert_configuration_id" tf:"optional"` + AlertConfigurationId types.String `tfsdk:"alert_configuration_id" tf:""` // The threshold for the budget alert to determine if it is in a triggered // state. The number is evaluated based on `quantity_type`. - QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:"optional"` + QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:""` // The way to calculate cost for this budget alert. This is what // `quantity_threshold` is measured in. - QuantityType types.String `tfsdk:"quantity_type" tf:"optional"` + QuantityType types.String `tfsdk:"quantity_type" tf:""` // The time window of usage data for the budget. - TimePeriod types.String `tfsdk:"time_period" tf:"optional"` + TimePeriod types.String `tfsdk:"time_period" tf:""` // The evaluation method to determine when this budget alert is in a // triggered state. - TriggerType types.String `tfsdk:"trigger_type" tf:"optional"` + TriggerType types.String `tfsdk:"trigger_type" tf:""` } func (newState *AlertConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConfiguration) { @@ -96,6 +102,12 @@ func (newState *AlertConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AlertConfiguration) SyncEffectiveFieldsDuringRead(existingState AlertConfiguration) { } +func (c AlertConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ActionConfiguration{}.ToSchema(cs, append(path, "action_configurations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -169,23 +181,23 @@ func (o *AlertConfiguration) SetActionConfigurations(ctx context.Context, v []Ac type BudgetConfiguration struct { // Databricks account ID. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Alerts to configure when this budget is in a triggered state. Budgets // must have exactly one alert configuration. - AlertConfigurations types.List `tfsdk:"alert_configurations" tf:"optional"` + AlertConfigurations types.List `tfsdk:"alert_configurations" tf:""` // Databricks budget configuration ID. - BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:"optional"` + BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:""` // Creation time of this budget configuration. - CreateTime types.Int64 `tfsdk:"create_time" tf:"optional"` + CreateTime types.Int64 `tfsdk:"create_time" tf:""` // Human-readable name of budget configuration. Max Length: 128 - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Configured filters for this budget. These are applied to your account's // usage to limit the scope of what is considered for this budget. Leave // empty to include all usage for this account. All provided filters must be // matched for usage to be included. - Filter types.Object `tfsdk:"filter" tf:"optional,object"` + Filter types.Object `tfsdk:"filter" tf:"object"` // Update time of this budget configuration. - UpdateTime types.Int64 `tfsdk:"update_time" tf:"optional"` + UpdateTime types.Int64 `tfsdk:"update_time" tf:""` } func (newState *BudgetConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfiguration) { @@ -194,6 +206,13 @@ func (newState *BudgetConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *BudgetConfiguration) SyncEffectiveFieldsDuringRead(existingState BudgetConfiguration) { } +func (c BudgetConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertConfiguration{}.ToSchema(cs, append(path, "alert_configurations")...) + BudgetConfigurationFilter{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -300,9 +319,9 @@ type BudgetConfigurationFilter struct { // A list of tag keys and values that will limit the budget to usage that // includes those specific custom tags. Tags are case-sensitive and should // be entered exactly as they appear in your usage data. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // If provided, usage must match with the provided Databricks workspace IDs. - WorkspaceId types.Object `tfsdk:"workspace_id" tf:"optional,object"` + WorkspaceId types.Object `tfsdk:"workspace_id" tf:"object"` } func (newState *BudgetConfigurationFilter) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilter) { @@ -311,6 +330,13 @@ func (newState *BudgetConfigurationFilter) SyncEffectiveFieldsDuringCreateOrUpda func (newState *BudgetConfigurationFilter) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilter) { } +func (c BudgetConfigurationFilter) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfigurationFilterTagClause{}.ToSchema(cs, append(path, "tags")...) + BudgetConfigurationFilterWorkspaceIdClause{}.ToSchema(cs, append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -404,9 +430,9 @@ func (o *BudgetConfigurationFilter) SetWorkspaceId(ctx context.Context, v Budget } type BudgetConfigurationFilterClause struct { - Operator types.String `tfsdk:"operator" tf:"optional"` + Operator types.String `tfsdk:"operator" tf:""` - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *BudgetConfigurationFilterClause) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterClause) { @@ -415,6 +441,11 @@ func (newState *BudgetConfigurationFilterClause) SyncEffectiveFieldsDuringCreate func (newState *BudgetConfigurationFilterClause) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilterClause) { } +func (c BudgetConfigurationFilterClause) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilterClause. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -479,9 +510,9 @@ func (o *BudgetConfigurationFilterClause) SetValues(ctx context.Context, v []typ } type BudgetConfigurationFilterTagClause struct { - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` - Value types.Object `tfsdk:"value" tf:"optional,object"` + Value types.Object `tfsdk:"value" tf:"object"` } func (newState *BudgetConfigurationFilterTagClause) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterTagClause) { @@ -490,6 +521,12 @@ func (newState *BudgetConfigurationFilterTagClause) SyncEffectiveFieldsDuringCre func (newState *BudgetConfigurationFilterTagClause) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilterTagClause) { } +func (c BudgetConfigurationFilterTagClause) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfigurationFilterClause{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilterTagClause. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -554,9 +591,9 @@ func (o *BudgetConfigurationFilterTagClause) SetValue(ctx context.Context, v Bud } type BudgetConfigurationFilterWorkspaceIdClause struct { - Operator types.String `tfsdk:"operator" tf:"optional"` + Operator types.String `tfsdk:"operator" tf:""` - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *BudgetConfigurationFilterWorkspaceIdClause) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterWorkspaceIdClause) { @@ -565,6 +602,11 @@ func (newState *BudgetConfigurationFilterWorkspaceIdClause) SyncEffectiveFieldsD func (newState *BudgetConfigurationFilterWorkspaceIdClause) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilterWorkspaceIdClause) { } +func (c BudgetConfigurationFilterWorkspaceIdClause) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilterWorkspaceIdClause. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -632,10 +674,10 @@ type CreateBillingUsageDashboardRequest struct { // Workspace level usage dashboard shows usage data for the specified // workspace ID. Global level usage dashboard shows usage data for all // workspaces in the account. - DashboardType types.String `tfsdk:"dashboard_type" tf:"optional"` + DashboardType types.String `tfsdk:"dashboard_type" tf:""` // The workspace ID of the workspace in which the usage dashboard is // created. - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` } func (newState *CreateBillingUsageDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBillingUsageDashboardRequest) { @@ -644,6 +686,11 @@ func (newState *CreateBillingUsageDashboardRequest) SyncEffectiveFieldsDuringCre func (newState *CreateBillingUsageDashboardRequest) SyncEffectiveFieldsDuringRead(existingState CreateBillingUsageDashboardRequest) { } +func (c CreateBillingUsageDashboardRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBillingUsageDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -679,7 +726,7 @@ func (o CreateBillingUsageDashboardRequest) Type(ctx context.Context) attr.Type type CreateBillingUsageDashboardResponse struct { // The unique id of the usage dashboard. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` } func (newState *CreateBillingUsageDashboardResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBillingUsageDashboardResponse) { @@ -688,6 +735,11 @@ func (newState *CreateBillingUsageDashboardResponse) SyncEffectiveFieldsDuringCr func (newState *CreateBillingUsageDashboardResponse) SyncEffectiveFieldsDuringRead(existingState CreateBillingUsageDashboardResponse) { } +func (c CreateBillingUsageDashboardResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBillingUsageDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -721,17 +773,17 @@ func (o CreateBillingUsageDashboardResponse) Type(ctx context.Context) attr.Type type CreateBudgetConfigurationBudget struct { // Databricks account ID. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Alerts to configure when this budget is in a triggered state. Budgets // must have exactly one alert configuration. - AlertConfigurations types.List `tfsdk:"alert_configurations" tf:"optional"` + AlertConfigurations types.List `tfsdk:"alert_configurations" tf:""` // Human-readable name of budget configuration. Max Length: 128 - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Configured filters for this budget. These are applied to your account's // usage to limit the scope of what is considered for this budget. Leave // empty to include all usage for this account. All provided filters must be // matched for usage to be included. - Filter types.Object `tfsdk:"filter" tf:"optional,object"` + Filter types.Object `tfsdk:"filter" tf:"object"` } func (newState *CreateBudgetConfigurationBudget) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudget) { @@ -740,6 +792,13 @@ func (newState *CreateBudgetConfigurationBudget) SyncEffectiveFieldsDuringCreate func (newState *CreateBudgetConfigurationBudget) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationBudget) { } +func (c CreateBudgetConfigurationBudget) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateBudgetConfigurationBudgetAlertConfigurations{}.ToSchema(cs, append(path, "alert_configurations")...) + BudgetConfigurationFilter{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationBudget. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -838,9 +897,9 @@ func (o *CreateBudgetConfigurationBudget) SetFilter(ctx context.Context, v Budge type CreateBudgetConfigurationBudgetActionConfigurations struct { // The type of the action. - ActionType types.String `tfsdk:"action_type" tf:"optional"` + ActionType types.String `tfsdk:"action_type" tf:""` // Target for the action. For example, an email address. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` } func (newState *CreateBudgetConfigurationBudgetActionConfigurations) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudgetActionConfigurations) { @@ -849,6 +908,11 @@ func (newState *CreateBudgetConfigurationBudgetActionConfigurations) SyncEffecti func (newState *CreateBudgetConfigurationBudgetActionConfigurations) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationBudgetActionConfigurations) { } +func (c CreateBudgetConfigurationBudgetActionConfigurations) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationBudgetActionConfigurations. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -885,18 +949,18 @@ func (o CreateBudgetConfigurationBudgetActionConfigurations) Type(ctx context.Co type CreateBudgetConfigurationBudgetAlertConfigurations struct { // Configured actions for this alert. These define what happens when an // alert enters a triggered state. - ActionConfigurations types.List `tfsdk:"action_configurations" tf:"optional"` + ActionConfigurations types.List `tfsdk:"action_configurations" tf:""` // The threshold for the budget alert to determine if it is in a triggered // state. The number is evaluated based on `quantity_type`. - QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:"optional"` + QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:""` // The way to calculate cost for this budget alert. This is what // `quantity_threshold` is measured in. - QuantityType types.String `tfsdk:"quantity_type" tf:"optional"` + QuantityType types.String `tfsdk:"quantity_type" tf:""` // The time window of usage data for the budget. - TimePeriod types.String `tfsdk:"time_period" tf:"optional"` + TimePeriod types.String `tfsdk:"time_period" tf:""` // The evaluation method to determine when this budget alert is in a // triggered state. - TriggerType types.String `tfsdk:"trigger_type" tf:"optional"` + TriggerType types.String `tfsdk:"trigger_type" tf:""` } func (newState *CreateBudgetConfigurationBudgetAlertConfigurations) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudgetAlertConfigurations) { @@ -905,6 +969,12 @@ func (newState *CreateBudgetConfigurationBudgetAlertConfigurations) SyncEffectiv func (newState *CreateBudgetConfigurationBudgetAlertConfigurations) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationBudgetAlertConfigurations) { } +func (c CreateBudgetConfigurationBudgetAlertConfigurations) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateBudgetConfigurationBudgetActionConfigurations{}.ToSchema(cs, append(path, "action_configurations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationBudgetAlertConfigurations. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -985,6 +1055,13 @@ func (newState *CreateBudgetConfigurationRequest) SyncEffectiveFieldsDuringCreat func (newState *CreateBudgetConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationRequest) { } +func (c CreateBudgetConfigurationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "budget")...) + CreateBudgetConfigurationBudget{}.ToSchema(cs, append(path, "budget")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1048,7 +1125,7 @@ func (o *CreateBudgetConfigurationRequest) SetBudget(ctx context.Context, v Crea type CreateBudgetConfigurationResponse struct { // The created budget configuration. - Budget types.Object `tfsdk:"budget" tf:"optional,object"` + Budget types.Object `tfsdk:"budget" tf:"object"` } func (newState *CreateBudgetConfigurationResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationResponse) { @@ -1057,6 +1134,12 @@ func (newState *CreateBudgetConfigurationResponse) SyncEffectiveFieldsDuringCrea func (newState *CreateBudgetConfigurationResponse) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationResponse) { } +func (c CreateBudgetConfigurationResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfiguration{}.ToSchema(cs, append(path, "budget")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1121,7 +1204,7 @@ func (o *CreateBudgetConfigurationResponse) SetBudget(ctx context.Context, v Bud type CreateLogDeliveryConfigurationParams struct { // The optional human-readable name of the log delivery configuration. // Defaults to empty. - ConfigName types.String `tfsdk:"config_name" tf:"optional"` + ConfigName types.String `tfsdk:"config_name" tf:""` // The ID for a method:credentials/create that represents the AWS IAM role // with policy and trust relationship as described in the main billable // usage documentation page. See [Configure billable usage delivery]. @@ -1132,12 +1215,12 @@ type CreateLogDeliveryConfigurationParams struct { // empty, which means that logs are delivered to the root of the bucket. // This must be a valid S3 object key. This must not start or end with a // slash character. - DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:"optional"` + DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:""` // This field applies only if `log_type` is `BILLABLE_USAGE`. This is the // optional start month and year for delivery, specified in `YYYY-MM` // format. Defaults to current year and month. `BILLABLE_USAGE` logs are not // available for usage before March 2019 (`2019-03`). - DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:"optional"` + DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:""` // Log delivery type. Supported values are: // // * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the @@ -1167,7 +1250,7 @@ type CreateLogDeliveryConfigurationParams struct { // the configuration](#operation/patch-log-delivery-config-status) later. // Deletion of a configuration is not supported, so disable a log delivery // configuration that is no longer needed. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The ID for a method:storage/create that represents the S3 bucket with // bucket policy as described in the main billable usage documentation page. // See [Configure billable usage delivery]. @@ -1187,7 +1270,7 @@ type CreateLogDeliveryConfigurationParams struct { // delivery won't include account level logs. For some types of Databricks // deployments there is only one workspace per account ID, so this field is // unnecessary. - WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:"optional"` + WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:""` } func (newState *CreateLogDeliveryConfigurationParams) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateLogDeliveryConfigurationParams) { @@ -1196,6 +1279,15 @@ func (newState *CreateLogDeliveryConfigurationParams) SyncEffectiveFieldsDuringC func (newState *CreateLogDeliveryConfigurationParams) SyncEffectiveFieldsDuringRead(existingState CreateLogDeliveryConfigurationParams) { } +func (c CreateLogDeliveryConfigurationParams) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credentials_id")...) + cs.SetRequired(append(path, "log_type")...) + cs.SetRequired(append(path, "output_format")...) + cs.SetRequired(append(path, "storage_configuration_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateLogDeliveryConfigurationParams. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1279,12 +1371,6 @@ type DeleteBudgetConfigurationRequest struct { BudgetId types.String `tfsdk:"-"` } -func (newState *DeleteBudgetConfigurationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteBudgetConfigurationRequest) { -} - -func (newState *DeleteBudgetConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState DeleteBudgetConfigurationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteBudgetConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1325,6 +1411,11 @@ func (newState *DeleteBudgetConfigurationResponse) SyncEffectiveFieldsDuringCrea func (newState *DeleteBudgetConfigurationResponse) SyncEffectiveFieldsDuringRead(existingState DeleteBudgetConfigurationResponse) { } +func (c DeleteBudgetConfigurationResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteBudgetConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1366,12 +1457,6 @@ type DownloadRequest struct { StartMonth types.String `tfsdk:"-"` } -func (newState *DownloadRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadRequest) { -} - -func (newState *DownloadRequest) SyncEffectiveFieldsDuringRead(existingState DownloadRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1411,12 +1496,6 @@ type DownloadResponse struct { Contents types.Object `tfsdk:"-"` } -func (newState *DownloadResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadResponse) { -} - -func (newState *DownloadResponse) SyncEffectiveFieldsDuringRead(existingState DownloadResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1459,12 +1538,6 @@ type GetBillingUsageDashboardRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *GetBillingUsageDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBillingUsageDashboardRequest) { -} - -func (newState *GetBillingUsageDashboardRequest) SyncEffectiveFieldsDuringRead(existingState GetBillingUsageDashboardRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBillingUsageDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1500,9 +1573,9 @@ func (o GetBillingUsageDashboardRequest) Type(ctx context.Context) attr.Type { type GetBillingUsageDashboardResponse struct { // The unique id of the usage dashboard. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The URL of the usage dashboard. - DashboardUrl types.String `tfsdk:"dashboard_url" tf:"optional"` + DashboardUrl types.String `tfsdk:"dashboard_url" tf:""` } func (newState *GetBillingUsageDashboardResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBillingUsageDashboardResponse) { @@ -1511,6 +1584,11 @@ func (newState *GetBillingUsageDashboardResponse) SyncEffectiveFieldsDuringCreat func (newState *GetBillingUsageDashboardResponse) SyncEffectiveFieldsDuringRead(existingState GetBillingUsageDashboardResponse) { } +func (c GetBillingUsageDashboardResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBillingUsageDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1550,12 +1628,6 @@ type GetBudgetConfigurationRequest struct { BudgetId types.String `tfsdk:"-"` } -func (newState *GetBudgetConfigurationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBudgetConfigurationRequest) { -} - -func (newState *GetBudgetConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState GetBudgetConfigurationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBudgetConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1588,7 +1660,7 @@ func (o GetBudgetConfigurationRequest) Type(ctx context.Context) attr.Type { } type GetBudgetConfigurationResponse struct { - Budget types.Object `tfsdk:"budget" tf:"optional,object"` + Budget types.Object `tfsdk:"budget" tf:"object"` } func (newState *GetBudgetConfigurationResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBudgetConfigurationResponse) { @@ -1597,6 +1669,12 @@ func (newState *GetBudgetConfigurationResponse) SyncEffectiveFieldsDuringCreateO func (newState *GetBudgetConfigurationResponse) SyncEffectiveFieldsDuringRead(existingState GetBudgetConfigurationResponse) { } +func (c GetBudgetConfigurationResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfiguration{}.ToSchema(cs, append(path, "budget")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBudgetConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1664,12 +1742,6 @@ type GetLogDeliveryRequest struct { LogDeliveryConfigurationId types.String `tfsdk:"-"` } -func (newState *GetLogDeliveryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLogDeliveryRequest) { -} - -func (newState *GetLogDeliveryRequest) SyncEffectiveFieldsDuringRead(existingState GetLogDeliveryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLogDeliveryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1709,12 +1781,6 @@ type ListBudgetConfigurationsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListBudgetConfigurationsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListBudgetConfigurationsRequest) { -} - -func (newState *ListBudgetConfigurationsRequest) SyncEffectiveFieldsDuringRead(existingState ListBudgetConfigurationsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListBudgetConfigurationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1747,10 +1813,10 @@ func (o ListBudgetConfigurationsRequest) Type(ctx context.Context) attr.Type { } type ListBudgetConfigurationsResponse struct { - Budgets types.List `tfsdk:"budgets" tf:"optional"` + Budgets types.List `tfsdk:"budgets" tf:""` // Token which can be sent as `page_token` to retrieve the next page of // results. If this field is omitted, there are no subsequent budgets. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListBudgetConfigurationsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListBudgetConfigurationsResponse) { @@ -1759,6 +1825,12 @@ func (newState *ListBudgetConfigurationsResponse) SyncEffectiveFieldsDuringCreat func (newState *ListBudgetConfigurationsResponse) SyncEffectiveFieldsDuringRead(existingState ListBudgetConfigurationsResponse) { } +func (c ListBudgetConfigurationsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfiguration{}.ToSchema(cs, append(path, "budgets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListBudgetConfigurationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1832,12 +1904,6 @@ type ListLogDeliveryRequest struct { StorageConfigurationId types.String `tfsdk:"-"` } -func (newState *ListLogDeliveryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListLogDeliveryRequest) { -} - -func (newState *ListLogDeliveryRequest) SyncEffectiveFieldsDuringRead(existingState ListLogDeliveryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListLogDeliveryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1875,33 +1941,33 @@ func (o ListLogDeliveryRequest) Type(ctx context.Context) attr.Type { type LogDeliveryConfiguration struct { // The Databricks account ID that hosts the log delivery configuration. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Databricks log delivery configuration ID. - ConfigId types.String `tfsdk:"config_id" tf:"optional"` + ConfigId types.String `tfsdk:"config_id" tf:""` // The optional human-readable name of the log delivery configuration. // Defaults to empty. - ConfigName types.String `tfsdk:"config_name" tf:"optional"` + ConfigName types.String `tfsdk:"config_name" tf:""` // Time in epoch milliseconds when the log delivery configuration was // created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // The ID for a method:credentials/create that represents the AWS IAM role // with policy and trust relationship as described in the main billable // usage documentation page. See [Configure billable usage delivery]. // // [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The optional delivery path prefix within Amazon S3 storage. Defaults to // empty, which means that logs are delivered to the root of the bucket. // This must be a valid S3 object key. This must not start or end with a // slash character. - DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:"optional"` + DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:""` // This field applies only if `log_type` is `BILLABLE_USAGE`. This is the // optional start month and year for delivery, specified in `YYYY-MM` // format. Defaults to current year and month. `BILLABLE_USAGE` logs are not // available for usage before March 2019 (`2019-03`). - DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:"optional"` + DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:""` // Databricks log delivery status. - LogDeliveryStatus types.Object `tfsdk:"log_delivery_status" tf:"optional,object"` + LogDeliveryStatus types.Object `tfsdk:"log_delivery_status" tf:"object"` // Log delivery type. Supported values are: // // * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the @@ -1914,7 +1980,7 @@ type LogDeliveryConfiguration struct { // [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html // [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html // [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html - LogType types.String `tfsdk:"log_type" tf:"optional"` + LogType types.String `tfsdk:"log_type" tf:""` // The file type of log delivery. // // * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the @@ -1925,22 +1991,22 @@ type LogDeliveryConfiguration struct { // // [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html // [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html - OutputFormat types.String `tfsdk:"output_format" tf:"optional"` + OutputFormat types.String `tfsdk:"output_format" tf:""` // Status of log delivery configuration. Set to `ENABLED` (enabled) or // `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable // the configuration](#operation/patch-log-delivery-config-status) later. // Deletion of a configuration is not supported, so disable a log delivery // configuration that is no longer needed. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The ID for a method:storage/create that represents the S3 bucket with // bucket policy as described in the main billable usage documentation page. // See [Configure billable usage delivery]. // // [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // Time in epoch milliseconds when the log delivery configuration was // updated. - UpdateTime types.Int64 `tfsdk:"update_time" tf:"optional"` + UpdateTime types.Int64 `tfsdk:"update_time" tf:""` // Optional filter that specifies workspace IDs to deliver logs for. By // default the workspace filter is empty and log delivery applies at the // account level, delivering workspace-level logs for all workspaces in your @@ -1954,7 +2020,7 @@ type LogDeliveryConfiguration struct { // delivery won't include account level logs. For some types of Databricks // deployments there is only one workspace per account ID, so this field is // unnecessary. - WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:"optional"` + WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:""` } func (newState *LogDeliveryConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogDeliveryConfiguration) { @@ -1963,6 +2029,12 @@ func (newState *LogDeliveryConfiguration) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *LogDeliveryConfiguration) SyncEffectiveFieldsDuringRead(existingState LogDeliveryConfiguration) { } +func (c LogDeliveryConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LogDeliveryStatus{}.ToSchema(cs, append(path, "log_delivery_status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogDeliveryConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2082,13 +2154,13 @@ func (o *LogDeliveryConfiguration) SetWorkspaceIdsFilter(ctx context.Context, v // Databricks log delivery status. type LogDeliveryStatus struct { // The UTC time for the latest log delivery attempt. - LastAttemptTime types.String `tfsdk:"last_attempt_time" tf:"optional"` + LastAttemptTime types.String `tfsdk:"last_attempt_time" tf:""` // The UTC time for the latest successful log delivery. - LastSuccessfulAttemptTime types.String `tfsdk:"last_successful_attempt_time" tf:"optional"` + LastSuccessfulAttemptTime types.String `tfsdk:"last_successful_attempt_time" tf:""` // Informative message about the latest log delivery attempt. If the log // delivery fails with USER_FAILURE, error details will be provided for // fixing misconfigurations in cloud permissions. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // The status string for log delivery. Possible values are: * `CREATED`: // There were no log delivery attempts since the config was created. * // `SUCCEEDED`: The latest attempt of log delivery has succeeded completely. @@ -2099,7 +2171,7 @@ type LogDeliveryStatus struct { // `NOT_FOUND`: The log delivery status as the configuration has been // disabled since the release of this feature or there are no workspaces in // the account. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *LogDeliveryStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogDeliveryStatus) { @@ -2108,6 +2180,11 @@ func (newState *LogDeliveryStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *LogDeliveryStatus) SyncEffectiveFieldsDuringRead(existingState LogDeliveryStatus) { } +func (c LogDeliveryStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogDeliveryStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2148,12 +2225,6 @@ func (o LogDeliveryStatus) Type(ctx context.Context) attr.Type { type PatchStatusResponse struct { } -func (newState *PatchStatusResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchStatusResponse) { -} - -func (newState *PatchStatusResponse) SyncEffectiveFieldsDuringRead(existingState PatchStatusResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2183,19 +2254,19 @@ func (o PatchStatusResponse) Type(ctx context.Context) attr.Type { type UpdateBudgetConfigurationBudget struct { // Databricks account ID. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Alerts to configure when this budget is in a triggered state. Budgets // must have exactly one alert configuration. - AlertConfigurations types.List `tfsdk:"alert_configurations" tf:"optional"` + AlertConfigurations types.List `tfsdk:"alert_configurations" tf:""` // Databricks budget configuration ID. - BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:"optional"` + BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:""` // Human-readable name of budget configuration. Max Length: 128 - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Configured filters for this budget. These are applied to your account's // usage to limit the scope of what is considered for this budget. Leave // empty to include all usage for this account. All provided filters must be // matched for usage to be included. - Filter types.Object `tfsdk:"filter" tf:"optional,object"` + Filter types.Object `tfsdk:"filter" tf:"object"` } func (newState *UpdateBudgetConfigurationBudget) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationBudget) { @@ -2204,6 +2275,13 @@ func (newState *UpdateBudgetConfigurationBudget) SyncEffectiveFieldsDuringCreate func (newState *UpdateBudgetConfigurationBudget) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationBudget) { } +func (c UpdateBudgetConfigurationBudget) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertConfiguration{}.ToSchema(cs, append(path, "alert_configurations")...) + BudgetConfigurationFilter{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateBudgetConfigurationBudget. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2316,6 +2394,14 @@ func (newState *UpdateBudgetConfigurationRequest) SyncEffectiveFieldsDuringCreat func (newState *UpdateBudgetConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationRequest) { } +func (c UpdateBudgetConfigurationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "budget")...) + UpdateBudgetConfigurationBudget{}.ToSchema(cs, append(path, "budget")...) + cs.SetRequired(append(path, "budget_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateBudgetConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2381,7 +2467,7 @@ func (o *UpdateBudgetConfigurationRequest) SetBudget(ctx context.Context, v Upda type UpdateBudgetConfigurationResponse struct { // The updated budget. - Budget types.Object `tfsdk:"budget" tf:"optional,object"` + Budget types.Object `tfsdk:"budget" tf:"object"` } func (newState *UpdateBudgetConfigurationResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationResponse) { @@ -2390,6 +2476,12 @@ func (newState *UpdateBudgetConfigurationResponse) SyncEffectiveFieldsDuringCrea func (newState *UpdateBudgetConfigurationResponse) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationResponse) { } +func (c UpdateBudgetConfigurationResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BudgetConfiguration{}.ToSchema(cs, append(path, "budget")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateBudgetConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2468,6 +2560,13 @@ func (newState *UpdateLogDeliveryConfigurationStatusRequest) SyncEffectiveFields func (newState *UpdateLogDeliveryConfigurationStatusRequest) SyncEffectiveFieldsDuringRead(existingState UpdateLogDeliveryConfigurationStatusRequest) { } +func (c UpdateLogDeliveryConfigurationStatusRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "log_delivery_configuration_id")...) + cs.SetRequired(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateLogDeliveryConfigurationStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2502,7 +2601,7 @@ func (o UpdateLogDeliveryConfigurationStatusRequest) Type(ctx context.Context) a } type WrappedCreateLogDeliveryConfiguration struct { - LogDeliveryConfiguration types.Object `tfsdk:"log_delivery_configuration" tf:"optional,object"` + LogDeliveryConfiguration types.Object `tfsdk:"log_delivery_configuration" tf:"object"` } func (newState *WrappedCreateLogDeliveryConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedCreateLogDeliveryConfiguration) { @@ -2511,6 +2610,12 @@ func (newState *WrappedCreateLogDeliveryConfiguration) SyncEffectiveFieldsDuring func (newState *WrappedCreateLogDeliveryConfiguration) SyncEffectiveFieldsDuringRead(existingState WrappedCreateLogDeliveryConfiguration) { } +func (c WrappedCreateLogDeliveryConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateLogDeliveryConfigurationParams{}.ToSchema(cs, append(path, "log_delivery_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WrappedCreateLogDeliveryConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2573,7 +2678,7 @@ func (o *WrappedCreateLogDeliveryConfiguration) SetLogDeliveryConfiguration(ctx } type WrappedLogDeliveryConfiguration struct { - LogDeliveryConfiguration types.Object `tfsdk:"log_delivery_configuration" tf:"optional,object"` + LogDeliveryConfiguration types.Object `tfsdk:"log_delivery_configuration" tf:"object"` } func (newState *WrappedLogDeliveryConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedLogDeliveryConfiguration) { @@ -2582,6 +2687,12 @@ func (newState *WrappedLogDeliveryConfiguration) SyncEffectiveFieldsDuringCreate func (newState *WrappedLogDeliveryConfiguration) SyncEffectiveFieldsDuringRead(existingState WrappedLogDeliveryConfiguration) { } +func (c WrappedLogDeliveryConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LogDeliveryConfiguration{}.ToSchema(cs, append(path, "log_delivery_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WrappedLogDeliveryConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2644,7 +2755,7 @@ func (o *WrappedLogDeliveryConfiguration) SetLogDeliveryConfiguration(ctx contex } type WrappedLogDeliveryConfigurations struct { - LogDeliveryConfigurations types.List `tfsdk:"log_delivery_configurations" tf:"optional"` + LogDeliveryConfigurations types.List `tfsdk:"log_delivery_configurations" tf:""` } func (newState *WrappedLogDeliveryConfigurations) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedLogDeliveryConfigurations) { @@ -2653,6 +2764,12 @@ func (newState *WrappedLogDeliveryConfigurations) SyncEffectiveFieldsDuringCreat func (newState *WrappedLogDeliveryConfigurations) SyncEffectiveFieldsDuringRead(existingState WrappedLogDeliveryConfigurations) { } +func (c WrappedLogDeliveryConfigurations) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LogDeliveryConfiguration{}.ToSchema(cs, append(path, "log_delivery_configurations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WrappedLogDeliveryConfigurations. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/catalog_tf/legacy_model.go b/internal/service/catalog_tf/legacy_model.go index e9f275dfa..3f9e6b117 100755 --- a/internal/service/catalog_tf/legacy_model.go +++ b/internal/service/catalog_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -22,7 +23,7 @@ import ( ) type AccountsCreateMetastore_SdkV2 struct { - MetastoreInfo types.List `tfsdk:"metastore_info" tf:"optional,object"` + MetastoreInfo types.List `tfsdk:"metastore_info" tf:"object"` } func (newState *AccountsCreateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateMetastore_SdkV2) { @@ -31,6 +32,12 @@ func (newState *AccountsCreateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *AccountsCreateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastore_SdkV2) { } +func (c AccountsCreateMetastore_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateMetastore_SdkV2{}.ToSchema(cs, append(path, "metastore_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsCreateMetastore. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -93,7 +100,7 @@ func (o *AccountsCreateMetastore_SdkV2) SetMetastoreInfo(ctx context.Context, v } type AccountsCreateMetastoreAssignment_SdkV2 struct { - MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"optional,object"` + MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` // Workspace ID. @@ -106,6 +113,14 @@ func (newState *AccountsCreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuri func (newState *AccountsCreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastoreAssignment_SdkV2) { } +func (c AccountsCreateMetastoreAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateMetastoreAssignment_SdkV2{}.ToSchema(cs, append(path, "metastore_assignment")...) + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsCreateMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -172,7 +187,7 @@ func (o *AccountsCreateMetastoreAssignment_SdkV2) SetMetastoreAssignment(ctx con } type AccountsCreateStorageCredential_SdkV2 struct { - CredentialInfo types.List `tfsdk:"credential_info" tf:"optional,object"` + CredentialInfo types.List `tfsdk:"credential_info" tf:"object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` } @@ -183,6 +198,13 @@ func (newState *AccountsCreateStorageCredential_SdkV2) SyncEffectiveFieldsDuring func (newState *AccountsCreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsCreateStorageCredential_SdkV2) { } +func (c AccountsCreateStorageCredential_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateStorageCredential_SdkV2{}.ToSchema(cs, append(path, "credential_info")...) + cs.SetRequired(append(path, "metastore_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsCreateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -247,7 +269,7 @@ func (o *AccountsCreateStorageCredential_SdkV2) SetCredentialInfo(ctx context.Co } type AccountsMetastoreAssignment_SdkV2 struct { - MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"optional,object"` + MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"object"` } func (newState *AccountsMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsMetastoreAssignment_SdkV2) { @@ -256,6 +278,12 @@ func (newState *AccountsMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *AccountsMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsMetastoreAssignment_SdkV2) { } +func (c AccountsMetastoreAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MetastoreAssignment_SdkV2{}.ToSchema(cs, append(path, "metastore_assignment")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -318,7 +346,7 @@ func (o *AccountsMetastoreAssignment_SdkV2) SetMetastoreAssignment(ctx context.C } type AccountsMetastoreInfo_SdkV2 struct { - MetastoreInfo types.List `tfsdk:"metastore_info" tf:"optional,object"` + MetastoreInfo types.List `tfsdk:"metastore_info" tf:"object"` } func (newState *AccountsMetastoreInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsMetastoreInfo_SdkV2) { @@ -327,6 +355,12 @@ func (newState *AccountsMetastoreInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *AccountsMetastoreInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsMetastoreInfo_SdkV2) { } +func (c AccountsMetastoreInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MetastoreInfo_SdkV2{}.ToSchema(cs, append(path, "metastore_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsMetastoreInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -389,7 +423,7 @@ func (o *AccountsMetastoreInfo_SdkV2) SetMetastoreInfo(ctx context.Context, v Me } type AccountsStorageCredentialInfo_SdkV2 struct { - CredentialInfo types.List `tfsdk:"credential_info" tf:"optional,object"` + CredentialInfo types.List `tfsdk:"credential_info" tf:"object"` } func (newState *AccountsStorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsStorageCredentialInfo_SdkV2) { @@ -398,6 +432,12 @@ func (newState *AccountsStorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringCr func (newState *AccountsStorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsStorageCredentialInfo_SdkV2) { } +func (c AccountsStorageCredentialInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StorageCredentialInfo_SdkV2{}.ToSchema(cs, append(path, "credential_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsStorageCredentialInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -463,7 +503,7 @@ type AccountsUpdateMetastore_SdkV2 struct { // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` - MetastoreInfo types.List `tfsdk:"metastore_info" tf:"optional,object"` + MetastoreInfo types.List `tfsdk:"metastore_info" tf:"object"` } func (newState *AccountsUpdateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateMetastore_SdkV2) { @@ -472,6 +512,13 @@ func (newState *AccountsUpdateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *AccountsUpdateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastore_SdkV2) { } +func (c AccountsUpdateMetastore_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "metastore_id")...) + UpdateMetastore_SdkV2{}.ToSchema(cs, append(path, "metastore_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsUpdateMetastore. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -536,7 +583,7 @@ func (o *AccountsUpdateMetastore_SdkV2) SetMetastoreInfo(ctx context.Context, v } type AccountsUpdateMetastoreAssignment_SdkV2 struct { - MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"optional,object"` + MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` // Workspace ID. @@ -549,6 +596,14 @@ func (newState *AccountsUpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuri func (newState *AccountsUpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastoreAssignment_SdkV2) { } +func (c AccountsUpdateMetastoreAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateMetastoreAssignment_SdkV2{}.ToSchema(cs, append(path, "metastore_assignment")...) + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsUpdateMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -615,7 +670,7 @@ func (o *AccountsUpdateMetastoreAssignment_SdkV2) SetMetastoreAssignment(ctx con } type AccountsUpdateStorageCredential_SdkV2 struct { - CredentialInfo types.List `tfsdk:"credential_info" tf:"optional,object"` + CredentialInfo types.List `tfsdk:"credential_info" tf:"object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` // Name of the storage credential. @@ -628,6 +683,14 @@ func (newState *AccountsUpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuring func (newState *AccountsUpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateStorageCredential_SdkV2) { } +func (c AccountsUpdateStorageCredential_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateStorageCredential_SdkV2{}.ToSchema(cs, append(path, "credential_info")...) + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "storage_credential_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsUpdateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -695,13 +758,13 @@ func (o *AccountsUpdateStorageCredential_SdkV2) SetCredentialInfo(ctx context.Co type ArtifactAllowlistInfo_SdkV2 struct { // A list of allowed artifact match patterns. - ArtifactMatchers types.List `tfsdk:"artifact_matchers" tf:"optional"` + ArtifactMatchers types.List `tfsdk:"artifact_matchers" tf:""` // Time at which this artifact allowlist was set, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of the user who set the artifact allowlist. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` } func (newState *ArtifactAllowlistInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ArtifactAllowlistInfo_SdkV2) { @@ -710,6 +773,12 @@ func (newState *ArtifactAllowlistInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ArtifactAllowlistInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ArtifactAllowlistInfo_SdkV2) { } +func (c ArtifactAllowlistInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ArtifactMatcher_SdkV2{}.ToSchema(cs, append(path, "artifact_matchers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ArtifactAllowlistInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -790,6 +859,13 @@ func (newState *ArtifactMatcher_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ArtifactMatcher_SdkV2) SyncEffectiveFieldsDuringRead(existingState ArtifactMatcher_SdkV2) { } +func (c ArtifactMatcher_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "artifact")...) + cs.SetRequired(append(path, "match_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ArtifactMatcher. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -826,12 +902,6 @@ func (o ArtifactMatcher_SdkV2) Type(ctx context.Context) attr.Type { type AssignResponse_SdkV2 struct { } -func (newState *AssignResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AssignResponse_SdkV2) { -} - -func (newState *AssignResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AssignResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in AssignResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -863,15 +933,15 @@ func (o AssignResponse_SdkV2) Type(ctx context.Context) attr.Type { // https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. type AwsCredentials_SdkV2 struct { // The access key ID that identifies the temporary credentials. - AccessKeyId types.String `tfsdk:"access_key_id" tf:"optional"` + AccessKeyId types.String `tfsdk:"access_key_id" tf:""` // The Amazon Resource Name (ARN) of the S3 access point for temporary // credentials related the external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // The secret access key that can be used to sign AWS API requests. - SecretAccessKey types.String `tfsdk:"secret_access_key" tf:"optional"` + SecretAccessKey types.String `tfsdk:"secret_access_key" tf:""` // The token that users must pass to AWS API to use the temporary // credentials. - SessionToken types.String `tfsdk:"session_token" tf:"optional"` + SessionToken types.String `tfsdk:"session_token" tf:""` } func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsCredentials_SdkV2) { @@ -880,6 +950,11 @@ func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsCredentials_SdkV2) { } +func (c AwsCredentials_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsCredentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -921,13 +996,13 @@ func (o AwsCredentials_SdkV2) Type(ctx context.Context) attr.Type { type AwsIamRole_SdkV2 struct { // The external ID used in role assumption to prevent the confused deputy // problem. - ExternalId types.String `tfsdk:"external_id" tf:"computed"` + ExternalId types.String `tfsdk:"external_id" tf:""` // The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary // credentials. - RoleArn types.String `tfsdk:"role_arn" tf:"optional"` + RoleArn types.String `tfsdk:"role_arn" tf:""` // The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks. // This is the identity that is going to assume the AWS IAM role. - UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:"computed"` + UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:""` } func (newState *AwsIamRole_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsIamRole_SdkV2) { @@ -936,6 +1011,13 @@ func (newState *AwsIamRole_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan A func (newState *AwsIamRole_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsIamRole_SdkV2) { } +func (c AwsIamRole_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "external_id")...) + cs.SetComputed(append(path, "unity_catalog_iam_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsIamRole. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -982,6 +1064,12 @@ func (newState *AwsIamRoleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *AwsIamRoleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsIamRoleRequest_SdkV2) { } +func (c AwsIamRoleRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "role_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsIamRoleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1016,12 +1104,12 @@ func (o AwsIamRoleRequest_SdkV2) Type(ctx context.Context) attr.Type { type AwsIamRoleResponse_SdkV2 struct { // The external ID used in role assumption to prevent confused deputy // problem.. - ExternalId types.String `tfsdk:"external_id" tf:"optional"` + ExternalId types.String `tfsdk:"external_id" tf:""` // The Amazon Resource Name (ARN) of the AWS IAM role for S3 data access. RoleArn types.String `tfsdk:"role_arn" tf:""` // The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks. // This is the identity that is going to assume the AWS IAM role. - UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:"optional"` + UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:""` } func (newState *AwsIamRoleResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsIamRoleResponse_SdkV2) { @@ -1030,6 +1118,12 @@ func (newState *AwsIamRoleResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *AwsIamRoleResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsIamRoleResponse_SdkV2) { } +func (c AwsIamRoleResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "role_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsIamRoleResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1071,7 +1165,7 @@ func (o AwsIamRoleResponse_SdkV2) Type(ctx context.Context) attr.Type { type AzureActiveDirectoryToken_SdkV2 struct { // Opaque token that contains claims that you can use in Azure Active // Directory to access cloud services. - AadToken types.String `tfsdk:"aad_token" tf:"optional"` + AadToken types.String `tfsdk:"aad_token" tf:""` } func (newState *AzureActiveDirectoryToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureActiveDirectoryToken_SdkV2) { @@ -1080,6 +1174,11 @@ func (newState *AzureActiveDirectoryToken_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *AzureActiveDirectoryToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureActiveDirectoryToken_SdkV2) { } +func (c AzureActiveDirectoryToken_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureActiveDirectoryToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1121,14 +1220,14 @@ type AzureManagedIdentity_SdkV2 struct { // field is only used to persist the credential_id once it is fetched from // the credentials manager - as we only use the protobuf serializer to store // credentials, this ID gets persisted to the database. . - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // The Azure resource ID of the managed identity. Use the format, // `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}` // This is only available for user-assgined identities. For system-assigned // identities, the access_connector_id is used to identify the identity. If // this field is not provided, then we assume the AzureManagedIdentity is // using the system-assigned identity. - ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:"optional"` + ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:""` } func (newState *AzureManagedIdentity_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureManagedIdentity_SdkV2) { @@ -1137,6 +1236,12 @@ func (newState *AzureManagedIdentity_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *AzureManagedIdentity_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureManagedIdentity_SdkV2) { } +func (c AzureManagedIdentity_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_connector_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureManagedIdentity. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1183,7 +1288,7 @@ type AzureManagedIdentityRequest_SdkV2 struct { // identities, the access_connector_id is used to identify the identity. If // this field is not provided, then we assume the AzureManagedIdentity is // for a system-assigned identity. - ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:"optional"` + ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:""` } func (newState *AzureManagedIdentityRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureManagedIdentityRequest_SdkV2) { @@ -1192,6 +1297,12 @@ func (newState *AzureManagedIdentityRequest_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *AzureManagedIdentityRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureManagedIdentityRequest_SdkV2) { } +func (c AzureManagedIdentityRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_connector_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureManagedIdentityRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1231,14 +1342,14 @@ type AzureManagedIdentityResponse_SdkV2 struct { // /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}. AccessConnectorId types.String `tfsdk:"access_connector_id" tf:""` // The Databricks internal ID that represents this managed identity. - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // The Azure resource ID of the managed identity. Use the format // /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}. // This is only available for user-assgined identities. For system-assigned // identities, the access_connector_id is used to identify the identity. If // this field is not provided, then we assume the AzureManagedIdentity is // for a system-assigned identity. - ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:"optional"` + ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:""` } func (newState *AzureManagedIdentityResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureManagedIdentityResponse_SdkV2) { @@ -1247,6 +1358,12 @@ func (newState *AzureManagedIdentityResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *AzureManagedIdentityResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureManagedIdentityResponse_SdkV2) { } +func (c AzureManagedIdentityResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_connector_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureManagedIdentityResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1301,6 +1418,14 @@ func (newState *AzureServicePrincipal_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *AzureServicePrincipal_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureServicePrincipal_SdkV2) { } +func (c AzureServicePrincipal_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "application_id")...) + cs.SetRequired(append(path, "client_secret")...) + cs.SetRequired(append(path, "directory_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureServicePrincipal. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1340,7 +1465,7 @@ func (o AzureServicePrincipal_SdkV2) Type(ctx context.Context) attr.Type { // https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas type AzureUserDelegationSas_SdkV2 struct { // The signed URI (SAS Token) used to access blob services for a given path - SasToken types.String `tfsdk:"sas_token" tf:"optional"` + SasToken types.String `tfsdk:"sas_token" tf:""` } func (newState *AzureUserDelegationSas_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureUserDelegationSas_SdkV2) { @@ -1349,6 +1474,11 @@ func (newState *AzureUserDelegationSas_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *AzureUserDelegationSas_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureUserDelegationSas_SdkV2) { } +func (c AzureUserDelegationSas_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureUserDelegationSas. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1388,12 +1518,6 @@ type CancelRefreshRequest_SdkV2 struct { TableName types.String `tfsdk:"-"` } -func (newState *CancelRefreshRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRefreshRequest_SdkV2) { -} - -func (newState *CancelRefreshRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelRefreshRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRefreshRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1430,12 +1554,6 @@ func (o CancelRefreshRequest_SdkV2) Type(ctx context.Context) attr.Type { type CancelRefreshResponse_SdkV2 struct { } -func (newState *CancelRefreshResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRefreshResponse_SdkV2) { -} - -func (newState *CancelRefreshResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelRefreshResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRefreshResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1467,58 +1585,58 @@ type CatalogInfo_SdkV2 struct { // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // The type of the catalog. - CatalogType types.String `tfsdk:"catalog_type" tf:"optional"` + CatalogType types.String `tfsdk:"catalog_type" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the connection to an external data source. - ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + ConnectionName types.String `tfsdk:"connection_name" tf:""` // Time at which this catalog was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of catalog creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"object"` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // The full name of the catalog. Corresponds with the name field. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Whether the current securable is accessible from all workspaces or a // specific set of workspaces. - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of catalog. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // A map of key-value properties attached to the securable. - Options types.Map `tfsdk:"options" tf:"optional"` + Options types.Map `tfsdk:"options" tf:""` // Username of current owner of catalog. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // The name of delta sharing provider. // // A Delta Sharing catalog is a catalog that is based on a Delta share on a // remote sharing server. - ProviderName types.String `tfsdk:"provider_name" tf:"optional"` + ProviderName types.String `tfsdk:"provider_name" tf:""` // Status of an asynchronously provisioned resource. - ProvisioningInfo types.List `tfsdk:"provisioning_info" tf:"optional,object"` + ProvisioningInfo types.List `tfsdk:"provisioning_info" tf:"object"` // Kind of catalog securable. - SecurableKind types.String `tfsdk:"securable_kind" tf:"optional"` + SecurableKind types.String `tfsdk:"securable_kind" tf:""` - SecurableType types.String `tfsdk:"securable_type" tf:"optional"` + SecurableType types.String `tfsdk:"securable_type" tf:""` // The name of the share under the share provider. - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` // Storage Location URL (full path) for managed tables within catalog. - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // Storage root URL for managed tables within catalog. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // Time at which this catalog was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified catalog. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *CatalogInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CatalogInfo_SdkV2) { @@ -1527,6 +1645,13 @@ func (newState *CatalogInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CatalogInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CatalogInfo_SdkV2) { } +func (c CatalogInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EffectivePredictiveOptimizationFlag_SdkV2{}.ToSchema(cs, append(path, "effective_predictive_optimization_flag")...) + ProvisioningInfo_SdkV2{}.ToSchema(cs, append(path, "provisioning_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CatalogInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1736,6 +1861,14 @@ func (newState *CloudflareApiToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CloudflareApiToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloudflareApiToken_SdkV2) { } +func (c CloudflareApiToken_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_key_id")...) + cs.SetRequired(append(path, "account_id")...) + cs.SetRequired(append(path, "secret_access_key")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloudflareApiToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1773,29 +1906,29 @@ func (o CloudflareApiToken_SdkV2) Type(ctx context.Context) attr.Type { type ColumnInfo_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - Mask types.List `tfsdk:"mask" tf:"optional,object"` + Mask types.List `tfsdk:"mask" tf:"object"` // Name of Column. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether field may be Null (default: true). - Nullable types.Bool `tfsdk:"nullable" tf:"optional"` + Nullable types.Bool `tfsdk:"nullable" tf:""` // Partition index for column. - PartitionIndex types.Int64 `tfsdk:"partition_index" tf:"optional"` + PartitionIndex types.Int64 `tfsdk:"partition_index" tf:""` // Ordinal position of column (starting at position 0). - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // Format of IntervalType. - TypeIntervalType types.String `tfsdk:"type_interval_type" tf:"optional"` + TypeIntervalType types.String `tfsdk:"type_interval_type" tf:""` // Full data type specification, JSON-serialized. - TypeJson types.String `tfsdk:"type_json" tf:"optional"` + TypeJson types.String `tfsdk:"type_json" tf:""` - TypeName types.String `tfsdk:"type_name" tf:"optional"` + TypeName types.String `tfsdk:"type_name" tf:""` // Digits of precision; required for DecimalTypes. - TypePrecision types.Int64 `tfsdk:"type_precision" tf:"optional"` + TypePrecision types.Int64 `tfsdk:"type_precision" tf:""` // Digits to right of decimal; Required for DecimalTypes. - TypeScale types.Int64 `tfsdk:"type_scale" tf:"optional"` + TypeScale types.Int64 `tfsdk:"type_scale" tf:""` // Full data type specification as SQL/catalogString text. - TypeText types.String `tfsdk:"type_text" tf:"optional"` + TypeText types.String `tfsdk:"type_text" tf:""` } func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnInfo_SdkV2) { @@ -1804,6 +1937,12 @@ func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ColumnInfo_SdkV2) { } +func (c ColumnInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ColumnMask_SdkV2{}.ToSchema(cs, append(path, "mask")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1889,12 +2028,12 @@ func (o *ColumnInfo_SdkV2) SetMask(ctx context.Context, v ColumnMask_SdkV2) { type ColumnMask_SdkV2 struct { // The full name of the column mask SQL UDF. - FunctionName types.String `tfsdk:"function_name" tf:"optional"` + FunctionName types.String `tfsdk:"function_name" tf:""` // The list of additional table columns to be passed as input to the column // mask function. The first arg of the mask function should be of the type // of the column being masked and the types of the rest of the args should // match the types of columns in 'using_column_names'. - UsingColumnNames types.List `tfsdk:"using_column_names" tf:"optional"` + UsingColumnNames types.List `tfsdk:"using_column_names" tf:""` } func (newState *ColumnMask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnMask_SdkV2) { @@ -1903,6 +2042,11 @@ func (newState *ColumnMask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *ColumnMask_SdkV2) SyncEffectiveFieldsDuringRead(existingState ColumnMask_SdkV2) { } +func (c ColumnMask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnMask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1968,44 +2112,44 @@ func (o *ColumnMask_SdkV2) SetUsingColumnNames(ctx context.Context, v []types.St type ConnectionInfo_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Unique identifier of the Connection. - ConnectionId types.String `tfsdk:"connection_id" tf:"optional"` + ConnectionId types.String `tfsdk:"connection_id" tf:""` // The type of connection. - ConnectionType types.String `tfsdk:"connection_type" tf:"optional"` + ConnectionType types.String `tfsdk:"connection_type" tf:""` // Time at which this connection was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of connection creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The type of credential. - CredentialType types.String `tfsdk:"credential_type" tf:"optional"` + CredentialType types.String `tfsdk:"credential_type" tf:""` // Full name of connection. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of the connection. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // A map of key-value properties attached to the securable. - Options types.Map `tfsdk:"options" tf:"optional"` + Options types.Map `tfsdk:"options" tf:""` // Username of current owner of the connection. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // An object containing map of key-value properties attached to the // connection. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // Status of an asynchronously provisioned resource. - ProvisioningInfo types.List `tfsdk:"provisioning_info" tf:"optional,object"` + ProvisioningInfo types.List `tfsdk:"provisioning_info" tf:"object"` // If the connection is read only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Kind of connection securable. - SecurableKind types.String `tfsdk:"securable_kind" tf:"optional"` + SecurableKind types.String `tfsdk:"securable_kind" tf:""` - SecurableType types.String `tfsdk:"securable_type" tf:"optional"` + SecurableType types.String `tfsdk:"securable_type" tf:""` // Time at which this connection was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified connection. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // URL of the remote data source, extracted from options. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *ConnectionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ConnectionInfo_SdkV2) { @@ -2014,6 +2158,12 @@ func (newState *ConnectionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ConnectionInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ConnectionInfo_SdkV2) { } +func (c ConnectionInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProvisioningInfo_SdkV2{}.ToSchema(cs, append(path, "provisioning_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ConnectionInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2173,14 +2323,14 @@ func (o *ConnectionInfo_SdkV2) SetProvisioningInfo(ctx context.Context, v Provis // ONLINE_CONTINUOUS_UPDATE or the ONLINE_UPDATING_PIPELINE_RESOURCES state. type ContinuousUpdateStatus_SdkV2 struct { // Progress of the initial data synchronization. - InitialPipelineSyncProgress types.List `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` + InitialPipelineSyncProgress types.List `tfsdk:"initial_pipeline_sync_progress" tf:"object"` // The last source table Delta version that was synced to the online table. // Note that this Delta version may not be completely synced to the online // table yet. - LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:"optional"` + LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:""` // The timestamp of the last time any data was synchronized from the source // table to the online table. - Timestamp types.String `tfsdk:"timestamp" tf:"optional"` + Timestamp types.String `tfsdk:"timestamp" tf:""` } func (newState *ContinuousUpdateStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContinuousUpdateStatus_SdkV2) { @@ -2189,6 +2339,12 @@ func (newState *ContinuousUpdateStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *ContinuousUpdateStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ContinuousUpdateStatus_SdkV2) { } +func (c ContinuousUpdateStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineProgress_SdkV2{}.ToSchema(cs, append(path, "initial_pipeline_sync_progress")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ContinuousUpdateStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2256,24 +2412,24 @@ func (o *ContinuousUpdateStatus_SdkV2) SetInitialPipelineSyncProgress(ctx contex type CreateCatalog_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the connection to an external data source. - ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + ConnectionName types.String `tfsdk:"connection_name" tf:""` // Name of catalog. Name types.String `tfsdk:"name" tf:""` // A map of key-value properties attached to the securable. - Options types.Map `tfsdk:"options" tf:"optional"` + Options types.Map `tfsdk:"options" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // The name of delta sharing provider. // // A Delta Sharing catalog is a catalog that is based on a Delta share on a // remote sharing server. - ProviderName types.String `tfsdk:"provider_name" tf:"optional"` + ProviderName types.String `tfsdk:"provider_name" tf:""` // The name of the share under the share provider. - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` // Storage root URL for managed tables within catalog. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` } func (newState *CreateCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCatalog_SdkV2) { @@ -2282,6 +2438,12 @@ func (newState *CreateCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CreateCatalog_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCatalog_SdkV2) { } +func (c CreateCatalog_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCatalog. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2388,7 +2550,7 @@ func (o *CreateCatalog_SdkV2) SetProperties(ctx context.Context, v map[string]ty type CreateConnection_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The type of connection. ConnectionType types.String `tfsdk:"connection_type" tf:""` // Name of the connection. @@ -2397,9 +2559,9 @@ type CreateConnection_SdkV2 struct { Options types.Map `tfsdk:"options" tf:""` // An object containing map of key-value properties attached to the // connection. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // If the connection is read only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` } func (newState *CreateConnection_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateConnection_SdkV2) { @@ -2408,6 +2570,14 @@ func (newState *CreateConnection_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateConnection_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateConnection_SdkV2) { } +func (c CreateConnection_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "connection_type")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateConnection. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2510,28 +2680,28 @@ func (o *CreateConnection_SdkV2) SetProperties(ctx context.Context, v map[string type CreateCredentialRequest_SdkV2 struct { // The AWS IAM role configuration - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. Only applicable when purpose // is **STORAGE**. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // GCP long-lived credential. Databricks-created Google Cloud Storage // service account. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"object"` // The credential name. The name must be unique among storage and service // credentials within the metastore. Name types.String `tfsdk:"name" tf:""` // Indicates the purpose of the credential. - Purpose types.String `tfsdk:"purpose" tf:"optional"` + Purpose types.String `tfsdk:"purpose" tf:""` // Whether the credential is usable only for read operations. Only // applicable when purpose is **STORAGE**. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Optional. Supplying true to this argument skips validation of the created // set of credentials. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialRequest_SdkV2) { @@ -2540,6 +2710,16 @@ func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest_SdkV2) { } +func (c CreateCredentialRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRole_SdkV2{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentity_SdkV2{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal_SdkV2{}.ToSchema(cs, append(path, "azure_service_principal")...) + DatabricksGcpServiceAccount_SdkV2{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2706,24 +2886,24 @@ func (o *CreateCredentialRequest_SdkV2) SetDatabricksGcpServiceAccount(ctx conte type CreateExternalLocation_SdkV2 struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"object"` // Indicates whether fallback mode is enabled for this external location. // When fallback mode is enabled, the access to the location falls back to // cluster credentials if UC credentials are not sufficient. - Fallback types.Bool `tfsdk:"fallback" tf:"optional"` + Fallback types.Bool `tfsdk:"fallback" tf:""` // Name of the external location. Name types.String `tfsdk:"name" tf:""` // Indicates whether the external location is read-only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Skips validation of the storage credential associated with the external // location. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` // Path URL of the external location. Url types.String `tfsdk:"url" tf:""` } @@ -2734,6 +2914,15 @@ func (newState *CreateExternalLocation_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CreateExternalLocation_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExternalLocation_SdkV2) { } +func (c CreateExternalLocation_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_name")...) + EncryptionDetails_SdkV2{}.ToSchema(cs, append(path, "encryption_details")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExternalLocation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2815,13 +3004,13 @@ type CreateFunction_SdkV2 struct { // Name of parent catalog. CatalogName types.String `tfsdk:"catalog_name" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Scalar function return data type. DataType types.String `tfsdk:"data_type" tf:""` // External function language. - ExternalLanguage types.String `tfsdk:"external_language" tf:"optional"` + ExternalLanguage types.String `tfsdk:"external_language" tf:""` // External function name. - ExternalName types.String `tfsdk:"external_name" tf:"optional"` + ExternalName types.String `tfsdk:"external_name" tf:""` // Pretty printed function data type. FullDataType types.String `tfsdk:"full_data_type" tf:""` @@ -2835,9 +3024,9 @@ type CreateFunction_SdkV2 struct { // Function parameter style. **S** is the value for SQL. ParameterStyle types.String `tfsdk:"parameter_style" tf:""` // JSON-serialized key-value pair map, encoded (escaped) as a string. - Properties types.String `tfsdk:"properties" tf:"optional"` + Properties types.String `tfsdk:"properties" tf:""` // Table function return parameters. - ReturnParams types.List `tfsdk:"return_params" tf:"optional,object"` + ReturnParams types.List `tfsdk:"return_params" tf:"object"` // Function language. When **EXTERNAL** is used, the language of the routine // function should be specified in the __external_language__ field, and the // __return_params__ of the function cannot be used (as **TABLE** return @@ -2847,7 +3036,7 @@ type CreateFunction_SdkV2 struct { // Function body. RoutineDefinition types.String `tfsdk:"routine_definition" tf:""` // Function dependencies. - RoutineDependencies types.List `tfsdk:"routine_dependencies" tf:"optional,object"` + RoutineDependencies types.List `tfsdk:"routine_dependencies" tf:"object"` // Name of parent schema relative to its parent catalog. SchemaName types.String `tfsdk:"schema_name" tf:""` // Function security type. @@ -2857,7 +3046,7 @@ type CreateFunction_SdkV2 struct { // Function SQL data access. SqlDataAccess types.String `tfsdk:"sql_data_access" tf:""` // List of schemes whose objects can be referenced without qualification. - SqlPath types.String `tfsdk:"sql_path" tf:"optional"` + SqlPath types.String `tfsdk:"sql_path" tf:""` } func (newState *CreateFunction_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFunction_SdkV2) { @@ -2866,6 +3055,28 @@ func (newState *CreateFunction_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CreateFunction_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFunction_SdkV2) { } +func (c CreateFunction_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "catalog_name")...) + cs.SetRequired(append(path, "data_type")...) + cs.SetRequired(append(path, "full_data_type")...) + cs.SetRequired(append(path, "input_params")...) + FunctionParameterInfos_SdkV2{}.ToSchema(cs, append(path, "input_params")...) + cs.SetRequired(append(path, "is_deterministic")...) + cs.SetRequired(append(path, "is_null_call")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "parameter_style")...) + FunctionParameterInfos_SdkV2{}.ToSchema(cs, append(path, "return_params")...) + cs.SetRequired(append(path, "routine_body")...) + cs.SetRequired(append(path, "routine_definition")...) + DependencyList_SdkV2{}.ToSchema(cs, append(path, "routine_dependencies")...) + cs.SetRequired(append(path, "schema_name")...) + cs.SetRequired(append(path, "security_type")...) + cs.SetRequired(append(path, "specific_name")...) + cs.SetRequired(append(path, "sql_data_access")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFunction. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3036,6 +3247,13 @@ func (newState *CreateFunctionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateFunctionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFunctionRequest_SdkV2) { } +func (c CreateFunctionRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "function_info")...) + CreateFunction_SdkV2{}.ToSchema(cs, append(path, "function_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFunctionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3104,9 +3322,9 @@ type CreateMetastore_SdkV2 struct { // The field can be omitted in the __workspace-level__ __API__ but not in // the __account-level__ __API__. If this field is omitted, the region of // the workspace receiving the request will be used. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The storage root URL for metastore - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` } func (newState *CreateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateMetastore_SdkV2) { @@ -3115,6 +3333,12 @@ func (newState *CreateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateMetastore_SdkV2) { } +func (c CreateMetastore_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateMetastore. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3167,6 +3391,14 @@ func (newState *CreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *CreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateMetastoreAssignment_SdkV2) { } +func (c CreateMetastoreAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "default_catalog_name")...) + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3208,39 +3440,39 @@ type CreateMonitor_SdkV2 struct { // Name of the baseline table from which drift metrics are computed from. // Columns in the monitored table should also be present in the baseline // table. - BaselineTableName types.String `tfsdk:"baseline_table_name" tf:"optional"` + BaselineTableName types.String `tfsdk:"baseline_table_name" tf:""` // Custom metrics to compute on the monitored table. These can be aggregate // metrics, derived metrics (from already computed aggregate metrics), or // drift metrics (comparing metrics across time windows). - CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` + CustomMetrics types.List `tfsdk:"custom_metrics" tf:""` // The data classification config for the monitor. - DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"optional,object"` + DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"object"` // Configuration for monitoring inference logs. - InferenceLog types.List `tfsdk:"inference_log" tf:"optional,object"` + InferenceLog types.List `tfsdk:"inference_log" tf:"object"` // The notification settings for the monitor. - Notifications types.List `tfsdk:"notifications" tf:"optional,object"` + Notifications types.List `tfsdk:"notifications" tf:"object"` // Schema where output metric tables are created. OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // The schedule for automatically updating and refreshing metric tables. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.List `tfsdk:"schedule" tf:"object"` // Whether to skip creating a default dashboard summarizing data quality // metrics. - SkipBuiltinDashboard types.Bool `tfsdk:"skip_builtin_dashboard" tf:"optional"` + SkipBuiltinDashboard types.Bool `tfsdk:"skip_builtin_dashboard" tf:""` // List of column expressions to slice data with for targeted analysis. The // data is grouped by each expression independently, resulting in a separate // slice for each predicate and its complements. For high-cardinality // columns, only the top 100 unique values by frequency will generate // slices. - SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` + SlicingExprs types.List `tfsdk:"slicing_exprs" tf:""` // Configuration for monitoring snapshot tables. - Snapshot types.List `tfsdk:"snapshot" tf:"optional,object"` + Snapshot types.List `tfsdk:"snapshot" tf:"object"` // Full name of the table. TableName types.String `tfsdk:"-"` // Configuration for monitoring time series tables. - TimeSeries types.List `tfsdk:"time_series" tf:"optional,object"` + TimeSeries types.List `tfsdk:"time_series" tf:"object"` // Optional argument to specify the warehouse for dashboard creation. If not // specified, the first running warehouse will be used. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *CreateMonitor_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateMonitor_SdkV2) { @@ -3249,6 +3481,21 @@ func (newState *CreateMonitor_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CreateMonitor_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateMonitor_SdkV2) { } +func (c CreateMonitor_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "assets_dir")...) + MonitorMetric_SdkV2{}.ToSchema(cs, append(path, "custom_metrics")...) + MonitorDataClassificationConfig_SdkV2{}.ToSchema(cs, append(path, "data_classification_config")...) + MonitorInferenceLog_SdkV2{}.ToSchema(cs, append(path, "inference_log")...) + MonitorNotifications_SdkV2{}.ToSchema(cs, append(path, "notifications")...) + cs.SetRequired(append(path, "output_schema_name")...) + MonitorCronSchedule_SdkV2{}.ToSchema(cs, append(path, "schedule")...) + MonitorSnapshot_SdkV2{}.ToSchema(cs, append(path, "snapshot")...) + cs.SetRequired(append(path, "table_name")...) + MonitorTimeSeries_SdkV2{}.ToSchema(cs, append(path, "time_series")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateMonitor. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3542,13 +3789,7 @@ func (o *CreateMonitor_SdkV2) SetTimeSeries(ctx context.Context, v MonitorTimeSe // Create an Online Table type CreateOnlineTableRequest_SdkV2 struct { // Online Table information. - Table types.List `tfsdk:"table" tf:"optional,object"` -} - -func (newState *CreateOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOnlineTableRequest_SdkV2) { -} - -func (newState *CreateOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateOnlineTableRequest_SdkV2) { + Table types.List `tfsdk:"table" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateOnlineTableRequest. @@ -3616,14 +3857,14 @@ type CreateRegisteredModelRequest_SdkV2 struct { // The name of the catalog where the schema and the registered model reside CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the registered model - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the registered model Name types.String `tfsdk:"name" tf:""` // The name of the schema where the registered model resides SchemaName types.String `tfsdk:"schema_name" tf:""` // The storage location on the cloud under which model version data files // are stored - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` } func (newState *CreateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegisteredModelRequest_SdkV2) { @@ -3632,6 +3873,14 @@ func (newState *CreateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCre func (newState *CreateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRegisteredModelRequest_SdkV2) { } +func (c CreateRegisteredModelRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "catalog_name")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "schema_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRegisteredModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3674,12 +3923,6 @@ func (o CreateRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type type CreateResponse_SdkV2 struct { } -func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse_SdkV2) { -} - -func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3711,13 +3954,13 @@ type CreateSchema_SdkV2 struct { // Name of parent catalog. CatalogName types.String `tfsdk:"catalog_name" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of schema, relative to parent catalog. Name types.String `tfsdk:"name" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // Storage root URL for managed tables within schema. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` } func (newState *CreateSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateSchema_SdkV2) { @@ -3726,6 +3969,13 @@ func (newState *CreateSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateSchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateSchema_SdkV2) { } +func (c CreateSchema_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "catalog_name")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateSchema. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3797,24 +4047,24 @@ func (o *CreateSchema_SdkV2) SetProperties(ctx context.Context, v map[string]typ type CreateStorageCredential_SdkV2 struct { // The AWS IAM role configuration. - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"object"` // The Cloudflare API token configuration. - CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The Databricks managed GCP service account configuration. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"object"` // The credential name. The name must be unique within the metastore. Name types.String `tfsdk:"name" tf:""` // Whether the storage credential is only usable for read operations. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Supplying true to this argument skips validation of the created // credential. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *CreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateStorageCredential_SdkV2) { @@ -3823,6 +4073,17 @@ func (newState *CreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *CreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateStorageCredential_SdkV2) { } +func (c CreateStorageCredential_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRoleRequest_SdkV2{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentityRequest_SdkV2{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal_SdkV2{}.ToSchema(cs, append(path, "azure_service_principal")...) + CloudflareApiToken_SdkV2{}.ToSchema(cs, append(path, "cloudflare_api_token")...) + DatabricksGcpServiceAccountRequest_SdkV2{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4031,6 +4292,14 @@ func (newState *CreateTableConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateTableConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTableConstraint_SdkV2) { } +func (c CreateTableConstraint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "constraint")...) + TableConstraint_SdkV2{}.ToSchema(cs, append(path, "constraint")...) + cs.SetRequired(append(path, "full_name_arg")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTableConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4098,13 +4367,13 @@ type CreateVolumeRequestContent_SdkV2 struct { // The name of the catalog where the schema and the volume are CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the volume - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the volume Name types.String `tfsdk:"name" tf:""` // The name of the schema where the volume is SchemaName types.String `tfsdk:"schema_name" tf:""` // The storage location on the cloud - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` VolumeType types.String `tfsdk:"volume_type" tf:""` } @@ -4115,6 +4384,15 @@ func (newState *CreateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *CreateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVolumeRequestContent_SdkV2) { } +func (c CreateVolumeRequestContent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "catalog_name")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "schema_name")...) + cs.SetRequired(append(path, "volume_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVolumeRequestContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4158,47 +4436,47 @@ func (o CreateVolumeRequestContent_SdkV2) Type(ctx context.Context) attr.Type { type CredentialInfo_SdkV2 struct { // The AWS IAM role configuration - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. Only applicable when purpose // is **STORAGE**. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this credential was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of credential creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // GCP long-lived credential. Databricks-created Google Cloud Storage // service account. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"object"` // The full name of the credential. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // The unique identifier of the credential. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Whether the current securable is accessible from all workspaces or a // specific set of workspaces. - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Unique identifier of the parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The credential name. The name must be unique among storage and service // credentials within the metastore. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of credential. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Indicates the purpose of the credential. - Purpose types.String `tfsdk:"purpose" tf:"optional"` + Purpose types.String `tfsdk:"purpose" tf:""` // Whether the credential is usable only for read operations. Only // applicable when purpose is **STORAGE**. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Time at which this credential was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the credential. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // Whether this credential is the current metastore's root storage // credential. Only applicable when purpose is **STORAGE**. - UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:"optional"` + UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:""` } func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialInfo_SdkV2) { @@ -4207,6 +4485,15 @@ func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CredentialInfo_SdkV2) { } +func (c CredentialInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRole_SdkV2{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentity_SdkV2{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal_SdkV2{}.ToSchema(cs, append(path, "azure_service_principal")...) + DatabricksGcpServiceAccount_SdkV2{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4391,9 +4678,9 @@ func (o *CredentialInfo_SdkV2) SetDatabricksGcpServiceAccount(ctx context.Contex type CredentialValidationResult_SdkV2 struct { // Error message would exist when the result does not equal to **PASS**. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // The results of the tested operation. - Result types.String `tfsdk:"result" tf:"optional"` + Result types.String `tfsdk:"result" tf:""` } func (newState *CredentialValidationResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialValidationResult_SdkV2) { @@ -4402,6 +4689,11 @@ func (newState *CredentialValidationResult_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *CredentialValidationResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState CredentialValidationResult_SdkV2) { } +func (c CredentialValidationResult_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialValidationResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4438,7 +4730,7 @@ func (o CredentialValidationResult_SdkV2) Type(ctx context.Context) attr.Type { // Currently assigned workspaces type CurrentWorkspaceBindings_SdkV2 struct { // A list of workspace IDs. - Workspaces types.List `tfsdk:"workspaces" tf:"optional"` + Workspaces types.List `tfsdk:"workspaces" tf:""` } func (newState *CurrentWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CurrentWorkspaceBindings_SdkV2) { @@ -4447,6 +4739,11 @@ func (newState *CurrentWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *CurrentWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringRead(existingState CurrentWorkspaceBindings_SdkV2) { } +func (c CurrentWorkspaceBindings_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CurrentWorkspaceBindings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4515,11 +4812,11 @@ type DatabricksGcpServiceAccount_SdkV2 struct { // field is only used to persist the credential_id once it is fetched from // the credentials manager - as we only use the protobuf serializer to store // credentials, this ID gets persisted to the database - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // The email of the service account. - Email types.String `tfsdk:"email" tf:"optional"` + Email types.String `tfsdk:"email" tf:""` // The ID that represents the private key for this Service Account - PrivateKeyId types.String `tfsdk:"private_key_id" tf:"optional"` + PrivateKeyId types.String `tfsdk:"private_key_id" tf:""` } func (newState *DatabricksGcpServiceAccount_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabricksGcpServiceAccount_SdkV2) { @@ -4528,6 +4825,11 @@ func (newState *DatabricksGcpServiceAccount_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *DatabricksGcpServiceAccount_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabricksGcpServiceAccount_SdkV2) { } +func (c DatabricksGcpServiceAccount_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksGcpServiceAccount. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4572,6 +4874,11 @@ func (newState *DatabricksGcpServiceAccountRequest_SdkV2) SyncEffectiveFieldsDur func (newState *DatabricksGcpServiceAccountRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabricksGcpServiceAccountRequest_SdkV2) { } +func (c DatabricksGcpServiceAccountRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksGcpServiceAccountRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4602,9 +4909,9 @@ func (o DatabricksGcpServiceAccountRequest_SdkV2) Type(ctx context.Context) attr type DatabricksGcpServiceAccountResponse_SdkV2 struct { // The Databricks internal ID that represents this service account. This is // an output-only field. - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // The email of the service account. This is an output-only field. - Email types.String `tfsdk:"email" tf:"optional"` + Email types.String `tfsdk:"email" tf:""` } func (newState *DatabricksGcpServiceAccountResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabricksGcpServiceAccountResponse_SdkV2) { @@ -4613,6 +4920,11 @@ func (newState *DatabricksGcpServiceAccountResponse_SdkV2) SyncEffectiveFieldsDu func (newState *DatabricksGcpServiceAccountResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabricksGcpServiceAccountResponse_SdkV2) { } +func (c DatabricksGcpServiceAccountResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksGcpServiceAccountResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4654,12 +4966,6 @@ type DeleteAccountMetastoreAssignmentRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *DeleteAccountMetastoreAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountMetastoreAssignmentRequest_SdkV2) { -} - -func (newState *DeleteAccountMetastoreAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountMetastoreAssignmentRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountMetastoreAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4701,12 +5007,6 @@ type DeleteAccountMetastoreRequest_SdkV2 struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *DeleteAccountMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountMetastoreRequest_SdkV2) { -} - -func (newState *DeleteAccountMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountMetastoreRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountMetastoreRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4751,12 +5051,6 @@ type DeleteAccountStorageCredentialRequest_SdkV2 struct { StorageCredentialName types.String `tfsdk:"-"` } -func (newState *DeleteAccountStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountStorageCredentialRequest_SdkV2) { -} - -func (newState *DeleteAccountStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountStorageCredentialRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountStorageCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4800,12 +5094,6 @@ type DeleteAliasRequest_SdkV2 struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteAliasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAliasRequest_SdkV2) { -} - -func (newState *DeleteAliasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAliasRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAliasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4842,12 +5130,6 @@ func (o DeleteAliasRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteAliasResponse_SdkV2 struct { } -func (newState *DeleteAliasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAliasResponse_SdkV2) { -} - -func (newState *DeleteAliasResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAliasResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAliasResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4883,12 +5165,6 @@ type DeleteCatalogRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteCatalogRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCatalogRequest_SdkV2) { -} - -func (newState *DeleteCatalogRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCatalogRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCatalogRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4928,12 +5204,6 @@ type DeleteConnectionRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteConnectionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteConnectionRequest_SdkV2) { -} - -func (newState *DeleteConnectionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteConnectionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteConnectionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4975,12 +5245,6 @@ type DeleteCredentialRequest_SdkV2 struct { NameArg types.String `tfsdk:"-"` } -func (newState *DeleteCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialRequest_SdkV2) { -} - -func (newState *DeleteCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5023,6 +5287,11 @@ func (newState *DeleteCredentialResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *DeleteCredentialResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialResponse_SdkV2) { } +func (c DeleteCredentialResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5058,12 +5327,6 @@ type DeleteExternalLocationRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteExternalLocationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExternalLocationRequest_SdkV2) { -} - -func (newState *DeleteExternalLocationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExternalLocationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExternalLocationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5106,12 +5369,6 @@ type DeleteFunctionRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteFunctionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFunctionRequest_SdkV2) { -} - -func (newState *DeleteFunctionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteFunctionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFunctionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5153,12 +5410,6 @@ type DeleteMetastoreRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteMetastoreRequest_SdkV2) { -} - -func (newState *DeleteMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteMetastoreRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteMetastoreRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5200,12 +5451,6 @@ type DeleteModelVersionRequest_SdkV2 struct { Version types.Int64 `tfsdk:"-"` } -func (newState *DeleteModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionRequest_SdkV2) { -} - -func (newState *DeleteModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5245,12 +5490,6 @@ type DeleteOnlineTableRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteOnlineTableRequest_SdkV2) { -} - -func (newState *DeleteOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteOnlineTableRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteOnlineTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5288,12 +5527,6 @@ type DeleteQualityMonitorRequest_SdkV2 struct { TableName types.String `tfsdk:"-"` } -func (newState *DeleteQualityMonitorRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteQualityMonitorRequest_SdkV2) { -} - -func (newState *DeleteQualityMonitorRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteQualityMonitorRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQualityMonitorRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5331,12 +5564,6 @@ type DeleteRegisteredModelRequest_SdkV2 struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRegisteredModelRequest_SdkV2) { -} - -func (newState *DeleteRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRegisteredModelRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRegisteredModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5371,12 +5598,6 @@ func (o DeleteRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5412,12 +5633,6 @@ type DeleteSchemaRequest_SdkV2 struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteSchemaRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSchemaRequest_SdkV2) { -} - -func (newState *DeleteSchemaRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSchemaRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSchemaRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5460,12 +5675,6 @@ type DeleteStorageCredentialRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteStorageCredentialRequest_SdkV2) { -} - -func (newState *DeleteStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteStorageCredentialRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteStorageCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5511,12 +5720,6 @@ type DeleteTableConstraintRequest_SdkV2 struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteTableConstraintRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTableConstraintRequest_SdkV2) { -} - -func (newState *DeleteTableConstraintRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTableConstraintRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTableConstraintRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5558,12 +5761,6 @@ type DeleteTableRequest_SdkV2 struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTableRequest_SdkV2) { -} - -func (newState *DeleteTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTableRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5601,12 +5798,6 @@ type DeleteVolumeRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteVolumeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteVolumeRequest_SdkV2) { -} - -func (newState *DeleteVolumeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteVolumeRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteVolumeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5652,6 +5843,12 @@ func (newState *DeltaRuntimePropertiesKvPairs_SdkV2) SyncEffectiveFieldsDuringCr func (newState *DeltaRuntimePropertiesKvPairs_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeltaRuntimePropertiesKvPairs_SdkV2) { } +func (c DeltaRuntimePropertiesKvPairs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "delta_runtime_properties")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaRuntimePropertiesKvPairs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5717,9 +5914,9 @@ func (o *DeltaRuntimePropertiesKvPairs_SdkV2) SetDeltaRuntimeProperties(ctx cont // field must be defined. type Dependency_SdkV2 struct { // A function that is dependent on a SQL object. - Function types.List `tfsdk:"function" tf:"optional,object"` + Function types.List `tfsdk:"function" tf:"object"` // A table that is dependent on a SQL object. - Table types.List `tfsdk:"table" tf:"optional,object"` + Table types.List `tfsdk:"table" tf:"object"` } func (newState *Dependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dependency_SdkV2) { @@ -5728,6 +5925,13 @@ func (newState *Dependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan D func (newState *Dependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState Dependency_SdkV2) { } +func (c Dependency_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FunctionDependency_SdkV2{}.ToSchema(cs, append(path, "function")...) + TableDependency_SdkV2{}.ToSchema(cs, append(path, "table")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Dependency. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5823,7 +6027,7 @@ func (o *Dependency_SdkV2) SetTable(ctx context.Context, v TableDependency_SdkV2 // A list of dependencies. type DependencyList_SdkV2 struct { // Array of dependencies. - Dependencies types.List `tfsdk:"dependencies" tf:"optional"` + Dependencies types.List `tfsdk:"dependencies" tf:""` } func (newState *DependencyList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DependencyList_SdkV2) { @@ -5832,6 +6036,12 @@ func (newState *DependencyList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DependencyList_SdkV2) SyncEffectiveFieldsDuringRead(existingState DependencyList_SdkV2) { } +func (c DependencyList_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Dependency_SdkV2{}.ToSchema(cs, append(path, "dependencies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DependencyList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5901,12 +6111,6 @@ type DisableRequest_SdkV2 struct { SchemaName types.String `tfsdk:"-"` } -func (newState *DisableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableRequest_SdkV2) { -} - -func (newState *DisableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5943,12 +6147,6 @@ func (o DisableRequest_SdkV2) Type(ctx context.Context) attr.Type { type DisableResponse_SdkV2 struct { } -func (newState *DisableResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableResponse_SdkV2) { -} - -func (newState *DisableResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5979,7 +6177,7 @@ func (o DisableResponse_SdkV2) Type(ctx context.Context) attr.Type { type EffectivePermissionsList_SdkV2 struct { // The privileges conveyed to each principal (either directly or via // inheritance) - PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:"optional"` + PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:""` } func (newState *EffectivePermissionsList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePermissionsList_SdkV2) { @@ -5988,6 +6186,12 @@ func (newState *EffectivePermissionsList_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *EffectivePermissionsList_SdkV2) SyncEffectiveFieldsDuringRead(existingState EffectivePermissionsList_SdkV2) { } +func (c EffectivePermissionsList_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EffectivePrivilegeAssignment_SdkV2{}.ToSchema(cs, append(path, "privilege_assignments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePermissionsList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6052,10 +6256,10 @@ func (o *EffectivePermissionsList_SdkV2) SetPrivilegeAssignments(ctx context.Con type EffectivePredictiveOptimizationFlag_SdkV2 struct { // The name of the object from which the flag was inherited. If there was no // inheritance, this field is left blank. - InheritedFromName types.String `tfsdk:"inherited_from_name" tf:"optional"` + InheritedFromName types.String `tfsdk:"inherited_from_name" tf:""` // The type of the object from which the flag was inherited. If there was no // inheritance, this field is left blank. - InheritedFromType types.String `tfsdk:"inherited_from_type" tf:"optional"` + InheritedFromType types.String `tfsdk:"inherited_from_type" tf:""` // Whether predictive optimization should be enabled for this object and // objects under it. Value types.String `tfsdk:"value" tf:""` @@ -6067,6 +6271,12 @@ func (newState *EffectivePredictiveOptimizationFlag_SdkV2) SyncEffectiveFieldsDu func (newState *EffectivePredictiveOptimizationFlag_SdkV2) SyncEffectiveFieldsDuringRead(existingState EffectivePredictiveOptimizationFlag_SdkV2) { } +func (c EffectivePredictiveOptimizationFlag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePredictiveOptimizationFlag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6106,13 +6316,13 @@ type EffectivePrivilege_SdkV2 struct { // The full name of the object that conveys this privilege via inheritance. // This field is omitted when privilege is not inherited (it's assigned to // the securable itself). - InheritedFromName types.String `tfsdk:"inherited_from_name" tf:"optional"` + InheritedFromName types.String `tfsdk:"inherited_from_name" tf:""` // The type of the object that conveys this privilege via inheritance. This // field is omitted when privilege is not inherited (it's assigned to the // securable itself). - InheritedFromType types.String `tfsdk:"inherited_from_type" tf:"optional"` + InheritedFromType types.String `tfsdk:"inherited_from_type" tf:""` // The privilege assigned to the principal. - Privilege types.String `tfsdk:"privilege" tf:"optional"` + Privilege types.String `tfsdk:"privilege" tf:""` } func (newState *EffectivePrivilege_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePrivilege_SdkV2) { @@ -6121,6 +6331,11 @@ func (newState *EffectivePrivilege_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *EffectivePrivilege_SdkV2) SyncEffectiveFieldsDuringRead(existingState EffectivePrivilege_SdkV2) { } +func (c EffectivePrivilege_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePrivilege. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6158,10 +6373,10 @@ func (o EffectivePrivilege_SdkV2) Type(ctx context.Context) attr.Type { type EffectivePrivilegeAssignment_SdkV2 struct { // The principal (user email address or group name). - Principal types.String `tfsdk:"principal" tf:"optional"` + Principal types.String `tfsdk:"principal" tf:""` // The privileges conveyed to the principal (either directly or via // inheritance). - Privileges types.List `tfsdk:"privileges" tf:"optional"` + Privileges types.List `tfsdk:"privileges" tf:""` } func (newState *EffectivePrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePrivilegeAssignment_SdkV2) { @@ -6170,6 +6385,12 @@ func (newState *EffectivePrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCre func (newState *EffectivePrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState EffectivePrivilegeAssignment_SdkV2) { } +func (c EffectivePrivilegeAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EffectivePrivilege_SdkV2{}.ToSchema(cs, append(path, "privileges")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePrivilegeAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6241,12 +6462,6 @@ type EnableRequest_SdkV2 struct { SchemaName types.String `tfsdk:"-"` } -func (newState *EnableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnableRequest_SdkV2) { -} - -func (newState *EnableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnableRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6283,12 +6498,6 @@ func (o EnableRequest_SdkV2) Type(ctx context.Context) attr.Type { type EnableResponse_SdkV2 struct { } -func (newState *EnableResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnableResponse_SdkV2) { -} - -func (newState *EnableResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnableResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnableResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6319,7 +6528,7 @@ func (o EnableResponse_SdkV2) Type(ctx context.Context) attr.Type { // Encryption options that apply to clients connecting to cloud storage. type EncryptionDetails_SdkV2 struct { // Server-Side Encryption properties for clients communicating with AWS s3. - SseEncryptionDetails types.List `tfsdk:"sse_encryption_details" tf:"optional,object"` + SseEncryptionDetails types.List `tfsdk:"sse_encryption_details" tf:"object"` } func (newState *EncryptionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EncryptionDetails_SdkV2) { @@ -6328,6 +6537,12 @@ func (newState *EncryptionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *EncryptionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState EncryptionDetails_SdkV2) { } +func (c EncryptionDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SseEncryptionDetails_SdkV2{}.ToSchema(cs, append(path, "sse_encryption_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EncryptionDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6395,12 +6610,6 @@ type ExistsRequest_SdkV2 struct { FullName types.String `tfsdk:"-"` } -func (newState *ExistsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExistsRequest_SdkV2) { -} - -func (newState *ExistsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExistsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExistsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6434,44 +6643,44 @@ func (o ExistsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ExternalLocationInfo_SdkV2 struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this external location was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of external location creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique ID of the location's storage credential. - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // Name of the storage credential used with this location. - CredentialName types.String `tfsdk:"credential_name" tf:"optional"` + CredentialName types.String `tfsdk:"credential_name" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"object"` // Indicates whether fallback mode is enabled for this external location. // When fallback mode is enabled, the access to the location falls back to // cluster credentials if UC credentials are not sufficient. - Fallback types.Bool `tfsdk:"fallback" tf:"optional"` + Fallback types.Bool `tfsdk:"fallback" tf:""` - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Unique identifier of metastore hosting the external location. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of the external location. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The owner of the external location. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Indicates whether the external location is read-only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Time at which external location this was last modified, in epoch // milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the external location. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // Path URL of the external location. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *ExternalLocationInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLocationInfo_SdkV2) { @@ -6480,6 +6689,12 @@ func (newState *ExternalLocationInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ExternalLocationInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLocationInfo_SdkV2) { } +func (c ExternalLocationInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EncryptionDetails_SdkV2{}.ToSchema(cs, append(path, "encryption_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLocationInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6580,11 +6795,11 @@ type FailedStatus_SdkV2 struct { // Note that this Delta version may only be partially synced to the online // table. Only populated if the table is still online and available for // serving. - LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:"optional"` + LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:""` // The timestamp of the last time any data was synchronized from the source // table to the online table. Only populated if the table is still online // and available for serving. - Timestamp types.String `tfsdk:"timestamp" tf:"optional"` + Timestamp types.String `tfsdk:"timestamp" tf:""` } func (newState *FailedStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FailedStatus_SdkV2) { @@ -6593,6 +6808,11 @@ func (newState *FailedStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *FailedStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState FailedStatus_SdkV2) { } +func (c FailedStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FailedStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6643,6 +6863,15 @@ func (newState *ForeignKeyConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ForeignKeyConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForeignKeyConstraint_SdkV2) { } +func (c ForeignKeyConstraint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "child_columns")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "parent_columns")...) + cs.SetRequired(append(path, "parent_table")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForeignKeyConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6752,6 +6981,12 @@ func (newState *FunctionDependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *FunctionDependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState FunctionDependency_SdkV2) { } +func (c FunctionDependency_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "function_full_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionDependency. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6787,70 +7022,70 @@ type FunctionInfo_SdkV2 struct { // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // Name of parent catalog. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this function was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of function creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Scalar function return data type. - DataType types.String `tfsdk:"data_type" tf:"optional"` + DataType types.String `tfsdk:"data_type" tf:""` // External function language. - ExternalLanguage types.String `tfsdk:"external_language" tf:"optional"` + ExternalLanguage types.String `tfsdk:"external_language" tf:""` // External function name. - ExternalName types.String `tfsdk:"external_name" tf:"optional"` + ExternalName types.String `tfsdk:"external_name" tf:""` // Pretty printed function data type. - FullDataType types.String `tfsdk:"full_data_type" tf:"optional"` + FullDataType types.String `tfsdk:"full_data_type" tf:""` // Full name of function, in form of // __catalog_name__.__schema_name__.__function__name__ - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Id of Function, relative to parent schema. - FunctionId types.String `tfsdk:"function_id" tf:"optional"` + FunctionId types.String `tfsdk:"function_id" tf:""` - InputParams types.List `tfsdk:"input_params" tf:"optional,object"` + InputParams types.List `tfsdk:"input_params" tf:"object"` // Whether the function is deterministic. - IsDeterministic types.Bool `tfsdk:"is_deterministic" tf:"optional"` + IsDeterministic types.Bool `tfsdk:"is_deterministic" tf:""` // Function null call. - IsNullCall types.Bool `tfsdk:"is_null_call" tf:"optional"` + IsNullCall types.Bool `tfsdk:"is_null_call" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of function, relative to parent schema. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of function. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Function parameter style. **S** is the value for SQL. - ParameterStyle types.String `tfsdk:"parameter_style" tf:"optional"` + ParameterStyle types.String `tfsdk:"parameter_style" tf:""` // JSON-serialized key-value pair map, encoded (escaped) as a string. - Properties types.String `tfsdk:"properties" tf:"optional"` + Properties types.String `tfsdk:"properties" tf:""` // Table function return parameters. - ReturnParams types.List `tfsdk:"return_params" tf:"optional,object"` + ReturnParams types.List `tfsdk:"return_params" tf:"object"` // Function language. When **EXTERNAL** is used, the language of the routine // function should be specified in the __external_language__ field, and the // __return_params__ of the function cannot be used (as **TABLE** return // type is not supported), and the __sql_data_access__ field must be // **NO_SQL**. - RoutineBody types.String `tfsdk:"routine_body" tf:"optional"` + RoutineBody types.String `tfsdk:"routine_body" tf:""` // Function body. - RoutineDefinition types.String `tfsdk:"routine_definition" tf:"optional"` + RoutineDefinition types.String `tfsdk:"routine_definition" tf:""` // Function dependencies. - RoutineDependencies types.List `tfsdk:"routine_dependencies" tf:"optional,object"` + RoutineDependencies types.List `tfsdk:"routine_dependencies" tf:"object"` // Name of parent schema relative to its parent catalog. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // Function security type. - SecurityType types.String `tfsdk:"security_type" tf:"optional"` + SecurityType types.String `tfsdk:"security_type" tf:""` // Specific name of the function; Reserved for future use. - SpecificName types.String `tfsdk:"specific_name" tf:"optional"` + SpecificName types.String `tfsdk:"specific_name" tf:""` // Function SQL data access. - SqlDataAccess types.String `tfsdk:"sql_data_access" tf:"optional"` + SqlDataAccess types.String `tfsdk:"sql_data_access" tf:""` // List of schemes whose objects can be referenced without qualification. - SqlPath types.String `tfsdk:"sql_path" tf:"optional"` + SqlPath types.String `tfsdk:"sql_path" tf:""` // Time at which this function was created, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified function. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *FunctionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FunctionInfo_SdkV2) { @@ -6859,6 +7094,14 @@ func (newState *FunctionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *FunctionInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FunctionInfo_SdkV2) { } +func (c FunctionInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FunctionParameterInfos_SdkV2{}.ToSchema(cs, append(path, "input_params")...) + FunctionParameterInfos_SdkV2{}.ToSchema(cs, append(path, "return_params")...) + DependencyList_SdkV2{}.ToSchema(cs, append(path, "routine_dependencies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7038,27 +7281,27 @@ func (o *FunctionInfo_SdkV2) SetRoutineDependencies(ctx context.Context, v Depen type FunctionParameterInfo_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of parameter. Name types.String `tfsdk:"name" tf:""` // Default value of the parameter. - ParameterDefault types.String `tfsdk:"parameter_default" tf:"optional"` + ParameterDefault types.String `tfsdk:"parameter_default" tf:""` // The mode of the function parameter. - ParameterMode types.String `tfsdk:"parameter_mode" tf:"optional"` + ParameterMode types.String `tfsdk:"parameter_mode" tf:""` // The type of function parameter. - ParameterType types.String `tfsdk:"parameter_type" tf:"optional"` + ParameterType types.String `tfsdk:"parameter_type" tf:""` // Ordinal position of column (starting at position 0). Position types.Int64 `tfsdk:"position" tf:""` // Format of IntervalType. - TypeIntervalType types.String `tfsdk:"type_interval_type" tf:"optional"` + TypeIntervalType types.String `tfsdk:"type_interval_type" tf:""` // Full data type spec, JSON-serialized. - TypeJson types.String `tfsdk:"type_json" tf:"optional"` + TypeJson types.String `tfsdk:"type_json" tf:""` TypeName types.String `tfsdk:"type_name" tf:""` // Digits of precision; required on Create for DecimalTypes. - TypePrecision types.Int64 `tfsdk:"type_precision" tf:"optional"` + TypePrecision types.Int64 `tfsdk:"type_precision" tf:""` // Digits to right of decimal; Required on Create for DecimalTypes. - TypeScale types.Int64 `tfsdk:"type_scale" tf:"optional"` + TypeScale types.Int64 `tfsdk:"type_scale" tf:""` // Full data type spec, SQL/catalogString text. TypeText types.String `tfsdk:"type_text" tf:""` } @@ -7069,6 +7312,15 @@ func (newState *FunctionParameterInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *FunctionParameterInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FunctionParameterInfo_SdkV2) { } +func (c FunctionParameterInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "position")...) + cs.SetRequired(append(path, "type_name")...) + cs.SetRequired(append(path, "type_text")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionParameterInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7125,7 +7377,7 @@ func (o FunctionParameterInfo_SdkV2) Type(ctx context.Context) attr.Type { type FunctionParameterInfos_SdkV2 struct { // The array of __FunctionParameterInfo__ definitions of the function's // parameters. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *FunctionParameterInfos_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FunctionParameterInfos_SdkV2) { @@ -7134,6 +7386,12 @@ func (newState *FunctionParameterInfos_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *FunctionParameterInfos_SdkV2) SyncEffectiveFieldsDuringRead(existingState FunctionParameterInfos_SdkV2) { } +func (c FunctionParameterInfos_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FunctionParameterInfo_SdkV2{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionParameterInfos. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7198,7 +7456,7 @@ func (o *FunctionParameterInfos_SdkV2) SetParameters(ctx context.Context, v []Fu // GCP temporary credentials for API authentication. Read more at // https://developers.google.com/identity/protocols/oauth2/service-account type GcpOauthToken_SdkV2 struct { - OauthToken types.String `tfsdk:"oauth_token" tf:"optional"` + OauthToken types.String `tfsdk:"oauth_token" tf:""` } func (newState *GcpOauthToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpOauthToken_SdkV2) { @@ -7207,6 +7465,11 @@ func (newState *GcpOauthToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *GcpOauthToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpOauthToken_SdkV2) { } +func (c GcpOauthToken_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpOauthToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7243,7 +7506,7 @@ type GenerateTemporaryServiceCredentialAzureOptions_SdkV2 struct { // The resources to which the temporary Azure credential should apply. These // resources are the scopes that are passed to the token provider (see // https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python) - Resources types.List `tfsdk:"resources" tf:"optional"` + Resources types.List `tfsdk:"resources" tf:""` } func (newState *GenerateTemporaryServiceCredentialAzureOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialAzureOptions_SdkV2) { @@ -7252,6 +7515,11 @@ func (newState *GenerateTemporaryServiceCredentialAzureOptions_SdkV2) SyncEffect func (newState *GenerateTemporaryServiceCredentialAzureOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialAzureOptions_SdkV2) { } +func (c GenerateTemporaryServiceCredentialAzureOptions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialAzureOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7318,7 +7586,7 @@ type GenerateTemporaryServiceCredentialGcpOptions_SdkV2 struct { // The scopes to which the temporary GCP credential should apply. These // resources are the scopes that are passed to the token provider (see // https://google-auth.readthedocs.io/en/latest/reference/google.auth.html#google.auth.credentials.Credentials) - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` } func (newState *GenerateTemporaryServiceCredentialGcpOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialGcpOptions_SdkV2) { @@ -7327,6 +7595,11 @@ func (newState *GenerateTemporaryServiceCredentialGcpOptions_SdkV2) SyncEffectiv func (newState *GenerateTemporaryServiceCredentialGcpOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialGcpOptions_SdkV2) { } +func (c GenerateTemporaryServiceCredentialGcpOptions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialGcpOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7390,12 +7663,12 @@ func (o *GenerateTemporaryServiceCredentialGcpOptions_SdkV2) SetScopes(ctx conte type GenerateTemporaryServiceCredentialRequest_SdkV2 struct { // The Azure cloud options to customize the requested temporary credential - AzureOptions types.List `tfsdk:"azure_options" tf:"optional,object"` + AzureOptions types.List `tfsdk:"azure_options" tf:"object"` // The name of the service credential used to generate a temporary // credential CredentialName types.String `tfsdk:"credential_name" tf:""` // The GCP cloud options to customize the requested temporary credential - GcpOptions types.List `tfsdk:"gcp_options" tf:"optional,object"` + GcpOptions types.List `tfsdk:"gcp_options" tf:"object"` } func (newState *GenerateTemporaryServiceCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialRequest_SdkV2) { @@ -7404,6 +7677,14 @@ func (newState *GenerateTemporaryServiceCredentialRequest_SdkV2) SyncEffectiveFi func (newState *GenerateTemporaryServiceCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialRequest_SdkV2) { } +func (c GenerateTemporaryServiceCredentialRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GenerateTemporaryServiceCredentialAzureOptions_SdkV2{}.ToSchema(cs, append(path, "azure_options")...) + cs.SetRequired(append(path, "credential_name")...) + GenerateTemporaryServiceCredentialGcpOptions_SdkV2{}.ToSchema(cs, append(path, "gcp_options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7502,9 +7783,9 @@ type GenerateTemporaryTableCredentialRequest_SdkV2 struct { // The operation performed against the table data, either READ or // READ_WRITE. If READ_WRITE is specified, the credentials returned will // have write permissions, otherwise, it will be read only. - Operation types.String `tfsdk:"operation" tf:"optional"` + Operation types.String `tfsdk:"operation" tf:""` // UUID of the table to read or write. - TableId types.String `tfsdk:"table_id" tf:"optional"` + TableId types.String `tfsdk:"table_id" tf:""` } func (newState *GenerateTemporaryTableCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryTableCredentialRequest_SdkV2) { @@ -7513,6 +7794,11 @@ func (newState *GenerateTemporaryTableCredentialRequest_SdkV2) SyncEffectiveFiel func (newState *GenerateTemporaryTableCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryTableCredentialRequest_SdkV2) { } +func (c GenerateTemporaryTableCredentialRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryTableCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7549,25 +7835,25 @@ func (o GenerateTemporaryTableCredentialRequest_SdkV2) Type(ctx context.Context) type GenerateTemporaryTableCredentialResponse_SdkV2 struct { // AWS temporary credentials for API authentication. Read more at // https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. - AwsTempCredentials types.List `tfsdk:"aws_temp_credentials" tf:"optional,object"` + AwsTempCredentials types.List `tfsdk:"aws_temp_credentials" tf:"object"` // Azure Active Directory token, essentially the Oauth token for Azure // Service Principal or Managed Identity. Read more at // https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/service-prin-aad-token - AzureAad types.List `tfsdk:"azure_aad" tf:"optional,object"` + AzureAad types.List `tfsdk:"azure_aad" tf:"object"` // Azure temporary credentials for API authentication. Read more at // https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas - AzureUserDelegationSas types.List `tfsdk:"azure_user_delegation_sas" tf:"optional,object"` + AzureUserDelegationSas types.List `tfsdk:"azure_user_delegation_sas" tf:"object"` // Server time when the credential will expire, in epoch milliseconds. The // API client is advised to cache the credential given this expiration time. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // GCP temporary credentials for API authentication. Read more at // https://developers.google.com/identity/protocols/oauth2/service-account - GcpOauthToken types.List `tfsdk:"gcp_oauth_token" tf:"optional,object"` + GcpOauthToken types.List `tfsdk:"gcp_oauth_token" tf:"object"` // R2 temporary credentials for API authentication. Read more at // https://developers.cloudflare.com/r2/api/s3/tokens/. - R2TempCredentials types.List `tfsdk:"r2_temp_credentials" tf:"optional,object"` + R2TempCredentials types.List `tfsdk:"r2_temp_credentials" tf:"object"` // The URL of the storage path accessible by the temporary credential. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *GenerateTemporaryTableCredentialResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryTableCredentialResponse_SdkV2) { @@ -7576,6 +7862,16 @@ func (newState *GenerateTemporaryTableCredentialResponse_SdkV2) SyncEffectiveFie func (newState *GenerateTemporaryTableCredentialResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryTableCredentialResponse_SdkV2) { } +func (c GenerateTemporaryTableCredentialResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsCredentials_SdkV2{}.ToSchema(cs, append(path, "aws_temp_credentials")...) + AzureActiveDirectoryToken_SdkV2{}.ToSchema(cs, append(path, "azure_aad")...) + AzureUserDelegationSas_SdkV2{}.ToSchema(cs, append(path, "azure_user_delegation_sas")...) + GcpOauthToken_SdkV2{}.ToSchema(cs, append(path, "gcp_oauth_token")...) + R2Credentials_SdkV2{}.ToSchema(cs, append(path, "r2_temp_credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryTableCredentialResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7771,12 +8067,6 @@ type GetAccountMetastoreAssignmentRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *GetAccountMetastoreAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountMetastoreAssignmentRequest_SdkV2) { -} - -func (newState *GetAccountMetastoreAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountMetastoreAssignmentRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountMetastoreAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7814,12 +8104,6 @@ type GetAccountMetastoreRequest_SdkV2 struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *GetAccountMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountMetastoreRequest_SdkV2) { -} - -func (newState *GetAccountMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountMetastoreRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountMetastoreRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7859,12 +8143,6 @@ type GetAccountStorageCredentialRequest_SdkV2 struct { StorageCredentialName types.String `tfsdk:"-"` } -func (newState *GetAccountStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountStorageCredentialRequest_SdkV2) { -} - -func (newState *GetAccountStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountStorageCredentialRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountStorageCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7904,12 +8182,6 @@ type GetArtifactAllowlistRequest_SdkV2 struct { ArtifactType types.String `tfsdk:"-"` } -func (newState *GetArtifactAllowlistRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetArtifactAllowlistRequest_SdkV2) { -} - -func (newState *GetArtifactAllowlistRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetArtifactAllowlistRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetArtifactAllowlistRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7958,12 +8230,6 @@ type GetBindingsRequest_SdkV2 struct { SecurableType types.String `tfsdk:"-"` } -func (newState *GetBindingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBindingsRequest_SdkV2) { -} - -func (newState *GetBindingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBindingsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBindingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8012,12 +8278,6 @@ type GetByAliasRequest_SdkV2 struct { IncludeAliases types.Bool `tfsdk:"-"` } -func (newState *GetByAliasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetByAliasRequest_SdkV2) { -} - -func (newState *GetByAliasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetByAliasRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetByAliasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8062,12 +8322,6 @@ type GetCatalogRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetCatalogRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCatalogRequest_SdkV2) { -} - -func (newState *GetCatalogRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCatalogRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCatalogRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8107,12 +8361,6 @@ type GetConnectionRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetConnectionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetConnectionRequest_SdkV2) { -} - -func (newState *GetConnectionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetConnectionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetConnectionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8150,12 +8398,6 @@ type GetCredentialRequest_SdkV2 struct { NameArg types.String `tfsdk:"-"` } -func (newState *GetCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialRequest_SdkV2) { -} - -func (newState *GetCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCredentialRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8198,12 +8440,6 @@ type GetEffectiveRequest_SdkV2 struct { SecurableType types.String `tfsdk:"-"` } -func (newState *GetEffectiveRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEffectiveRequest_SdkV2) { -} - -func (newState *GetEffectiveRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEffectiveRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEffectiveRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8248,12 +8484,6 @@ type GetExternalLocationRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetExternalLocationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExternalLocationRequest_SdkV2) { -} - -func (newState *GetExternalLocationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExternalLocationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExternalLocationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8297,12 +8527,6 @@ type GetFunctionRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetFunctionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFunctionRequest_SdkV2) { -} - -func (newState *GetFunctionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetFunctionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFunctionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8347,12 +8571,6 @@ type GetGrantRequest_SdkV2 struct { SecurableType types.String `tfsdk:"-"` } -func (newState *GetGrantRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetGrantRequest_SdkV2) { -} - -func (newState *GetGrantRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetGrantRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetGrantRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8394,12 +8612,6 @@ type GetMetastoreRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetastoreRequest_SdkV2) { -} - -func (newState *GetMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetastoreRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetastoreRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8433,47 +8645,47 @@ func (o GetMetastoreRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetMetastoreSummaryResponse_SdkV2 struct { // Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`). - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // Time at which this metastore was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of metastore creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique identifier of the metastore's (Default) Data Access Configuration. - DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:"optional"` + DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:""` // The organization name of a Delta Sharing entity, to be used in // Databricks-to-Databricks Delta Sharing as the official name. - DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:"optional"` + DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:""` // The lifetime of delta sharing recipient token in seconds. - DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:"optional"` + DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:""` // The scope of Delta Sharing enabled for the metastore. - DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:"optional"` + DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:""` // Whether to allow non-DBR clients to directly access entities under the // metastore. - ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:"optional"` + ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:""` // Globally unique metastore ID across clouds and regions, of the form // `cloud:region:metastore_id`. - GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:"optional"` + GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:""` // Unique identifier of metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The user-specified name of the metastore. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The owner of the metastore. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Privilege model version of the metastore, of the form `major.minor` // (e.g., `1.0`). - PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:"optional"` + PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:""` // Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The storage root URL for metastore - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // UUID of storage credential to access the metastore storage_root. - StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:"optional"` + StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:""` // Name of the storage credential to access the metastore storage_root. - StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:"optional"` + StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:""` // Time at which the metastore was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the metastore. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *GetMetastoreSummaryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetastoreSummaryResponse_SdkV2) { @@ -8482,6 +8694,11 @@ func (newState *GetMetastoreSummaryResponse_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *GetMetastoreSummaryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetastoreSummaryResponse_SdkV2) { } +func (c GetMetastoreSummaryResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetastoreSummaryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8563,12 +8780,6 @@ type GetModelVersionRequest_SdkV2 struct { Version types.Int64 `tfsdk:"-"` } -func (newState *GetModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionRequest_SdkV2) { -} - -func (newState *GetModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8612,12 +8823,6 @@ type GetOnlineTableRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetOnlineTableRequest_SdkV2) { -} - -func (newState *GetOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetOnlineTableRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetOnlineTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8655,12 +8860,6 @@ type GetQualityMonitorRequest_SdkV2 struct { TableName types.String `tfsdk:"-"` } -func (newState *GetQualityMonitorRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQualityMonitorRequest_SdkV2) { -} - -func (newState *GetQualityMonitorRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQualityMonitorRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQualityMonitorRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8704,12 +8903,6 @@ type GetQuotaRequest_SdkV2 struct { QuotaName types.String `tfsdk:"-"` } -func (newState *GetQuotaRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQuotaRequest_SdkV2) { -} - -func (newState *GetQuotaRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQuotaRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQuotaRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8747,7 +8940,7 @@ func (o GetQuotaRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetQuotaResponse_SdkV2 struct { // The returned QuotaInfo. - QuotaInfo types.List `tfsdk:"quota_info" tf:"optional,object"` + QuotaInfo types.List `tfsdk:"quota_info" tf:"object"` } func (newState *GetQuotaResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQuotaResponse_SdkV2) { @@ -8756,6 +8949,12 @@ func (newState *GetQuotaResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *GetQuotaResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQuotaResponse_SdkV2) { } +func (c GetQuotaResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QuotaInfo_SdkV2{}.ToSchema(cs, append(path, "quota_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQuotaResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8825,12 +9024,6 @@ type GetRefreshRequest_SdkV2 struct { TableName types.String `tfsdk:"-"` } -func (newState *GetRefreshRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRefreshRequest_SdkV2) { -} - -func (newState *GetRefreshRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRefreshRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRefreshRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8875,12 +9068,6 @@ type GetRegisteredModelRequest_SdkV2 struct { IncludeBrowse types.Bool `tfsdk:"-"` } -func (newState *GetRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelRequest_SdkV2) { -} - -func (newState *GetRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8925,12 +9112,6 @@ type GetSchemaRequest_SdkV2 struct { IncludeBrowse types.Bool `tfsdk:"-"` } -func (newState *GetSchemaRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSchemaRequest_SdkV2) { -} - -func (newState *GetSchemaRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSchemaRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSchemaRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8970,12 +9151,6 @@ type GetStorageCredentialRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStorageCredentialRequest_SdkV2) { -} - -func (newState *GetStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStorageCredentialRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStorageCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9020,12 +9195,6 @@ type GetTableRequest_SdkV2 struct { IncludeManifestCapabilities types.Bool `tfsdk:"-"` } -func (newState *GetTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTableRequest_SdkV2) { -} - -func (newState *GetTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetTableRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9069,12 +9238,6 @@ type GetWorkspaceBindingRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetWorkspaceBindingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceBindingRequest_SdkV2) { -} - -func (newState *GetWorkspaceBindingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceBindingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceBindingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9112,12 +9275,6 @@ type ListAccountMetastoreAssignmentsRequest_SdkV2 struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *ListAccountMetastoreAssignmentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountMetastoreAssignmentsRequest_SdkV2) { -} - -func (newState *ListAccountMetastoreAssignmentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountMetastoreAssignmentsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountMetastoreAssignmentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9151,7 +9308,7 @@ func (o ListAccountMetastoreAssignmentsRequest_SdkV2) Type(ctx context.Context) // The list of workspaces to which the given metastore is assigned. type ListAccountMetastoreAssignmentsResponse_SdkV2 struct { - WorkspaceIds types.List `tfsdk:"workspace_ids" tf:"optional"` + WorkspaceIds types.List `tfsdk:"workspace_ids" tf:""` } func (newState *ListAccountMetastoreAssignmentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountMetastoreAssignmentsResponse_SdkV2) { @@ -9160,6 +9317,11 @@ func (newState *ListAccountMetastoreAssignmentsResponse_SdkV2) SyncEffectiveFiel func (newState *ListAccountMetastoreAssignmentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountMetastoreAssignmentsResponse_SdkV2) { } +func (c ListAccountMetastoreAssignmentsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountMetastoreAssignmentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9227,12 +9389,6 @@ type ListAccountStorageCredentialsRequest_SdkV2 struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *ListAccountStorageCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountStorageCredentialsRequest_SdkV2) { -} - -func (newState *ListAccountStorageCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountStorageCredentialsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountStorageCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9266,7 +9422,7 @@ func (o ListAccountStorageCredentialsRequest_SdkV2) Type(ctx context.Context) at type ListAccountStorageCredentialsResponse_SdkV2 struct { // An array of metastore storage credentials. - StorageCredentials types.List `tfsdk:"storage_credentials" tf:"optional"` + StorageCredentials types.List `tfsdk:"storage_credentials" tf:""` } func (newState *ListAccountStorageCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountStorageCredentialsResponse_SdkV2) { @@ -9275,6 +9431,12 @@ func (newState *ListAccountStorageCredentialsResponse_SdkV2) SyncEffectiveFields func (newState *ListAccountStorageCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountStorageCredentialsResponse_SdkV2) { } +func (c ListAccountStorageCredentialsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StorageCredentialInfo_SdkV2{}.ToSchema(cs, append(path, "storage_credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountStorageCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9355,12 +9517,6 @@ type ListCatalogsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCatalogsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCatalogsRequest_SdkV2) { -} - -func (newState *ListCatalogsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCatalogsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCatalogsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9398,11 +9554,11 @@ func (o ListCatalogsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListCatalogsResponse_SdkV2 struct { // An array of catalog information objects. - Catalogs types.List `tfsdk:"catalogs" tf:"optional"` + Catalogs types.List `tfsdk:"catalogs" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListCatalogsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCatalogsResponse_SdkV2) { @@ -9411,6 +9567,12 @@ func (newState *ListCatalogsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListCatalogsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCatalogsResponse_SdkV2) { } +func (c ListCatalogsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CatalogInfo_SdkV2{}.ToSchema(cs, append(path, "catalogs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCatalogsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9487,12 +9649,6 @@ type ListConnectionsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListConnectionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListConnectionsRequest_SdkV2) { -} - -func (newState *ListConnectionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListConnectionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListConnectionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9528,11 +9684,11 @@ func (o ListConnectionsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListConnectionsResponse_SdkV2 struct { // An array of connection information objects. - Connections types.List `tfsdk:"connections" tf:"optional"` + Connections types.List `tfsdk:"connections" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListConnectionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListConnectionsResponse_SdkV2) { @@ -9541,6 +9697,12 @@ func (newState *ListConnectionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ListConnectionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListConnectionsResponse_SdkV2) { } +func (c ListConnectionsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ConnectionInfo_SdkV2{}.ToSchema(cs, append(path, "connections")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListConnectionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9618,12 +9780,6 @@ type ListCredentialsRequest_SdkV2 struct { Purpose types.String `tfsdk:"-"` } -func (newState *ListCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCredentialsRequest_SdkV2) { -} - -func (newState *ListCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCredentialsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9660,11 +9816,11 @@ func (o ListCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListCredentialsResponse_SdkV2 struct { - Credentials types.List `tfsdk:"credentials" tf:"optional"` + Credentials types.List `tfsdk:"credentials" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCredentialsResponse_SdkV2) { @@ -9673,6 +9829,12 @@ func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCredentialsResponse_SdkV2) { } +func (c ListCredentialsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CredentialInfo_SdkV2{}.ToSchema(cs, append(path, "credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9752,12 +9914,6 @@ type ListExternalLocationsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListExternalLocationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsRequest_SdkV2) { -} - -func (newState *ListExternalLocationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLocationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9795,11 +9951,11 @@ func (o ListExternalLocationsRequest_SdkV2) Type(ctx context.Context) attr.Type type ListExternalLocationsResponse_SdkV2 struct { // An array of external locations. - ExternalLocations types.List `tfsdk:"external_locations" tf:"optional"` + ExternalLocations types.List `tfsdk:"external_locations" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExternalLocationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsResponse_SdkV2) { @@ -9808,6 +9964,12 @@ func (newState *ListExternalLocationsResponse_SdkV2) SyncEffectiveFieldsDuringCr func (newState *ListExternalLocationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsResponse_SdkV2) { } +func (c ListExternalLocationsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalLocationInfo_SdkV2{}.ToSchema(cs, append(path, "external_locations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLocationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9891,12 +10053,6 @@ type ListFunctionsRequest_SdkV2 struct { SchemaName types.String `tfsdk:"-"` } -func (newState *ListFunctionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFunctionsRequest_SdkV2) { -} - -func (newState *ListFunctionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFunctionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFunctionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9938,11 +10094,11 @@ func (o ListFunctionsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListFunctionsResponse_SdkV2 struct { // An array of function information objects. - Functions types.List `tfsdk:"functions" tf:"optional"` + Functions types.List `tfsdk:"functions" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListFunctionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFunctionsResponse_SdkV2) { @@ -9951,6 +10107,12 @@ func (newState *ListFunctionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListFunctionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFunctionsResponse_SdkV2) { } +func (c ListFunctionsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FunctionInfo_SdkV2{}.ToSchema(cs, append(path, "functions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFunctionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10016,7 +10178,7 @@ func (o *ListFunctionsResponse_SdkV2) SetFunctions(ctx context.Context, v []Func type ListMetastoresResponse_SdkV2 struct { // An array of metastore information objects. - Metastores types.List `tfsdk:"metastores" tf:"optional"` + Metastores types.List `tfsdk:"metastores" tf:""` } func (newState *ListMetastoresResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListMetastoresResponse_SdkV2) { @@ -10025,6 +10187,12 @@ func (newState *ListMetastoresResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *ListMetastoresResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListMetastoresResponse_SdkV2) { } +func (c ListMetastoresResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MetastoreInfo_SdkV2{}.ToSchema(cs, append(path, "metastores")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListMetastoresResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10106,12 +10274,6 @@ type ListModelVersionsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListModelVersionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelVersionsRequest_SdkV2) { -} - -func (newState *ListModelVersionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListModelVersionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelVersionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10150,11 +10312,11 @@ func (o ListModelVersionsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListModelVersionsResponse_SdkV2 struct { - ModelVersions types.List `tfsdk:"model_versions" tf:"optional"` + ModelVersions types.List `tfsdk:"model_versions" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelVersionsResponse_SdkV2) { @@ -10163,6 +10325,12 @@ func (newState *ListModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ListModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListModelVersionsResponse_SdkV2) { } +func (c ListModelVersionsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersionInfo_SdkV2{}.ToSchema(cs, append(path, "model_versions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelVersionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10234,12 +10402,6 @@ type ListQuotasRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListQuotasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQuotasRequest_SdkV2) { -} - -func (newState *ListQuotasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQuotasRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQuotasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10277,9 +10439,9 @@ type ListQuotasResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of returned QuotaInfos. - Quotas types.List `tfsdk:"quotas" tf:"optional"` + Quotas types.List `tfsdk:"quotas" tf:""` } func (newState *ListQuotasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQuotasResponse_SdkV2) { @@ -10288,6 +10450,12 @@ func (newState *ListQuotasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListQuotasResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQuotasResponse_SdkV2) { } +func (c ListQuotasResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QuotaInfo_SdkV2{}.ToSchema(cs, append(path, "quotas")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQuotasResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10357,12 +10525,6 @@ type ListRefreshesRequest_SdkV2 struct { TableName types.String `tfsdk:"-"` } -func (newState *ListRefreshesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRefreshesRequest_SdkV2) { -} - -func (newState *ListRefreshesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRefreshesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRefreshesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10427,12 +10589,6 @@ type ListRegisteredModelsRequest_SdkV2 struct { SchemaName types.String `tfsdk:"-"` } -func (newState *ListRegisteredModelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRegisteredModelsRequest_SdkV2) { -} - -func (newState *ListRegisteredModelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRegisteredModelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRegisteredModelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10475,9 +10631,9 @@ func (o ListRegisteredModelsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListRegisteredModelsResponse_SdkV2 struct { // Opaque token for pagination. Omitted if there are no more results. // page_token should be set to this value for fetching the next page. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - RegisteredModels types.List `tfsdk:"registered_models" tf:"optional"` + RegisteredModels types.List `tfsdk:"registered_models" tf:""` } func (newState *ListRegisteredModelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRegisteredModelsResponse_SdkV2) { @@ -10486,6 +10642,12 @@ func (newState *ListRegisteredModelsResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *ListRegisteredModelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRegisteredModelsResponse_SdkV2) { } +func (c ListRegisteredModelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelInfo_SdkV2{}.ToSchema(cs, append(path, "registered_models")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRegisteredModelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10567,12 +10729,6 @@ type ListSchemasRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListSchemasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchemasRequest_SdkV2) { -} - -func (newState *ListSchemasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSchemasRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchemasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10614,9 +10770,9 @@ type ListSchemasResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of schema information objects. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *ListSchemasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchemasResponse_SdkV2) { @@ -10625,6 +10781,12 @@ func (newState *ListSchemasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ListSchemasResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSchemasResponse_SdkV2) { } +func (c ListSchemasResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SchemaInfo_SdkV2{}.ToSchema(cs, append(path, "schemas")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchemasResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10701,12 +10863,6 @@ type ListStorageCredentialsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListStorageCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListStorageCredentialsRequest_SdkV2) { -} - -func (newState *ListStorageCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListStorageCredentialsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStorageCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10744,9 +10900,9 @@ type ListStorageCredentialsResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - StorageCredentials types.List `tfsdk:"storage_credentials" tf:"optional"` + StorageCredentials types.List `tfsdk:"storage_credentials" tf:""` } func (newState *ListStorageCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListStorageCredentialsResponse_SdkV2) { @@ -10755,6 +10911,12 @@ func (newState *ListStorageCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringC func (newState *ListStorageCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListStorageCredentialsResponse_SdkV2) { } +func (c ListStorageCredentialsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StorageCredentialInfo_SdkV2{}.ToSchema(cs, append(path, "storage_credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStorageCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10842,12 +11004,6 @@ type ListSummariesRequest_SdkV2 struct { TableNamePattern types.String `tfsdk:"-"` } -func (newState *ListSummariesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSummariesRequest_SdkV2) { -} - -func (newState *ListSummariesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSummariesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSummariesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10904,12 +11060,6 @@ type ListSystemSchemasRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListSystemSchemasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSystemSchemasRequest_SdkV2) { -} - -func (newState *ListSystemSchemasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSystemSchemasRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSystemSchemasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10949,9 +11099,9 @@ type ListSystemSchemasResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of system schema information objects. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *ListSystemSchemasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSystemSchemasResponse_SdkV2) { @@ -10960,6 +11110,12 @@ func (newState *ListSystemSchemasResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ListSystemSchemasResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSystemSchemasResponse_SdkV2) { } +func (c ListSystemSchemasResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SystemSchemaInfo_SdkV2{}.ToSchema(cs, append(path, "schemas")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSystemSchemasResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11027,9 +11183,9 @@ type ListTableSummariesResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // List of table summaries. - Tables types.List `tfsdk:"tables" tf:"optional"` + Tables types.List `tfsdk:"tables" tf:""` } func (newState *ListTableSummariesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTableSummariesResponse_SdkV2) { @@ -11038,6 +11194,12 @@ func (newState *ListTableSummariesResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ListTableSummariesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTableSummariesResponse_SdkV2) { } +func (c ListTableSummariesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableSummary_SdkV2{}.ToSchema(cs, append(path, "tables")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTableSummariesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11132,12 +11294,6 @@ type ListTablesRequest_SdkV2 struct { SchemaName types.String `tfsdk:"-"` } -func (newState *ListTablesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTablesRequest_SdkV2) { -} - -func (newState *ListTablesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTablesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTablesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11191,9 +11347,9 @@ type ListTablesResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of table information objects. - Tables types.List `tfsdk:"tables" tf:"optional"` + Tables types.List `tfsdk:"tables" tf:""` } func (newState *ListTablesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTablesResponse_SdkV2) { @@ -11202,6 +11358,12 @@ func (newState *ListTablesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListTablesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTablesResponse_SdkV2) { } +func (c ListTablesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableInfo_SdkV2{}.ToSchema(cs, append(path, "tables")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTablesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11292,12 +11454,6 @@ type ListVolumesRequest_SdkV2 struct { SchemaName types.String `tfsdk:"-"` } -func (newState *ListVolumesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVolumesRequest_SdkV2) { -} - -func (newState *ListVolumesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVolumesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVolumesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11341,9 +11497,9 @@ type ListVolumesResponseContent_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request to retrieve the next page of results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Volumes types.List `tfsdk:"volumes" tf:"optional"` + Volumes types.List `tfsdk:"volumes" tf:""` } func (newState *ListVolumesResponseContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVolumesResponseContent_SdkV2) { @@ -11352,6 +11508,12 @@ func (newState *ListVolumesResponseContent_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ListVolumesResponseContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVolumesResponseContent_SdkV2) { } +func (c ListVolumesResponseContent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + VolumeInfo_SdkV2{}.ToSchema(cs, append(path, "volumes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVolumesResponseContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11417,7 +11579,7 @@ func (o *ListVolumesResponseContent_SdkV2) SetVolumes(ctx context.Context, v []V type MetastoreAssignment_SdkV2 struct { // The name of the default catalog in the metastore. - DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:"optional"` + DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:""` // The unique ID of the metastore. MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The unique ID of the Databricks workspace. @@ -11430,6 +11592,13 @@ func (newState *MetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *MetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState MetastoreAssignment_SdkV2) { } +func (c MetastoreAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11467,47 +11636,47 @@ func (o MetastoreAssignment_SdkV2) Type(ctx context.Context) attr.Type { type MetastoreInfo_SdkV2 struct { // Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`). - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // Time at which this metastore was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of metastore creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique identifier of the metastore's (Default) Data Access Configuration. - DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:"optional"` + DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:""` // The organization name of a Delta Sharing entity, to be used in // Databricks-to-Databricks Delta Sharing as the official name. - DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:"optional"` + DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:""` // The lifetime of delta sharing recipient token in seconds. - DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:"optional"` + DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:""` // The scope of Delta Sharing enabled for the metastore. - DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:"optional"` + DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:""` // Whether to allow non-DBR clients to directly access entities under the // metastore. - ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:"optional"` + ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:""` // Globally unique metastore ID across clouds and regions, of the form // `cloud:region:metastore_id`. - GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:"optional"` + GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:""` // Unique identifier of metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The user-specified name of the metastore. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The owner of the metastore. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Privilege model version of the metastore, of the form `major.minor` // (e.g., `1.0`). - PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:"optional"` + PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:""` // Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The storage root URL for metastore - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // UUID of storage credential to access the metastore storage_root. - StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:"optional"` + StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:""` // Name of the storage credential to access the metastore storage_root. - StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:"optional"` + StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:""` // Time at which the metastore was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the metastore. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *MetastoreInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MetastoreInfo_SdkV2) { @@ -11516,6 +11685,11 @@ func (newState *MetastoreInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *MetastoreInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState MetastoreInfo_SdkV2) { } +func (c MetastoreInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MetastoreInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11585,55 +11759,55 @@ func (o MetastoreInfo_SdkV2) Type(ctx context.Context) attr.Type { type ModelVersionInfo_SdkV2 struct { // List of aliases associated with the model version - Aliases types.List `tfsdk:"aliases" tf:"optional"` + Aliases types.List `tfsdk:"aliases" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // The name of the catalog containing the model version - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the model version - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The identifier of the user who created the model version - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The unique identifier of the model version - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The unique identifier of the metastore containing the model version - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The name of the parent registered model of the model version, relative to // parent schema - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // Model version dependencies, for feature-store packaged models - ModelVersionDependencies types.List `tfsdk:"model_version_dependencies" tf:"optional,object"` + ModelVersionDependencies types.List `tfsdk:"model_version_dependencies" tf:"object"` // MLflow run ID used when creating the model version, if ``source`` was // generated by an experiment run stored in an MLflow tracking server - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // ID of the Databricks workspace containing the MLflow run that generated // this model version, if applicable - RunWorkspaceId types.Int64 `tfsdk:"run_workspace_id" tf:"optional"` + RunWorkspaceId types.Int64 `tfsdk:"run_workspace_id" tf:""` // The name of the schema containing the model version, relative to parent // catalog - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // URI indicating the location of the source artifacts (files) for the model // version - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // Current status of the model version. Newly created model versions start // in PENDING_REGISTRATION status, then move to READY status once the model // version files are uploaded and the model version is finalized. Only model // versions in READY status can be loaded for inference or served. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The storage location on the cloud under which model version data files // are stored - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The identifier of the user who updated the model version last time - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // Integer model version number, used to reference the model version in API // requests. - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *ModelVersionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersionInfo_SdkV2) { @@ -11642,6 +11816,13 @@ func (newState *ModelVersionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ModelVersionInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelVersionInfo_SdkV2) { } +func (c ModelVersionInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelAlias_SdkV2{}.ToSchema(cs, append(path, "aliases")...) + DependencyList_SdkV2{}.ToSchema(cs, append(path, "model_version_dependencies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersionInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11770,7 +11951,7 @@ func (o *ModelVersionInfo_SdkV2) SetModelVersionDependencies(ctx context.Context type MonitorCronSchedule_SdkV2 struct { // Read only field that indicates whether a schedule is paused or not. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` // The expression that determines when to run the monitor. See [examples]. // // [examples]: https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html @@ -11786,6 +11967,13 @@ func (newState *MonitorCronSchedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *MonitorCronSchedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorCronSchedule_SdkV2) { } +func (c MonitorCronSchedule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "quartz_cron_expression")...) + cs.SetRequired(append(path, "timezone_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorCronSchedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11823,7 +12011,7 @@ func (o MonitorCronSchedule_SdkV2) Type(ctx context.Context) attr.Type { type MonitorDataClassificationConfig_SdkV2 struct { // Whether data classification is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` } func (newState *MonitorDataClassificationConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorDataClassificationConfig_SdkV2) { @@ -11832,6 +12020,11 @@ func (newState *MonitorDataClassificationConfig_SdkV2) SyncEffectiveFieldsDuring func (newState *MonitorDataClassificationConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorDataClassificationConfig_SdkV2) { } +func (c MonitorDataClassificationConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorDataClassificationConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11866,7 +12059,7 @@ func (o MonitorDataClassificationConfig_SdkV2) Type(ctx context.Context) attr.Ty type MonitorDestination_SdkV2 struct { // The list of email addresses to send the notification to. A maximum of 5 // email addresses is supported. - EmailAddresses types.List `tfsdk:"email_addresses" tf:"optional"` + EmailAddresses types.List `tfsdk:"email_addresses" tf:""` } func (newState *MonitorDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorDestination_SdkV2) { @@ -11875,6 +12068,11 @@ func (newState *MonitorDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *MonitorDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorDestination_SdkV2) { } +func (c MonitorDestination_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11943,7 +12141,7 @@ type MonitorInferenceLog_SdkV2 struct { // week(s)"``, ``"1 month"``, ``"1 year"``}. Granularities types.List `tfsdk:"granularities" tf:""` // Optional column that contains the ground truth for the prediction. - LabelCol types.String `tfsdk:"label_col" tf:"optional"` + LabelCol types.String `tfsdk:"label_col" tf:""` // Column that contains the id of the model generating the predictions. // Metrics will be computed per model id by default, and also across all // model ids. @@ -11954,7 +12152,7 @@ type MonitorInferenceLog_SdkV2 struct { // in a classification problem type. The values in this column should be a // map, mapping each class label to the prediction probability for a given // sample. The map should be of PySpark MapType(). - PredictionProbaCol types.String `tfsdk:"prediction_proba_col" tf:"optional"` + PredictionProbaCol types.String `tfsdk:"prediction_proba_col" tf:""` // Problem type the model aims to solve. Determines the type of // model-quality metrics that will be computed. ProblemType types.String `tfsdk:"problem_type" tf:""` @@ -11973,6 +12171,16 @@ func (newState *MonitorInferenceLog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *MonitorInferenceLog_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorInferenceLog_SdkV2) { } +func (c MonitorInferenceLog_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "granularities")...) + cs.SetRequired(append(path, "model_id_col")...) + cs.SetRequired(append(path, "prediction_col")...) + cs.SetRequired(append(path, "problem_type")...) + cs.SetRequired(append(path, "timestamp_col")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorInferenceLog. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12048,60 +12256,77 @@ func (o *MonitorInferenceLog_SdkV2) SetGranularities(ctx context.Context, v []ty type MonitorInfo_SdkV2 struct { // The directory to store monitoring assets (e.g. dashboard, metric tables). - AssetsDir types.String `tfsdk:"assets_dir" tf:"optional"` + AssetsDir types.String `tfsdk:"assets_dir" tf:""` // Name of the baseline table from which drift metrics are computed from. // Columns in the monitored table should also be present in the baseline // table. - BaselineTableName types.String `tfsdk:"baseline_table_name" tf:"optional"` + BaselineTableName types.String `tfsdk:"baseline_table_name" tf:""` // Custom metrics to compute on the monitored table. These can be aggregate // metrics, derived metrics (from already computed aggregate metrics), or // drift metrics (comparing metrics across time windows). - CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` + CustomMetrics types.List `tfsdk:"custom_metrics" tf:""` // Id of dashboard that visualizes the computed metrics. This can be empty // if the monitor is in PENDING state. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The data classification config for the monitor. - DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"optional,object"` + DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"object"` // The full name of the drift metrics table. Format: // __catalog_name__.__schema_name__.__table_name__. DriftMetricsTableName types.String `tfsdk:"drift_metrics_table_name" tf:""` // Configuration for monitoring inference logs. - InferenceLog types.List `tfsdk:"inference_log" tf:"optional,object"` + InferenceLog types.List `tfsdk:"inference_log" tf:"object"` // The latest failure message of the monitor (if any). - LatestMonitorFailureMsg types.String `tfsdk:"latest_monitor_failure_msg" tf:"optional"` + LatestMonitorFailureMsg types.String `tfsdk:"latest_monitor_failure_msg" tf:""` // The version of the monitor config (e.g. 1,2,3). If negative, the monitor // may be corrupted. MonitorVersion types.String `tfsdk:"monitor_version" tf:""` // The notification settings for the monitor. - Notifications types.List `tfsdk:"notifications" tf:"optional,object"` + Notifications types.List `tfsdk:"notifications" tf:"object"` // Schema where output metric tables are created. - OutputSchemaName types.String `tfsdk:"output_schema_name" tf:"optional"` + OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // The full name of the profile metrics table. Format: // __catalog_name__.__schema_name__.__table_name__. ProfileMetricsTableName types.String `tfsdk:"profile_metrics_table_name" tf:""` // The schedule for automatically updating and refreshing metric tables. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.List `tfsdk:"schedule" tf:"object"` // List of column expressions to slice data with for targeted analysis. The // data is grouped by each expression independently, resulting in a separate // slice for each predicate and its complements. For high-cardinality // columns, only the top 100 unique values by frequency will generate // slices. - SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` + SlicingExprs types.List `tfsdk:"slicing_exprs" tf:""` // Configuration for monitoring snapshot tables. - Snapshot types.List `tfsdk:"snapshot" tf:"optional,object"` + Snapshot types.List `tfsdk:"snapshot" tf:"object"` // The status of the monitor. Status types.String `tfsdk:"status" tf:""` // The full name of the table to monitor. Format: // __catalog_name__.__schema_name__.__table_name__. TableName types.String `tfsdk:"table_name" tf:""` // Configuration for monitoring time series tables. - TimeSeries types.List `tfsdk:"time_series" tf:"optional,object"` + TimeSeries types.List `tfsdk:"time_series" tf:"object"` } func (newState *MonitorInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorInfo_SdkV2) { } -func (newState *MonitorInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorInfo_SdkV2) { +func (newState *MonitorInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorInfo_SdkV2) { +} + +func (c MonitorInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MonitorMetric_SdkV2{}.ToSchema(cs, append(path, "custom_metrics")...) + MonitorDataClassificationConfig_SdkV2{}.ToSchema(cs, append(path, "data_classification_config")...) + cs.SetRequired(append(path, "drift_metrics_table_name")...) + MonitorInferenceLog_SdkV2{}.ToSchema(cs, append(path, "inference_log")...) + cs.SetRequired(append(path, "monitor_version")...) + MonitorNotifications_SdkV2{}.ToSchema(cs, append(path, "notifications")...) + cs.SetRequired(append(path, "profile_metrics_table_name")...) + MonitorCronSchedule_SdkV2{}.ToSchema(cs, append(path, "schedule")...) + MonitorSnapshot_SdkV2{}.ToSchema(cs, append(path, "snapshot")...) + cs.SetRequired(append(path, "status")...) + cs.SetRequired(append(path, "table_name")...) + MonitorTimeSeries_SdkV2{}.ToSchema(cs, append(path, "time_series")...) + + return cs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorInfo. @@ -12435,6 +12660,16 @@ func (newState *MonitorMetric_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *MonitorMetric_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorMetric_SdkV2) { } +func (c MonitorMetric_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "definition")...) + cs.SetRequired(append(path, "input_columns")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "output_data_type")...) + cs.SetRequired(append(path, "type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorMetric. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12506,10 +12741,10 @@ func (o *MonitorMetric_SdkV2) SetInputColumns(ctx context.Context, v []types.Str type MonitorNotifications_SdkV2 struct { // Who to send notifications to on monitor failure. - OnFailure types.List `tfsdk:"on_failure" tf:"optional,object"` + OnFailure types.List `tfsdk:"on_failure" tf:"object"` // Who to send notifications to when new data classification tags are // detected. - OnNewClassificationTagDetected types.List `tfsdk:"on_new_classification_tag_detected" tf:"optional,object"` + OnNewClassificationTagDetected types.List `tfsdk:"on_new_classification_tag_detected" tf:"object"` } func (newState *MonitorNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorNotifications_SdkV2) { @@ -12518,6 +12753,13 @@ func (newState *MonitorNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *MonitorNotifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorNotifications_SdkV2) { } +func (c MonitorNotifications_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MonitorDestination_SdkV2{}.ToSchema(cs, append(path, "on_failure")...) + MonitorDestination_SdkV2{}.ToSchema(cs, append(path, "on_new_classification_tag_detected")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorNotifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12613,10 +12855,10 @@ func (o *MonitorNotifications_SdkV2) SetOnNewClassificationTagDetected(ctx conte type MonitorRefreshInfo_SdkV2 struct { // Time at which refresh operation completed (milliseconds since 1/1/1970 // UTC). - EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:"optional"` + EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:""` // An optional message to give insight into the current state of the job // (e.g. FAILURE messages). - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Unique id of the refresh operation. RefreshId types.Int64 `tfsdk:"refresh_id" tf:""` // Time at which refresh operation was initiated (milliseconds since @@ -12625,7 +12867,7 @@ type MonitorRefreshInfo_SdkV2 struct { // The current state of the refresh. State types.String `tfsdk:"state" tf:""` // The method by which the refresh was triggered. - Trigger types.String `tfsdk:"trigger" tf:"optional"` + Trigger types.String `tfsdk:"trigger" tf:""` } func (newState *MonitorRefreshInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorRefreshInfo_SdkV2) { @@ -12634,6 +12876,14 @@ func (newState *MonitorRefreshInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *MonitorRefreshInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorRefreshInfo_SdkV2) { } +func (c MonitorRefreshInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "refresh_id")...) + cs.SetRequired(append(path, "start_time_ms")...) + cs.SetRequired(append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorRefreshInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12677,7 +12927,7 @@ func (o MonitorRefreshInfo_SdkV2) Type(ctx context.Context) attr.Type { type MonitorRefreshListResponse_SdkV2 struct { // List of refreshes. - Refreshes types.List `tfsdk:"refreshes" tf:"optional"` + Refreshes types.List `tfsdk:"refreshes" tf:""` } func (newState *MonitorRefreshListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorRefreshListResponse_SdkV2) { @@ -12686,6 +12936,12 @@ func (newState *MonitorRefreshListResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *MonitorRefreshListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorRefreshListResponse_SdkV2) { } +func (c MonitorRefreshListResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MonitorRefreshInfo_SdkV2{}.ToSchema(cs, append(path, "refreshes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorRefreshListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12756,6 +13012,11 @@ func (newState *MonitorSnapshot_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *MonitorSnapshot_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorSnapshot_SdkV2) { } +func (c MonitorSnapshot_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorSnapshot. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12804,6 +13065,13 @@ func (newState *MonitorTimeSeries_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *MonitorTimeSeries_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorTimeSeries_SdkV2) { } +func (c MonitorTimeSeries_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "granularities")...) + cs.SetRequired(append(path, "timestamp_col")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorTimeSeries. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12878,6 +13146,12 @@ func (newState *NamedTableConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *NamedTableConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState NamedTableConstraint_SdkV2) { } +func (c NamedTableConstraint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NamedTableConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12912,18 +13186,18 @@ func (o NamedTableConstraint_SdkV2) Type(ctx context.Context) attr.Type { // Online Table information. type OnlineTable_SdkV2 struct { // Full three-part (catalog, schema, table) name of the table. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Specification of the online table. - Spec types.List `tfsdk:"spec" tf:"optional,object"` + Spec types.List `tfsdk:"spec" tf:"object"` // Online Table data synchronization status - Status types.List `tfsdk:"status" tf:"computed,object"` + Status types.List `tfsdk:"status" tf:"object"` // Data serving REST API URL for this table - TableServingUrl types.String `tfsdk:"table_serving_url" tf:"computed"` + TableServingUrl types.String `tfsdk:"table_serving_url" tf:""` // The provisioning state of the online table entity in Unity Catalog. This // is distinct from the state of the data synchronization pipeline (i.e. the // table may be in "ACTIVE" but the pipeline may be in "PROVISIONING" as it // runs asynchronously). - UnityCatalogProvisioningState types.String `tfsdk:"unity_catalog_provisioning_state" tf:"computed"` + UnityCatalogProvisioningState types.String `tfsdk:"unity_catalog_provisioning_state" tf:""` } func (newState *OnlineTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTable_SdkV2) { @@ -12932,6 +13206,16 @@ func (newState *OnlineTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *OnlineTable_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTable_SdkV2) { } +func (c OnlineTable_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + OnlineTableSpec_SdkV2{}.ToSchema(cs, append(path, "spec")...) + cs.SetComputed(append(path, "status")...) + OnlineTableStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + cs.SetComputed(append(path, "table_serving_url")...) + cs.SetComputed(append(path, "unity_catalog_provisioning_state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTable. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13039,22 +13323,22 @@ type OnlineTableSpec_SdkV2 struct { // the source table and there are no incremental updates. This mode is // useful for syncing views or tables without CDFs to online tables. Note // that the full-copy pipeline only supports "triggered" scheduling policy. - PerformFullCopy types.Bool `tfsdk:"perform_full_copy" tf:"optional"` + PerformFullCopy types.Bool `tfsdk:"perform_full_copy" tf:""` // ID of the associated pipeline. Generated by the server - cannot be set by // the caller. - PipelineId types.String `tfsdk:"pipeline_id" tf:"computed"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // Primary Key columns to be used for data insert/update in the destination. - PrimaryKeyColumns types.List `tfsdk:"primary_key_columns" tf:"optional"` + PrimaryKeyColumns types.List `tfsdk:"primary_key_columns" tf:""` // Pipeline runs continuously after generating the initial data. - RunContinuously types.List `tfsdk:"run_continuously" tf:"optional,object"` + RunContinuously types.List `tfsdk:"run_continuously" tf:"object"` // Pipeline stops after generating the initial data and can be triggered // later (manually, through a cron job or through data triggers) - RunTriggered types.List `tfsdk:"run_triggered" tf:"optional,object"` + RunTriggered types.List `tfsdk:"run_triggered" tf:"object"` // Three-part (catalog, schema, table) name of the source Delta table. - SourceTableFullName types.String `tfsdk:"source_table_full_name" tf:"optional"` + SourceTableFullName types.String `tfsdk:"source_table_full_name" tf:""` // Time series key to deduplicate (tie-break) rows with the same primary // key. - TimeseriesKey types.String `tfsdk:"timeseries_key" tf:"optional"` + TimeseriesKey types.String `tfsdk:"timeseries_key" tf:""` } func (newState *OnlineTableSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTableSpec_SdkV2) { @@ -13063,6 +13347,14 @@ func (newState *OnlineTableSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *OnlineTableSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTableSpec_SdkV2) { } +func (c OnlineTableSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "pipeline_id")...) + OnlineTableSpecContinuousSchedulingPolicy_SdkV2{}.ToSchema(cs, append(path, "run_continuously")...) + OnlineTableSpecTriggeredSchedulingPolicy_SdkV2{}.ToSchema(cs, append(path, "run_triggered")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13203,6 +13495,11 @@ func (newState *OnlineTableSpecContinuousSchedulingPolicy_SdkV2) SyncEffectiveFi func (newState *OnlineTableSpecContinuousSchedulingPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTableSpecContinuousSchedulingPolicy_SdkV2) { } +func (c OnlineTableSpecContinuousSchedulingPolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableSpecContinuousSchedulingPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13239,6 +13536,11 @@ func (newState *OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) SyncEffectiveFie func (newState *OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) { } +func (c OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableSpecTriggeredSchedulingPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13270,21 +13572,21 @@ func (o OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) Type(ctx context.Context type OnlineTableStatus_SdkV2 struct { // Detailed status of an online table. Shown if the online table is in the // ONLINE_CONTINUOUS_UPDATE or the ONLINE_UPDATING_PIPELINE_RESOURCES state. - ContinuousUpdateStatus types.List `tfsdk:"continuous_update_status" tf:"optional,object"` + ContinuousUpdateStatus types.List `tfsdk:"continuous_update_status" tf:"object"` // The state of the online table. - DetailedState types.String `tfsdk:"detailed_state" tf:"optional"` + DetailedState types.String `tfsdk:"detailed_state" tf:""` // Detailed status of an online table. Shown if the online table is in the // OFFLINE_FAILED or the ONLINE_PIPELINE_FAILED state. - FailedStatus types.List `tfsdk:"failed_status" tf:"optional,object"` + FailedStatus types.List `tfsdk:"failed_status" tf:"object"` // A text description of the current state of the online table. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Detailed status of an online table. Shown if the online table is in the // PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT // state. - ProvisioningStatus types.List `tfsdk:"provisioning_status" tf:"optional,object"` + ProvisioningStatus types.List `tfsdk:"provisioning_status" tf:"object"` // Detailed status of an online table. Shown if the online table is in the // ONLINE_TRIGGERED_UPDATE or the ONLINE_NO_PENDING_UPDATE state. - TriggeredUpdateStatus types.List `tfsdk:"triggered_update_status" tf:"optional,object"` + TriggeredUpdateStatus types.List `tfsdk:"triggered_update_status" tf:"object"` } func (newState *OnlineTableStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTableStatus_SdkV2) { @@ -13293,6 +13595,15 @@ func (newState *OnlineTableStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *OnlineTableStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTableStatus_SdkV2) { } +func (c OnlineTableStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ContinuousUpdateStatus_SdkV2{}.ToSchema(cs, append(path, "continuous_update_status")...) + FailedStatus_SdkV2{}.ToSchema(cs, append(path, "failed_status")...) + ProvisioningStatus_SdkV2{}.ToSchema(cs, append(path, "provisioning_status")...) + TriggeredUpdateStatus_SdkV2{}.ToSchema(cs, append(path, "triggered_update_status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13453,11 +13764,11 @@ func (o *OnlineTableStatus_SdkV2) SetTriggeredUpdateStatus(ctx context.Context, type PermissionsChange_SdkV2 struct { // The set of privileges to add. - Add types.List `tfsdk:"add" tf:"optional"` + Add types.List `tfsdk:"add" tf:""` // The principal whose privileges we are changing. - Principal types.String `tfsdk:"principal" tf:"optional"` + Principal types.String `tfsdk:"principal" tf:""` // The set of privileges to remove. - Remove types.List `tfsdk:"remove" tf:"optional"` + Remove types.List `tfsdk:"remove" tf:""` } func (newState *PermissionsChange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsChange_SdkV2) { @@ -13466,6 +13777,11 @@ func (newState *PermissionsChange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *PermissionsChange_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionsChange_SdkV2) { } +func (c PermissionsChange_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsChange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13562,7 +13878,7 @@ func (o *PermissionsChange_SdkV2) SetRemove(ctx context.Context, v []types.Strin type PermissionsList_SdkV2 struct { // The privileges assigned to each principal - PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:"optional"` + PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:""` } func (newState *PermissionsList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsList_SdkV2) { @@ -13571,6 +13887,12 @@ func (newState *PermissionsList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PermissionsList_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionsList_SdkV2) { } +func (c PermissionsList_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PrivilegeAssignment_SdkV2{}.ToSchema(cs, append(path, "privilege_assignments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13635,17 +13957,17 @@ func (o *PermissionsList_SdkV2) SetPrivilegeAssignments(ctx context.Context, v [ // Progress information of the Online Table data synchronization pipeline. type PipelineProgress_SdkV2 struct { // The estimated time remaining to complete this update in seconds. - EstimatedCompletionTimeSeconds types.Float64 `tfsdk:"estimated_completion_time_seconds" tf:"optional"` + EstimatedCompletionTimeSeconds types.Float64 `tfsdk:"estimated_completion_time_seconds" tf:""` // The source table Delta version that was last processed by the pipeline. // The pipeline may not have completely processed this version yet. - LatestVersionCurrentlyProcessing types.Int64 `tfsdk:"latest_version_currently_processing" tf:"optional"` + LatestVersionCurrentlyProcessing types.Int64 `tfsdk:"latest_version_currently_processing" tf:""` // The completion ratio of this update. This is a number between 0 and 1. - SyncProgressCompletion types.Float64 `tfsdk:"sync_progress_completion" tf:"optional"` + SyncProgressCompletion types.Float64 `tfsdk:"sync_progress_completion" tf:""` // The number of rows that have been synced in this update. - SyncedRowCount types.Int64 `tfsdk:"synced_row_count" tf:"optional"` + SyncedRowCount types.Int64 `tfsdk:"synced_row_count" tf:""` // The total number of rows that need to be synced in this update. This // number may be an estimate. - TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:"optional"` + TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:""` } func (newState *PipelineProgress_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineProgress_SdkV2) { @@ -13654,6 +13976,11 @@ func (newState *PipelineProgress_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *PipelineProgress_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineProgress_SdkV2) { } +func (c PipelineProgress_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineProgress. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13706,6 +14033,13 @@ func (newState *PrimaryKeyConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *PrimaryKeyConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrimaryKeyConstraint_SdkV2) { } +func (c PrimaryKeyConstraint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "child_columns")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrimaryKeyConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13771,9 +14105,9 @@ func (o *PrimaryKeyConstraint_SdkV2) SetChildColumns(ctx context.Context, v []ty type PrivilegeAssignment_SdkV2 struct { // The principal (user email address or group name). - Principal types.String `tfsdk:"principal" tf:"optional"` + Principal types.String `tfsdk:"principal" tf:""` // The privileges assigned to the principal. - Privileges types.List `tfsdk:"privileges" tf:"optional"` + Privileges types.List `tfsdk:"privileges" tf:""` } func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrivilegeAssignment_SdkV2) { @@ -13782,6 +14116,11 @@ func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrivilegeAssignment_SdkV2) { } +func (c PrivilegeAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrivilegeAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13847,7 +14186,7 @@ func (o *PrivilegeAssignment_SdkV2) SetPrivileges(ctx context.Context, v []types // Status of an asynchronously provisioned resource. type ProvisioningInfo_SdkV2 struct { - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *ProvisioningInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProvisioningInfo_SdkV2) { @@ -13856,6 +14195,11 @@ func (newState *ProvisioningInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ProvisioningInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProvisioningInfo_SdkV2) { } +func (c ProvisioningInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProvisioningInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13892,7 +14236,7 @@ func (o ProvisioningInfo_SdkV2) Type(ctx context.Context) attr.Type { type ProvisioningStatus_SdkV2 struct { // Details about initial data synchronization. Only populated when in the // PROVISIONING_INITIAL_SNAPSHOT state. - InitialPipelineSyncProgress types.List `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` + InitialPipelineSyncProgress types.List `tfsdk:"initial_pipeline_sync_progress" tf:"object"` } func (newState *ProvisioningStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProvisioningStatus_SdkV2) { @@ -13901,6 +14245,12 @@ func (newState *ProvisioningStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ProvisioningStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProvisioningStatus_SdkV2) { } +func (c ProvisioningStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineProgress_SdkV2{}.ToSchema(cs, append(path, "initial_pipeline_sync_progress")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProvisioningStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13964,18 +14314,18 @@ func (o *ProvisioningStatus_SdkV2) SetInitialPipelineSyncProgress(ctx context.Co type QuotaInfo_SdkV2 struct { // The timestamp that indicates when the quota count was last updated. - LastRefreshedAt types.Int64 `tfsdk:"last_refreshed_at" tf:"optional"` + LastRefreshedAt types.Int64 `tfsdk:"last_refreshed_at" tf:""` // Name of the parent resource. Returns metastore ID if the parent is a // metastore. - ParentFullName types.String `tfsdk:"parent_full_name" tf:"optional"` + ParentFullName types.String `tfsdk:"parent_full_name" tf:""` // The quota parent securable type. - ParentSecurableType types.String `tfsdk:"parent_securable_type" tf:"optional"` + ParentSecurableType types.String `tfsdk:"parent_securable_type" tf:""` // The current usage of the resource quota. - QuotaCount types.Int64 `tfsdk:"quota_count" tf:"optional"` + QuotaCount types.Int64 `tfsdk:"quota_count" tf:""` // The current limit of the resource quota. - QuotaLimit types.Int64 `tfsdk:"quota_limit" tf:"optional"` + QuotaLimit types.Int64 `tfsdk:"quota_limit" tf:""` // The name of the quota. - QuotaName types.String `tfsdk:"quota_name" tf:"optional"` + QuotaName types.String `tfsdk:"quota_name" tf:""` } func (newState *QuotaInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QuotaInfo_SdkV2) { @@ -13984,6 +14334,11 @@ func (newState *QuotaInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Qu func (newState *QuotaInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState QuotaInfo_SdkV2) { } +func (c QuotaInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QuotaInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14029,11 +14384,11 @@ func (o QuotaInfo_SdkV2) Type(ctx context.Context) attr.Type { // https://developers.cloudflare.com/r2/api/s3/tokens/. type R2Credentials_SdkV2 struct { // The access key ID that identifies the temporary credentials. - AccessKeyId types.String `tfsdk:"access_key_id" tf:"optional"` + AccessKeyId types.String `tfsdk:"access_key_id" tf:""` // The secret access key associated with the access key. - SecretAccessKey types.String `tfsdk:"secret_access_key" tf:"optional"` + SecretAccessKey types.String `tfsdk:"secret_access_key" tf:""` // The generated JWT that users must pass to use the temporary credentials. - SessionToken types.String `tfsdk:"session_token" tf:"optional"` + SessionToken types.String `tfsdk:"session_token" tf:""` } func (newState *R2Credentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan R2Credentials_SdkV2) { @@ -14042,6 +14397,11 @@ func (newState *R2Credentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *R2Credentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState R2Credentials_SdkV2) { } +func (c R2Credentials_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in R2Credentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14086,12 +14446,6 @@ type ReadVolumeRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *ReadVolumeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadVolumeRequest_SdkV2) { -} - -func (newState *ReadVolumeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReadVolumeRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReadVolumeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14130,7 +14484,7 @@ type RegenerateDashboardRequest_SdkV2 struct { TableName types.String `tfsdk:"-"` // Optional argument to specify the warehouse for dashboard regeneration. If // not specified, the first running warehouse will be used. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *RegenerateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegenerateDashboardRequest_SdkV2) { @@ -14139,6 +14493,12 @@ func (newState *RegenerateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *RegenerateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegenerateDashboardRequest_SdkV2) { } +func (c RegenerateDashboardRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "table_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegenerateDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14174,9 +14534,9 @@ func (o RegenerateDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { type RegenerateDashboardResponse_SdkV2 struct { // Id of the regenerated monitoring dashboard. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The directory where the regenerated dashboard is stored. - ParentFolder types.String `tfsdk:"parent_folder" tf:"optional"` + ParentFolder types.String `tfsdk:"parent_folder" tf:""` } func (newState *RegenerateDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegenerateDashboardResponse_SdkV2) { @@ -14185,6 +14545,11 @@ func (newState *RegenerateDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *RegenerateDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegenerateDashboardResponse_SdkV2) { } +func (c RegenerateDashboardResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegenerateDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14221,9 +14586,9 @@ func (o RegenerateDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { // Registered model alias. type RegisteredModelAlias_SdkV2 struct { // Name of the alias, e.g. 'champion' or 'latest_stable' - AliasName types.String `tfsdk:"alias_name" tf:"optional"` + AliasName types.String `tfsdk:"alias_name" tf:""` // Integer version number of the model version to which this alias points. - VersionNum types.Int64 `tfsdk:"version_num" tf:"optional"` + VersionNum types.Int64 `tfsdk:"version_num" tf:""` } func (newState *RegisteredModelAlias_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelAlias_SdkV2) { @@ -14232,6 +14597,11 @@ func (newState *RegisteredModelAlias_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *RegisteredModelAlias_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelAlias_SdkV2) { } +func (c RegisteredModelAlias_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelAlias. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14267,38 +14637,38 @@ func (o RegisteredModelAlias_SdkV2) Type(ctx context.Context) attr.Type { type RegisteredModelInfo_SdkV2 struct { // List of aliases associated with the registered model - Aliases types.List `tfsdk:"aliases" tf:"optional"` + Aliases types.List `tfsdk:"aliases" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // The name of the catalog where the schema and the registered model reside - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the registered model - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Creation timestamp of the registered model in milliseconds since the Unix // epoch - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The identifier of the user who created the registered model - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The three-level (fully qualified) name of the registered model - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // The unique identifier of the metastore - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The name of the registered model - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The identifier of the user who owns the registered model - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // The name of the schema where the registered model resides - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // The storage location on the cloud under which model version data files // are stored - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // Last-update timestamp of the registered model in milliseconds since the // Unix epoch - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The identifier of the user who updated the registered model last time - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *RegisteredModelInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelInfo_SdkV2) { @@ -14307,6 +14677,12 @@ func (newState *RegisteredModelInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *RegisteredModelInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelInfo_SdkV2) { } +func (c RegisteredModelInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelAlias_SdkV2{}.ToSchema(cs, append(path, "aliases")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14400,12 +14776,6 @@ type RunRefreshRequest_SdkV2 struct { TableName types.String `tfsdk:"-"` } -func (newState *RunRefreshRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunRefreshRequest_SdkV2) { -} - -func (newState *RunRefreshRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunRefreshRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunRefreshRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14441,42 +14811,42 @@ type SchemaInfo_SdkV2 struct { // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // Name of parent catalog. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The type of the parent catalog. - CatalogType types.String `tfsdk:"catalog_type" tf:"optional"` + CatalogType types.String `tfsdk:"catalog_type" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this schema was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of schema creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"object"` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // Full name of schema, in form of __catalog_name__.__schema_name__. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of schema, relative to parent catalog. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of schema. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // The unique identifier of the schema. - SchemaId types.String `tfsdk:"schema_id" tf:"optional"` + SchemaId types.String `tfsdk:"schema_id" tf:""` // Storage location for managed tables within schema. - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // Storage root URL for managed tables within schema. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // Time at which this schema was created, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified schema. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *SchemaInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SchemaInfo_SdkV2) { @@ -14485,6 +14855,12 @@ func (newState *SchemaInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *SchemaInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState SchemaInfo_SdkV2) { } +func (c SchemaInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EffectivePredictiveOptimizationFlag_SdkV2{}.ToSchema(cs, append(path, "effective_predictive_optimization_flag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SchemaInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14622,6 +14998,14 @@ func (newState *SetArtifactAllowlist_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *SetArtifactAllowlist_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetArtifactAllowlist_SdkV2) { } +func (c SetArtifactAllowlist_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "artifact_matchers")...) + ArtifactMatcher_SdkV2{}.ToSchema(cs, append(path, "artifact_matchers")...) + cs.SetRequired(append(path, "artifact_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetArtifactAllowlist. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14700,6 +15084,14 @@ func (newState *SetRegisteredModelAliasRequest_SdkV2) SyncEffectiveFieldsDuringC func (newState *SetRegisteredModelAliasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetRegisteredModelAliasRequest_SdkV2) { } +func (c SetRegisteredModelAliasRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "alias")...) + cs.SetRequired(append(path, "full_name")...) + cs.SetRequired(append(path, "version_num")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetRegisteredModelAliasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14738,10 +15130,10 @@ func (o SetRegisteredModelAliasRequest_SdkV2) Type(ctx context.Context) attr.Typ // Server-Side Encryption properties for clients communicating with AWS s3. type SseEncryptionDetails_SdkV2 struct { // The type of key encryption to use (affects headers from s3 client). - Algorithm types.String `tfsdk:"algorithm" tf:"optional"` + Algorithm types.String `tfsdk:"algorithm" tf:""` // When algorithm is **AWS_SSE_KMS** this field specifies the ARN of the SSE // key to use. - AwsKmsKeyArn types.String `tfsdk:"aws_kms_key_arn" tf:"optional"` + AwsKmsKeyArn types.String `tfsdk:"aws_kms_key_arn" tf:""` } func (newState *SseEncryptionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SseEncryptionDetails_SdkV2) { @@ -14750,6 +15142,11 @@ func (newState *SseEncryptionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *SseEncryptionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState SseEncryptionDetails_SdkV2) { } +func (c SseEncryptionDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SseEncryptionDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14785,42 +15182,42 @@ func (o SseEncryptionDetails_SdkV2) Type(ctx context.Context) attr.Type { type StorageCredentialInfo_SdkV2 struct { // The AWS IAM role configuration. - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"object"` // The Cloudflare API token configuration. - CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this Credential was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of credential creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The Databricks managed GCP service account configuration. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"object"` // The full name of the credential. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // The unique identifier of the credential. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The credential name. The name must be unique within the metastore. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of credential. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Whether the storage credential is only usable for read operations. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Time at which this credential was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the credential. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // Whether this credential is the current metastore's root storage // credential. - UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:"optional"` + UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:""` } func (newState *StorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StorageCredentialInfo_SdkV2) { @@ -14829,6 +15226,16 @@ func (newState *StorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *StorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState StorageCredentialInfo_SdkV2) { } +func (c StorageCredentialInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRoleResponse_SdkV2{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentityResponse_SdkV2{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal_SdkV2{}.ToSchema(cs, append(path, "azure_service_principal")...) + CloudflareApiToken_SdkV2{}.ToSchema(cs, append(path, "cloudflare_api_token")...) + DatabricksGcpServiceAccountResponse_SdkV2{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StorageCredentialInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15042,10 +15449,10 @@ func (o *StorageCredentialInfo_SdkV2) SetDatabricksGcpServiceAccount(ctx context type SystemSchemaInfo_SdkV2 struct { // Name of the system schema. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // The current state of enablement for the system schema. An empty string // means the system schema is available and ready for opt-in. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *SystemSchemaInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SystemSchemaInfo_SdkV2) { @@ -15054,6 +15461,11 @@ func (newState *SystemSchemaInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *SystemSchemaInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState SystemSchemaInfo_SdkV2) { } +func (c SystemSchemaInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SystemSchemaInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15091,11 +15503,11 @@ func (o SystemSchemaInfo_SdkV2) Type(ctx context.Context) attr.Type { // __primary_key_constraint__, __foreign_key_constraint__, // __named_table_constraint__. type TableConstraint_SdkV2 struct { - ForeignKeyConstraint types.List `tfsdk:"foreign_key_constraint" tf:"optional,object"` + ForeignKeyConstraint types.List `tfsdk:"foreign_key_constraint" tf:"object"` - NamedTableConstraint types.List `tfsdk:"named_table_constraint" tf:"optional,object"` + NamedTableConstraint types.List `tfsdk:"named_table_constraint" tf:"object"` - PrimaryKeyConstraint types.List `tfsdk:"primary_key_constraint" tf:"optional,object"` + PrimaryKeyConstraint types.List `tfsdk:"primary_key_constraint" tf:"object"` } func (newState *TableConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableConstraint_SdkV2) { @@ -15104,6 +15516,14 @@ func (newState *TableConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *TableConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableConstraint_SdkV2) { } +func (c TableConstraint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ForeignKeyConstraint_SdkV2{}.ToSchema(cs, append(path, "foreign_key_constraint")...) + NamedTableConstraint_SdkV2{}.ToSchema(cs, append(path, "named_table_constraint")...) + PrimaryKeyConstraint_SdkV2{}.ToSchema(cs, append(path, "primary_key_constraint")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15240,6 +15660,12 @@ func (newState *TableDependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *TableDependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableDependency_SdkV2) { } +func (c TableDependency_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "table_full_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableDependency. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15273,7 +15699,7 @@ func (o TableDependency_SdkV2) Type(ctx context.Context) attr.Type { type TableExistsResponse_SdkV2 struct { // Whether the table exists or not. - TableExists types.Bool `tfsdk:"table_exists" tf:"optional"` + TableExists types.Bool `tfsdk:"table_exists" tf:""` } func (newState *TableExistsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableExistsResponse_SdkV2) { @@ -15282,6 +15708,11 @@ func (newState *TableExistsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *TableExistsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableExistsResponse_SdkV2) { } +func (c TableExistsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableExistsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15315,82 +15746,82 @@ func (o TableExistsResponse_SdkV2) Type(ctx context.Context) attr.Type { type TableInfo_SdkV2 struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // Name of parent catalog. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The array of __ColumnInfo__ definitions of the table's columns. - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this table was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of table creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique ID of the Data Access Configuration to use with the table data. - DataAccessConfigurationId types.String `tfsdk:"data_access_configuration_id" tf:"optional"` + DataAccessConfigurationId types.String `tfsdk:"data_access_configuration_id" tf:""` // Data source format - DataSourceFormat types.String `tfsdk:"data_source_format" tf:"optional"` + DataSourceFormat types.String `tfsdk:"data_source_format" tf:""` // Time at which this table was deleted, in epoch milliseconds. Field is // omitted if table is not deleted. - DeletedAt types.Int64 `tfsdk:"deleted_at" tf:"optional"` + DeletedAt types.Int64 `tfsdk:"deleted_at" tf:""` // Information pertaining to current state of the delta table. - DeltaRuntimePropertiesKvpairs types.List `tfsdk:"delta_runtime_properties_kvpairs" tf:"optional,object"` + DeltaRuntimePropertiesKvpairs types.List `tfsdk:"delta_runtime_properties_kvpairs" tf:"object"` - EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"object"` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"object"` // Full name of table, in form of // __catalog_name__.__schema_name__.__table_name__ - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of table, relative to parent schema. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of table. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // The pipeline ID of the table. Applicable for tables created by pipelines // (Materialized View, Streaming Table, etc.). - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` - RowFilter types.List `tfsdk:"row_filter" tf:"optional,object"` + RowFilter types.List `tfsdk:"row_filter" tf:"object"` // Name of parent schema relative to its parent catalog. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // List of schemes whose objects can be referenced without qualification. - SqlPath types.String `tfsdk:"sql_path" tf:"optional"` + SqlPath types.String `tfsdk:"sql_path" tf:""` // Name of the storage credential, when a storage credential is configured // for use with this table. - StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:"optional"` + StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:""` // Storage root URL for table (for **MANAGED**, **EXTERNAL** tables) - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // List of table constraints. Note: this field is not set in the output of // the __listTables__ API. - TableConstraints types.List `tfsdk:"table_constraints" tf:"optional"` + TableConstraints types.List `tfsdk:"table_constraints" tf:""` // The unique identifier of the table. - TableId types.String `tfsdk:"table_id" tf:"optional"` + TableId types.String `tfsdk:"table_id" tf:""` - TableType types.String `tfsdk:"table_type" tf:"optional"` + TableType types.String `tfsdk:"table_type" tf:""` // Time at which this table was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the table. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // View definition SQL (when __table_type__ is **VIEW**, // **MATERIALIZED_VIEW**, or **STREAMING_TABLE**) - ViewDefinition types.String `tfsdk:"view_definition" tf:"optional"` + ViewDefinition types.String `tfsdk:"view_definition" tf:""` // View dependencies (when table_type == **VIEW** or **MATERIALIZED_VIEW**, // **STREAMING_TABLE**) - when DependencyList is None, the dependency is not // provided; - when DependencyList is an empty list, the dependency is // provided but is empty; - when DependencyList is not an empty list, // dependencies are provided and recorded. - ViewDependencies types.List `tfsdk:"view_dependencies" tf:"optional,object"` + ViewDependencies types.List `tfsdk:"view_dependencies" tf:"object"` } func (newState *TableInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableInfo_SdkV2) { @@ -15399,6 +15830,18 @@ func (newState *TableInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ta func (newState *TableInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableInfo_SdkV2) { } +func (c TableInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ColumnInfo_SdkV2{}.ToSchema(cs, append(path, "columns")...) + DeltaRuntimePropertiesKvPairs_SdkV2{}.ToSchema(cs, append(path, "delta_runtime_properties_kvpairs")...) + EffectivePredictiveOptimizationFlag_SdkV2{}.ToSchema(cs, append(path, "effective_predictive_optimization_flag")...) + EncryptionDetails_SdkV2{}.ToSchema(cs, append(path, "encryption_details")...) + TableRowFilter_SdkV2{}.ToSchema(cs, append(path, "row_filter")...) + TableConstraint_SdkV2{}.ToSchema(cs, append(path, "table_constraints")...) + DependencyList_SdkV2{}.ToSchema(cs, append(path, "view_dependencies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15740,6 +16183,13 @@ func (newState *TableRowFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *TableRowFilter_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableRowFilter_SdkV2) { } +func (c TableRowFilter_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "function_name")...) + cs.SetRequired(append(path, "input_column_names")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableRowFilter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15805,9 +16255,9 @@ func (o *TableRowFilter_SdkV2) SetInputColumnNames(ctx context.Context, v []type type TableSummary_SdkV2 struct { // The full name of the table. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` - TableType types.String `tfsdk:"table_type" tf:"optional"` + TableType types.String `tfsdk:"table_type" tf:""` } func (newState *TableSummary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSummary_SdkV2) { @@ -15816,6 +16266,11 @@ func (newState *TableSummary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *TableSummary_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableSummary_SdkV2) { } +func (c TableSummary_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableSummary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15852,14 +16307,14 @@ func (o TableSummary_SdkV2) Type(ctx context.Context) attr.Type { type TemporaryCredentials_SdkV2 struct { // AWS temporary credentials for API authentication. Read more at // https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. - AwsTempCredentials types.List `tfsdk:"aws_temp_credentials" tf:"optional,object"` + AwsTempCredentials types.List `tfsdk:"aws_temp_credentials" tf:"object"` // Azure Active Directory token, essentially the Oauth token for Azure // Service Principal or Managed Identity. Read more at // https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/service-prin-aad-token - AzureAad types.List `tfsdk:"azure_aad" tf:"optional,object"` + AzureAad types.List `tfsdk:"azure_aad" tf:"object"` // Server time when the credential will expire, in epoch milliseconds. The // API client is advised to cache the credential given this expiration time. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` } func (newState *TemporaryCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TemporaryCredentials_SdkV2) { @@ -15868,6 +16323,13 @@ func (newState *TemporaryCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *TemporaryCredentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState TemporaryCredentials_SdkV2) { } +func (c TemporaryCredentials_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsCredentials_SdkV2{}.ToSchema(cs, append(path, "aws_temp_credentials")...) + AzureActiveDirectoryToken_SdkV2{}.ToSchema(cs, append(path, "azure_aad")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TemporaryCredentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15968,12 +16430,12 @@ type TriggeredUpdateStatus_SdkV2 struct { // The last source table Delta version that was synced to the online table. // Note that this Delta version may not be completely synced to the online // table yet. - LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:"optional"` + LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:""` // The timestamp of the last time any data was synchronized from the source // table to the online table. - Timestamp types.String `tfsdk:"timestamp" tf:"optional"` + Timestamp types.String `tfsdk:"timestamp" tf:""` // Progress of the active data synchronization pipeline. - TriggeredUpdateProgress types.List `tfsdk:"triggered_update_progress" tf:"optional,object"` + TriggeredUpdateProgress types.List `tfsdk:"triggered_update_progress" tf:"object"` } func (newState *TriggeredUpdateStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggeredUpdateStatus_SdkV2) { @@ -15982,6 +16444,12 @@ func (newState *TriggeredUpdateStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *TriggeredUpdateStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState TriggeredUpdateStatus_SdkV2) { } +func (c TriggeredUpdateStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineProgress_SdkV2{}.ToSchema(cs, append(path, "triggered_update_progress")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TriggeredUpdateStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16055,12 +16523,6 @@ type UnassignRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *UnassignRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnassignRequest_SdkV2) { -} - -func (newState *UnassignRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnassignRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnassignRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16097,12 +16559,6 @@ func (o UnassignRequest_SdkV2) Type(ctx context.Context) attr.Type { type UnassignResponse_SdkV2 struct { } -func (newState *UnassignResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnassignResponse_SdkV2) { -} - -func (newState *UnassignResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnassignResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnassignResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16133,12 +16589,6 @@ func (o UnassignResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateAssignmentResponse_SdkV2 struct { } -func (newState *UpdateAssignmentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAssignmentResponse_SdkV2) { -} - -func (newState *UpdateAssignmentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAssignmentResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAssignmentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16168,21 +16618,21 @@ func (o UpdateAssignmentResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateCatalog_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // Whether the current securable is accessible from all workspaces or a // specific set of workspaces. - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // The name of the catalog. Name types.String `tfsdk:"-"` // New name for the catalog. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of catalog. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` } func (newState *UpdateCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCatalog_SdkV2) { @@ -16191,6 +16641,12 @@ func (newState *UpdateCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *UpdateCatalog_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCatalog_SdkV2) { } +func (c UpdateCatalog_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCatalog. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16268,11 +16724,11 @@ type UpdateConnection_SdkV2 struct { // Name of the connection. Name types.String `tfsdk:"-"` // New name for the connection. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // A map of key-value properties attached to the securable. Options types.Map `tfsdk:"options" tf:""` // Username of current owner of the connection. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` } func (newState *UpdateConnection_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateConnection_SdkV2) { @@ -16281,6 +16737,13 @@ func (newState *UpdateConnection_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *UpdateConnection_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateConnection_SdkV2) { } +func (c UpdateConnection_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateConnection. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16350,36 +16813,36 @@ func (o *UpdateConnection_SdkV2) SetOptions(ctx context.Context, v map[string]ty type UpdateCredentialRequest_SdkV2 struct { // The AWS IAM role configuration - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. Only applicable when purpose // is **STORAGE**. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // GCP long-lived credential. Databricks-created Google Cloud Storage // service account. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"object"` // Force an update even if there are dependent services (when purpose is // **SERVICE**) or dependent external locations and external tables (when // purpose is **STORAGE**). - Force types.Bool `tfsdk:"force" tf:"optional"` + Force types.Bool `tfsdk:"force" tf:""` // Whether the current securable is accessible from all workspaces or a // specific set of workspaces. - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Name of the credential. NameArg types.String `tfsdk:"-"` // New name of credential. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of credential. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Whether the credential is usable only for read operations. Only // applicable when purpose is **STORAGE**. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Supply true to this argument to skip validation of the updated // credential. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *UpdateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialRequest_SdkV2) { @@ -16388,6 +16851,16 @@ func (newState *UpdateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *UpdateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialRequest_SdkV2) { } +func (c UpdateCredentialRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRole_SdkV2{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentity_SdkV2{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal_SdkV2{}.ToSchema(cs, append(path, "azure_service_principal")...) + DatabricksGcpServiceAccount_SdkV2{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + cs.SetRequired(append(path, "name_arg")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16560,35 +17033,35 @@ func (o *UpdateCredentialRequest_SdkV2) SetDatabricksGcpServiceAccount(ctx conte type UpdateExternalLocation_SdkV2 struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the storage credential used with this location. - CredentialName types.String `tfsdk:"credential_name" tf:"optional"` + CredentialName types.String `tfsdk:"credential_name" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"object"` // Indicates whether fallback mode is enabled for this external location. // When fallback mode is enabled, the access to the location falls back to // cluster credentials if UC credentials are not sufficient. - Fallback types.Bool `tfsdk:"fallback" tf:"optional"` + Fallback types.Bool `tfsdk:"fallback" tf:""` // Force update even if changing url invalidates dependent external tables // or mounts. - Force types.Bool `tfsdk:"force" tf:"optional"` + Force types.Bool `tfsdk:"force" tf:""` - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Name of the external location. Name types.String `tfsdk:"-"` // New name for the external location. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // The owner of the external location. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Indicates whether the external location is read-only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Skips validation of the storage credential associated with the external // location. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` // Path URL of the external location. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *UpdateExternalLocation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExternalLocation_SdkV2) { @@ -16597,6 +17070,13 @@ func (newState *UpdateExternalLocation_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *UpdateExternalLocation_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExternalLocation_SdkV2) { } +func (c UpdateExternalLocation_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EncryptionDetails_SdkV2{}.ToSchema(cs, append(path, "encryption_details")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExternalLocation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16687,7 +17167,7 @@ type UpdateFunction_SdkV2 struct { // __catalog_name__.__schema_name__.__function__name__). Name types.String `tfsdk:"-"` // Username of current owner of function. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` } func (newState *UpdateFunction_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateFunction_SdkV2) { @@ -16696,6 +17176,12 @@ func (newState *UpdateFunction_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *UpdateFunction_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateFunction_SdkV2) { } +func (c UpdateFunction_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateFunction. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16732,22 +17218,22 @@ func (o UpdateFunction_SdkV2) Type(ctx context.Context) attr.Type { type UpdateMetastore_SdkV2 struct { // The organization name of a Delta Sharing entity, to be used in // Databricks-to-Databricks Delta Sharing as the official name. - DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:"optional"` + DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:""` // The lifetime of delta sharing recipient token in seconds. - DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:"optional"` + DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:""` // The scope of Delta Sharing enabled for the metastore. - DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:"optional"` + DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:""` // Unique ID of the metastore. Id types.String `tfsdk:"-"` // New name for the metastore. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // The owner of the metastore. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Privilege model version of the metastore, of the form `major.minor` // (e.g., `1.0`). - PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:"optional"` + PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:""` // UUID of storage credential to access the metastore storage_root. - StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:"optional"` + StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:""` } func (newState *UpdateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMetastore_SdkV2) { @@ -16756,6 +17242,12 @@ func (newState *UpdateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *UpdateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateMetastore_SdkV2) { } +func (c UpdateMetastore_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMetastore. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16805,9 +17297,9 @@ type UpdateMetastoreAssignment_SdkV2 struct { // The name of the default catalog in the metastore. This field is // depracted. Please use "Default Namespace API" to configure the default // catalog for a Databricks workspace. - DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:"optional"` + DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:""` // The unique ID of the metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // A workspace ID. WorkspaceId types.Int64 `tfsdk:"-"` } @@ -16818,6 +17310,12 @@ func (newState *UpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *UpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateMetastoreAssignment_SdkV2) { } +func (c UpdateMetastoreAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16855,7 +17353,7 @@ func (o UpdateMetastoreAssignment_SdkV2) Type(ctx context.Context) attr.Type { type UpdateModelVersionRequest_SdkV2 struct { // The comment attached to the model version - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The three-level (fully qualified) name of the model version FullName types.String `tfsdk:"-"` // The integer version number of the model version @@ -16868,6 +17366,13 @@ func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest_SdkV2) { } +func (c UpdateModelVersionRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "full_name")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16907,36 +17412,36 @@ type UpdateMonitor_SdkV2 struct { // Name of the baseline table from which drift metrics are computed from. // Columns in the monitored table should also be present in the baseline // table. - BaselineTableName types.String `tfsdk:"baseline_table_name" tf:"optional"` + BaselineTableName types.String `tfsdk:"baseline_table_name" tf:""` // Custom metrics to compute on the monitored table. These can be aggregate // metrics, derived metrics (from already computed aggregate metrics), or // drift metrics (comparing metrics across time windows). - CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` + CustomMetrics types.List `tfsdk:"custom_metrics" tf:""` // Id of dashboard that visualizes the computed metrics. This can be empty // if the monitor is in PENDING state. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The data classification config for the monitor. - DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"optional,object"` + DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"object"` // Configuration for monitoring inference logs. - InferenceLog types.List `tfsdk:"inference_log" tf:"optional,object"` + InferenceLog types.List `tfsdk:"inference_log" tf:"object"` // The notification settings for the monitor. - Notifications types.List `tfsdk:"notifications" tf:"optional,object"` + Notifications types.List `tfsdk:"notifications" tf:"object"` // Schema where output metric tables are created. OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // The schedule for automatically updating and refreshing metric tables. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.List `tfsdk:"schedule" tf:"object"` // List of column expressions to slice data with for targeted analysis. The // data is grouped by each expression independently, resulting in a separate // slice for each predicate and its complements. For high-cardinality // columns, only the top 100 unique values by frequency will generate // slices. - SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` + SlicingExprs types.List `tfsdk:"slicing_exprs" tf:""` // Configuration for monitoring snapshot tables. - Snapshot types.List `tfsdk:"snapshot" tf:"optional,object"` + Snapshot types.List `tfsdk:"snapshot" tf:"object"` // Full name of the table. TableName types.String `tfsdk:"-"` // Configuration for monitoring time series tables. - TimeSeries types.List `tfsdk:"time_series" tf:"optional,object"` + TimeSeries types.List `tfsdk:"time_series" tf:"object"` } func (newState *UpdateMonitor_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMonitor_SdkV2) { @@ -16945,6 +17450,20 @@ func (newState *UpdateMonitor_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *UpdateMonitor_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateMonitor_SdkV2) { } +func (c UpdateMonitor_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MonitorMetric_SdkV2{}.ToSchema(cs, append(path, "custom_metrics")...) + MonitorDataClassificationConfig_SdkV2{}.ToSchema(cs, append(path, "data_classification_config")...) + MonitorInferenceLog_SdkV2{}.ToSchema(cs, append(path, "inference_log")...) + MonitorNotifications_SdkV2{}.ToSchema(cs, append(path, "notifications")...) + cs.SetRequired(append(path, "output_schema_name")...) + MonitorCronSchedule_SdkV2{}.ToSchema(cs, append(path, "schedule")...) + MonitorSnapshot_SdkV2{}.ToSchema(cs, append(path, "snapshot")...) + cs.SetRequired(append(path, "table_name")...) + MonitorTimeSeries_SdkV2{}.ToSchema(cs, append(path, "time_series")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMonitor. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17233,7 +17752,7 @@ func (o *UpdateMonitor_SdkV2) SetTimeSeries(ctx context.Context, v MonitorTimeSe type UpdatePermissions_SdkV2 struct { // Array of permissions change objects. - Changes types.List `tfsdk:"changes" tf:"optional"` + Changes types.List `tfsdk:"changes" tf:""` // Full name of securable. FullName types.String `tfsdk:"-"` // Type of securable. @@ -17246,6 +17765,14 @@ func (newState *UpdatePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *UpdatePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePermissions_SdkV2) { } +func (c UpdatePermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PermissionsChange_SdkV2{}.ToSchema(cs, append(path, "changes")...) + cs.SetRequired(append(path, "full_name")...) + cs.SetRequired(append(path, "securable_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17313,13 +17840,13 @@ func (o *UpdatePermissions_SdkV2) SetChanges(ctx context.Context, v []Permission type UpdateRegisteredModelRequest_SdkV2 struct { // The comment attached to the registered model - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The three-level (fully qualified) name of the registered model FullName types.String `tfsdk:"-"` // New name for the registered model. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // The identifier of the user who owns the registered model - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` } func (newState *UpdateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegisteredModelRequest_SdkV2) { @@ -17328,6 +17855,12 @@ func (newState *UpdateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCre func (newState *UpdateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRegisteredModelRequest_SdkV2) { } +func (c UpdateRegisteredModelRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "full_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRegisteredModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17368,12 +17901,6 @@ func (o UpdateRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type type UpdateResponse_SdkV2 struct { } -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { -} - -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17403,18 +17930,18 @@ func (o UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateSchema_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // Full name of the schema. FullName types.String `tfsdk:"-"` // New name for the schema. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of schema. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` } func (newState *UpdateSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSchema_SdkV2) { @@ -17423,6 +17950,12 @@ func (newState *UpdateSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UpdateSchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateSchema_SdkV2) { } +func (c UpdateSchema_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "full_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateSchema. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17496,33 +18029,33 @@ func (o *UpdateSchema_SdkV2) SetProperties(ctx context.Context, v map[string]typ type UpdateStorageCredential_SdkV2 struct { // The AWS IAM role configuration. - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"object"` // The Cloudflare API token configuration. - CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The Databricks managed GCP service account configuration. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"object"` // Force update even if there are dependent external locations or external // tables. - Force types.Bool `tfsdk:"force" tf:"optional"` + Force types.Bool `tfsdk:"force" tf:""` - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Name of the storage credential. Name types.String `tfsdk:"-"` // New name for the storage credential. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of credential. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Whether the storage credential is only usable for read operations. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Supplying true to this argument skips validation of the updated // credential. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *UpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateStorageCredential_SdkV2) { @@ -17531,6 +18064,17 @@ func (newState *UpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *UpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateStorageCredential_SdkV2) { } +func (c UpdateStorageCredential_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRoleRequest_SdkV2{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentityResponse_SdkV2{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal_SdkV2{}.ToSchema(cs, append(path, "azure_service_principal")...) + CloudflareApiToken_SdkV2{}.ToSchema(cs, append(path, "cloudflare_api_token")...) + DatabricksGcpServiceAccountRequest_SdkV2{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17737,13 +18281,7 @@ type UpdateTableRequest_SdkV2 struct { // Full name of the table. FullName types.String `tfsdk:"-"` - Owner types.String `tfsdk:"owner" tf:"optional"` -} - -func (newState *UpdateTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateTableRequest_SdkV2) { -} - -func (newState *UpdateTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateTableRequest_SdkV2) { + Owner types.String `tfsdk:"owner" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateTableRequest. @@ -17781,13 +18319,13 @@ func (o UpdateTableRequest_SdkV2) Type(ctx context.Context) attr.Type { type UpdateVolumeRequestContent_SdkV2 struct { // The comment attached to the volume - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The three-level (fully qualified) name of the volume Name types.String `tfsdk:"-"` // New name for the volume. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // The identifier of the user who owns the volume - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` } func (newState *UpdateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVolumeRequestContent_SdkV2) { @@ -17796,6 +18334,12 @@ func (newState *UpdateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *UpdateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateVolumeRequestContent_SdkV2) { } +func (c UpdateVolumeRequestContent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateVolumeRequestContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17835,11 +18379,11 @@ func (o UpdateVolumeRequestContent_SdkV2) Type(ctx context.Context) attr.Type { type UpdateWorkspaceBindings_SdkV2 struct { // A list of workspace IDs. - AssignWorkspaces types.List `tfsdk:"assign_workspaces" tf:"optional"` + AssignWorkspaces types.List `tfsdk:"assign_workspaces" tf:""` // The name of the catalog. Name types.String `tfsdk:"-"` // A list of workspace IDs. - UnassignWorkspaces types.List `tfsdk:"unassign_workspaces" tf:"optional"` + UnassignWorkspaces types.List `tfsdk:"unassign_workspaces" tf:""` } func (newState *UpdateWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceBindings_SdkV2) { @@ -17848,6 +18392,12 @@ func (newState *UpdateWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *UpdateWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindings_SdkV2) { } +func (c UpdateWorkspaceBindings_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWorkspaceBindings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17944,9 +18494,9 @@ func (o *UpdateWorkspaceBindings_SdkV2) SetUnassignWorkspaces(ctx context.Contex type UpdateWorkspaceBindingsParameters_SdkV2 struct { // List of workspace bindings - Add types.List `tfsdk:"add" tf:"optional"` + Add types.List `tfsdk:"add" tf:""` // List of workspace bindings - Remove types.List `tfsdk:"remove" tf:"optional"` + Remove types.List `tfsdk:"remove" tf:""` // The name of the securable. SecurableName types.String `tfsdk:"-"` // The type of the securable to bind to a workspace. @@ -17959,6 +18509,15 @@ func (newState *UpdateWorkspaceBindingsParameters_SdkV2) SyncEffectiveFieldsDuri func (newState *UpdateWorkspaceBindingsParameters_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindingsParameters_SdkV2) { } +func (c UpdateWorkspaceBindingsParameters_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceBinding_SdkV2{}.ToSchema(cs, append(path, "add")...) + WorkspaceBinding_SdkV2{}.ToSchema(cs, append(path, "remove")...) + cs.SetRequired(append(path, "securable_name")...) + cs.SetRequired(append(path, "securable_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWorkspaceBindingsParameters. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18057,24 +18616,24 @@ func (o *UpdateWorkspaceBindingsParameters_SdkV2) SetRemove(ctx context.Context, type ValidateCredentialRequest_SdkV2 struct { // The AWS IAM role configuration - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"object"` // Required. The name of an existing credential or long-lived cloud // credential to validate. - CredentialName types.String `tfsdk:"credential_name" tf:"optional"` + CredentialName types.String `tfsdk:"credential_name" tf:""` // The name of an existing external location to validate. Only applicable // for storage credentials (purpose is **STORAGE**.) - ExternalLocationName types.String `tfsdk:"external_location_name" tf:"optional"` + ExternalLocationName types.String `tfsdk:"external_location_name" tf:""` // The purpose of the credential. This should only be used when the // credential is specified. - Purpose types.String `tfsdk:"purpose" tf:"optional"` + Purpose types.String `tfsdk:"purpose" tf:""` // Whether the credential is only usable for read operations. Only // applicable for storage credentials (purpose is **STORAGE**.) - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // The external location url to validate. Only applicable when purpose is // **STORAGE**. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *ValidateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateCredentialRequest_SdkV2) { @@ -18083,6 +18642,13 @@ func (newState *ValidateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ValidateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateCredentialRequest_SdkV2) { } +func (c ValidateCredentialRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRole_SdkV2{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentity_SdkV2{}.ToSchema(cs, append(path, "azure_managed_identity")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18188,9 +18754,9 @@ func (o *ValidateCredentialRequest_SdkV2) SetAzureManagedIdentity(ctx context.Co type ValidateCredentialResponse_SdkV2 struct { // Whether the tested location is a directory in cloud storage. Only // applicable for when purpose is **STORAGE**. - IsDir types.Bool `tfsdk:"isDir" tf:"optional"` + IsDir types.Bool `tfsdk:"isDir" tf:""` // The results of the validation check. - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ValidateCredentialResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateCredentialResponse_SdkV2) { @@ -18199,6 +18765,12 @@ func (newState *ValidateCredentialResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ValidateCredentialResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateCredentialResponse_SdkV2) { } +func (c ValidateCredentialResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CredentialValidationResult_SdkV2{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateCredentialResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18264,23 +18836,23 @@ func (o *ValidateCredentialResponse_SdkV2) SetResults(ctx context.Context, v []C type ValidateStorageCredential_SdkV2 struct { // The AWS IAM role configuration. - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"object"` // The Cloudflare API token configuration. - CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"object"` // The Databricks created GCP service account configuration. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"object"` // The name of an existing external location to validate. - ExternalLocationName types.String `tfsdk:"external_location_name" tf:"optional"` + ExternalLocationName types.String `tfsdk:"external_location_name" tf:""` // Whether the storage credential is only usable for read operations. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // The name of the storage credential to validate. - StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:"optional"` + StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:""` // The external location url to validate. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *ValidateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateStorageCredential_SdkV2) { @@ -18289,6 +18861,16 @@ func (newState *ValidateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ValidateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateStorageCredential_SdkV2) { } +func (c ValidateStorageCredential_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRoleRequest_SdkV2{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentityRequest_SdkV2{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal_SdkV2{}.ToSchema(cs, append(path, "azure_service_principal")...) + CloudflareApiToken_SdkV2{}.ToSchema(cs, append(path, "cloudflare_api_token")...) + DatabricksGcpServiceAccountRequest_SdkV2{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18484,9 +19066,9 @@ func (o *ValidateStorageCredential_SdkV2) SetDatabricksGcpServiceAccount(ctx con type ValidateStorageCredentialResponse_SdkV2 struct { // Whether the tested location is a directory in cloud storage. - IsDir types.Bool `tfsdk:"isDir" tf:"optional"` + IsDir types.Bool `tfsdk:"isDir" tf:""` // The results of the validation check. - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ValidateStorageCredentialResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateStorageCredentialResponse_SdkV2) { @@ -18495,6 +19077,12 @@ func (newState *ValidateStorageCredentialResponse_SdkV2) SyncEffectiveFieldsDuri func (newState *ValidateStorageCredentialResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateStorageCredentialResponse_SdkV2) { } +func (c ValidateStorageCredentialResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ValidationResult_SdkV2{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateStorageCredentialResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18560,11 +19148,11 @@ func (o *ValidateStorageCredentialResponse_SdkV2) SetResults(ctx context.Context type ValidationResult_SdkV2 struct { // Error message would exist when the result does not equal to **PASS**. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // The operation tested. - Operation types.String `tfsdk:"operation" tf:"optional"` + Operation types.String `tfsdk:"operation" tf:""` // The results of the tested operation. - Result types.String `tfsdk:"result" tf:"optional"` + Result types.String `tfsdk:"result" tf:""` } func (newState *ValidationResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidationResult_SdkV2) { @@ -18573,6 +19161,11 @@ func (newState *ValidationResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ValidationResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidationResult_SdkV2) { } +func (c ValidationResult_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidationResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18610,41 +19203,41 @@ func (o ValidationResult_SdkV2) Type(ctx context.Context) attr.Type { type VolumeInfo_SdkV2 struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // The name of the catalog where the schema and the volume are - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the volume - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The identifier of the user who created the volume - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"object"` // The three-level (fully qualified) name of the volume - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // The unique identifier of the metastore - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The name of the volume - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The identifier of the user who owns the volume - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // The name of the schema where the volume is - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // The storage location on the cloud - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The identifier of the user who updated the volume last time - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // The unique identifier of the volume - VolumeId types.String `tfsdk:"volume_id" tf:"optional"` + VolumeId types.String `tfsdk:"volume_id" tf:""` - VolumeType types.String `tfsdk:"volume_type" tf:"optional"` + VolumeType types.String `tfsdk:"volume_type" tf:""` } func (newState *VolumeInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan VolumeInfo_SdkV2) { @@ -18653,6 +19246,12 @@ func (newState *VolumeInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan V func (newState *VolumeInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState VolumeInfo_SdkV2) { } +func (c VolumeInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EncryptionDetails_SdkV2{}.ToSchema(cs, append(path, "encryption_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VolumeInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18747,9 +19346,9 @@ func (o *VolumeInfo_SdkV2) SetEncryptionDetails(ctx context.Context, v Encryptio } type WorkspaceBinding_SdkV2 struct { - BindingType types.String `tfsdk:"binding_type" tf:"optional"` + BindingType types.String `tfsdk:"binding_type" tf:""` - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` } func (newState *WorkspaceBinding_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceBinding_SdkV2) { @@ -18758,6 +19357,11 @@ func (newState *WorkspaceBinding_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *WorkspaceBinding_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceBinding_SdkV2) { } +func (c WorkspaceBinding_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceBinding. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18794,11 +19398,11 @@ func (o WorkspaceBinding_SdkV2) Type(ctx context.Context) attr.Type { // Currently assigned workspace bindings type WorkspaceBindingsResponse_SdkV2 struct { // List of workspace bindings - Bindings types.List `tfsdk:"bindings" tf:"optional"` + Bindings types.List `tfsdk:"bindings" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *WorkspaceBindingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceBindingsResponse_SdkV2) { @@ -18807,6 +19411,12 @@ func (newState *WorkspaceBindingsResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *WorkspaceBindingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceBindingsResponse_SdkV2) { } +func (c WorkspaceBindingsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceBinding_SdkV2{}.ToSchema(cs, append(path, "bindings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceBindingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/catalog_tf/model.go b/internal/service/catalog_tf/model.go index 4b2917471..c518fb0d3 100755 --- a/internal/service/catalog_tf/model.go +++ b/internal/service/catalog_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -22,7 +23,7 @@ import ( ) type AccountsCreateMetastore struct { - MetastoreInfo types.Object `tfsdk:"metastore_info" tf:"optional,object"` + MetastoreInfo types.Object `tfsdk:"metastore_info" tf:"object"` } func (newState *AccountsCreateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateMetastore) { @@ -31,6 +32,12 @@ func (newState *AccountsCreateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *AccountsCreateMetastore) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastore) { } +func (c AccountsCreateMetastore) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateMetastore{}.ToSchema(cs, append(path, "metastore_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsCreateMetastore. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -93,7 +100,7 @@ func (o *AccountsCreateMetastore) SetMetastoreInfo(ctx context.Context, v Create } type AccountsCreateMetastoreAssignment struct { - MetastoreAssignment types.Object `tfsdk:"metastore_assignment" tf:"optional,object"` + MetastoreAssignment types.Object `tfsdk:"metastore_assignment" tf:"object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` // Workspace ID. @@ -106,6 +113,14 @@ func (newState *AccountsCreateMetastoreAssignment) SyncEffectiveFieldsDuringCrea func (newState *AccountsCreateMetastoreAssignment) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastoreAssignment) { } +func (c AccountsCreateMetastoreAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateMetastoreAssignment{}.ToSchema(cs, append(path, "metastore_assignment")...) + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsCreateMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -172,7 +187,7 @@ func (o *AccountsCreateMetastoreAssignment) SetMetastoreAssignment(ctx context.C } type AccountsCreateStorageCredential struct { - CredentialInfo types.Object `tfsdk:"credential_info" tf:"optional,object"` + CredentialInfo types.Object `tfsdk:"credential_info" tf:"object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` } @@ -183,6 +198,13 @@ func (newState *AccountsCreateStorageCredential) SyncEffectiveFieldsDuringCreate func (newState *AccountsCreateStorageCredential) SyncEffectiveFieldsDuringRead(existingState AccountsCreateStorageCredential) { } +func (c AccountsCreateStorageCredential) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateStorageCredential{}.ToSchema(cs, append(path, "credential_info")...) + cs.SetRequired(append(path, "metastore_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsCreateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -247,7 +269,7 @@ func (o *AccountsCreateStorageCredential) SetCredentialInfo(ctx context.Context, } type AccountsMetastoreAssignment struct { - MetastoreAssignment types.Object `tfsdk:"metastore_assignment" tf:"optional,object"` + MetastoreAssignment types.Object `tfsdk:"metastore_assignment" tf:"object"` } func (newState *AccountsMetastoreAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsMetastoreAssignment) { @@ -256,6 +278,12 @@ func (newState *AccountsMetastoreAssignment) SyncEffectiveFieldsDuringCreateOrUp func (newState *AccountsMetastoreAssignment) SyncEffectiveFieldsDuringRead(existingState AccountsMetastoreAssignment) { } +func (c AccountsMetastoreAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MetastoreAssignment{}.ToSchema(cs, append(path, "metastore_assignment")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -318,7 +346,7 @@ func (o *AccountsMetastoreAssignment) SetMetastoreAssignment(ctx context.Context } type AccountsMetastoreInfo struct { - MetastoreInfo types.Object `tfsdk:"metastore_info" tf:"optional,object"` + MetastoreInfo types.Object `tfsdk:"metastore_info" tf:"object"` } func (newState *AccountsMetastoreInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsMetastoreInfo) { @@ -327,6 +355,12 @@ func (newState *AccountsMetastoreInfo) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *AccountsMetastoreInfo) SyncEffectiveFieldsDuringRead(existingState AccountsMetastoreInfo) { } +func (c AccountsMetastoreInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MetastoreInfo{}.ToSchema(cs, append(path, "metastore_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsMetastoreInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -389,7 +423,7 @@ func (o *AccountsMetastoreInfo) SetMetastoreInfo(ctx context.Context, v Metastor } type AccountsStorageCredentialInfo struct { - CredentialInfo types.Object `tfsdk:"credential_info" tf:"optional,object"` + CredentialInfo types.Object `tfsdk:"credential_info" tf:"object"` } func (newState *AccountsStorageCredentialInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsStorageCredentialInfo) { @@ -398,6 +432,12 @@ func (newState *AccountsStorageCredentialInfo) SyncEffectiveFieldsDuringCreateOr func (newState *AccountsStorageCredentialInfo) SyncEffectiveFieldsDuringRead(existingState AccountsStorageCredentialInfo) { } +func (c AccountsStorageCredentialInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StorageCredentialInfo{}.ToSchema(cs, append(path, "credential_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsStorageCredentialInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -463,7 +503,7 @@ type AccountsUpdateMetastore struct { // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` - MetastoreInfo types.Object `tfsdk:"metastore_info" tf:"optional,object"` + MetastoreInfo types.Object `tfsdk:"metastore_info" tf:"object"` } func (newState *AccountsUpdateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateMetastore) { @@ -472,6 +512,13 @@ func (newState *AccountsUpdateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *AccountsUpdateMetastore) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastore) { } +func (c AccountsUpdateMetastore) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "metastore_id")...) + UpdateMetastore{}.ToSchema(cs, append(path, "metastore_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsUpdateMetastore. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -536,7 +583,7 @@ func (o *AccountsUpdateMetastore) SetMetastoreInfo(ctx context.Context, v Update } type AccountsUpdateMetastoreAssignment struct { - MetastoreAssignment types.Object `tfsdk:"metastore_assignment" tf:"optional,object"` + MetastoreAssignment types.Object `tfsdk:"metastore_assignment" tf:"object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` // Workspace ID. @@ -549,6 +596,14 @@ func (newState *AccountsUpdateMetastoreAssignment) SyncEffectiveFieldsDuringCrea func (newState *AccountsUpdateMetastoreAssignment) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastoreAssignment) { } +func (c AccountsUpdateMetastoreAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateMetastoreAssignment{}.ToSchema(cs, append(path, "metastore_assignment")...) + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsUpdateMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -615,7 +670,7 @@ func (o *AccountsUpdateMetastoreAssignment) SetMetastoreAssignment(ctx context.C } type AccountsUpdateStorageCredential struct { - CredentialInfo types.Object `tfsdk:"credential_info" tf:"optional,object"` + CredentialInfo types.Object `tfsdk:"credential_info" tf:"object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` // Name of the storage credential. @@ -628,6 +683,14 @@ func (newState *AccountsUpdateStorageCredential) SyncEffectiveFieldsDuringCreate func (newState *AccountsUpdateStorageCredential) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateStorageCredential) { } +func (c AccountsUpdateStorageCredential) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateStorageCredential{}.ToSchema(cs, append(path, "credential_info")...) + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "storage_credential_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsUpdateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -695,13 +758,13 @@ func (o *AccountsUpdateStorageCredential) SetCredentialInfo(ctx context.Context, type ArtifactAllowlistInfo struct { // A list of allowed artifact match patterns. - ArtifactMatchers types.List `tfsdk:"artifact_matchers" tf:"optional"` + ArtifactMatchers types.List `tfsdk:"artifact_matchers" tf:""` // Time at which this artifact allowlist was set, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of the user who set the artifact allowlist. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` } func (newState *ArtifactAllowlistInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ArtifactAllowlistInfo) { @@ -710,6 +773,12 @@ func (newState *ArtifactAllowlistInfo) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ArtifactAllowlistInfo) SyncEffectiveFieldsDuringRead(existingState ArtifactAllowlistInfo) { } +func (c ArtifactAllowlistInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ArtifactMatcher{}.ToSchema(cs, append(path, "artifact_matchers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ArtifactAllowlistInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -790,6 +859,13 @@ func (newState *ArtifactMatcher) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ar func (newState *ArtifactMatcher) SyncEffectiveFieldsDuringRead(existingState ArtifactMatcher) { } +func (c ArtifactMatcher) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "artifact")...) + cs.SetRequired(append(path, "match_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ArtifactMatcher. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -826,12 +902,6 @@ func (o ArtifactMatcher) Type(ctx context.Context) attr.Type { type AssignResponse struct { } -func (newState *AssignResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan AssignResponse) { -} - -func (newState *AssignResponse) SyncEffectiveFieldsDuringRead(existingState AssignResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in AssignResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -863,15 +933,15 @@ func (o AssignResponse) Type(ctx context.Context) attr.Type { // https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. type AwsCredentials struct { // The access key ID that identifies the temporary credentials. - AccessKeyId types.String `tfsdk:"access_key_id" tf:"optional"` + AccessKeyId types.String `tfsdk:"access_key_id" tf:""` // The Amazon Resource Name (ARN) of the S3 access point for temporary // credentials related the external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // The secret access key that can be used to sign AWS API requests. - SecretAccessKey types.String `tfsdk:"secret_access_key" tf:"optional"` + SecretAccessKey types.String `tfsdk:"secret_access_key" tf:""` // The token that users must pass to AWS API to use the temporary // credentials. - SessionToken types.String `tfsdk:"session_token" tf:"optional"` + SessionToken types.String `tfsdk:"session_token" tf:""` } func (newState *AwsCredentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsCredentials) { @@ -880,6 +950,11 @@ func (newState *AwsCredentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan Aws func (newState *AwsCredentials) SyncEffectiveFieldsDuringRead(existingState AwsCredentials) { } +func (c AwsCredentials) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsCredentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -921,13 +996,13 @@ func (o AwsCredentials) Type(ctx context.Context) attr.Type { type AwsIamRole struct { // The external ID used in role assumption to prevent the confused deputy // problem. - ExternalId types.String `tfsdk:"external_id" tf:"computed"` + ExternalId types.String `tfsdk:"external_id" tf:""` // The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary // credentials. - RoleArn types.String `tfsdk:"role_arn" tf:"optional"` + RoleArn types.String `tfsdk:"role_arn" tf:""` // The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks. // This is the identity that is going to assume the AWS IAM role. - UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:"computed"` + UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:""` } func (newState *AwsIamRole) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsIamRole) { @@ -936,6 +1011,13 @@ func (newState *AwsIamRole) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsIamR func (newState *AwsIamRole) SyncEffectiveFieldsDuringRead(existingState AwsIamRole) { } +func (c AwsIamRole) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "external_id")...) + cs.SetComputed(append(path, "unity_catalog_iam_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsIamRole. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -982,6 +1064,12 @@ func (newState *AwsIamRoleRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AwsIamRoleRequest) SyncEffectiveFieldsDuringRead(existingState AwsIamRoleRequest) { } +func (c AwsIamRoleRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "role_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsIamRoleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1016,12 +1104,12 @@ func (o AwsIamRoleRequest) Type(ctx context.Context) attr.Type { type AwsIamRoleResponse struct { // The external ID used in role assumption to prevent confused deputy // problem.. - ExternalId types.String `tfsdk:"external_id" tf:"optional"` + ExternalId types.String `tfsdk:"external_id" tf:""` // The Amazon Resource Name (ARN) of the AWS IAM role for S3 data access. RoleArn types.String `tfsdk:"role_arn" tf:""` // The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks. // This is the identity that is going to assume the AWS IAM role. - UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:"optional"` + UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:""` } func (newState *AwsIamRoleResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsIamRoleResponse) { @@ -1030,6 +1118,12 @@ func (newState *AwsIamRoleResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AwsIamRoleResponse) SyncEffectiveFieldsDuringRead(existingState AwsIamRoleResponse) { } +func (c AwsIamRoleResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "role_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsIamRoleResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1071,7 +1165,7 @@ func (o AwsIamRoleResponse) Type(ctx context.Context) attr.Type { type AzureActiveDirectoryToken struct { // Opaque token that contains claims that you can use in Azure Active // Directory to access cloud services. - AadToken types.String `tfsdk:"aad_token" tf:"optional"` + AadToken types.String `tfsdk:"aad_token" tf:""` } func (newState *AzureActiveDirectoryToken) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureActiveDirectoryToken) { @@ -1080,6 +1174,11 @@ func (newState *AzureActiveDirectoryToken) SyncEffectiveFieldsDuringCreateOrUpda func (newState *AzureActiveDirectoryToken) SyncEffectiveFieldsDuringRead(existingState AzureActiveDirectoryToken) { } +func (c AzureActiveDirectoryToken) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureActiveDirectoryToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1121,14 +1220,14 @@ type AzureManagedIdentity struct { // field is only used to persist the credential_id once it is fetched from // the credentials manager - as we only use the protobuf serializer to store // credentials, this ID gets persisted to the database. . - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // The Azure resource ID of the managed identity. Use the format, // `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}` // This is only available for user-assgined identities. For system-assigned // identities, the access_connector_id is used to identify the identity. If // this field is not provided, then we assume the AzureManagedIdentity is // using the system-assigned identity. - ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:"optional"` + ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:""` } func (newState *AzureManagedIdentity) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureManagedIdentity) { @@ -1137,6 +1236,12 @@ func (newState *AzureManagedIdentity) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *AzureManagedIdentity) SyncEffectiveFieldsDuringRead(existingState AzureManagedIdentity) { } +func (c AzureManagedIdentity) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_connector_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureManagedIdentity. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1183,7 +1288,7 @@ type AzureManagedIdentityRequest struct { // identities, the access_connector_id is used to identify the identity. If // this field is not provided, then we assume the AzureManagedIdentity is // for a system-assigned identity. - ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:"optional"` + ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:""` } func (newState *AzureManagedIdentityRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureManagedIdentityRequest) { @@ -1192,6 +1297,12 @@ func (newState *AzureManagedIdentityRequest) SyncEffectiveFieldsDuringCreateOrUp func (newState *AzureManagedIdentityRequest) SyncEffectiveFieldsDuringRead(existingState AzureManagedIdentityRequest) { } +func (c AzureManagedIdentityRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_connector_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureManagedIdentityRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1231,14 +1342,14 @@ type AzureManagedIdentityResponse struct { // /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}. AccessConnectorId types.String `tfsdk:"access_connector_id" tf:""` // The Databricks internal ID that represents this managed identity. - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // The Azure resource ID of the managed identity. Use the format // /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}. // This is only available for user-assgined identities. For system-assigned // identities, the access_connector_id is used to identify the identity. If // this field is not provided, then we assume the AzureManagedIdentity is // for a system-assigned identity. - ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:"optional"` + ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:""` } func (newState *AzureManagedIdentityResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureManagedIdentityResponse) { @@ -1247,6 +1358,12 @@ func (newState *AzureManagedIdentityResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *AzureManagedIdentityResponse) SyncEffectiveFieldsDuringRead(existingState AzureManagedIdentityResponse) { } +func (c AzureManagedIdentityResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_connector_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureManagedIdentityResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1301,6 +1418,14 @@ func (newState *AzureServicePrincipal) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *AzureServicePrincipal) SyncEffectiveFieldsDuringRead(existingState AzureServicePrincipal) { } +func (c AzureServicePrincipal) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "application_id")...) + cs.SetRequired(append(path, "client_secret")...) + cs.SetRequired(append(path, "directory_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureServicePrincipal. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1340,7 +1465,7 @@ func (o AzureServicePrincipal) Type(ctx context.Context) attr.Type { // https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas type AzureUserDelegationSas struct { // The signed URI (SAS Token) used to access blob services for a given path - SasToken types.String `tfsdk:"sas_token" tf:"optional"` + SasToken types.String `tfsdk:"sas_token" tf:""` } func (newState *AzureUserDelegationSas) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureUserDelegationSas) { @@ -1349,6 +1474,11 @@ func (newState *AzureUserDelegationSas) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *AzureUserDelegationSas) SyncEffectiveFieldsDuringRead(existingState AzureUserDelegationSas) { } +func (c AzureUserDelegationSas) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureUserDelegationSas. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1388,12 +1518,6 @@ type CancelRefreshRequest struct { TableName types.String `tfsdk:"-"` } -func (newState *CancelRefreshRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRefreshRequest) { -} - -func (newState *CancelRefreshRequest) SyncEffectiveFieldsDuringRead(existingState CancelRefreshRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRefreshRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1430,12 +1554,6 @@ func (o CancelRefreshRequest) Type(ctx context.Context) attr.Type { type CancelRefreshResponse struct { } -func (newState *CancelRefreshResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRefreshResponse) { -} - -func (newState *CancelRefreshResponse) SyncEffectiveFieldsDuringRead(existingState CancelRefreshResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRefreshResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1467,58 +1585,58 @@ type CatalogInfo struct { // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // The type of the catalog. - CatalogType types.String `tfsdk:"catalog_type" tf:"optional"` + CatalogType types.String `tfsdk:"catalog_type" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the connection to an external data source. - ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + ConnectionName types.String `tfsdk:"connection_name" tf:""` // Time at which this catalog was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of catalog creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag" tf:"object"` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // The full name of the catalog. Corresponds with the name field. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Whether the current securable is accessible from all workspaces or a // specific set of workspaces. - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of catalog. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // A map of key-value properties attached to the securable. - Options types.Map `tfsdk:"options" tf:"optional"` + Options types.Map `tfsdk:"options" tf:""` // Username of current owner of catalog. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // The name of delta sharing provider. // // A Delta Sharing catalog is a catalog that is based on a Delta share on a // remote sharing server. - ProviderName types.String `tfsdk:"provider_name" tf:"optional"` + ProviderName types.String `tfsdk:"provider_name" tf:""` // Status of an asynchronously provisioned resource. - ProvisioningInfo types.Object `tfsdk:"provisioning_info" tf:"optional,object"` + ProvisioningInfo types.Object `tfsdk:"provisioning_info" tf:"object"` // Kind of catalog securable. - SecurableKind types.String `tfsdk:"securable_kind" tf:"optional"` + SecurableKind types.String `tfsdk:"securable_kind" tf:""` - SecurableType types.String `tfsdk:"securable_type" tf:"optional"` + SecurableType types.String `tfsdk:"securable_type" tf:""` // The name of the share under the share provider. - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` // Storage Location URL (full path) for managed tables within catalog. - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // Storage root URL for managed tables within catalog. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // Time at which this catalog was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified catalog. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *CatalogInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan CatalogInfo) { @@ -1527,6 +1645,13 @@ func (newState *CatalogInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Catalo func (newState *CatalogInfo) SyncEffectiveFieldsDuringRead(existingState CatalogInfo) { } +func (c CatalogInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EffectivePredictiveOptimizationFlag{}.ToSchema(cs, append(path, "effective_predictive_optimization_flag")...) + ProvisioningInfo{}.ToSchema(cs, append(path, "provisioning_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CatalogInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1736,6 +1861,14 @@ func (newState *CloudflareApiToken) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CloudflareApiToken) SyncEffectiveFieldsDuringRead(existingState CloudflareApiToken) { } +func (c CloudflareApiToken) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_key_id")...) + cs.SetRequired(append(path, "account_id")...) + cs.SetRequired(append(path, "secret_access_key")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloudflareApiToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1773,29 +1906,29 @@ func (o CloudflareApiToken) Type(ctx context.Context) attr.Type { type ColumnInfo struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - Mask types.Object `tfsdk:"mask" tf:"optional,object"` + Mask types.Object `tfsdk:"mask" tf:"object"` // Name of Column. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether field may be Null (default: true). - Nullable types.Bool `tfsdk:"nullable" tf:"optional"` + Nullable types.Bool `tfsdk:"nullable" tf:""` // Partition index for column. - PartitionIndex types.Int64 `tfsdk:"partition_index" tf:"optional"` + PartitionIndex types.Int64 `tfsdk:"partition_index" tf:""` // Ordinal position of column (starting at position 0). - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // Format of IntervalType. - TypeIntervalType types.String `tfsdk:"type_interval_type" tf:"optional"` + TypeIntervalType types.String `tfsdk:"type_interval_type" tf:""` // Full data type specification, JSON-serialized. - TypeJson types.String `tfsdk:"type_json" tf:"optional"` + TypeJson types.String `tfsdk:"type_json" tf:""` - TypeName types.String `tfsdk:"type_name" tf:"optional"` + TypeName types.String `tfsdk:"type_name" tf:""` // Digits of precision; required for DecimalTypes. - TypePrecision types.Int64 `tfsdk:"type_precision" tf:"optional"` + TypePrecision types.Int64 `tfsdk:"type_precision" tf:""` // Digits to right of decimal; Required for DecimalTypes. - TypeScale types.Int64 `tfsdk:"type_scale" tf:"optional"` + TypeScale types.Int64 `tfsdk:"type_scale" tf:""` // Full data type specification as SQL/catalogString text. - TypeText types.String `tfsdk:"type_text" tf:"optional"` + TypeText types.String `tfsdk:"type_text" tf:""` } func (newState *ColumnInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnInfo) { @@ -1804,6 +1937,12 @@ func (newState *ColumnInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnI func (newState *ColumnInfo) SyncEffectiveFieldsDuringRead(existingState ColumnInfo) { } +func (c ColumnInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ColumnMask{}.ToSchema(cs, append(path, "mask")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1889,12 +2028,12 @@ func (o *ColumnInfo) SetMask(ctx context.Context, v ColumnMask) { type ColumnMask struct { // The full name of the column mask SQL UDF. - FunctionName types.String `tfsdk:"function_name" tf:"optional"` + FunctionName types.String `tfsdk:"function_name" tf:""` // The list of additional table columns to be passed as input to the column // mask function. The first arg of the mask function should be of the type // of the column being masked and the types of the rest of the args should // match the types of columns in 'using_column_names'. - UsingColumnNames types.List `tfsdk:"using_column_names" tf:"optional"` + UsingColumnNames types.List `tfsdk:"using_column_names" tf:""` } func (newState *ColumnMask) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnMask) { @@ -1903,6 +2042,11 @@ func (newState *ColumnMask) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnM func (newState *ColumnMask) SyncEffectiveFieldsDuringRead(existingState ColumnMask) { } +func (c ColumnMask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnMask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1968,44 +2112,44 @@ func (o *ColumnMask) SetUsingColumnNames(ctx context.Context, v []types.String) type ConnectionInfo struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Unique identifier of the Connection. - ConnectionId types.String `tfsdk:"connection_id" tf:"optional"` + ConnectionId types.String `tfsdk:"connection_id" tf:""` // The type of connection. - ConnectionType types.String `tfsdk:"connection_type" tf:"optional"` + ConnectionType types.String `tfsdk:"connection_type" tf:""` // Time at which this connection was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of connection creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The type of credential. - CredentialType types.String `tfsdk:"credential_type" tf:"optional"` + CredentialType types.String `tfsdk:"credential_type" tf:""` // Full name of connection. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of the connection. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // A map of key-value properties attached to the securable. - Options types.Map `tfsdk:"options" tf:"optional"` + Options types.Map `tfsdk:"options" tf:""` // Username of current owner of the connection. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // An object containing map of key-value properties attached to the // connection. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // Status of an asynchronously provisioned resource. - ProvisioningInfo types.Object `tfsdk:"provisioning_info" tf:"optional,object"` + ProvisioningInfo types.Object `tfsdk:"provisioning_info" tf:"object"` // If the connection is read only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Kind of connection securable. - SecurableKind types.String `tfsdk:"securable_kind" tf:"optional"` + SecurableKind types.String `tfsdk:"securable_kind" tf:""` - SecurableType types.String `tfsdk:"securable_type" tf:"optional"` + SecurableType types.String `tfsdk:"securable_type" tf:""` // Time at which this connection was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified connection. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // URL of the remote data source, extracted from options. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *ConnectionInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ConnectionInfo) { @@ -2014,6 +2158,12 @@ func (newState *ConnectionInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Con func (newState *ConnectionInfo) SyncEffectiveFieldsDuringRead(existingState ConnectionInfo) { } +func (c ConnectionInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProvisioningInfo{}.ToSchema(cs, append(path, "provisioning_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ConnectionInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2173,14 +2323,14 @@ func (o *ConnectionInfo) SetProvisioningInfo(ctx context.Context, v Provisioning // ONLINE_CONTINUOUS_UPDATE or the ONLINE_UPDATING_PIPELINE_RESOURCES state. type ContinuousUpdateStatus struct { // Progress of the initial data synchronization. - InitialPipelineSyncProgress types.Object `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` + InitialPipelineSyncProgress types.Object `tfsdk:"initial_pipeline_sync_progress" tf:"object"` // The last source table Delta version that was synced to the online table. // Note that this Delta version may not be completely synced to the online // table yet. - LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:"optional"` + LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:""` // The timestamp of the last time any data was synchronized from the source // table to the online table. - Timestamp types.String `tfsdk:"timestamp" tf:"optional"` + Timestamp types.String `tfsdk:"timestamp" tf:""` } func (newState *ContinuousUpdateStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContinuousUpdateStatus) { @@ -2189,6 +2339,12 @@ func (newState *ContinuousUpdateStatus) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ContinuousUpdateStatus) SyncEffectiveFieldsDuringRead(existingState ContinuousUpdateStatus) { } +func (c ContinuousUpdateStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineProgress{}.ToSchema(cs, append(path, "initial_pipeline_sync_progress")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ContinuousUpdateStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2256,24 +2412,24 @@ func (o *ContinuousUpdateStatus) SetInitialPipelineSyncProgress(ctx context.Cont type CreateCatalog struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the connection to an external data source. - ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + ConnectionName types.String `tfsdk:"connection_name" tf:""` // Name of catalog. Name types.String `tfsdk:"name" tf:""` // A map of key-value properties attached to the securable. - Options types.Map `tfsdk:"options" tf:"optional"` + Options types.Map `tfsdk:"options" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // The name of delta sharing provider. // // A Delta Sharing catalog is a catalog that is based on a Delta share on a // remote sharing server. - ProviderName types.String `tfsdk:"provider_name" tf:"optional"` + ProviderName types.String `tfsdk:"provider_name" tf:""` // The name of the share under the share provider. - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` // Storage root URL for managed tables within catalog. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` } func (newState *CreateCatalog) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCatalog) { @@ -2282,6 +2438,12 @@ func (newState *CreateCatalog) SyncEffectiveFieldsDuringCreateOrUpdate(plan Crea func (newState *CreateCatalog) SyncEffectiveFieldsDuringRead(existingState CreateCatalog) { } +func (c CreateCatalog) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCatalog. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2388,7 +2550,7 @@ func (o *CreateCatalog) SetProperties(ctx context.Context, v map[string]types.St type CreateConnection struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The type of connection. ConnectionType types.String `tfsdk:"connection_type" tf:""` // Name of the connection. @@ -2397,9 +2559,9 @@ type CreateConnection struct { Options types.Map `tfsdk:"options" tf:""` // An object containing map of key-value properties attached to the // connection. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // If the connection is read only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` } func (newState *CreateConnection) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateConnection) { @@ -2408,6 +2570,14 @@ func (newState *CreateConnection) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *CreateConnection) SyncEffectiveFieldsDuringRead(existingState CreateConnection) { } +func (c CreateConnection) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "connection_type")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateConnection. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2510,28 +2680,28 @@ func (o *CreateConnection) SetProperties(ctx context.Context, v map[string]types type CreateCredentialRequest struct { // The AWS IAM role configuration - AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. Only applicable when purpose // is **STORAGE**. - AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // GCP long-lived credential. Databricks-created Google Cloud Storage // service account. - DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"object"` // The credential name. The name must be unique among storage and service // credentials within the metastore. Name types.String `tfsdk:"name" tf:""` // Indicates the purpose of the credential. - Purpose types.String `tfsdk:"purpose" tf:"optional"` + Purpose types.String `tfsdk:"purpose" tf:""` // Whether the credential is usable only for read operations. Only // applicable when purpose is **STORAGE**. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Optional. Supplying true to this argument skips validation of the created // set of credentials. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *CreateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialRequest) { @@ -2540,6 +2710,16 @@ func (newState *CreateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateCredentialRequest) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest) { } +func (c CreateCredentialRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRole{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentity{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal{}.ToSchema(cs, append(path, "azure_service_principal")...) + DatabricksGcpServiceAccount{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2706,24 +2886,24 @@ func (o *CreateCredentialRequest) SetDatabricksGcpServiceAccount(ctx context.Con type CreateExternalLocation struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"object"` // Indicates whether fallback mode is enabled for this external location. // When fallback mode is enabled, the access to the location falls back to // cluster credentials if UC credentials are not sufficient. - Fallback types.Bool `tfsdk:"fallback" tf:"optional"` + Fallback types.Bool `tfsdk:"fallback" tf:""` // Name of the external location. Name types.String `tfsdk:"name" tf:""` // Indicates whether the external location is read-only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Skips validation of the storage credential associated with the external // location. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` // Path URL of the external location. Url types.String `tfsdk:"url" tf:""` } @@ -2734,6 +2914,15 @@ func (newState *CreateExternalLocation) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateExternalLocation) SyncEffectiveFieldsDuringRead(existingState CreateExternalLocation) { } +func (c CreateExternalLocation) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_name")...) + EncryptionDetails{}.ToSchema(cs, append(path, "encryption_details")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExternalLocation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2815,13 +3004,13 @@ type CreateFunction struct { // Name of parent catalog. CatalogName types.String `tfsdk:"catalog_name" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Scalar function return data type. DataType types.String `tfsdk:"data_type" tf:""` // External function language. - ExternalLanguage types.String `tfsdk:"external_language" tf:"optional"` + ExternalLanguage types.String `tfsdk:"external_language" tf:""` // External function name. - ExternalName types.String `tfsdk:"external_name" tf:"optional"` + ExternalName types.String `tfsdk:"external_name" tf:""` // Pretty printed function data type. FullDataType types.String `tfsdk:"full_data_type" tf:""` @@ -2835,9 +3024,9 @@ type CreateFunction struct { // Function parameter style. **S** is the value for SQL. ParameterStyle types.String `tfsdk:"parameter_style" tf:""` // JSON-serialized key-value pair map, encoded (escaped) as a string. - Properties types.String `tfsdk:"properties" tf:"optional"` + Properties types.String `tfsdk:"properties" tf:""` // Table function return parameters. - ReturnParams types.Object `tfsdk:"return_params" tf:"optional,object"` + ReturnParams types.Object `tfsdk:"return_params" tf:"object"` // Function language. When **EXTERNAL** is used, the language of the routine // function should be specified in the __external_language__ field, and the // __return_params__ of the function cannot be used (as **TABLE** return @@ -2847,7 +3036,7 @@ type CreateFunction struct { // Function body. RoutineDefinition types.String `tfsdk:"routine_definition" tf:""` // Function dependencies. - RoutineDependencies types.Object `tfsdk:"routine_dependencies" tf:"optional,object"` + RoutineDependencies types.Object `tfsdk:"routine_dependencies" tf:"object"` // Name of parent schema relative to its parent catalog. SchemaName types.String `tfsdk:"schema_name" tf:""` // Function security type. @@ -2857,7 +3046,7 @@ type CreateFunction struct { // Function SQL data access. SqlDataAccess types.String `tfsdk:"sql_data_access" tf:""` // List of schemes whose objects can be referenced without qualification. - SqlPath types.String `tfsdk:"sql_path" tf:"optional"` + SqlPath types.String `tfsdk:"sql_path" tf:""` } func (newState *CreateFunction) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFunction) { @@ -2866,6 +3055,28 @@ func (newState *CreateFunction) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cre func (newState *CreateFunction) SyncEffectiveFieldsDuringRead(existingState CreateFunction) { } +func (c CreateFunction) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "catalog_name")...) + cs.SetRequired(append(path, "data_type")...) + cs.SetRequired(append(path, "full_data_type")...) + cs.SetRequired(append(path, "input_params")...) + FunctionParameterInfos{}.ToSchema(cs, append(path, "input_params")...) + cs.SetRequired(append(path, "is_deterministic")...) + cs.SetRequired(append(path, "is_null_call")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "parameter_style")...) + FunctionParameterInfos{}.ToSchema(cs, append(path, "return_params")...) + cs.SetRequired(append(path, "routine_body")...) + cs.SetRequired(append(path, "routine_definition")...) + DependencyList{}.ToSchema(cs, append(path, "routine_dependencies")...) + cs.SetRequired(append(path, "schema_name")...) + cs.SetRequired(append(path, "security_type")...) + cs.SetRequired(append(path, "specific_name")...) + cs.SetRequired(append(path, "sql_data_access")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFunction. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3036,6 +3247,13 @@ func (newState *CreateFunctionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateFunctionRequest) SyncEffectiveFieldsDuringRead(existingState CreateFunctionRequest) { } +func (c CreateFunctionRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "function_info")...) + CreateFunction{}.ToSchema(cs, append(path, "function_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFunctionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3104,9 +3322,9 @@ type CreateMetastore struct { // The field can be omitted in the __workspace-level__ __API__ but not in // the __account-level__ __API__. If this field is omitted, the region of // the workspace receiving the request will be used. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The storage root URL for metastore - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` } func (newState *CreateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateMetastore) { @@ -3115,6 +3333,12 @@ func (newState *CreateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cr func (newState *CreateMetastore) SyncEffectiveFieldsDuringRead(existingState CreateMetastore) { } +func (c CreateMetastore) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateMetastore. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3167,6 +3391,14 @@ func (newState *CreateMetastoreAssignment) SyncEffectiveFieldsDuringCreateOrUpda func (newState *CreateMetastoreAssignment) SyncEffectiveFieldsDuringRead(existingState CreateMetastoreAssignment) { } +func (c CreateMetastoreAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "default_catalog_name")...) + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3208,39 +3440,39 @@ type CreateMonitor struct { // Name of the baseline table from which drift metrics are computed from. // Columns in the monitored table should also be present in the baseline // table. - BaselineTableName types.String `tfsdk:"baseline_table_name" tf:"optional"` + BaselineTableName types.String `tfsdk:"baseline_table_name" tf:""` // Custom metrics to compute on the monitored table. These can be aggregate // metrics, derived metrics (from already computed aggregate metrics), or // drift metrics (comparing metrics across time windows). - CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` + CustomMetrics types.List `tfsdk:"custom_metrics" tf:""` // The data classification config for the monitor. - DataClassificationConfig types.Object `tfsdk:"data_classification_config" tf:"optional,object"` + DataClassificationConfig types.Object `tfsdk:"data_classification_config" tf:"object"` // Configuration for monitoring inference logs. - InferenceLog types.Object `tfsdk:"inference_log" tf:"optional,object"` + InferenceLog types.Object `tfsdk:"inference_log" tf:"object"` // The notification settings for the monitor. - Notifications types.Object `tfsdk:"notifications" tf:"optional,object"` + Notifications types.Object `tfsdk:"notifications" tf:"object"` // Schema where output metric tables are created. OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // The schedule for automatically updating and refreshing metric tables. - Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"object"` // Whether to skip creating a default dashboard summarizing data quality // metrics. - SkipBuiltinDashboard types.Bool `tfsdk:"skip_builtin_dashboard" tf:"optional"` + SkipBuiltinDashboard types.Bool `tfsdk:"skip_builtin_dashboard" tf:""` // List of column expressions to slice data with for targeted analysis. The // data is grouped by each expression independently, resulting in a separate // slice for each predicate and its complements. For high-cardinality // columns, only the top 100 unique values by frequency will generate // slices. - SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` + SlicingExprs types.List `tfsdk:"slicing_exprs" tf:""` // Configuration for monitoring snapshot tables. - Snapshot types.Object `tfsdk:"snapshot" tf:"optional,object"` + Snapshot types.Object `tfsdk:"snapshot" tf:"object"` // Full name of the table. TableName types.String `tfsdk:"-"` // Configuration for monitoring time series tables. - TimeSeries types.Object `tfsdk:"time_series" tf:"optional,object"` + TimeSeries types.Object `tfsdk:"time_series" tf:"object"` // Optional argument to specify the warehouse for dashboard creation. If not // specified, the first running warehouse will be used. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *CreateMonitor) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateMonitor) { @@ -3249,6 +3481,21 @@ func (newState *CreateMonitor) SyncEffectiveFieldsDuringCreateOrUpdate(plan Crea func (newState *CreateMonitor) SyncEffectiveFieldsDuringRead(existingState CreateMonitor) { } +func (c CreateMonitor) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "assets_dir")...) + MonitorMetric{}.ToSchema(cs, append(path, "custom_metrics")...) + MonitorDataClassificationConfig{}.ToSchema(cs, append(path, "data_classification_config")...) + MonitorInferenceLog{}.ToSchema(cs, append(path, "inference_log")...) + MonitorNotifications{}.ToSchema(cs, append(path, "notifications")...) + cs.SetRequired(append(path, "output_schema_name")...) + MonitorCronSchedule{}.ToSchema(cs, append(path, "schedule")...) + MonitorSnapshot{}.ToSchema(cs, append(path, "snapshot")...) + cs.SetRequired(append(path, "table_name")...) + MonitorTimeSeries{}.ToSchema(cs, append(path, "time_series")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateMonitor. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3542,13 +3789,7 @@ func (o *CreateMonitor) SetTimeSeries(ctx context.Context, v MonitorTimeSeries) // Create an Online Table type CreateOnlineTableRequest struct { // Online Table information. - Table types.Object `tfsdk:"table" tf:"optional,object"` -} - -func (newState *CreateOnlineTableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOnlineTableRequest) { -} - -func (newState *CreateOnlineTableRequest) SyncEffectiveFieldsDuringRead(existingState CreateOnlineTableRequest) { + Table types.Object `tfsdk:"table" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateOnlineTableRequest. @@ -3616,14 +3857,14 @@ type CreateRegisteredModelRequest struct { // The name of the catalog where the schema and the registered model reside CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the registered model - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the registered model Name types.String `tfsdk:"name" tf:""` // The name of the schema where the registered model resides SchemaName types.String `tfsdk:"schema_name" tf:""` // The storage location on the cloud under which model version data files // are stored - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` } func (newState *CreateRegisteredModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegisteredModelRequest) { @@ -3632,6 +3873,14 @@ func (newState *CreateRegisteredModelRequest) SyncEffectiveFieldsDuringCreateOrU func (newState *CreateRegisteredModelRequest) SyncEffectiveFieldsDuringRead(existingState CreateRegisteredModelRequest) { } +func (c CreateRegisteredModelRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "catalog_name")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "schema_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRegisteredModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3674,12 +3923,6 @@ func (o CreateRegisteredModelRequest) Type(ctx context.Context) attr.Type { type CreateResponse struct { } -func (newState *CreateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse) { -} - -func (newState *CreateResponse) SyncEffectiveFieldsDuringRead(existingState CreateResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3711,13 +3954,13 @@ type CreateSchema struct { // Name of parent catalog. CatalogName types.String `tfsdk:"catalog_name" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of schema, relative to parent catalog. Name types.String `tfsdk:"name" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // Storage root URL for managed tables within schema. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` } func (newState *CreateSchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateSchema) { @@ -3726,6 +3969,13 @@ func (newState *CreateSchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan Creat func (newState *CreateSchema) SyncEffectiveFieldsDuringRead(existingState CreateSchema) { } +func (c CreateSchema) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "catalog_name")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateSchema. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3797,24 +4047,24 @@ func (o *CreateSchema) SetProperties(ctx context.Context, v map[string]types.Str type CreateStorageCredential struct { // The AWS IAM role configuration. - AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. - AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"object"` // The Cloudflare API token configuration. - CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The Databricks managed GCP service account configuration. - DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"object"` // The credential name. The name must be unique within the metastore. Name types.String `tfsdk:"name" tf:""` // Whether the storage credential is only usable for read operations. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Supplying true to this argument skips validation of the created // credential. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *CreateStorageCredential) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateStorageCredential) { @@ -3823,6 +4073,17 @@ func (newState *CreateStorageCredential) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateStorageCredential) SyncEffectiveFieldsDuringRead(existingState CreateStorageCredential) { } +func (c CreateStorageCredential) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRoleRequest{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentityRequest{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal{}.ToSchema(cs, append(path, "azure_service_principal")...) + CloudflareApiToken{}.ToSchema(cs, append(path, "cloudflare_api_token")...) + DatabricksGcpServiceAccountRequest{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4031,6 +4292,14 @@ func (newState *CreateTableConstraint) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateTableConstraint) SyncEffectiveFieldsDuringRead(existingState CreateTableConstraint) { } +func (c CreateTableConstraint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "constraint")...) + TableConstraint{}.ToSchema(cs, append(path, "constraint")...) + cs.SetRequired(append(path, "full_name_arg")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTableConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4098,13 +4367,13 @@ type CreateVolumeRequestContent struct { // The name of the catalog where the schema and the volume are CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the volume - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the volume Name types.String `tfsdk:"name" tf:""` // The name of the schema where the volume is SchemaName types.String `tfsdk:"schema_name" tf:""` // The storage location on the cloud - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` VolumeType types.String `tfsdk:"volume_type" tf:""` } @@ -4115,6 +4384,15 @@ func (newState *CreateVolumeRequestContent) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CreateVolumeRequestContent) SyncEffectiveFieldsDuringRead(existingState CreateVolumeRequestContent) { } +func (c CreateVolumeRequestContent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "catalog_name")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "schema_name")...) + cs.SetRequired(append(path, "volume_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVolumeRequestContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4158,47 +4436,47 @@ func (o CreateVolumeRequestContent) Type(ctx context.Context) attr.Type { type CredentialInfo struct { // The AWS IAM role configuration - AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. Only applicable when purpose // is **STORAGE**. - AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this credential was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of credential creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // GCP long-lived credential. Databricks-created Google Cloud Storage // service account. - DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"object"` // The full name of the credential. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // The unique identifier of the credential. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Whether the current securable is accessible from all workspaces or a // specific set of workspaces. - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Unique identifier of the parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The credential name. The name must be unique among storage and service // credentials within the metastore. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of credential. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Indicates the purpose of the credential. - Purpose types.String `tfsdk:"purpose" tf:"optional"` + Purpose types.String `tfsdk:"purpose" tf:""` // Whether the credential is usable only for read operations. Only // applicable when purpose is **STORAGE**. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Time at which this credential was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the credential. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // Whether this credential is the current metastore's root storage // credential. Only applicable when purpose is **STORAGE**. - UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:"optional"` + UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:""` } func (newState *CredentialInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialInfo) { @@ -4207,6 +4485,15 @@ func (newState *CredentialInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cre func (newState *CredentialInfo) SyncEffectiveFieldsDuringRead(existingState CredentialInfo) { } +func (c CredentialInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRole{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentity{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal{}.ToSchema(cs, append(path, "azure_service_principal")...) + DatabricksGcpServiceAccount{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4391,9 +4678,9 @@ func (o *CredentialInfo) SetDatabricksGcpServiceAccount(ctx context.Context, v D type CredentialValidationResult struct { // Error message would exist when the result does not equal to **PASS**. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // The results of the tested operation. - Result types.String `tfsdk:"result" tf:"optional"` + Result types.String `tfsdk:"result" tf:""` } func (newState *CredentialValidationResult) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialValidationResult) { @@ -4402,6 +4689,11 @@ func (newState *CredentialValidationResult) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CredentialValidationResult) SyncEffectiveFieldsDuringRead(existingState CredentialValidationResult) { } +func (c CredentialValidationResult) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialValidationResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4438,7 +4730,7 @@ func (o CredentialValidationResult) Type(ctx context.Context) attr.Type { // Currently assigned workspaces type CurrentWorkspaceBindings struct { // A list of workspace IDs. - Workspaces types.List `tfsdk:"workspaces" tf:"optional"` + Workspaces types.List `tfsdk:"workspaces" tf:""` } func (newState *CurrentWorkspaceBindings) SyncEffectiveFieldsDuringCreateOrUpdate(plan CurrentWorkspaceBindings) { @@ -4447,6 +4739,11 @@ func (newState *CurrentWorkspaceBindings) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CurrentWorkspaceBindings) SyncEffectiveFieldsDuringRead(existingState CurrentWorkspaceBindings) { } +func (c CurrentWorkspaceBindings) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CurrentWorkspaceBindings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4515,11 +4812,11 @@ type DatabricksGcpServiceAccount struct { // field is only used to persist the credential_id once it is fetched from // the credentials manager - as we only use the protobuf serializer to store // credentials, this ID gets persisted to the database - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // The email of the service account. - Email types.String `tfsdk:"email" tf:"optional"` + Email types.String `tfsdk:"email" tf:""` // The ID that represents the private key for this Service Account - PrivateKeyId types.String `tfsdk:"private_key_id" tf:"optional"` + PrivateKeyId types.String `tfsdk:"private_key_id" tf:""` } func (newState *DatabricksGcpServiceAccount) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabricksGcpServiceAccount) { @@ -4528,6 +4825,11 @@ func (newState *DatabricksGcpServiceAccount) SyncEffectiveFieldsDuringCreateOrUp func (newState *DatabricksGcpServiceAccount) SyncEffectiveFieldsDuringRead(existingState DatabricksGcpServiceAccount) { } +func (c DatabricksGcpServiceAccount) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksGcpServiceAccount. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4572,6 +4874,11 @@ func (newState *DatabricksGcpServiceAccountRequest) SyncEffectiveFieldsDuringCre func (newState *DatabricksGcpServiceAccountRequest) SyncEffectiveFieldsDuringRead(existingState DatabricksGcpServiceAccountRequest) { } +func (c DatabricksGcpServiceAccountRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksGcpServiceAccountRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4602,9 +4909,9 @@ func (o DatabricksGcpServiceAccountRequest) Type(ctx context.Context) attr.Type type DatabricksGcpServiceAccountResponse struct { // The Databricks internal ID that represents this service account. This is // an output-only field. - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // The email of the service account. This is an output-only field. - Email types.String `tfsdk:"email" tf:"optional"` + Email types.String `tfsdk:"email" tf:""` } func (newState *DatabricksGcpServiceAccountResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabricksGcpServiceAccountResponse) { @@ -4613,6 +4920,11 @@ func (newState *DatabricksGcpServiceAccountResponse) SyncEffectiveFieldsDuringCr func (newState *DatabricksGcpServiceAccountResponse) SyncEffectiveFieldsDuringRead(existingState DatabricksGcpServiceAccountResponse) { } +func (c DatabricksGcpServiceAccountResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksGcpServiceAccountResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4654,12 +4966,6 @@ type DeleteAccountMetastoreAssignmentRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *DeleteAccountMetastoreAssignmentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountMetastoreAssignmentRequest) { -} - -func (newState *DeleteAccountMetastoreAssignmentRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAccountMetastoreAssignmentRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountMetastoreAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4701,12 +5007,6 @@ type DeleteAccountMetastoreRequest struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *DeleteAccountMetastoreRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountMetastoreRequest) { -} - -func (newState *DeleteAccountMetastoreRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAccountMetastoreRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountMetastoreRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4751,12 +5051,6 @@ type DeleteAccountStorageCredentialRequest struct { StorageCredentialName types.String `tfsdk:"-"` } -func (newState *DeleteAccountStorageCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountStorageCredentialRequest) { -} - -func (newState *DeleteAccountStorageCredentialRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAccountStorageCredentialRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountStorageCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4800,12 +5094,6 @@ type DeleteAliasRequest struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteAliasRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAliasRequest) { -} - -func (newState *DeleteAliasRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAliasRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAliasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4842,12 +5130,6 @@ func (o DeleteAliasRequest) Type(ctx context.Context) attr.Type { type DeleteAliasResponse struct { } -func (newState *DeleteAliasResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAliasResponse) { -} - -func (newState *DeleteAliasResponse) SyncEffectiveFieldsDuringRead(existingState DeleteAliasResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAliasResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4883,12 +5165,6 @@ type DeleteCatalogRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteCatalogRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCatalogRequest) { -} - -func (newState *DeleteCatalogRequest) SyncEffectiveFieldsDuringRead(existingState DeleteCatalogRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCatalogRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4928,12 +5204,6 @@ type DeleteConnectionRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteConnectionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteConnectionRequest) { -} - -func (newState *DeleteConnectionRequest) SyncEffectiveFieldsDuringRead(existingState DeleteConnectionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteConnectionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4975,12 +5245,6 @@ type DeleteCredentialRequest struct { NameArg types.String `tfsdk:"-"` } -func (newState *DeleteCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialRequest) { -} - -func (newState *DeleteCredentialRequest) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5023,6 +5287,11 @@ func (newState *DeleteCredentialResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *DeleteCredentialResponse) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialResponse) { } +func (c DeleteCredentialResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5058,12 +5327,6 @@ type DeleteExternalLocationRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteExternalLocationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExternalLocationRequest) { -} - -func (newState *DeleteExternalLocationRequest) SyncEffectiveFieldsDuringRead(existingState DeleteExternalLocationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExternalLocationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5106,12 +5369,6 @@ type DeleteFunctionRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteFunctionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFunctionRequest) { -} - -func (newState *DeleteFunctionRequest) SyncEffectiveFieldsDuringRead(existingState DeleteFunctionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFunctionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5153,12 +5410,6 @@ type DeleteMetastoreRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteMetastoreRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteMetastoreRequest) { -} - -func (newState *DeleteMetastoreRequest) SyncEffectiveFieldsDuringRead(existingState DeleteMetastoreRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteMetastoreRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5200,12 +5451,6 @@ type DeleteModelVersionRequest struct { Version types.Int64 `tfsdk:"-"` } -func (newState *DeleteModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionRequest) { -} - -func (newState *DeleteModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5245,12 +5490,6 @@ type DeleteOnlineTableRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteOnlineTableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteOnlineTableRequest) { -} - -func (newState *DeleteOnlineTableRequest) SyncEffectiveFieldsDuringRead(existingState DeleteOnlineTableRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteOnlineTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5288,12 +5527,6 @@ type DeleteQualityMonitorRequest struct { TableName types.String `tfsdk:"-"` } -func (newState *DeleteQualityMonitorRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteQualityMonitorRequest) { -} - -func (newState *DeleteQualityMonitorRequest) SyncEffectiveFieldsDuringRead(existingState DeleteQualityMonitorRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQualityMonitorRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5331,12 +5564,6 @@ type DeleteRegisteredModelRequest struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteRegisteredModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRegisteredModelRequest) { -} - -func (newState *DeleteRegisteredModelRequest) SyncEffectiveFieldsDuringRead(existingState DeleteRegisteredModelRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRegisteredModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5371,12 +5598,6 @@ func (o DeleteRegisteredModelRequest) Type(ctx context.Context) attr.Type { type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5412,12 +5633,6 @@ type DeleteSchemaRequest struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteSchemaRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSchemaRequest) { -} - -func (newState *DeleteSchemaRequest) SyncEffectiveFieldsDuringRead(existingState DeleteSchemaRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSchemaRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5460,12 +5675,6 @@ type DeleteStorageCredentialRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteStorageCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteStorageCredentialRequest) { -} - -func (newState *DeleteStorageCredentialRequest) SyncEffectiveFieldsDuringRead(existingState DeleteStorageCredentialRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteStorageCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5511,12 +5720,6 @@ type DeleteTableConstraintRequest struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteTableConstraintRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTableConstraintRequest) { -} - -func (newState *DeleteTableConstraintRequest) SyncEffectiveFieldsDuringRead(existingState DeleteTableConstraintRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTableConstraintRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5558,12 +5761,6 @@ type DeleteTableRequest struct { FullName types.String `tfsdk:"-"` } -func (newState *DeleteTableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTableRequest) { -} - -func (newState *DeleteTableRequest) SyncEffectiveFieldsDuringRead(existingState DeleteTableRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5601,12 +5798,6 @@ type DeleteVolumeRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteVolumeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteVolumeRequest) { -} - -func (newState *DeleteVolumeRequest) SyncEffectiveFieldsDuringRead(existingState DeleteVolumeRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteVolumeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5652,6 +5843,12 @@ func (newState *DeltaRuntimePropertiesKvPairs) SyncEffectiveFieldsDuringCreateOr func (newState *DeltaRuntimePropertiesKvPairs) SyncEffectiveFieldsDuringRead(existingState DeltaRuntimePropertiesKvPairs) { } +func (c DeltaRuntimePropertiesKvPairs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "delta_runtime_properties")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaRuntimePropertiesKvPairs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5717,9 +5914,9 @@ func (o *DeltaRuntimePropertiesKvPairs) SetDeltaRuntimeProperties(ctx context.Co // field must be defined. type Dependency struct { // A function that is dependent on a SQL object. - Function types.Object `tfsdk:"function" tf:"optional,object"` + Function types.Object `tfsdk:"function" tf:"object"` // A table that is dependent on a SQL object. - Table types.Object `tfsdk:"table" tf:"optional,object"` + Table types.Object `tfsdk:"table" tf:"object"` } func (newState *Dependency) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dependency) { @@ -5728,6 +5925,13 @@ func (newState *Dependency) SyncEffectiveFieldsDuringCreateOrUpdate(plan Depende func (newState *Dependency) SyncEffectiveFieldsDuringRead(existingState Dependency) { } +func (c Dependency) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FunctionDependency{}.ToSchema(cs, append(path, "function")...) + TableDependency{}.ToSchema(cs, append(path, "table")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Dependency. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5823,7 +6027,7 @@ func (o *Dependency) SetTable(ctx context.Context, v TableDependency) { // A list of dependencies. type DependencyList struct { // Array of dependencies. - Dependencies types.List `tfsdk:"dependencies" tf:"optional"` + Dependencies types.List `tfsdk:"dependencies" tf:""` } func (newState *DependencyList) SyncEffectiveFieldsDuringCreateOrUpdate(plan DependencyList) { @@ -5832,6 +6036,12 @@ func (newState *DependencyList) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dep func (newState *DependencyList) SyncEffectiveFieldsDuringRead(existingState DependencyList) { } +func (c DependencyList) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Dependency{}.ToSchema(cs, append(path, "dependencies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DependencyList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5901,12 +6111,6 @@ type DisableRequest struct { SchemaName types.String `tfsdk:"-"` } -func (newState *DisableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableRequest) { -} - -func (newState *DisableRequest) SyncEffectiveFieldsDuringRead(existingState DisableRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5943,12 +6147,6 @@ func (o DisableRequest) Type(ctx context.Context) attr.Type { type DisableResponse struct { } -func (newState *DisableResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableResponse) { -} - -func (newState *DisableResponse) SyncEffectiveFieldsDuringRead(existingState DisableResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5979,7 +6177,7 @@ func (o DisableResponse) Type(ctx context.Context) attr.Type { type EffectivePermissionsList struct { // The privileges conveyed to each principal (either directly or via // inheritance) - PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:"optional"` + PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:""` } func (newState *EffectivePermissionsList) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePermissionsList) { @@ -5988,6 +6186,12 @@ func (newState *EffectivePermissionsList) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *EffectivePermissionsList) SyncEffectiveFieldsDuringRead(existingState EffectivePermissionsList) { } +func (c EffectivePermissionsList) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EffectivePrivilegeAssignment{}.ToSchema(cs, append(path, "privilege_assignments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePermissionsList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6052,10 +6256,10 @@ func (o *EffectivePermissionsList) SetPrivilegeAssignments(ctx context.Context, type EffectivePredictiveOptimizationFlag struct { // The name of the object from which the flag was inherited. If there was no // inheritance, this field is left blank. - InheritedFromName types.String `tfsdk:"inherited_from_name" tf:"optional"` + InheritedFromName types.String `tfsdk:"inherited_from_name" tf:""` // The type of the object from which the flag was inherited. If there was no // inheritance, this field is left blank. - InheritedFromType types.String `tfsdk:"inherited_from_type" tf:"optional"` + InheritedFromType types.String `tfsdk:"inherited_from_type" tf:""` // Whether predictive optimization should be enabled for this object and // objects under it. Value types.String `tfsdk:"value" tf:""` @@ -6067,6 +6271,12 @@ func (newState *EffectivePredictiveOptimizationFlag) SyncEffectiveFieldsDuringCr func (newState *EffectivePredictiveOptimizationFlag) SyncEffectiveFieldsDuringRead(existingState EffectivePredictiveOptimizationFlag) { } +func (c EffectivePredictiveOptimizationFlag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePredictiveOptimizationFlag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6106,13 +6316,13 @@ type EffectivePrivilege struct { // The full name of the object that conveys this privilege via inheritance. // This field is omitted when privilege is not inherited (it's assigned to // the securable itself). - InheritedFromName types.String `tfsdk:"inherited_from_name" tf:"optional"` + InheritedFromName types.String `tfsdk:"inherited_from_name" tf:""` // The type of the object that conveys this privilege via inheritance. This // field is omitted when privilege is not inherited (it's assigned to the // securable itself). - InheritedFromType types.String `tfsdk:"inherited_from_type" tf:"optional"` + InheritedFromType types.String `tfsdk:"inherited_from_type" tf:""` // The privilege assigned to the principal. - Privilege types.String `tfsdk:"privilege" tf:"optional"` + Privilege types.String `tfsdk:"privilege" tf:""` } func (newState *EffectivePrivilege) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePrivilege) { @@ -6121,6 +6331,11 @@ func (newState *EffectivePrivilege) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EffectivePrivilege) SyncEffectiveFieldsDuringRead(existingState EffectivePrivilege) { } +func (c EffectivePrivilege) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePrivilege. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6158,10 +6373,10 @@ func (o EffectivePrivilege) Type(ctx context.Context) attr.Type { type EffectivePrivilegeAssignment struct { // The principal (user email address or group name). - Principal types.String `tfsdk:"principal" tf:"optional"` + Principal types.String `tfsdk:"principal" tf:""` // The privileges conveyed to the principal (either directly or via // inheritance). - Privileges types.List `tfsdk:"privileges" tf:"optional"` + Privileges types.List `tfsdk:"privileges" tf:""` } func (newState *EffectivePrivilegeAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePrivilegeAssignment) { @@ -6170,6 +6385,12 @@ func (newState *EffectivePrivilegeAssignment) SyncEffectiveFieldsDuringCreateOrU func (newState *EffectivePrivilegeAssignment) SyncEffectiveFieldsDuringRead(existingState EffectivePrivilegeAssignment) { } +func (c EffectivePrivilegeAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EffectivePrivilege{}.ToSchema(cs, append(path, "privileges")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePrivilegeAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6241,12 +6462,6 @@ type EnableRequest struct { SchemaName types.String `tfsdk:"-"` } -func (newState *EnableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnableRequest) { -} - -func (newState *EnableRequest) SyncEffectiveFieldsDuringRead(existingState EnableRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6283,12 +6498,6 @@ func (o EnableRequest) Type(ctx context.Context) attr.Type { type EnableResponse struct { } -func (newState *EnableResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnableResponse) { -} - -func (newState *EnableResponse) SyncEffectiveFieldsDuringRead(existingState EnableResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnableResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6319,7 +6528,7 @@ func (o EnableResponse) Type(ctx context.Context) attr.Type { // Encryption options that apply to clients connecting to cloud storage. type EncryptionDetails struct { // Server-Side Encryption properties for clients communicating with AWS s3. - SseEncryptionDetails types.Object `tfsdk:"sse_encryption_details" tf:"optional,object"` + SseEncryptionDetails types.Object `tfsdk:"sse_encryption_details" tf:"object"` } func (newState *EncryptionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan EncryptionDetails) { @@ -6328,6 +6537,12 @@ func (newState *EncryptionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EncryptionDetails) SyncEffectiveFieldsDuringRead(existingState EncryptionDetails) { } +func (c EncryptionDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SseEncryptionDetails{}.ToSchema(cs, append(path, "sse_encryption_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EncryptionDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6395,12 +6610,6 @@ type ExistsRequest struct { FullName types.String `tfsdk:"-"` } -func (newState *ExistsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExistsRequest) { -} - -func (newState *ExistsRequest) SyncEffectiveFieldsDuringRead(existingState ExistsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExistsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6434,44 +6643,44 @@ func (o ExistsRequest) Type(ctx context.Context) attr.Type { type ExternalLocationInfo struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this external location was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of external location creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique ID of the location's storage credential. - CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + CredentialId types.String `tfsdk:"credential_id" tf:""` // Name of the storage credential used with this location. - CredentialName types.String `tfsdk:"credential_name" tf:"optional"` + CredentialName types.String `tfsdk:"credential_name" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"object"` // Indicates whether fallback mode is enabled for this external location. // When fallback mode is enabled, the access to the location falls back to // cluster credentials if UC credentials are not sufficient. - Fallback types.Bool `tfsdk:"fallback" tf:"optional"` + Fallback types.Bool `tfsdk:"fallback" tf:""` - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Unique identifier of metastore hosting the external location. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of the external location. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The owner of the external location. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Indicates whether the external location is read-only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Time at which external location this was last modified, in epoch // milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the external location. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // Path URL of the external location. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *ExternalLocationInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLocationInfo) { @@ -6480,6 +6689,12 @@ func (newState *ExternalLocationInfo) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ExternalLocationInfo) SyncEffectiveFieldsDuringRead(existingState ExternalLocationInfo) { } +func (c ExternalLocationInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EncryptionDetails{}.ToSchema(cs, append(path, "encryption_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLocationInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6580,11 +6795,11 @@ type FailedStatus struct { // Note that this Delta version may only be partially synced to the online // table. Only populated if the table is still online and available for // serving. - LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:"optional"` + LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:""` // The timestamp of the last time any data was synchronized from the source // table to the online table. Only populated if the table is still online // and available for serving. - Timestamp types.String `tfsdk:"timestamp" tf:"optional"` + Timestamp types.String `tfsdk:"timestamp" tf:""` } func (newState *FailedStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan FailedStatus) { @@ -6593,6 +6808,11 @@ func (newState *FailedStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan Faile func (newState *FailedStatus) SyncEffectiveFieldsDuringRead(existingState FailedStatus) { } +func (c FailedStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FailedStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6643,6 +6863,15 @@ func (newState *ForeignKeyConstraint) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ForeignKeyConstraint) SyncEffectiveFieldsDuringRead(existingState ForeignKeyConstraint) { } +func (c ForeignKeyConstraint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "child_columns")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "parent_columns")...) + cs.SetRequired(append(path, "parent_table")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForeignKeyConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6752,6 +6981,12 @@ func (newState *FunctionDependency) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *FunctionDependency) SyncEffectiveFieldsDuringRead(existingState FunctionDependency) { } +func (c FunctionDependency) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "function_full_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionDependency. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6787,70 +7022,70 @@ type FunctionInfo struct { // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // Name of parent catalog. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this function was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of function creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Scalar function return data type. - DataType types.String `tfsdk:"data_type" tf:"optional"` + DataType types.String `tfsdk:"data_type" tf:""` // External function language. - ExternalLanguage types.String `tfsdk:"external_language" tf:"optional"` + ExternalLanguage types.String `tfsdk:"external_language" tf:""` // External function name. - ExternalName types.String `tfsdk:"external_name" tf:"optional"` + ExternalName types.String `tfsdk:"external_name" tf:""` // Pretty printed function data type. - FullDataType types.String `tfsdk:"full_data_type" tf:"optional"` + FullDataType types.String `tfsdk:"full_data_type" tf:""` // Full name of function, in form of // __catalog_name__.__schema_name__.__function__name__ - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Id of Function, relative to parent schema. - FunctionId types.String `tfsdk:"function_id" tf:"optional"` + FunctionId types.String `tfsdk:"function_id" tf:""` - InputParams types.Object `tfsdk:"input_params" tf:"optional,object"` + InputParams types.Object `tfsdk:"input_params" tf:"object"` // Whether the function is deterministic. - IsDeterministic types.Bool `tfsdk:"is_deterministic" tf:"optional"` + IsDeterministic types.Bool `tfsdk:"is_deterministic" tf:""` // Function null call. - IsNullCall types.Bool `tfsdk:"is_null_call" tf:"optional"` + IsNullCall types.Bool `tfsdk:"is_null_call" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of function, relative to parent schema. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of function. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Function parameter style. **S** is the value for SQL. - ParameterStyle types.String `tfsdk:"parameter_style" tf:"optional"` + ParameterStyle types.String `tfsdk:"parameter_style" tf:""` // JSON-serialized key-value pair map, encoded (escaped) as a string. - Properties types.String `tfsdk:"properties" tf:"optional"` + Properties types.String `tfsdk:"properties" tf:""` // Table function return parameters. - ReturnParams types.Object `tfsdk:"return_params" tf:"optional,object"` + ReturnParams types.Object `tfsdk:"return_params" tf:"object"` // Function language. When **EXTERNAL** is used, the language of the routine // function should be specified in the __external_language__ field, and the // __return_params__ of the function cannot be used (as **TABLE** return // type is not supported), and the __sql_data_access__ field must be // **NO_SQL**. - RoutineBody types.String `tfsdk:"routine_body" tf:"optional"` + RoutineBody types.String `tfsdk:"routine_body" tf:""` // Function body. - RoutineDefinition types.String `tfsdk:"routine_definition" tf:"optional"` + RoutineDefinition types.String `tfsdk:"routine_definition" tf:""` // Function dependencies. - RoutineDependencies types.Object `tfsdk:"routine_dependencies" tf:"optional,object"` + RoutineDependencies types.Object `tfsdk:"routine_dependencies" tf:"object"` // Name of parent schema relative to its parent catalog. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // Function security type. - SecurityType types.String `tfsdk:"security_type" tf:"optional"` + SecurityType types.String `tfsdk:"security_type" tf:""` // Specific name of the function; Reserved for future use. - SpecificName types.String `tfsdk:"specific_name" tf:"optional"` + SpecificName types.String `tfsdk:"specific_name" tf:""` // Function SQL data access. - SqlDataAccess types.String `tfsdk:"sql_data_access" tf:"optional"` + SqlDataAccess types.String `tfsdk:"sql_data_access" tf:""` // List of schemes whose objects can be referenced without qualification. - SqlPath types.String `tfsdk:"sql_path" tf:"optional"` + SqlPath types.String `tfsdk:"sql_path" tf:""` // Time at which this function was created, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified function. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *FunctionInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan FunctionInfo) { @@ -6859,6 +7094,14 @@ func (newState *FunctionInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Funct func (newState *FunctionInfo) SyncEffectiveFieldsDuringRead(existingState FunctionInfo) { } +func (c FunctionInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FunctionParameterInfos{}.ToSchema(cs, append(path, "input_params")...) + FunctionParameterInfos{}.ToSchema(cs, append(path, "return_params")...) + DependencyList{}.ToSchema(cs, append(path, "routine_dependencies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7038,27 +7281,27 @@ func (o *FunctionInfo) SetRoutineDependencies(ctx context.Context, v DependencyL type FunctionParameterInfo struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of parameter. Name types.String `tfsdk:"name" tf:""` // Default value of the parameter. - ParameterDefault types.String `tfsdk:"parameter_default" tf:"optional"` + ParameterDefault types.String `tfsdk:"parameter_default" tf:""` // The mode of the function parameter. - ParameterMode types.String `tfsdk:"parameter_mode" tf:"optional"` + ParameterMode types.String `tfsdk:"parameter_mode" tf:""` // The type of function parameter. - ParameterType types.String `tfsdk:"parameter_type" tf:"optional"` + ParameterType types.String `tfsdk:"parameter_type" tf:""` // Ordinal position of column (starting at position 0). Position types.Int64 `tfsdk:"position" tf:""` // Format of IntervalType. - TypeIntervalType types.String `tfsdk:"type_interval_type" tf:"optional"` + TypeIntervalType types.String `tfsdk:"type_interval_type" tf:""` // Full data type spec, JSON-serialized. - TypeJson types.String `tfsdk:"type_json" tf:"optional"` + TypeJson types.String `tfsdk:"type_json" tf:""` TypeName types.String `tfsdk:"type_name" tf:""` // Digits of precision; required on Create for DecimalTypes. - TypePrecision types.Int64 `tfsdk:"type_precision" tf:"optional"` + TypePrecision types.Int64 `tfsdk:"type_precision" tf:""` // Digits to right of decimal; Required on Create for DecimalTypes. - TypeScale types.Int64 `tfsdk:"type_scale" tf:"optional"` + TypeScale types.Int64 `tfsdk:"type_scale" tf:""` // Full data type spec, SQL/catalogString text. TypeText types.String `tfsdk:"type_text" tf:""` } @@ -7069,6 +7312,15 @@ func (newState *FunctionParameterInfo) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *FunctionParameterInfo) SyncEffectiveFieldsDuringRead(existingState FunctionParameterInfo) { } +func (c FunctionParameterInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "position")...) + cs.SetRequired(append(path, "type_name")...) + cs.SetRequired(append(path, "type_text")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionParameterInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7125,7 +7377,7 @@ func (o FunctionParameterInfo) Type(ctx context.Context) attr.Type { type FunctionParameterInfos struct { // The array of __FunctionParameterInfo__ definitions of the function's // parameters. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *FunctionParameterInfos) SyncEffectiveFieldsDuringCreateOrUpdate(plan FunctionParameterInfos) { @@ -7134,6 +7386,12 @@ func (newState *FunctionParameterInfos) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *FunctionParameterInfos) SyncEffectiveFieldsDuringRead(existingState FunctionParameterInfos) { } +func (c FunctionParameterInfos) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FunctionParameterInfo{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionParameterInfos. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7198,7 +7456,7 @@ func (o *FunctionParameterInfos) SetParameters(ctx context.Context, v []Function // GCP temporary credentials for API authentication. Read more at // https://developers.google.com/identity/protocols/oauth2/service-account type GcpOauthToken struct { - OauthToken types.String `tfsdk:"oauth_token" tf:"optional"` + OauthToken types.String `tfsdk:"oauth_token" tf:""` } func (newState *GcpOauthToken) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpOauthToken) { @@ -7207,6 +7465,11 @@ func (newState *GcpOauthToken) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpO func (newState *GcpOauthToken) SyncEffectiveFieldsDuringRead(existingState GcpOauthToken) { } +func (c GcpOauthToken) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpOauthToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7243,7 +7506,7 @@ type GenerateTemporaryServiceCredentialAzureOptions struct { // The resources to which the temporary Azure credential should apply. These // resources are the scopes that are passed to the token provider (see // https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python) - Resources types.List `tfsdk:"resources" tf:"optional"` + Resources types.List `tfsdk:"resources" tf:""` } func (newState *GenerateTemporaryServiceCredentialAzureOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialAzureOptions) { @@ -7252,6 +7515,11 @@ func (newState *GenerateTemporaryServiceCredentialAzureOptions) SyncEffectiveFie func (newState *GenerateTemporaryServiceCredentialAzureOptions) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialAzureOptions) { } +func (c GenerateTemporaryServiceCredentialAzureOptions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialAzureOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7318,7 +7586,7 @@ type GenerateTemporaryServiceCredentialGcpOptions struct { // The scopes to which the temporary GCP credential should apply. These // resources are the scopes that are passed to the token provider (see // https://google-auth.readthedocs.io/en/latest/reference/google.auth.html#google.auth.credentials.Credentials) - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` } func (newState *GenerateTemporaryServiceCredentialGcpOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialGcpOptions) { @@ -7327,6 +7595,11 @@ func (newState *GenerateTemporaryServiceCredentialGcpOptions) SyncEffectiveField func (newState *GenerateTemporaryServiceCredentialGcpOptions) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialGcpOptions) { } +func (c GenerateTemporaryServiceCredentialGcpOptions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialGcpOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7390,12 +7663,12 @@ func (o *GenerateTemporaryServiceCredentialGcpOptions) SetScopes(ctx context.Con type GenerateTemporaryServiceCredentialRequest struct { // The Azure cloud options to customize the requested temporary credential - AzureOptions types.Object `tfsdk:"azure_options" tf:"optional,object"` + AzureOptions types.Object `tfsdk:"azure_options" tf:"object"` // The name of the service credential used to generate a temporary // credential CredentialName types.String `tfsdk:"credential_name" tf:""` // The GCP cloud options to customize the requested temporary credential - GcpOptions types.Object `tfsdk:"gcp_options" tf:"optional,object"` + GcpOptions types.Object `tfsdk:"gcp_options" tf:"object"` } func (newState *GenerateTemporaryServiceCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialRequest) { @@ -7404,6 +7677,14 @@ func (newState *GenerateTemporaryServiceCredentialRequest) SyncEffectiveFieldsDu func (newState *GenerateTemporaryServiceCredentialRequest) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialRequest) { } +func (c GenerateTemporaryServiceCredentialRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GenerateTemporaryServiceCredentialAzureOptions{}.ToSchema(cs, append(path, "azure_options")...) + cs.SetRequired(append(path, "credential_name")...) + GenerateTemporaryServiceCredentialGcpOptions{}.ToSchema(cs, append(path, "gcp_options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7502,9 +7783,9 @@ type GenerateTemporaryTableCredentialRequest struct { // The operation performed against the table data, either READ or // READ_WRITE. If READ_WRITE is specified, the credentials returned will // have write permissions, otherwise, it will be read only. - Operation types.String `tfsdk:"operation" tf:"optional"` + Operation types.String `tfsdk:"operation" tf:""` // UUID of the table to read or write. - TableId types.String `tfsdk:"table_id" tf:"optional"` + TableId types.String `tfsdk:"table_id" tf:""` } func (newState *GenerateTemporaryTableCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryTableCredentialRequest) { @@ -7513,6 +7794,11 @@ func (newState *GenerateTemporaryTableCredentialRequest) SyncEffectiveFieldsDuri func (newState *GenerateTemporaryTableCredentialRequest) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryTableCredentialRequest) { } +func (c GenerateTemporaryTableCredentialRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryTableCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7549,25 +7835,25 @@ func (o GenerateTemporaryTableCredentialRequest) Type(ctx context.Context) attr. type GenerateTemporaryTableCredentialResponse struct { // AWS temporary credentials for API authentication. Read more at // https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. - AwsTempCredentials types.Object `tfsdk:"aws_temp_credentials" tf:"optional,object"` + AwsTempCredentials types.Object `tfsdk:"aws_temp_credentials" tf:"object"` // Azure Active Directory token, essentially the Oauth token for Azure // Service Principal or Managed Identity. Read more at // https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/service-prin-aad-token - AzureAad types.Object `tfsdk:"azure_aad" tf:"optional,object"` + AzureAad types.Object `tfsdk:"azure_aad" tf:"object"` // Azure temporary credentials for API authentication. Read more at // https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas - AzureUserDelegationSas types.Object `tfsdk:"azure_user_delegation_sas" tf:"optional,object"` + AzureUserDelegationSas types.Object `tfsdk:"azure_user_delegation_sas" tf:"object"` // Server time when the credential will expire, in epoch milliseconds. The // API client is advised to cache the credential given this expiration time. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // GCP temporary credentials for API authentication. Read more at // https://developers.google.com/identity/protocols/oauth2/service-account - GcpOauthToken types.Object `tfsdk:"gcp_oauth_token" tf:"optional,object"` + GcpOauthToken types.Object `tfsdk:"gcp_oauth_token" tf:"object"` // R2 temporary credentials for API authentication. Read more at // https://developers.cloudflare.com/r2/api/s3/tokens/. - R2TempCredentials types.Object `tfsdk:"r2_temp_credentials" tf:"optional,object"` + R2TempCredentials types.Object `tfsdk:"r2_temp_credentials" tf:"object"` // The URL of the storage path accessible by the temporary credential. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *GenerateTemporaryTableCredentialResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryTableCredentialResponse) { @@ -7576,6 +7862,16 @@ func (newState *GenerateTemporaryTableCredentialResponse) SyncEffectiveFieldsDur func (newState *GenerateTemporaryTableCredentialResponse) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryTableCredentialResponse) { } +func (c GenerateTemporaryTableCredentialResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsCredentials{}.ToSchema(cs, append(path, "aws_temp_credentials")...) + AzureActiveDirectoryToken{}.ToSchema(cs, append(path, "azure_aad")...) + AzureUserDelegationSas{}.ToSchema(cs, append(path, "azure_user_delegation_sas")...) + GcpOauthToken{}.ToSchema(cs, append(path, "gcp_oauth_token")...) + R2Credentials{}.ToSchema(cs, append(path, "r2_temp_credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryTableCredentialResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7771,12 +8067,6 @@ type GetAccountMetastoreAssignmentRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *GetAccountMetastoreAssignmentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountMetastoreAssignmentRequest) { -} - -func (newState *GetAccountMetastoreAssignmentRequest) SyncEffectiveFieldsDuringRead(existingState GetAccountMetastoreAssignmentRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountMetastoreAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7814,12 +8104,6 @@ type GetAccountMetastoreRequest struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *GetAccountMetastoreRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountMetastoreRequest) { -} - -func (newState *GetAccountMetastoreRequest) SyncEffectiveFieldsDuringRead(existingState GetAccountMetastoreRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountMetastoreRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7859,12 +8143,6 @@ type GetAccountStorageCredentialRequest struct { StorageCredentialName types.String `tfsdk:"-"` } -func (newState *GetAccountStorageCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountStorageCredentialRequest) { -} - -func (newState *GetAccountStorageCredentialRequest) SyncEffectiveFieldsDuringRead(existingState GetAccountStorageCredentialRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountStorageCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7904,12 +8182,6 @@ type GetArtifactAllowlistRequest struct { ArtifactType types.String `tfsdk:"-"` } -func (newState *GetArtifactAllowlistRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetArtifactAllowlistRequest) { -} - -func (newState *GetArtifactAllowlistRequest) SyncEffectiveFieldsDuringRead(existingState GetArtifactAllowlistRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetArtifactAllowlistRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7958,12 +8230,6 @@ type GetBindingsRequest struct { SecurableType types.String `tfsdk:"-"` } -func (newState *GetBindingsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBindingsRequest) { -} - -func (newState *GetBindingsRequest) SyncEffectiveFieldsDuringRead(existingState GetBindingsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBindingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8012,12 +8278,6 @@ type GetByAliasRequest struct { IncludeAliases types.Bool `tfsdk:"-"` } -func (newState *GetByAliasRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetByAliasRequest) { -} - -func (newState *GetByAliasRequest) SyncEffectiveFieldsDuringRead(existingState GetByAliasRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetByAliasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8062,12 +8322,6 @@ type GetCatalogRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetCatalogRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCatalogRequest) { -} - -func (newState *GetCatalogRequest) SyncEffectiveFieldsDuringRead(existingState GetCatalogRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCatalogRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8107,12 +8361,6 @@ type GetConnectionRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetConnectionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetConnectionRequest) { -} - -func (newState *GetConnectionRequest) SyncEffectiveFieldsDuringRead(existingState GetConnectionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetConnectionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8150,12 +8398,6 @@ type GetCredentialRequest struct { NameArg types.String `tfsdk:"-"` } -func (newState *GetCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialRequest) { -} - -func (newState *GetCredentialRequest) SyncEffectiveFieldsDuringRead(existingState GetCredentialRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8198,12 +8440,6 @@ type GetEffectiveRequest struct { SecurableType types.String `tfsdk:"-"` } -func (newState *GetEffectiveRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEffectiveRequest) { -} - -func (newState *GetEffectiveRequest) SyncEffectiveFieldsDuringRead(existingState GetEffectiveRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEffectiveRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8248,12 +8484,6 @@ type GetExternalLocationRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetExternalLocationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExternalLocationRequest) { -} - -func (newState *GetExternalLocationRequest) SyncEffectiveFieldsDuringRead(existingState GetExternalLocationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExternalLocationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8297,12 +8527,6 @@ type GetFunctionRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetFunctionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFunctionRequest) { -} - -func (newState *GetFunctionRequest) SyncEffectiveFieldsDuringRead(existingState GetFunctionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFunctionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8347,12 +8571,6 @@ type GetGrantRequest struct { SecurableType types.String `tfsdk:"-"` } -func (newState *GetGrantRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetGrantRequest) { -} - -func (newState *GetGrantRequest) SyncEffectiveFieldsDuringRead(existingState GetGrantRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetGrantRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8394,12 +8612,6 @@ type GetMetastoreRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetMetastoreRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetastoreRequest) { -} - -func (newState *GetMetastoreRequest) SyncEffectiveFieldsDuringRead(existingState GetMetastoreRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetastoreRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8433,47 +8645,47 @@ func (o GetMetastoreRequest) Type(ctx context.Context) attr.Type { type GetMetastoreSummaryResponse struct { // Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`). - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // Time at which this metastore was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of metastore creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique identifier of the metastore's (Default) Data Access Configuration. - DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:"optional"` + DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:""` // The organization name of a Delta Sharing entity, to be used in // Databricks-to-Databricks Delta Sharing as the official name. - DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:"optional"` + DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:""` // The lifetime of delta sharing recipient token in seconds. - DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:"optional"` + DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:""` // The scope of Delta Sharing enabled for the metastore. - DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:"optional"` + DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:""` // Whether to allow non-DBR clients to directly access entities under the // metastore. - ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:"optional"` + ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:""` // Globally unique metastore ID across clouds and regions, of the form // `cloud:region:metastore_id`. - GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:"optional"` + GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:""` // Unique identifier of metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The user-specified name of the metastore. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The owner of the metastore. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Privilege model version of the metastore, of the form `major.minor` // (e.g., `1.0`). - PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:"optional"` + PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:""` // Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The storage root URL for metastore - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // UUID of storage credential to access the metastore storage_root. - StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:"optional"` + StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:""` // Name of the storage credential to access the metastore storage_root. - StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:"optional"` + StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:""` // Time at which the metastore was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the metastore. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *GetMetastoreSummaryResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetastoreSummaryResponse) { @@ -8482,6 +8694,11 @@ func (newState *GetMetastoreSummaryResponse) SyncEffectiveFieldsDuringCreateOrUp func (newState *GetMetastoreSummaryResponse) SyncEffectiveFieldsDuringRead(existingState GetMetastoreSummaryResponse) { } +func (c GetMetastoreSummaryResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetastoreSummaryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8563,12 +8780,6 @@ type GetModelVersionRequest struct { Version types.Int64 `tfsdk:"-"` } -func (newState *GetModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionRequest) { -} - -func (newState *GetModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState GetModelVersionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8612,12 +8823,6 @@ type GetOnlineTableRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetOnlineTableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetOnlineTableRequest) { -} - -func (newState *GetOnlineTableRequest) SyncEffectiveFieldsDuringRead(existingState GetOnlineTableRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetOnlineTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8655,12 +8860,6 @@ type GetQualityMonitorRequest struct { TableName types.String `tfsdk:"-"` } -func (newState *GetQualityMonitorRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQualityMonitorRequest) { -} - -func (newState *GetQualityMonitorRequest) SyncEffectiveFieldsDuringRead(existingState GetQualityMonitorRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQualityMonitorRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8704,12 +8903,6 @@ type GetQuotaRequest struct { QuotaName types.String `tfsdk:"-"` } -func (newState *GetQuotaRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQuotaRequest) { -} - -func (newState *GetQuotaRequest) SyncEffectiveFieldsDuringRead(existingState GetQuotaRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQuotaRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8747,7 +8940,7 @@ func (o GetQuotaRequest) Type(ctx context.Context) attr.Type { type GetQuotaResponse struct { // The returned QuotaInfo. - QuotaInfo types.Object `tfsdk:"quota_info" tf:"optional,object"` + QuotaInfo types.Object `tfsdk:"quota_info" tf:"object"` } func (newState *GetQuotaResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQuotaResponse) { @@ -8756,6 +8949,12 @@ func (newState *GetQuotaResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan G func (newState *GetQuotaResponse) SyncEffectiveFieldsDuringRead(existingState GetQuotaResponse) { } +func (c GetQuotaResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QuotaInfo{}.ToSchema(cs, append(path, "quota_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQuotaResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8825,12 +9024,6 @@ type GetRefreshRequest struct { TableName types.String `tfsdk:"-"` } -func (newState *GetRefreshRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRefreshRequest) { -} - -func (newState *GetRefreshRequest) SyncEffectiveFieldsDuringRead(existingState GetRefreshRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRefreshRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8875,12 +9068,6 @@ type GetRegisteredModelRequest struct { IncludeBrowse types.Bool `tfsdk:"-"` } -func (newState *GetRegisteredModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelRequest) { -} - -func (newState *GetRegisteredModelRequest) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8925,12 +9112,6 @@ type GetSchemaRequest struct { IncludeBrowse types.Bool `tfsdk:"-"` } -func (newState *GetSchemaRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSchemaRequest) { -} - -func (newState *GetSchemaRequest) SyncEffectiveFieldsDuringRead(existingState GetSchemaRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSchemaRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8970,12 +9151,6 @@ type GetStorageCredentialRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetStorageCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStorageCredentialRequest) { -} - -func (newState *GetStorageCredentialRequest) SyncEffectiveFieldsDuringRead(existingState GetStorageCredentialRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStorageCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9020,12 +9195,6 @@ type GetTableRequest struct { IncludeManifestCapabilities types.Bool `tfsdk:"-"` } -func (newState *GetTableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTableRequest) { -} - -func (newState *GetTableRequest) SyncEffectiveFieldsDuringRead(existingState GetTableRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9069,12 +9238,6 @@ type GetWorkspaceBindingRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetWorkspaceBindingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceBindingRequest) { -} - -func (newState *GetWorkspaceBindingRequest) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceBindingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceBindingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9112,12 +9275,6 @@ type ListAccountMetastoreAssignmentsRequest struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *ListAccountMetastoreAssignmentsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountMetastoreAssignmentsRequest) { -} - -func (newState *ListAccountMetastoreAssignmentsRequest) SyncEffectiveFieldsDuringRead(existingState ListAccountMetastoreAssignmentsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountMetastoreAssignmentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9151,7 +9308,7 @@ func (o ListAccountMetastoreAssignmentsRequest) Type(ctx context.Context) attr.T // The list of workspaces to which the given metastore is assigned. type ListAccountMetastoreAssignmentsResponse struct { - WorkspaceIds types.List `tfsdk:"workspace_ids" tf:"optional"` + WorkspaceIds types.List `tfsdk:"workspace_ids" tf:""` } func (newState *ListAccountMetastoreAssignmentsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountMetastoreAssignmentsResponse) { @@ -9160,6 +9317,11 @@ func (newState *ListAccountMetastoreAssignmentsResponse) SyncEffectiveFieldsDuri func (newState *ListAccountMetastoreAssignmentsResponse) SyncEffectiveFieldsDuringRead(existingState ListAccountMetastoreAssignmentsResponse) { } +func (c ListAccountMetastoreAssignmentsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountMetastoreAssignmentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9227,12 +9389,6 @@ type ListAccountStorageCredentialsRequest struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *ListAccountStorageCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountStorageCredentialsRequest) { -} - -func (newState *ListAccountStorageCredentialsRequest) SyncEffectiveFieldsDuringRead(existingState ListAccountStorageCredentialsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountStorageCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9266,7 +9422,7 @@ func (o ListAccountStorageCredentialsRequest) Type(ctx context.Context) attr.Typ type ListAccountStorageCredentialsResponse struct { // An array of metastore storage credentials. - StorageCredentials types.List `tfsdk:"storage_credentials" tf:"optional"` + StorageCredentials types.List `tfsdk:"storage_credentials" tf:""` } func (newState *ListAccountStorageCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountStorageCredentialsResponse) { @@ -9275,6 +9431,12 @@ func (newState *ListAccountStorageCredentialsResponse) SyncEffectiveFieldsDuring func (newState *ListAccountStorageCredentialsResponse) SyncEffectiveFieldsDuringRead(existingState ListAccountStorageCredentialsResponse) { } +func (c ListAccountStorageCredentialsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StorageCredentialInfo{}.ToSchema(cs, append(path, "storage_credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountStorageCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9355,12 +9517,6 @@ type ListCatalogsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCatalogsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCatalogsRequest) { -} - -func (newState *ListCatalogsRequest) SyncEffectiveFieldsDuringRead(existingState ListCatalogsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCatalogsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9398,11 +9554,11 @@ func (o ListCatalogsRequest) Type(ctx context.Context) attr.Type { type ListCatalogsResponse struct { // An array of catalog information objects. - Catalogs types.List `tfsdk:"catalogs" tf:"optional"` + Catalogs types.List `tfsdk:"catalogs" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListCatalogsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCatalogsResponse) { @@ -9411,6 +9567,12 @@ func (newState *ListCatalogsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ListCatalogsResponse) SyncEffectiveFieldsDuringRead(existingState ListCatalogsResponse) { } +func (c ListCatalogsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CatalogInfo{}.ToSchema(cs, append(path, "catalogs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCatalogsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9487,12 +9649,6 @@ type ListConnectionsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListConnectionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListConnectionsRequest) { -} - -func (newState *ListConnectionsRequest) SyncEffectiveFieldsDuringRead(existingState ListConnectionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListConnectionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9528,11 +9684,11 @@ func (o ListConnectionsRequest) Type(ctx context.Context) attr.Type { type ListConnectionsResponse struct { // An array of connection information objects. - Connections types.List `tfsdk:"connections" tf:"optional"` + Connections types.List `tfsdk:"connections" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListConnectionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListConnectionsResponse) { @@ -9541,6 +9697,12 @@ func (newState *ListConnectionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ListConnectionsResponse) SyncEffectiveFieldsDuringRead(existingState ListConnectionsResponse) { } +func (c ListConnectionsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ConnectionInfo{}.ToSchema(cs, append(path, "connections")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListConnectionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9618,12 +9780,6 @@ type ListCredentialsRequest struct { Purpose types.String `tfsdk:"-"` } -func (newState *ListCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCredentialsRequest) { -} - -func (newState *ListCredentialsRequest) SyncEffectiveFieldsDuringRead(existingState ListCredentialsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9660,11 +9816,11 @@ func (o ListCredentialsRequest) Type(ctx context.Context) attr.Type { } type ListCredentialsResponse struct { - Credentials types.List `tfsdk:"credentials" tf:"optional"` + Credentials types.List `tfsdk:"credentials" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCredentialsResponse) { @@ -9673,6 +9829,12 @@ func (newState *ListCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ListCredentialsResponse) SyncEffectiveFieldsDuringRead(existingState ListCredentialsResponse) { } +func (c ListCredentialsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CredentialInfo{}.ToSchema(cs, append(path, "credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9752,12 +9914,6 @@ type ListExternalLocationsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListExternalLocationsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsRequest) { -} - -func (newState *ListExternalLocationsRequest) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLocationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9795,11 +9951,11 @@ func (o ListExternalLocationsRequest) Type(ctx context.Context) attr.Type { type ListExternalLocationsResponse struct { // An array of external locations. - ExternalLocations types.List `tfsdk:"external_locations" tf:"optional"` + ExternalLocations types.List `tfsdk:"external_locations" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExternalLocationsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsResponse) { @@ -9808,6 +9964,12 @@ func (newState *ListExternalLocationsResponse) SyncEffectiveFieldsDuringCreateOr func (newState *ListExternalLocationsResponse) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsResponse) { } +func (c ListExternalLocationsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalLocationInfo{}.ToSchema(cs, append(path, "external_locations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLocationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9891,12 +10053,6 @@ type ListFunctionsRequest struct { SchemaName types.String `tfsdk:"-"` } -func (newState *ListFunctionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFunctionsRequest) { -} - -func (newState *ListFunctionsRequest) SyncEffectiveFieldsDuringRead(existingState ListFunctionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFunctionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9938,11 +10094,11 @@ func (o ListFunctionsRequest) Type(ctx context.Context) attr.Type { type ListFunctionsResponse struct { // An array of function information objects. - Functions types.List `tfsdk:"functions" tf:"optional"` + Functions types.List `tfsdk:"functions" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListFunctionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFunctionsResponse) { @@ -9951,6 +10107,12 @@ func (newState *ListFunctionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListFunctionsResponse) SyncEffectiveFieldsDuringRead(existingState ListFunctionsResponse) { } +func (c ListFunctionsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FunctionInfo{}.ToSchema(cs, append(path, "functions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFunctionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10016,7 +10178,7 @@ func (o *ListFunctionsResponse) SetFunctions(ctx context.Context, v []FunctionIn type ListMetastoresResponse struct { // An array of metastore information objects. - Metastores types.List `tfsdk:"metastores" tf:"optional"` + Metastores types.List `tfsdk:"metastores" tf:""` } func (newState *ListMetastoresResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListMetastoresResponse) { @@ -10025,6 +10187,12 @@ func (newState *ListMetastoresResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ListMetastoresResponse) SyncEffectiveFieldsDuringRead(existingState ListMetastoresResponse) { } +func (c ListMetastoresResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MetastoreInfo{}.ToSchema(cs, append(path, "metastores")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListMetastoresResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10106,12 +10274,6 @@ type ListModelVersionsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListModelVersionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelVersionsRequest) { -} - -func (newState *ListModelVersionsRequest) SyncEffectiveFieldsDuringRead(existingState ListModelVersionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelVersionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10150,11 +10312,11 @@ func (o ListModelVersionsRequest) Type(ctx context.Context) attr.Type { } type ListModelVersionsResponse struct { - ModelVersions types.List `tfsdk:"model_versions" tf:"optional"` + ModelVersions types.List `tfsdk:"model_versions" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListModelVersionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelVersionsResponse) { @@ -10163,6 +10325,12 @@ func (newState *ListModelVersionsResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ListModelVersionsResponse) SyncEffectiveFieldsDuringRead(existingState ListModelVersionsResponse) { } +func (c ListModelVersionsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersionInfo{}.ToSchema(cs, append(path, "model_versions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelVersionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10234,12 +10402,6 @@ type ListQuotasRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListQuotasRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQuotasRequest) { -} - -func (newState *ListQuotasRequest) SyncEffectiveFieldsDuringRead(existingState ListQuotasRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQuotasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10277,9 +10439,9 @@ type ListQuotasResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of returned QuotaInfos. - Quotas types.List `tfsdk:"quotas" tf:"optional"` + Quotas types.List `tfsdk:"quotas" tf:""` } func (newState *ListQuotasResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQuotasResponse) { @@ -10288,6 +10450,12 @@ func (newState *ListQuotasResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListQuotasResponse) SyncEffectiveFieldsDuringRead(existingState ListQuotasResponse) { } +func (c ListQuotasResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QuotaInfo{}.ToSchema(cs, append(path, "quotas")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQuotasResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10357,12 +10525,6 @@ type ListRefreshesRequest struct { TableName types.String `tfsdk:"-"` } -func (newState *ListRefreshesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRefreshesRequest) { -} - -func (newState *ListRefreshesRequest) SyncEffectiveFieldsDuringRead(existingState ListRefreshesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRefreshesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10427,12 +10589,6 @@ type ListRegisteredModelsRequest struct { SchemaName types.String `tfsdk:"-"` } -func (newState *ListRegisteredModelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRegisteredModelsRequest) { -} - -func (newState *ListRegisteredModelsRequest) SyncEffectiveFieldsDuringRead(existingState ListRegisteredModelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRegisteredModelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10475,9 +10631,9 @@ func (o ListRegisteredModelsRequest) Type(ctx context.Context) attr.Type { type ListRegisteredModelsResponse struct { // Opaque token for pagination. Omitted if there are no more results. // page_token should be set to this value for fetching the next page. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - RegisteredModels types.List `tfsdk:"registered_models" tf:"optional"` + RegisteredModels types.List `tfsdk:"registered_models" tf:""` } func (newState *ListRegisteredModelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRegisteredModelsResponse) { @@ -10486,6 +10642,12 @@ func (newState *ListRegisteredModelsResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *ListRegisteredModelsResponse) SyncEffectiveFieldsDuringRead(existingState ListRegisteredModelsResponse) { } +func (c ListRegisteredModelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelInfo{}.ToSchema(cs, append(path, "registered_models")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRegisteredModelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10567,12 +10729,6 @@ type ListSchemasRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListSchemasRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchemasRequest) { -} - -func (newState *ListSchemasRequest) SyncEffectiveFieldsDuringRead(existingState ListSchemasRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchemasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10614,9 +10770,9 @@ type ListSchemasResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of schema information objects. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *ListSchemasResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchemasResponse) { @@ -10625,6 +10781,12 @@ func (newState *ListSchemasResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ListSchemasResponse) SyncEffectiveFieldsDuringRead(existingState ListSchemasResponse) { } +func (c ListSchemasResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SchemaInfo{}.ToSchema(cs, append(path, "schemas")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchemasResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10701,12 +10863,6 @@ type ListStorageCredentialsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListStorageCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListStorageCredentialsRequest) { -} - -func (newState *ListStorageCredentialsRequest) SyncEffectiveFieldsDuringRead(existingState ListStorageCredentialsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStorageCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10744,9 +10900,9 @@ type ListStorageCredentialsResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - StorageCredentials types.List `tfsdk:"storage_credentials" tf:"optional"` + StorageCredentials types.List `tfsdk:"storage_credentials" tf:""` } func (newState *ListStorageCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListStorageCredentialsResponse) { @@ -10755,6 +10911,12 @@ func (newState *ListStorageCredentialsResponse) SyncEffectiveFieldsDuringCreateO func (newState *ListStorageCredentialsResponse) SyncEffectiveFieldsDuringRead(existingState ListStorageCredentialsResponse) { } +func (c ListStorageCredentialsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StorageCredentialInfo{}.ToSchema(cs, append(path, "storage_credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStorageCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10842,12 +11004,6 @@ type ListSummariesRequest struct { TableNamePattern types.String `tfsdk:"-"` } -func (newState *ListSummariesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSummariesRequest) { -} - -func (newState *ListSummariesRequest) SyncEffectiveFieldsDuringRead(existingState ListSummariesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSummariesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10904,12 +11060,6 @@ type ListSystemSchemasRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListSystemSchemasRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSystemSchemasRequest) { -} - -func (newState *ListSystemSchemasRequest) SyncEffectiveFieldsDuringRead(existingState ListSystemSchemasRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSystemSchemasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10949,9 +11099,9 @@ type ListSystemSchemasResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of system schema information objects. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *ListSystemSchemasResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSystemSchemasResponse) { @@ -10960,6 +11110,12 @@ func (newState *ListSystemSchemasResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ListSystemSchemasResponse) SyncEffectiveFieldsDuringRead(existingState ListSystemSchemasResponse) { } +func (c ListSystemSchemasResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SystemSchemaInfo{}.ToSchema(cs, append(path, "schemas")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSystemSchemasResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11027,9 +11183,9 @@ type ListTableSummariesResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // List of table summaries. - Tables types.List `tfsdk:"tables" tf:"optional"` + Tables types.List `tfsdk:"tables" tf:""` } func (newState *ListTableSummariesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTableSummariesResponse) { @@ -11038,6 +11194,12 @@ func (newState *ListTableSummariesResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListTableSummariesResponse) SyncEffectiveFieldsDuringRead(existingState ListTableSummariesResponse) { } +func (c ListTableSummariesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableSummary{}.ToSchema(cs, append(path, "tables")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTableSummariesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11132,12 +11294,6 @@ type ListTablesRequest struct { SchemaName types.String `tfsdk:"-"` } -func (newState *ListTablesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTablesRequest) { -} - -func (newState *ListTablesRequest) SyncEffectiveFieldsDuringRead(existingState ListTablesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTablesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11191,9 +11347,9 @@ type ListTablesResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of table information objects. - Tables types.List `tfsdk:"tables" tf:"optional"` + Tables types.List `tfsdk:"tables" tf:""` } func (newState *ListTablesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTablesResponse) { @@ -11202,6 +11358,12 @@ func (newState *ListTablesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListTablesResponse) SyncEffectiveFieldsDuringRead(existingState ListTablesResponse) { } +func (c ListTablesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableInfo{}.ToSchema(cs, append(path, "tables")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTablesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11292,12 +11454,6 @@ type ListVolumesRequest struct { SchemaName types.String `tfsdk:"-"` } -func (newState *ListVolumesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVolumesRequest) { -} - -func (newState *ListVolumesRequest) SyncEffectiveFieldsDuringRead(existingState ListVolumesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVolumesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11341,9 +11497,9 @@ type ListVolumesResponseContent struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request to retrieve the next page of results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Volumes types.List `tfsdk:"volumes" tf:"optional"` + Volumes types.List `tfsdk:"volumes" tf:""` } func (newState *ListVolumesResponseContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVolumesResponseContent) { @@ -11352,6 +11508,12 @@ func (newState *ListVolumesResponseContent) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListVolumesResponseContent) SyncEffectiveFieldsDuringRead(existingState ListVolumesResponseContent) { } +func (c ListVolumesResponseContent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + VolumeInfo{}.ToSchema(cs, append(path, "volumes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVolumesResponseContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11417,7 +11579,7 @@ func (o *ListVolumesResponseContent) SetVolumes(ctx context.Context, v []VolumeI type MetastoreAssignment struct { // The name of the default catalog in the metastore. - DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:"optional"` + DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:""` // The unique ID of the metastore. MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The unique ID of the Databricks workspace. @@ -11430,6 +11592,13 @@ func (newState *MetastoreAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *MetastoreAssignment) SyncEffectiveFieldsDuringRead(existingState MetastoreAssignment) { } +func (c MetastoreAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "metastore_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11467,47 +11636,47 @@ func (o MetastoreAssignment) Type(ctx context.Context) attr.Type { type MetastoreInfo struct { // Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`). - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // Time at which this metastore was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of metastore creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique identifier of the metastore's (Default) Data Access Configuration. - DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:"optional"` + DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:""` // The organization name of a Delta Sharing entity, to be used in // Databricks-to-Databricks Delta Sharing as the official name. - DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:"optional"` + DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:""` // The lifetime of delta sharing recipient token in seconds. - DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:"optional"` + DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:""` // The scope of Delta Sharing enabled for the metastore. - DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:"optional"` + DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:""` // Whether to allow non-DBR clients to directly access entities under the // metastore. - ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:"optional"` + ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:""` // Globally unique metastore ID across clouds and regions, of the form // `cloud:region:metastore_id`. - GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:"optional"` + GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:""` // Unique identifier of metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The user-specified name of the metastore. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The owner of the metastore. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Privilege model version of the metastore, of the form `major.minor` // (e.g., `1.0`). - PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:"optional"` + PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:""` // Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The storage root URL for metastore - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // UUID of storage credential to access the metastore storage_root. - StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:"optional"` + StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:""` // Name of the storage credential to access the metastore storage_root. - StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:"optional"` + StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:""` // Time at which the metastore was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the metastore. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *MetastoreInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan MetastoreInfo) { @@ -11516,6 +11685,11 @@ func (newState *MetastoreInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Meta func (newState *MetastoreInfo) SyncEffectiveFieldsDuringRead(existingState MetastoreInfo) { } +func (c MetastoreInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MetastoreInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11585,55 +11759,55 @@ func (o MetastoreInfo) Type(ctx context.Context) attr.Type { type ModelVersionInfo struct { // List of aliases associated with the model version - Aliases types.List `tfsdk:"aliases" tf:"optional"` + Aliases types.List `tfsdk:"aliases" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // The name of the catalog containing the model version - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the model version - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The identifier of the user who created the model version - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The unique identifier of the model version - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The unique identifier of the metastore containing the model version - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The name of the parent registered model of the model version, relative to // parent schema - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // Model version dependencies, for feature-store packaged models - ModelVersionDependencies types.Object `tfsdk:"model_version_dependencies" tf:"optional,object"` + ModelVersionDependencies types.Object `tfsdk:"model_version_dependencies" tf:"object"` // MLflow run ID used when creating the model version, if ``source`` was // generated by an experiment run stored in an MLflow tracking server - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // ID of the Databricks workspace containing the MLflow run that generated // this model version, if applicable - RunWorkspaceId types.Int64 `tfsdk:"run_workspace_id" tf:"optional"` + RunWorkspaceId types.Int64 `tfsdk:"run_workspace_id" tf:""` // The name of the schema containing the model version, relative to parent // catalog - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // URI indicating the location of the source artifacts (files) for the model // version - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // Current status of the model version. Newly created model versions start // in PENDING_REGISTRATION status, then move to READY status once the model // version files are uploaded and the model version is finalized. Only model // versions in READY status can be loaded for inference or served. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The storage location on the cloud under which model version data files // are stored - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The identifier of the user who updated the model version last time - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // Integer model version number, used to reference the model version in API // requests. - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *ModelVersionInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersionInfo) { @@ -11642,6 +11816,13 @@ func (newState *ModelVersionInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan M func (newState *ModelVersionInfo) SyncEffectiveFieldsDuringRead(existingState ModelVersionInfo) { } +func (c ModelVersionInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelAlias{}.ToSchema(cs, append(path, "aliases")...) + DependencyList{}.ToSchema(cs, append(path, "model_version_dependencies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersionInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11770,7 +11951,7 @@ func (o *ModelVersionInfo) SetModelVersionDependencies(ctx context.Context, v De type MonitorCronSchedule struct { // Read only field that indicates whether a schedule is paused or not. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` // The expression that determines when to run the monitor. See [examples]. // // [examples]: https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html @@ -11786,6 +11967,13 @@ func (newState *MonitorCronSchedule) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *MonitorCronSchedule) SyncEffectiveFieldsDuringRead(existingState MonitorCronSchedule) { } +func (c MonitorCronSchedule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "quartz_cron_expression")...) + cs.SetRequired(append(path, "timezone_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorCronSchedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11823,7 +12011,7 @@ func (o MonitorCronSchedule) Type(ctx context.Context) attr.Type { type MonitorDataClassificationConfig struct { // Whether data classification is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` } func (newState *MonitorDataClassificationConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorDataClassificationConfig) { @@ -11832,6 +12020,11 @@ func (newState *MonitorDataClassificationConfig) SyncEffectiveFieldsDuringCreate func (newState *MonitorDataClassificationConfig) SyncEffectiveFieldsDuringRead(existingState MonitorDataClassificationConfig) { } +func (c MonitorDataClassificationConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorDataClassificationConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11866,7 +12059,7 @@ func (o MonitorDataClassificationConfig) Type(ctx context.Context) attr.Type { type MonitorDestination struct { // The list of email addresses to send the notification to. A maximum of 5 // email addresses is supported. - EmailAddresses types.List `tfsdk:"email_addresses" tf:"optional"` + EmailAddresses types.List `tfsdk:"email_addresses" tf:""` } func (newState *MonitorDestination) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorDestination) { @@ -11875,6 +12068,11 @@ func (newState *MonitorDestination) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *MonitorDestination) SyncEffectiveFieldsDuringRead(existingState MonitorDestination) { } +func (c MonitorDestination) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11943,7 +12141,7 @@ type MonitorInferenceLog struct { // week(s)"``, ``"1 month"``, ``"1 year"``}. Granularities types.List `tfsdk:"granularities" tf:""` // Optional column that contains the ground truth for the prediction. - LabelCol types.String `tfsdk:"label_col" tf:"optional"` + LabelCol types.String `tfsdk:"label_col" tf:""` // Column that contains the id of the model generating the predictions. // Metrics will be computed per model id by default, and also across all // model ids. @@ -11954,7 +12152,7 @@ type MonitorInferenceLog struct { // in a classification problem type. The values in this column should be a // map, mapping each class label to the prediction probability for a given // sample. The map should be of PySpark MapType(). - PredictionProbaCol types.String `tfsdk:"prediction_proba_col" tf:"optional"` + PredictionProbaCol types.String `tfsdk:"prediction_proba_col" tf:""` // Problem type the model aims to solve. Determines the type of // model-quality metrics that will be computed. ProblemType types.String `tfsdk:"problem_type" tf:""` @@ -11973,6 +12171,16 @@ func (newState *MonitorInferenceLog) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *MonitorInferenceLog) SyncEffectiveFieldsDuringRead(existingState MonitorInferenceLog) { } +func (c MonitorInferenceLog) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "granularities")...) + cs.SetRequired(append(path, "model_id_col")...) + cs.SetRequired(append(path, "prediction_col")...) + cs.SetRequired(append(path, "problem_type")...) + cs.SetRequired(append(path, "timestamp_col")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorInferenceLog. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12048,60 +12256,77 @@ func (o *MonitorInferenceLog) SetGranularities(ctx context.Context, v []types.St type MonitorInfo struct { // The directory to store monitoring assets (e.g. dashboard, metric tables). - AssetsDir types.String `tfsdk:"assets_dir" tf:"optional"` + AssetsDir types.String `tfsdk:"assets_dir" tf:""` // Name of the baseline table from which drift metrics are computed from. // Columns in the monitored table should also be present in the baseline // table. - BaselineTableName types.String `tfsdk:"baseline_table_name" tf:"optional"` + BaselineTableName types.String `tfsdk:"baseline_table_name" tf:""` // Custom metrics to compute on the monitored table. These can be aggregate // metrics, derived metrics (from already computed aggregate metrics), or // drift metrics (comparing metrics across time windows). - CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` + CustomMetrics types.List `tfsdk:"custom_metrics" tf:""` // Id of dashboard that visualizes the computed metrics. This can be empty // if the monitor is in PENDING state. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The data classification config for the monitor. - DataClassificationConfig types.Object `tfsdk:"data_classification_config" tf:"optional,object"` + DataClassificationConfig types.Object `tfsdk:"data_classification_config" tf:"object"` // The full name of the drift metrics table. Format: // __catalog_name__.__schema_name__.__table_name__. DriftMetricsTableName types.String `tfsdk:"drift_metrics_table_name" tf:""` // Configuration for monitoring inference logs. - InferenceLog types.Object `tfsdk:"inference_log" tf:"optional,object"` + InferenceLog types.Object `tfsdk:"inference_log" tf:"object"` // The latest failure message of the monitor (if any). - LatestMonitorFailureMsg types.String `tfsdk:"latest_monitor_failure_msg" tf:"optional"` + LatestMonitorFailureMsg types.String `tfsdk:"latest_monitor_failure_msg" tf:""` // The version of the monitor config (e.g. 1,2,3). If negative, the monitor // may be corrupted. MonitorVersion types.String `tfsdk:"monitor_version" tf:""` // The notification settings for the monitor. - Notifications types.Object `tfsdk:"notifications" tf:"optional,object"` + Notifications types.Object `tfsdk:"notifications" tf:"object"` // Schema where output metric tables are created. - OutputSchemaName types.String `tfsdk:"output_schema_name" tf:"optional"` + OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // The full name of the profile metrics table. Format: // __catalog_name__.__schema_name__.__table_name__. ProfileMetricsTableName types.String `tfsdk:"profile_metrics_table_name" tf:""` // The schedule for automatically updating and refreshing metric tables. - Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"object"` // List of column expressions to slice data with for targeted analysis. The // data is grouped by each expression independently, resulting in a separate // slice for each predicate and its complements. For high-cardinality // columns, only the top 100 unique values by frequency will generate // slices. - SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` + SlicingExprs types.List `tfsdk:"slicing_exprs" tf:""` // Configuration for monitoring snapshot tables. - Snapshot types.Object `tfsdk:"snapshot" tf:"optional,object"` + Snapshot types.Object `tfsdk:"snapshot" tf:"object"` // The status of the monitor. Status types.String `tfsdk:"status" tf:""` // The full name of the table to monitor. Format: // __catalog_name__.__schema_name__.__table_name__. TableName types.String `tfsdk:"table_name" tf:""` // Configuration for monitoring time series tables. - TimeSeries types.Object `tfsdk:"time_series" tf:"optional,object"` + TimeSeries types.Object `tfsdk:"time_series" tf:"object"` } func (newState *MonitorInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorInfo) { } -func (newState *MonitorInfo) SyncEffectiveFieldsDuringRead(existingState MonitorInfo) { +func (newState *MonitorInfo) SyncEffectiveFieldsDuringRead(existingState MonitorInfo) { +} + +func (c MonitorInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MonitorMetric{}.ToSchema(cs, append(path, "custom_metrics")...) + MonitorDataClassificationConfig{}.ToSchema(cs, append(path, "data_classification_config")...) + cs.SetRequired(append(path, "drift_metrics_table_name")...) + MonitorInferenceLog{}.ToSchema(cs, append(path, "inference_log")...) + cs.SetRequired(append(path, "monitor_version")...) + MonitorNotifications{}.ToSchema(cs, append(path, "notifications")...) + cs.SetRequired(append(path, "profile_metrics_table_name")...) + MonitorCronSchedule{}.ToSchema(cs, append(path, "schedule")...) + MonitorSnapshot{}.ToSchema(cs, append(path, "snapshot")...) + cs.SetRequired(append(path, "status")...) + cs.SetRequired(append(path, "table_name")...) + MonitorTimeSeries{}.ToSchema(cs, append(path, "time_series")...) + + return cs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorInfo. @@ -12435,6 +12660,16 @@ func (newState *MonitorMetric) SyncEffectiveFieldsDuringCreateOrUpdate(plan Moni func (newState *MonitorMetric) SyncEffectiveFieldsDuringRead(existingState MonitorMetric) { } +func (c MonitorMetric) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "definition")...) + cs.SetRequired(append(path, "input_columns")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "output_data_type")...) + cs.SetRequired(append(path, "type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorMetric. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12506,10 +12741,10 @@ func (o *MonitorMetric) SetInputColumns(ctx context.Context, v []types.String) { type MonitorNotifications struct { // Who to send notifications to on monitor failure. - OnFailure types.Object `tfsdk:"on_failure" tf:"optional,object"` + OnFailure types.Object `tfsdk:"on_failure" tf:"object"` // Who to send notifications to when new data classification tags are // detected. - OnNewClassificationTagDetected types.Object `tfsdk:"on_new_classification_tag_detected" tf:"optional,object"` + OnNewClassificationTagDetected types.Object `tfsdk:"on_new_classification_tag_detected" tf:"object"` } func (newState *MonitorNotifications) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorNotifications) { @@ -12518,6 +12753,13 @@ func (newState *MonitorNotifications) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *MonitorNotifications) SyncEffectiveFieldsDuringRead(existingState MonitorNotifications) { } +func (c MonitorNotifications) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MonitorDestination{}.ToSchema(cs, append(path, "on_failure")...) + MonitorDestination{}.ToSchema(cs, append(path, "on_new_classification_tag_detected")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorNotifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12613,10 +12855,10 @@ func (o *MonitorNotifications) SetOnNewClassificationTagDetected(ctx context.Con type MonitorRefreshInfo struct { // Time at which refresh operation completed (milliseconds since 1/1/1970 // UTC). - EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:"optional"` + EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:""` // An optional message to give insight into the current state of the job // (e.g. FAILURE messages). - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Unique id of the refresh operation. RefreshId types.Int64 `tfsdk:"refresh_id" tf:""` // Time at which refresh operation was initiated (milliseconds since @@ -12625,7 +12867,7 @@ type MonitorRefreshInfo struct { // The current state of the refresh. State types.String `tfsdk:"state" tf:""` // The method by which the refresh was triggered. - Trigger types.String `tfsdk:"trigger" tf:"optional"` + Trigger types.String `tfsdk:"trigger" tf:""` } func (newState *MonitorRefreshInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorRefreshInfo) { @@ -12634,6 +12876,14 @@ func (newState *MonitorRefreshInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *MonitorRefreshInfo) SyncEffectiveFieldsDuringRead(existingState MonitorRefreshInfo) { } +func (c MonitorRefreshInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "refresh_id")...) + cs.SetRequired(append(path, "start_time_ms")...) + cs.SetRequired(append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorRefreshInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12677,7 +12927,7 @@ func (o MonitorRefreshInfo) Type(ctx context.Context) attr.Type { type MonitorRefreshListResponse struct { // List of refreshes. - Refreshes types.List `tfsdk:"refreshes" tf:"optional"` + Refreshes types.List `tfsdk:"refreshes" tf:""` } func (newState *MonitorRefreshListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorRefreshListResponse) { @@ -12686,6 +12936,12 @@ func (newState *MonitorRefreshListResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *MonitorRefreshListResponse) SyncEffectiveFieldsDuringRead(existingState MonitorRefreshListResponse) { } +func (c MonitorRefreshListResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MonitorRefreshInfo{}.ToSchema(cs, append(path, "refreshes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorRefreshListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12756,6 +13012,11 @@ func (newState *MonitorSnapshot) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mo func (newState *MonitorSnapshot) SyncEffectiveFieldsDuringRead(existingState MonitorSnapshot) { } +func (c MonitorSnapshot) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorSnapshot. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12804,6 +13065,13 @@ func (newState *MonitorTimeSeries) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *MonitorTimeSeries) SyncEffectiveFieldsDuringRead(existingState MonitorTimeSeries) { } +func (c MonitorTimeSeries) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "granularities")...) + cs.SetRequired(append(path, "timestamp_col")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorTimeSeries. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12878,6 +13146,12 @@ func (newState *NamedTableConstraint) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *NamedTableConstraint) SyncEffectiveFieldsDuringRead(existingState NamedTableConstraint) { } +func (c NamedTableConstraint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NamedTableConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12912,18 +13186,18 @@ func (o NamedTableConstraint) Type(ctx context.Context) attr.Type { // Online Table information. type OnlineTable struct { // Full three-part (catalog, schema, table) name of the table. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Specification of the online table. - Spec types.Object `tfsdk:"spec" tf:"optional,object"` + Spec types.Object `tfsdk:"spec" tf:"object"` // Online Table data synchronization status - Status types.Object `tfsdk:"status" tf:"computed,object"` + Status types.Object `tfsdk:"status" tf:"object"` // Data serving REST API URL for this table - TableServingUrl types.String `tfsdk:"table_serving_url" tf:"computed"` + TableServingUrl types.String `tfsdk:"table_serving_url" tf:""` // The provisioning state of the online table entity in Unity Catalog. This // is distinct from the state of the data synchronization pipeline (i.e. the // table may be in "ACTIVE" but the pipeline may be in "PROVISIONING" as it // runs asynchronously). - UnityCatalogProvisioningState types.String `tfsdk:"unity_catalog_provisioning_state" tf:"computed"` + UnityCatalogProvisioningState types.String `tfsdk:"unity_catalog_provisioning_state" tf:""` } func (newState *OnlineTable) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTable) { @@ -12932,6 +13206,16 @@ func (newState *OnlineTable) SyncEffectiveFieldsDuringCreateOrUpdate(plan Online func (newState *OnlineTable) SyncEffectiveFieldsDuringRead(existingState OnlineTable) { } +func (c OnlineTable) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + OnlineTableSpec{}.ToSchema(cs, append(path, "spec")...) + cs.SetComputed(append(path, "status")...) + OnlineTableStatus{}.ToSchema(cs, append(path, "status")...) + cs.SetComputed(append(path, "table_serving_url")...) + cs.SetComputed(append(path, "unity_catalog_provisioning_state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTable. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13039,22 +13323,22 @@ type OnlineTableSpec struct { // the source table and there are no incremental updates. This mode is // useful for syncing views or tables without CDFs to online tables. Note // that the full-copy pipeline only supports "triggered" scheduling policy. - PerformFullCopy types.Bool `tfsdk:"perform_full_copy" tf:"optional"` + PerformFullCopy types.Bool `tfsdk:"perform_full_copy" tf:""` // ID of the associated pipeline. Generated by the server - cannot be set by // the caller. - PipelineId types.String `tfsdk:"pipeline_id" tf:"computed"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // Primary Key columns to be used for data insert/update in the destination. - PrimaryKeyColumns types.List `tfsdk:"primary_key_columns" tf:"optional"` + PrimaryKeyColumns types.List `tfsdk:"primary_key_columns" tf:""` // Pipeline runs continuously after generating the initial data. - RunContinuously types.Object `tfsdk:"run_continuously" tf:"optional,object"` + RunContinuously types.Object `tfsdk:"run_continuously" tf:"object"` // Pipeline stops after generating the initial data and can be triggered // later (manually, through a cron job or through data triggers) - RunTriggered types.Object `tfsdk:"run_triggered" tf:"optional,object"` + RunTriggered types.Object `tfsdk:"run_triggered" tf:"object"` // Three-part (catalog, schema, table) name of the source Delta table. - SourceTableFullName types.String `tfsdk:"source_table_full_name" tf:"optional"` + SourceTableFullName types.String `tfsdk:"source_table_full_name" tf:""` // Time series key to deduplicate (tie-break) rows with the same primary // key. - TimeseriesKey types.String `tfsdk:"timeseries_key" tf:"optional"` + TimeseriesKey types.String `tfsdk:"timeseries_key" tf:""` } func (newState *OnlineTableSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTableSpec) { @@ -13063,6 +13347,14 @@ func (newState *OnlineTableSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan On func (newState *OnlineTableSpec) SyncEffectiveFieldsDuringRead(existingState OnlineTableSpec) { } +func (c OnlineTableSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "pipeline_id")...) + OnlineTableSpecContinuousSchedulingPolicy{}.ToSchema(cs, append(path, "run_continuously")...) + OnlineTableSpecTriggeredSchedulingPolicy{}.ToSchema(cs, append(path, "run_triggered")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13203,6 +13495,11 @@ func (newState *OnlineTableSpecContinuousSchedulingPolicy) SyncEffectiveFieldsDu func (newState *OnlineTableSpecContinuousSchedulingPolicy) SyncEffectiveFieldsDuringRead(existingState OnlineTableSpecContinuousSchedulingPolicy) { } +func (c OnlineTableSpecContinuousSchedulingPolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableSpecContinuousSchedulingPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13239,6 +13536,11 @@ func (newState *OnlineTableSpecTriggeredSchedulingPolicy) SyncEffectiveFieldsDur func (newState *OnlineTableSpecTriggeredSchedulingPolicy) SyncEffectiveFieldsDuringRead(existingState OnlineTableSpecTriggeredSchedulingPolicy) { } +func (c OnlineTableSpecTriggeredSchedulingPolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableSpecTriggeredSchedulingPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13270,21 +13572,21 @@ func (o OnlineTableSpecTriggeredSchedulingPolicy) Type(ctx context.Context) attr type OnlineTableStatus struct { // Detailed status of an online table. Shown if the online table is in the // ONLINE_CONTINUOUS_UPDATE or the ONLINE_UPDATING_PIPELINE_RESOURCES state. - ContinuousUpdateStatus types.Object `tfsdk:"continuous_update_status" tf:"optional,object"` + ContinuousUpdateStatus types.Object `tfsdk:"continuous_update_status" tf:"object"` // The state of the online table. - DetailedState types.String `tfsdk:"detailed_state" tf:"optional"` + DetailedState types.String `tfsdk:"detailed_state" tf:""` // Detailed status of an online table. Shown if the online table is in the // OFFLINE_FAILED or the ONLINE_PIPELINE_FAILED state. - FailedStatus types.Object `tfsdk:"failed_status" tf:"optional,object"` + FailedStatus types.Object `tfsdk:"failed_status" tf:"object"` // A text description of the current state of the online table. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Detailed status of an online table. Shown if the online table is in the // PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT // state. - ProvisioningStatus types.Object `tfsdk:"provisioning_status" tf:"optional,object"` + ProvisioningStatus types.Object `tfsdk:"provisioning_status" tf:"object"` // Detailed status of an online table. Shown if the online table is in the // ONLINE_TRIGGERED_UPDATE or the ONLINE_NO_PENDING_UPDATE state. - TriggeredUpdateStatus types.Object `tfsdk:"triggered_update_status" tf:"optional,object"` + TriggeredUpdateStatus types.Object `tfsdk:"triggered_update_status" tf:"object"` } func (newState *OnlineTableStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTableStatus) { @@ -13293,6 +13595,15 @@ func (newState *OnlineTableStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *OnlineTableStatus) SyncEffectiveFieldsDuringRead(existingState OnlineTableStatus) { } +func (c OnlineTableStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ContinuousUpdateStatus{}.ToSchema(cs, append(path, "continuous_update_status")...) + FailedStatus{}.ToSchema(cs, append(path, "failed_status")...) + ProvisioningStatus{}.ToSchema(cs, append(path, "provisioning_status")...) + TriggeredUpdateStatus{}.ToSchema(cs, append(path, "triggered_update_status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13453,11 +13764,11 @@ func (o *OnlineTableStatus) SetTriggeredUpdateStatus(ctx context.Context, v Trig type PermissionsChange struct { // The set of privileges to add. - Add types.List `tfsdk:"add" tf:"optional"` + Add types.List `tfsdk:"add" tf:""` // The principal whose privileges we are changing. - Principal types.String `tfsdk:"principal" tf:"optional"` + Principal types.String `tfsdk:"principal" tf:""` // The set of privileges to remove. - Remove types.List `tfsdk:"remove" tf:"optional"` + Remove types.List `tfsdk:"remove" tf:""` } func (newState *PermissionsChange) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsChange) { @@ -13466,6 +13777,11 @@ func (newState *PermissionsChange) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PermissionsChange) SyncEffectiveFieldsDuringRead(existingState PermissionsChange) { } +func (c PermissionsChange) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsChange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13562,7 +13878,7 @@ func (o *PermissionsChange) SetRemove(ctx context.Context, v []types.String) { type PermissionsList struct { // The privileges assigned to each principal - PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:"optional"` + PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:""` } func (newState *PermissionsList) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsList) { @@ -13571,6 +13887,12 @@ func (newState *PermissionsList) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pe func (newState *PermissionsList) SyncEffectiveFieldsDuringRead(existingState PermissionsList) { } +func (c PermissionsList) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PrivilegeAssignment{}.ToSchema(cs, append(path, "privilege_assignments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13635,17 +13957,17 @@ func (o *PermissionsList) SetPrivilegeAssignments(ctx context.Context, v []Privi // Progress information of the Online Table data synchronization pipeline. type PipelineProgress struct { // The estimated time remaining to complete this update in seconds. - EstimatedCompletionTimeSeconds types.Float64 `tfsdk:"estimated_completion_time_seconds" tf:"optional"` + EstimatedCompletionTimeSeconds types.Float64 `tfsdk:"estimated_completion_time_seconds" tf:""` // The source table Delta version that was last processed by the pipeline. // The pipeline may not have completely processed this version yet. - LatestVersionCurrentlyProcessing types.Int64 `tfsdk:"latest_version_currently_processing" tf:"optional"` + LatestVersionCurrentlyProcessing types.Int64 `tfsdk:"latest_version_currently_processing" tf:""` // The completion ratio of this update. This is a number between 0 and 1. - SyncProgressCompletion types.Float64 `tfsdk:"sync_progress_completion" tf:"optional"` + SyncProgressCompletion types.Float64 `tfsdk:"sync_progress_completion" tf:""` // The number of rows that have been synced in this update. - SyncedRowCount types.Int64 `tfsdk:"synced_row_count" tf:"optional"` + SyncedRowCount types.Int64 `tfsdk:"synced_row_count" tf:""` // The total number of rows that need to be synced in this update. This // number may be an estimate. - TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:"optional"` + TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:""` } func (newState *PipelineProgress) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineProgress) { @@ -13654,6 +13976,11 @@ func (newState *PipelineProgress) SyncEffectiveFieldsDuringCreateOrUpdate(plan P func (newState *PipelineProgress) SyncEffectiveFieldsDuringRead(existingState PipelineProgress) { } +func (c PipelineProgress) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineProgress. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13706,6 +14033,13 @@ func (newState *PrimaryKeyConstraint) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *PrimaryKeyConstraint) SyncEffectiveFieldsDuringRead(existingState PrimaryKeyConstraint) { } +func (c PrimaryKeyConstraint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "child_columns")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrimaryKeyConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13771,9 +14105,9 @@ func (o *PrimaryKeyConstraint) SetChildColumns(ctx context.Context, v []types.St type PrivilegeAssignment struct { // The principal (user email address or group name). - Principal types.String `tfsdk:"principal" tf:"optional"` + Principal types.String `tfsdk:"principal" tf:""` // The privileges assigned to the principal. - Privileges types.List `tfsdk:"privileges" tf:"optional"` + Privileges types.List `tfsdk:"privileges" tf:""` } func (newState *PrivilegeAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrivilegeAssignment) { @@ -13782,6 +14116,11 @@ func (newState *PrivilegeAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *PrivilegeAssignment) SyncEffectiveFieldsDuringRead(existingState PrivilegeAssignment) { } +func (c PrivilegeAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrivilegeAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13847,7 +14186,7 @@ func (o *PrivilegeAssignment) SetPrivileges(ctx context.Context, v []types.Strin // Status of an asynchronously provisioned resource. type ProvisioningInfo struct { - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *ProvisioningInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProvisioningInfo) { @@ -13856,6 +14195,11 @@ func (newState *ProvisioningInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan P func (newState *ProvisioningInfo) SyncEffectiveFieldsDuringRead(existingState ProvisioningInfo) { } +func (c ProvisioningInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProvisioningInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13892,7 +14236,7 @@ func (o ProvisioningInfo) Type(ctx context.Context) attr.Type { type ProvisioningStatus struct { // Details about initial data synchronization. Only populated when in the // PROVISIONING_INITIAL_SNAPSHOT state. - InitialPipelineSyncProgress types.Object `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` + InitialPipelineSyncProgress types.Object `tfsdk:"initial_pipeline_sync_progress" tf:"object"` } func (newState *ProvisioningStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProvisioningStatus) { @@ -13901,6 +14245,12 @@ func (newState *ProvisioningStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ProvisioningStatus) SyncEffectiveFieldsDuringRead(existingState ProvisioningStatus) { } +func (c ProvisioningStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineProgress{}.ToSchema(cs, append(path, "initial_pipeline_sync_progress")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProvisioningStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13964,18 +14314,18 @@ func (o *ProvisioningStatus) SetInitialPipelineSyncProgress(ctx context.Context, type QuotaInfo struct { // The timestamp that indicates when the quota count was last updated. - LastRefreshedAt types.Int64 `tfsdk:"last_refreshed_at" tf:"optional"` + LastRefreshedAt types.Int64 `tfsdk:"last_refreshed_at" tf:""` // Name of the parent resource. Returns metastore ID if the parent is a // metastore. - ParentFullName types.String `tfsdk:"parent_full_name" tf:"optional"` + ParentFullName types.String `tfsdk:"parent_full_name" tf:""` // The quota parent securable type. - ParentSecurableType types.String `tfsdk:"parent_securable_type" tf:"optional"` + ParentSecurableType types.String `tfsdk:"parent_securable_type" tf:""` // The current usage of the resource quota. - QuotaCount types.Int64 `tfsdk:"quota_count" tf:"optional"` + QuotaCount types.Int64 `tfsdk:"quota_count" tf:""` // The current limit of the resource quota. - QuotaLimit types.Int64 `tfsdk:"quota_limit" tf:"optional"` + QuotaLimit types.Int64 `tfsdk:"quota_limit" tf:""` // The name of the quota. - QuotaName types.String `tfsdk:"quota_name" tf:"optional"` + QuotaName types.String `tfsdk:"quota_name" tf:""` } func (newState *QuotaInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan QuotaInfo) { @@ -13984,6 +14334,11 @@ func (newState *QuotaInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan QuotaInf func (newState *QuotaInfo) SyncEffectiveFieldsDuringRead(existingState QuotaInfo) { } +func (c QuotaInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QuotaInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14029,11 +14384,11 @@ func (o QuotaInfo) Type(ctx context.Context) attr.Type { // https://developers.cloudflare.com/r2/api/s3/tokens/. type R2Credentials struct { // The access key ID that identifies the temporary credentials. - AccessKeyId types.String `tfsdk:"access_key_id" tf:"optional"` + AccessKeyId types.String `tfsdk:"access_key_id" tf:""` // The secret access key associated with the access key. - SecretAccessKey types.String `tfsdk:"secret_access_key" tf:"optional"` + SecretAccessKey types.String `tfsdk:"secret_access_key" tf:""` // The generated JWT that users must pass to use the temporary credentials. - SessionToken types.String `tfsdk:"session_token" tf:"optional"` + SessionToken types.String `tfsdk:"session_token" tf:""` } func (newState *R2Credentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan R2Credentials) { @@ -14042,6 +14397,11 @@ func (newState *R2Credentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan R2Cr func (newState *R2Credentials) SyncEffectiveFieldsDuringRead(existingState R2Credentials) { } +func (c R2Credentials) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in R2Credentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14086,12 +14446,6 @@ type ReadVolumeRequest struct { Name types.String `tfsdk:"-"` } -func (newState *ReadVolumeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadVolumeRequest) { -} - -func (newState *ReadVolumeRequest) SyncEffectiveFieldsDuringRead(existingState ReadVolumeRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReadVolumeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14130,7 +14484,7 @@ type RegenerateDashboardRequest struct { TableName types.String `tfsdk:"-"` // Optional argument to specify the warehouse for dashboard regeneration. If // not specified, the first running warehouse will be used. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *RegenerateDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegenerateDashboardRequest) { @@ -14139,6 +14493,12 @@ func (newState *RegenerateDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpd func (newState *RegenerateDashboardRequest) SyncEffectiveFieldsDuringRead(existingState RegenerateDashboardRequest) { } +func (c RegenerateDashboardRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "table_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegenerateDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14174,9 +14534,9 @@ func (o RegenerateDashboardRequest) Type(ctx context.Context) attr.Type { type RegenerateDashboardResponse struct { // Id of the regenerated monitoring dashboard. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The directory where the regenerated dashboard is stored. - ParentFolder types.String `tfsdk:"parent_folder" tf:"optional"` + ParentFolder types.String `tfsdk:"parent_folder" tf:""` } func (newState *RegenerateDashboardResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegenerateDashboardResponse) { @@ -14185,6 +14545,11 @@ func (newState *RegenerateDashboardResponse) SyncEffectiveFieldsDuringCreateOrUp func (newState *RegenerateDashboardResponse) SyncEffectiveFieldsDuringRead(existingState RegenerateDashboardResponse) { } +func (c RegenerateDashboardResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegenerateDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14221,9 +14586,9 @@ func (o RegenerateDashboardResponse) Type(ctx context.Context) attr.Type { // Registered model alias. type RegisteredModelAlias struct { // Name of the alias, e.g. 'champion' or 'latest_stable' - AliasName types.String `tfsdk:"alias_name" tf:"optional"` + AliasName types.String `tfsdk:"alias_name" tf:""` // Integer version number of the model version to which this alias points. - VersionNum types.Int64 `tfsdk:"version_num" tf:"optional"` + VersionNum types.Int64 `tfsdk:"version_num" tf:""` } func (newState *RegisteredModelAlias) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelAlias) { @@ -14232,6 +14597,11 @@ func (newState *RegisteredModelAlias) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *RegisteredModelAlias) SyncEffectiveFieldsDuringRead(existingState RegisteredModelAlias) { } +func (c RegisteredModelAlias) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelAlias. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14267,38 +14637,38 @@ func (o RegisteredModelAlias) Type(ctx context.Context) attr.Type { type RegisteredModelInfo struct { // List of aliases associated with the registered model - Aliases types.List `tfsdk:"aliases" tf:"optional"` + Aliases types.List `tfsdk:"aliases" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // The name of the catalog where the schema and the registered model reside - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the registered model - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Creation timestamp of the registered model in milliseconds since the Unix // epoch - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The identifier of the user who created the registered model - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The three-level (fully qualified) name of the registered model - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // The unique identifier of the metastore - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The name of the registered model - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The identifier of the user who owns the registered model - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // The name of the schema where the registered model resides - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // The storage location on the cloud under which model version data files // are stored - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // Last-update timestamp of the registered model in milliseconds since the // Unix epoch - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The identifier of the user who updated the registered model last time - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *RegisteredModelInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelInfo) { @@ -14307,6 +14677,12 @@ func (newState *RegisteredModelInfo) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *RegisteredModelInfo) SyncEffectiveFieldsDuringRead(existingState RegisteredModelInfo) { } +func (c RegisteredModelInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelAlias{}.ToSchema(cs, append(path, "aliases")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14400,12 +14776,6 @@ type RunRefreshRequest struct { TableName types.String `tfsdk:"-"` } -func (newState *RunRefreshRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunRefreshRequest) { -} - -func (newState *RunRefreshRequest) SyncEffectiveFieldsDuringRead(existingState RunRefreshRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunRefreshRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14441,42 +14811,42 @@ type SchemaInfo struct { // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // Name of parent catalog. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The type of the parent catalog. - CatalogType types.String `tfsdk:"catalog_type" tf:"optional"` + CatalogType types.String `tfsdk:"catalog_type" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this schema was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of schema creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag" tf:"object"` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // Full name of schema, in form of __catalog_name__.__schema_name__. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of schema, relative to parent catalog. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of schema. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` // The unique identifier of the schema. - SchemaId types.String `tfsdk:"schema_id" tf:"optional"` + SchemaId types.String `tfsdk:"schema_id" tf:""` // Storage location for managed tables within schema. - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // Storage root URL for managed tables within schema. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // Time at which this schema was created, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified schema. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *SchemaInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan SchemaInfo) { @@ -14485,6 +14855,12 @@ func (newState *SchemaInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan SchemaI func (newState *SchemaInfo) SyncEffectiveFieldsDuringRead(existingState SchemaInfo) { } +func (c SchemaInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EffectivePredictiveOptimizationFlag{}.ToSchema(cs, append(path, "effective_predictive_optimization_flag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SchemaInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14622,6 +14998,14 @@ func (newState *SetArtifactAllowlist) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SetArtifactAllowlist) SyncEffectiveFieldsDuringRead(existingState SetArtifactAllowlist) { } +func (c SetArtifactAllowlist) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "artifact_matchers")...) + ArtifactMatcher{}.ToSchema(cs, append(path, "artifact_matchers")...) + cs.SetRequired(append(path, "artifact_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetArtifactAllowlist. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14700,6 +15084,14 @@ func (newState *SetRegisteredModelAliasRequest) SyncEffectiveFieldsDuringCreateO func (newState *SetRegisteredModelAliasRequest) SyncEffectiveFieldsDuringRead(existingState SetRegisteredModelAliasRequest) { } +func (c SetRegisteredModelAliasRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "alias")...) + cs.SetRequired(append(path, "full_name")...) + cs.SetRequired(append(path, "version_num")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetRegisteredModelAliasRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14738,10 +15130,10 @@ func (o SetRegisteredModelAliasRequest) Type(ctx context.Context) attr.Type { // Server-Side Encryption properties for clients communicating with AWS s3. type SseEncryptionDetails struct { // The type of key encryption to use (affects headers from s3 client). - Algorithm types.String `tfsdk:"algorithm" tf:"optional"` + Algorithm types.String `tfsdk:"algorithm" tf:""` // When algorithm is **AWS_SSE_KMS** this field specifies the ARN of the SSE // key to use. - AwsKmsKeyArn types.String `tfsdk:"aws_kms_key_arn" tf:"optional"` + AwsKmsKeyArn types.String `tfsdk:"aws_kms_key_arn" tf:""` } func (newState *SseEncryptionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan SseEncryptionDetails) { @@ -14750,6 +15142,11 @@ func (newState *SseEncryptionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SseEncryptionDetails) SyncEffectiveFieldsDuringRead(existingState SseEncryptionDetails) { } +func (c SseEncryptionDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SseEncryptionDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14785,42 +15182,42 @@ func (o SseEncryptionDetails) Type(ctx context.Context) attr.Type { type StorageCredentialInfo struct { // The AWS IAM role configuration. - AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. - AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"object"` // The Cloudflare API token configuration. - CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this Credential was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of credential creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The Databricks managed GCP service account configuration. - DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"object"` // The full name of the credential. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // The unique identifier of the credential. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The credential name. The name must be unique within the metastore. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of credential. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Whether the storage credential is only usable for read operations. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Time at which this credential was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the credential. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // Whether this credential is the current metastore's root storage // credential. - UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:"optional"` + UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:""` } func (newState *StorageCredentialInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan StorageCredentialInfo) { @@ -14829,6 +15226,16 @@ func (newState *StorageCredentialInfo) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *StorageCredentialInfo) SyncEffectiveFieldsDuringRead(existingState StorageCredentialInfo) { } +func (c StorageCredentialInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRoleResponse{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentityResponse{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal{}.ToSchema(cs, append(path, "azure_service_principal")...) + CloudflareApiToken{}.ToSchema(cs, append(path, "cloudflare_api_token")...) + DatabricksGcpServiceAccountResponse{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StorageCredentialInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15042,10 +15449,10 @@ func (o *StorageCredentialInfo) SetDatabricksGcpServiceAccount(ctx context.Conte type SystemSchemaInfo struct { // Name of the system schema. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // The current state of enablement for the system schema. An empty string // means the system schema is available and ready for opt-in. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *SystemSchemaInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan SystemSchemaInfo) { @@ -15054,6 +15461,11 @@ func (newState *SystemSchemaInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *SystemSchemaInfo) SyncEffectiveFieldsDuringRead(existingState SystemSchemaInfo) { } +func (c SystemSchemaInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SystemSchemaInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15091,11 +15503,11 @@ func (o SystemSchemaInfo) Type(ctx context.Context) attr.Type { // __primary_key_constraint__, __foreign_key_constraint__, // __named_table_constraint__. type TableConstraint struct { - ForeignKeyConstraint types.Object `tfsdk:"foreign_key_constraint" tf:"optional,object"` + ForeignKeyConstraint types.Object `tfsdk:"foreign_key_constraint" tf:"object"` - NamedTableConstraint types.Object `tfsdk:"named_table_constraint" tf:"optional,object"` + NamedTableConstraint types.Object `tfsdk:"named_table_constraint" tf:"object"` - PrimaryKeyConstraint types.Object `tfsdk:"primary_key_constraint" tf:"optional,object"` + PrimaryKeyConstraint types.Object `tfsdk:"primary_key_constraint" tf:"object"` } func (newState *TableConstraint) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableConstraint) { @@ -15104,6 +15516,14 @@ func (newState *TableConstraint) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ta func (newState *TableConstraint) SyncEffectiveFieldsDuringRead(existingState TableConstraint) { } +func (c TableConstraint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ForeignKeyConstraint{}.ToSchema(cs, append(path, "foreign_key_constraint")...) + NamedTableConstraint{}.ToSchema(cs, append(path, "named_table_constraint")...) + PrimaryKeyConstraint{}.ToSchema(cs, append(path, "primary_key_constraint")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableConstraint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15240,6 +15660,12 @@ func (newState *TableDependency) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ta func (newState *TableDependency) SyncEffectiveFieldsDuringRead(existingState TableDependency) { } +func (c TableDependency) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "table_full_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableDependency. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15273,7 +15699,7 @@ func (o TableDependency) Type(ctx context.Context) attr.Type { type TableExistsResponse struct { // Whether the table exists or not. - TableExists types.Bool `tfsdk:"table_exists" tf:"optional"` + TableExists types.Bool `tfsdk:"table_exists" tf:""` } func (newState *TableExistsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableExistsResponse) { @@ -15282,6 +15708,11 @@ func (newState *TableExistsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *TableExistsResponse) SyncEffectiveFieldsDuringRead(existingState TableExistsResponse) { } +func (c TableExistsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableExistsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15315,82 +15746,82 @@ func (o TableExistsResponse) Type(ctx context.Context) attr.Type { type TableInfo struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // Name of parent catalog. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The array of __ColumnInfo__ definitions of the table's columns. - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this table was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of table creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Unique ID of the Data Access Configuration to use with the table data. - DataAccessConfigurationId types.String `tfsdk:"data_access_configuration_id" tf:"optional"` + DataAccessConfigurationId types.String `tfsdk:"data_access_configuration_id" tf:""` // Data source format - DataSourceFormat types.String `tfsdk:"data_source_format" tf:"optional"` + DataSourceFormat types.String `tfsdk:"data_source_format" tf:""` // Time at which this table was deleted, in epoch milliseconds. Field is // omitted if table is not deleted. - DeletedAt types.Int64 `tfsdk:"deleted_at" tf:"optional"` + DeletedAt types.Int64 `tfsdk:"deleted_at" tf:""` // Information pertaining to current state of the delta table. - DeltaRuntimePropertiesKvpairs types.Object `tfsdk:"delta_runtime_properties_kvpairs" tf:"optional,object"` + DeltaRuntimePropertiesKvpairs types.Object `tfsdk:"delta_runtime_properties_kvpairs" tf:"object"` - EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag" tf:"object"` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"object"` // Full name of table, in form of // __catalog_name__.__schema_name__.__table_name__ - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // Unique identifier of parent metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of table, relative to parent schema. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of current owner of table. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // The pipeline ID of the table. Applicable for tables created by pipelines // (Materialized View, Streaming Table, etc.). - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` - RowFilter types.Object `tfsdk:"row_filter" tf:"optional,object"` + RowFilter types.Object `tfsdk:"row_filter" tf:"object"` // Name of parent schema relative to its parent catalog. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // List of schemes whose objects can be referenced without qualification. - SqlPath types.String `tfsdk:"sql_path" tf:"optional"` + SqlPath types.String `tfsdk:"sql_path" tf:""` // Name of the storage credential, when a storage credential is configured // for use with this table. - StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:"optional"` + StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:""` // Storage root URL for table (for **MANAGED**, **EXTERNAL** tables) - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // List of table constraints. Note: this field is not set in the output of // the __listTables__ API. - TableConstraints types.List `tfsdk:"table_constraints" tf:"optional"` + TableConstraints types.List `tfsdk:"table_constraints" tf:""` // The unique identifier of the table. - TableId types.String `tfsdk:"table_id" tf:"optional"` + TableId types.String `tfsdk:"table_id" tf:""` - TableType types.String `tfsdk:"table_type" tf:"optional"` + TableType types.String `tfsdk:"table_type" tf:""` // Time at which this table was last modified, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified the table. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // View definition SQL (when __table_type__ is **VIEW**, // **MATERIALIZED_VIEW**, or **STREAMING_TABLE**) - ViewDefinition types.String `tfsdk:"view_definition" tf:"optional"` + ViewDefinition types.String `tfsdk:"view_definition" tf:""` // View dependencies (when table_type == **VIEW** or **MATERIALIZED_VIEW**, // **STREAMING_TABLE**) - when DependencyList is None, the dependency is not // provided; - when DependencyList is an empty list, the dependency is // provided but is empty; - when DependencyList is not an empty list, // dependencies are provided and recorded. - ViewDependencies types.Object `tfsdk:"view_dependencies" tf:"optional,object"` + ViewDependencies types.Object `tfsdk:"view_dependencies" tf:"object"` } func (newState *TableInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableInfo) { @@ -15399,6 +15830,18 @@ func (newState *TableInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableInf func (newState *TableInfo) SyncEffectiveFieldsDuringRead(existingState TableInfo) { } +func (c TableInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ColumnInfo{}.ToSchema(cs, append(path, "columns")...) + DeltaRuntimePropertiesKvPairs{}.ToSchema(cs, append(path, "delta_runtime_properties_kvpairs")...) + EffectivePredictiveOptimizationFlag{}.ToSchema(cs, append(path, "effective_predictive_optimization_flag")...) + EncryptionDetails{}.ToSchema(cs, append(path, "encryption_details")...) + TableRowFilter{}.ToSchema(cs, append(path, "row_filter")...) + TableConstraint{}.ToSchema(cs, append(path, "table_constraints")...) + DependencyList{}.ToSchema(cs, append(path, "view_dependencies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15740,6 +16183,13 @@ func (newState *TableRowFilter) SyncEffectiveFieldsDuringCreateOrUpdate(plan Tab func (newState *TableRowFilter) SyncEffectiveFieldsDuringRead(existingState TableRowFilter) { } +func (c TableRowFilter) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "function_name")...) + cs.SetRequired(append(path, "input_column_names")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableRowFilter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15805,9 +16255,9 @@ func (o *TableRowFilter) SetInputColumnNames(ctx context.Context, v []types.Stri type TableSummary struct { // The full name of the table. - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` - TableType types.String `tfsdk:"table_type" tf:"optional"` + TableType types.String `tfsdk:"table_type" tf:""` } func (newState *TableSummary) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSummary) { @@ -15816,6 +16266,11 @@ func (newState *TableSummary) SyncEffectiveFieldsDuringCreateOrUpdate(plan Table func (newState *TableSummary) SyncEffectiveFieldsDuringRead(existingState TableSummary) { } +func (c TableSummary) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableSummary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15852,14 +16307,14 @@ func (o TableSummary) Type(ctx context.Context) attr.Type { type TemporaryCredentials struct { // AWS temporary credentials for API authentication. Read more at // https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. - AwsTempCredentials types.Object `tfsdk:"aws_temp_credentials" tf:"optional,object"` + AwsTempCredentials types.Object `tfsdk:"aws_temp_credentials" tf:"object"` // Azure Active Directory token, essentially the Oauth token for Azure // Service Principal or Managed Identity. Read more at // https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/service-prin-aad-token - AzureAad types.Object `tfsdk:"azure_aad" tf:"optional,object"` + AzureAad types.Object `tfsdk:"azure_aad" tf:"object"` // Server time when the credential will expire, in epoch milliseconds. The // API client is advised to cache the credential given this expiration time. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` } func (newState *TemporaryCredentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan TemporaryCredentials) { @@ -15868,6 +16323,13 @@ func (newState *TemporaryCredentials) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *TemporaryCredentials) SyncEffectiveFieldsDuringRead(existingState TemporaryCredentials) { } +func (c TemporaryCredentials) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsCredentials{}.ToSchema(cs, append(path, "aws_temp_credentials")...) + AzureActiveDirectoryToken{}.ToSchema(cs, append(path, "azure_aad")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TemporaryCredentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15968,12 +16430,12 @@ type TriggeredUpdateStatus struct { // The last source table Delta version that was synced to the online table. // Note that this Delta version may not be completely synced to the online // table yet. - LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:"optional"` + LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:""` // The timestamp of the last time any data was synchronized from the source // table to the online table. - Timestamp types.String `tfsdk:"timestamp" tf:"optional"` + Timestamp types.String `tfsdk:"timestamp" tf:""` // Progress of the active data synchronization pipeline. - TriggeredUpdateProgress types.Object `tfsdk:"triggered_update_progress" tf:"optional,object"` + TriggeredUpdateProgress types.Object `tfsdk:"triggered_update_progress" tf:"object"` } func (newState *TriggeredUpdateStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggeredUpdateStatus) { @@ -15982,6 +16444,12 @@ func (newState *TriggeredUpdateStatus) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *TriggeredUpdateStatus) SyncEffectiveFieldsDuringRead(existingState TriggeredUpdateStatus) { } +func (c TriggeredUpdateStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineProgress{}.ToSchema(cs, append(path, "triggered_update_progress")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TriggeredUpdateStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16055,12 +16523,6 @@ type UnassignRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *UnassignRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnassignRequest) { -} - -func (newState *UnassignRequest) SyncEffectiveFieldsDuringRead(existingState UnassignRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnassignRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16097,12 +16559,6 @@ func (o UnassignRequest) Type(ctx context.Context) attr.Type { type UnassignResponse struct { } -func (newState *UnassignResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnassignResponse) { -} - -func (newState *UnassignResponse) SyncEffectiveFieldsDuringRead(existingState UnassignResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnassignResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16133,12 +16589,6 @@ func (o UnassignResponse) Type(ctx context.Context) attr.Type { type UpdateAssignmentResponse struct { } -func (newState *UpdateAssignmentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAssignmentResponse) { -} - -func (newState *UpdateAssignmentResponse) SyncEffectiveFieldsDuringRead(existingState UpdateAssignmentResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAssignmentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16168,21 +16618,21 @@ func (o UpdateAssignmentResponse) Type(ctx context.Context) attr.Type { type UpdateCatalog struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // Whether the current securable is accessible from all workspaces or a // specific set of workspaces. - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // The name of the catalog. Name types.String `tfsdk:"-"` // New name for the catalog. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of catalog. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` } func (newState *UpdateCatalog) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCatalog) { @@ -16191,6 +16641,12 @@ func (newState *UpdateCatalog) SyncEffectiveFieldsDuringCreateOrUpdate(plan Upda func (newState *UpdateCatalog) SyncEffectiveFieldsDuringRead(existingState UpdateCatalog) { } +func (c UpdateCatalog) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCatalog. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16268,11 +16724,11 @@ type UpdateConnection struct { // Name of the connection. Name types.String `tfsdk:"-"` // New name for the connection. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // A map of key-value properties attached to the securable. Options types.Map `tfsdk:"options" tf:""` // Username of current owner of the connection. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` } func (newState *UpdateConnection) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateConnection) { @@ -16281,6 +16737,13 @@ func (newState *UpdateConnection) SyncEffectiveFieldsDuringCreateOrUpdate(plan U func (newState *UpdateConnection) SyncEffectiveFieldsDuringRead(existingState UpdateConnection) { } +func (c UpdateConnection) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateConnection. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16350,36 +16813,36 @@ func (o *UpdateConnection) SetOptions(ctx context.Context, v map[string]types.St type UpdateCredentialRequest struct { // The AWS IAM role configuration - AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. Only applicable when purpose // is **STORAGE**. - AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // GCP long-lived credential. Databricks-created Google Cloud Storage // service account. - DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"object"` // Force an update even if there are dependent services (when purpose is // **SERVICE**) or dependent external locations and external tables (when // purpose is **STORAGE**). - Force types.Bool `tfsdk:"force" tf:"optional"` + Force types.Bool `tfsdk:"force" tf:""` // Whether the current securable is accessible from all workspaces or a // specific set of workspaces. - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Name of the credential. NameArg types.String `tfsdk:"-"` // New name of credential. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of credential. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Whether the credential is usable only for read operations. Only // applicable when purpose is **STORAGE**. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Supply true to this argument to skip validation of the updated // credential. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *UpdateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialRequest) { @@ -16388,6 +16851,16 @@ func (newState *UpdateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *UpdateCredentialRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialRequest) { } +func (c UpdateCredentialRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRole{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentity{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal{}.ToSchema(cs, append(path, "azure_service_principal")...) + DatabricksGcpServiceAccount{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + cs.SetRequired(append(path, "name_arg")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16560,35 +17033,35 @@ func (o *UpdateCredentialRequest) SetDatabricksGcpServiceAccount(ctx context.Con type UpdateExternalLocation struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the storage credential used with this location. - CredentialName types.String `tfsdk:"credential_name" tf:"optional"` + CredentialName types.String `tfsdk:"credential_name" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"object"` // Indicates whether fallback mode is enabled for this external location. // When fallback mode is enabled, the access to the location falls back to // cluster credentials if UC credentials are not sufficient. - Fallback types.Bool `tfsdk:"fallback" tf:"optional"` + Fallback types.Bool `tfsdk:"fallback" tf:""` // Force update even if changing url invalidates dependent external tables // or mounts. - Force types.Bool `tfsdk:"force" tf:"optional"` + Force types.Bool `tfsdk:"force" tf:""` - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Name of the external location. Name types.String `tfsdk:"-"` // New name for the external location. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // The owner of the external location. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Indicates whether the external location is read-only. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Skips validation of the storage credential associated with the external // location. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` // Path URL of the external location. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *UpdateExternalLocation) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExternalLocation) { @@ -16597,6 +17070,13 @@ func (newState *UpdateExternalLocation) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *UpdateExternalLocation) SyncEffectiveFieldsDuringRead(existingState UpdateExternalLocation) { } +func (c UpdateExternalLocation) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EncryptionDetails{}.ToSchema(cs, append(path, "encryption_details")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExternalLocation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16687,7 +17167,7 @@ type UpdateFunction struct { // __catalog_name__.__schema_name__.__function__name__). Name types.String `tfsdk:"-"` // Username of current owner of function. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` } func (newState *UpdateFunction) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateFunction) { @@ -16696,6 +17176,12 @@ func (newState *UpdateFunction) SyncEffectiveFieldsDuringCreateOrUpdate(plan Upd func (newState *UpdateFunction) SyncEffectiveFieldsDuringRead(existingState UpdateFunction) { } +func (c UpdateFunction) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateFunction. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16732,22 +17218,22 @@ func (o UpdateFunction) Type(ctx context.Context) attr.Type { type UpdateMetastore struct { // The organization name of a Delta Sharing entity, to be used in // Databricks-to-Databricks Delta Sharing as the official name. - DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:"optional"` + DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:""` // The lifetime of delta sharing recipient token in seconds. - DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:"optional"` + DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:""` // The scope of Delta Sharing enabled for the metastore. - DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:"optional"` + DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:""` // Unique ID of the metastore. Id types.String `tfsdk:"-"` // New name for the metastore. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // The owner of the metastore. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Privilege model version of the metastore, of the form `major.minor` // (e.g., `1.0`). - PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:"optional"` + PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:""` // UUID of storage credential to access the metastore storage_root. - StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:"optional"` + StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:""` } func (newState *UpdateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMetastore) { @@ -16756,6 +17242,12 @@ func (newState *UpdateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan Up func (newState *UpdateMetastore) SyncEffectiveFieldsDuringRead(existingState UpdateMetastore) { } +func (c UpdateMetastore) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMetastore. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16805,9 +17297,9 @@ type UpdateMetastoreAssignment struct { // The name of the default catalog in the metastore. This field is // depracted. Please use "Default Namespace API" to configure the default // catalog for a Databricks workspace. - DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:"optional"` + DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:""` // The unique ID of the metastore. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // A workspace ID. WorkspaceId types.Int64 `tfsdk:"-"` } @@ -16818,6 +17310,12 @@ func (newState *UpdateMetastoreAssignment) SyncEffectiveFieldsDuringCreateOrUpda func (newState *UpdateMetastoreAssignment) SyncEffectiveFieldsDuringRead(existingState UpdateMetastoreAssignment) { } +func (c UpdateMetastoreAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMetastoreAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16855,7 +17353,7 @@ func (o UpdateMetastoreAssignment) Type(ctx context.Context) attr.Type { type UpdateModelVersionRequest struct { // The comment attached to the model version - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The three-level (fully qualified) name of the model version FullName types.String `tfsdk:"-"` // The integer version number of the model version @@ -16868,6 +17366,13 @@ func (newState *UpdateModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *UpdateModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest) { } +func (c UpdateModelVersionRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "full_name")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16907,36 +17412,36 @@ type UpdateMonitor struct { // Name of the baseline table from which drift metrics are computed from. // Columns in the monitored table should also be present in the baseline // table. - BaselineTableName types.String `tfsdk:"baseline_table_name" tf:"optional"` + BaselineTableName types.String `tfsdk:"baseline_table_name" tf:""` // Custom metrics to compute on the monitored table. These can be aggregate // metrics, derived metrics (from already computed aggregate metrics), or // drift metrics (comparing metrics across time windows). - CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` + CustomMetrics types.List `tfsdk:"custom_metrics" tf:""` // Id of dashboard that visualizes the computed metrics. This can be empty // if the monitor is in PENDING state. - DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The data classification config for the monitor. - DataClassificationConfig types.Object `tfsdk:"data_classification_config" tf:"optional,object"` + DataClassificationConfig types.Object `tfsdk:"data_classification_config" tf:"object"` // Configuration for monitoring inference logs. - InferenceLog types.Object `tfsdk:"inference_log" tf:"optional,object"` + InferenceLog types.Object `tfsdk:"inference_log" tf:"object"` // The notification settings for the monitor. - Notifications types.Object `tfsdk:"notifications" tf:"optional,object"` + Notifications types.Object `tfsdk:"notifications" tf:"object"` // Schema where output metric tables are created. OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // The schedule for automatically updating and refreshing metric tables. - Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"object"` // List of column expressions to slice data with for targeted analysis. The // data is grouped by each expression independently, resulting in a separate // slice for each predicate and its complements. For high-cardinality // columns, only the top 100 unique values by frequency will generate // slices. - SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` + SlicingExprs types.List `tfsdk:"slicing_exprs" tf:""` // Configuration for monitoring snapshot tables. - Snapshot types.Object `tfsdk:"snapshot" tf:"optional,object"` + Snapshot types.Object `tfsdk:"snapshot" tf:"object"` // Full name of the table. TableName types.String `tfsdk:"-"` // Configuration for monitoring time series tables. - TimeSeries types.Object `tfsdk:"time_series" tf:"optional,object"` + TimeSeries types.Object `tfsdk:"time_series" tf:"object"` } func (newState *UpdateMonitor) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMonitor) { @@ -16945,6 +17450,20 @@ func (newState *UpdateMonitor) SyncEffectiveFieldsDuringCreateOrUpdate(plan Upda func (newState *UpdateMonitor) SyncEffectiveFieldsDuringRead(existingState UpdateMonitor) { } +func (c UpdateMonitor) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MonitorMetric{}.ToSchema(cs, append(path, "custom_metrics")...) + MonitorDataClassificationConfig{}.ToSchema(cs, append(path, "data_classification_config")...) + MonitorInferenceLog{}.ToSchema(cs, append(path, "inference_log")...) + MonitorNotifications{}.ToSchema(cs, append(path, "notifications")...) + cs.SetRequired(append(path, "output_schema_name")...) + MonitorCronSchedule{}.ToSchema(cs, append(path, "schedule")...) + MonitorSnapshot{}.ToSchema(cs, append(path, "snapshot")...) + cs.SetRequired(append(path, "table_name")...) + MonitorTimeSeries{}.ToSchema(cs, append(path, "time_series")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMonitor. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17233,7 +17752,7 @@ func (o *UpdateMonitor) SetTimeSeries(ctx context.Context, v MonitorTimeSeries) type UpdatePermissions struct { // Array of permissions change objects. - Changes types.List `tfsdk:"changes" tf:"optional"` + Changes types.List `tfsdk:"changes" tf:""` // Full name of securable. FullName types.String `tfsdk:"-"` // Type of securable. @@ -17246,6 +17765,14 @@ func (newState *UpdatePermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UpdatePermissions) SyncEffectiveFieldsDuringRead(existingState UpdatePermissions) { } +func (c UpdatePermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PermissionsChange{}.ToSchema(cs, append(path, "changes")...) + cs.SetRequired(append(path, "full_name")...) + cs.SetRequired(append(path, "securable_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17313,13 +17840,13 @@ func (o *UpdatePermissions) SetChanges(ctx context.Context, v []PermissionsChang type UpdateRegisteredModelRequest struct { // The comment attached to the registered model - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The three-level (fully qualified) name of the registered model FullName types.String `tfsdk:"-"` // New name for the registered model. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // The identifier of the user who owns the registered model - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` } func (newState *UpdateRegisteredModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegisteredModelRequest) { @@ -17328,6 +17855,12 @@ func (newState *UpdateRegisteredModelRequest) SyncEffectiveFieldsDuringCreateOrU func (newState *UpdateRegisteredModelRequest) SyncEffectiveFieldsDuringRead(existingState UpdateRegisteredModelRequest) { } +func (c UpdateRegisteredModelRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "full_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRegisteredModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17368,12 +17901,6 @@ func (o UpdateRegisteredModelRequest) Type(ctx context.Context) attr.Type { type UpdateResponse struct { } -func (newState *UpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse) { -} - -func (newState *UpdateResponse) SyncEffectiveFieldsDuringRead(existingState UpdateResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17403,18 +17930,18 @@ func (o UpdateResponse) Type(ctx context.Context) attr.Type { type UpdateSchema struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Whether predictive optimization should be enabled for this object and // objects under it. - EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:""` // Full name of the schema. FullName types.String `tfsdk:"-"` // New name for the schema. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of schema. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // A map of key-value properties attached to the securable. - Properties types.Map `tfsdk:"properties" tf:"optional"` + Properties types.Map `tfsdk:"properties" tf:""` } func (newState *UpdateSchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSchema) { @@ -17423,6 +17950,12 @@ func (newState *UpdateSchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan Updat func (newState *UpdateSchema) SyncEffectiveFieldsDuringRead(existingState UpdateSchema) { } +func (c UpdateSchema) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "full_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateSchema. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17496,33 +18029,33 @@ func (o *UpdateSchema) SetProperties(ctx context.Context, v map[string]types.Str type UpdateStorageCredential struct { // The AWS IAM role configuration. - AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. - AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"object"` // The Cloudflare API token configuration. - CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"object"` // Comment associated with the credential. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The Databricks managed GCP service account configuration. - DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"object"` // Force update even if there are dependent external locations or external // tables. - Force types.Bool `tfsdk:"force" tf:"optional"` + Force types.Bool `tfsdk:"force" tf:""` - IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + IsolationMode types.String `tfsdk:"isolation_mode" tf:""` // Name of the storage credential. Name types.String `tfsdk:"-"` // New name for the storage credential. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of credential. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Whether the storage credential is only usable for read operations. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // Supplying true to this argument skips validation of the updated // credential. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *UpdateStorageCredential) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateStorageCredential) { @@ -17531,6 +18064,17 @@ func (newState *UpdateStorageCredential) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *UpdateStorageCredential) SyncEffectiveFieldsDuringRead(existingState UpdateStorageCredential) { } +func (c UpdateStorageCredential) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRoleRequest{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentityResponse{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal{}.ToSchema(cs, append(path, "azure_service_principal")...) + CloudflareApiToken{}.ToSchema(cs, append(path, "cloudflare_api_token")...) + DatabricksGcpServiceAccountRequest{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17737,13 +18281,7 @@ type UpdateTableRequest struct { // Full name of the table. FullName types.String `tfsdk:"-"` - Owner types.String `tfsdk:"owner" tf:"optional"` -} - -func (newState *UpdateTableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateTableRequest) { -} - -func (newState *UpdateTableRequest) SyncEffectiveFieldsDuringRead(existingState UpdateTableRequest) { + Owner types.String `tfsdk:"owner" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateTableRequest. @@ -17781,13 +18319,13 @@ func (o UpdateTableRequest) Type(ctx context.Context) attr.Type { type UpdateVolumeRequestContent struct { // The comment attached to the volume - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The three-level (fully qualified) name of the volume Name types.String `tfsdk:"-"` // New name for the volume. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // The identifier of the user who owns the volume - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` } func (newState *UpdateVolumeRequestContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVolumeRequestContent) { @@ -17796,6 +18334,12 @@ func (newState *UpdateVolumeRequestContent) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UpdateVolumeRequestContent) SyncEffectiveFieldsDuringRead(existingState UpdateVolumeRequestContent) { } +func (c UpdateVolumeRequestContent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateVolumeRequestContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17835,11 +18379,11 @@ func (o UpdateVolumeRequestContent) Type(ctx context.Context) attr.Type { type UpdateWorkspaceBindings struct { // A list of workspace IDs. - AssignWorkspaces types.List `tfsdk:"assign_workspaces" tf:"optional"` + AssignWorkspaces types.List `tfsdk:"assign_workspaces" tf:""` // The name of the catalog. Name types.String `tfsdk:"-"` // A list of workspace IDs. - UnassignWorkspaces types.List `tfsdk:"unassign_workspaces" tf:"optional"` + UnassignWorkspaces types.List `tfsdk:"unassign_workspaces" tf:""` } func (newState *UpdateWorkspaceBindings) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceBindings) { @@ -17848,6 +18392,12 @@ func (newState *UpdateWorkspaceBindings) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *UpdateWorkspaceBindings) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindings) { } +func (c UpdateWorkspaceBindings) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWorkspaceBindings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -17944,9 +18494,9 @@ func (o *UpdateWorkspaceBindings) SetUnassignWorkspaces(ctx context.Context, v [ type UpdateWorkspaceBindingsParameters struct { // List of workspace bindings - Add types.List `tfsdk:"add" tf:"optional"` + Add types.List `tfsdk:"add" tf:""` // List of workspace bindings - Remove types.List `tfsdk:"remove" tf:"optional"` + Remove types.List `tfsdk:"remove" tf:""` // The name of the securable. SecurableName types.String `tfsdk:"-"` // The type of the securable to bind to a workspace. @@ -17959,6 +18509,15 @@ func (newState *UpdateWorkspaceBindingsParameters) SyncEffectiveFieldsDuringCrea func (newState *UpdateWorkspaceBindingsParameters) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindingsParameters) { } +func (c UpdateWorkspaceBindingsParameters) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceBinding{}.ToSchema(cs, append(path, "add")...) + WorkspaceBinding{}.ToSchema(cs, append(path, "remove")...) + cs.SetRequired(append(path, "securable_name")...) + cs.SetRequired(append(path, "securable_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWorkspaceBindingsParameters. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18057,24 +18616,24 @@ func (o *UpdateWorkspaceBindingsParameters) SetRemove(ctx context.Context, v []W type ValidateCredentialRequest struct { // The AWS IAM role configuration - AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"object"` // Required. The name of an existing credential or long-lived cloud // credential to validate. - CredentialName types.String `tfsdk:"credential_name" tf:"optional"` + CredentialName types.String `tfsdk:"credential_name" tf:""` // The name of an existing external location to validate. Only applicable // for storage credentials (purpose is **STORAGE**.) - ExternalLocationName types.String `tfsdk:"external_location_name" tf:"optional"` + ExternalLocationName types.String `tfsdk:"external_location_name" tf:""` // The purpose of the credential. This should only be used when the // credential is specified. - Purpose types.String `tfsdk:"purpose" tf:"optional"` + Purpose types.String `tfsdk:"purpose" tf:""` // Whether the credential is only usable for read operations. Only // applicable for storage credentials (purpose is **STORAGE**.) - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // The external location url to validate. Only applicable when purpose is // **STORAGE**. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *ValidateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateCredentialRequest) { @@ -18083,6 +18642,13 @@ func (newState *ValidateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ValidateCredentialRequest) SyncEffectiveFieldsDuringRead(existingState ValidateCredentialRequest) { } +func (c ValidateCredentialRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRole{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentity{}.ToSchema(cs, append(path, "azure_managed_identity")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18188,9 +18754,9 @@ func (o *ValidateCredentialRequest) SetAzureManagedIdentity(ctx context.Context, type ValidateCredentialResponse struct { // Whether the tested location is a directory in cloud storage. Only // applicable for when purpose is **STORAGE**. - IsDir types.Bool `tfsdk:"isDir" tf:"optional"` + IsDir types.Bool `tfsdk:"isDir" tf:""` // The results of the validation check. - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ValidateCredentialResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateCredentialResponse) { @@ -18199,6 +18765,12 @@ func (newState *ValidateCredentialResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ValidateCredentialResponse) SyncEffectiveFieldsDuringRead(existingState ValidateCredentialResponse) { } +func (c ValidateCredentialResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CredentialValidationResult{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateCredentialResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18264,23 +18836,23 @@ func (o *ValidateCredentialResponse) SetResults(ctx context.Context, v []Credent type ValidateStorageCredential struct { // The AWS IAM role configuration. - AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"object"` // The Azure managed identity configuration. - AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"object"` // The Azure service principal configuration. - AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"object"` // The Cloudflare API token configuration. - CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"object"` // The Databricks created GCP service account configuration. - DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"object"` // The name of an existing external location to validate. - ExternalLocationName types.String `tfsdk:"external_location_name" tf:"optional"` + ExternalLocationName types.String `tfsdk:"external_location_name" tf:""` // Whether the storage credential is only usable for read operations. - ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + ReadOnly types.Bool `tfsdk:"read_only" tf:""` // The name of the storage credential to validate. - StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:"optional"` + StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:""` // The external location url to validate. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *ValidateStorageCredential) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateStorageCredential) { @@ -18289,6 +18861,16 @@ func (newState *ValidateStorageCredential) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ValidateStorageCredential) SyncEffectiveFieldsDuringRead(existingState ValidateStorageCredential) { } +func (c ValidateStorageCredential) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsIamRoleRequest{}.ToSchema(cs, append(path, "aws_iam_role")...) + AzureManagedIdentityRequest{}.ToSchema(cs, append(path, "azure_managed_identity")...) + AzureServicePrincipal{}.ToSchema(cs, append(path, "azure_service_principal")...) + CloudflareApiToken{}.ToSchema(cs, append(path, "cloudflare_api_token")...) + DatabricksGcpServiceAccountRequest{}.ToSchema(cs, append(path, "databricks_gcp_service_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateStorageCredential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18484,9 +19066,9 @@ func (o *ValidateStorageCredential) SetDatabricksGcpServiceAccount(ctx context.C type ValidateStorageCredentialResponse struct { // Whether the tested location is a directory in cloud storage. - IsDir types.Bool `tfsdk:"isDir" tf:"optional"` + IsDir types.Bool `tfsdk:"isDir" tf:""` // The results of the validation check. - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ValidateStorageCredentialResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateStorageCredentialResponse) { @@ -18495,6 +19077,12 @@ func (newState *ValidateStorageCredentialResponse) SyncEffectiveFieldsDuringCrea func (newState *ValidateStorageCredentialResponse) SyncEffectiveFieldsDuringRead(existingState ValidateStorageCredentialResponse) { } +func (c ValidateStorageCredentialResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ValidationResult{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateStorageCredentialResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18560,11 +19148,11 @@ func (o *ValidateStorageCredentialResponse) SetResults(ctx context.Context, v [] type ValidationResult struct { // Error message would exist when the result does not equal to **PASS**. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // The operation tested. - Operation types.String `tfsdk:"operation" tf:"optional"` + Operation types.String `tfsdk:"operation" tf:""` // The results of the tested operation. - Result types.String `tfsdk:"result" tf:"optional"` + Result types.String `tfsdk:"result" tf:""` } func (newState *ValidationResult) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidationResult) { @@ -18573,6 +19161,11 @@ func (newState *ValidationResult) SyncEffectiveFieldsDuringCreateOrUpdate(plan V func (newState *ValidationResult) SyncEffectiveFieldsDuringRead(existingState ValidationResult) { } +func (c ValidationResult) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidationResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18610,41 +19203,41 @@ func (o ValidationResult) Type(ctx context.Context) attr.Type { type VolumeInfo struct { // The AWS access point to use when accesing s3 for this external location. - AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + AccessPoint types.String `tfsdk:"access_point" tf:""` // Indicates whether the principal is limited to retrieving metadata for the // associated object through the BROWSE privilege when include_browse is // enabled in the request. - BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + BrowseOnly types.Bool `tfsdk:"browse_only" tf:""` // The name of the catalog where the schema and the volume are - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // The comment attached to the volume - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The identifier of the user who created the volume - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"object"` // The three-level (fully qualified) name of the volume - FullName types.String `tfsdk:"full_name" tf:"optional"` + FullName types.String `tfsdk:"full_name" tf:""` // The unique identifier of the metastore - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The name of the volume - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The identifier of the user who owns the volume - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // The name of the schema where the volume is - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // The storage location on the cloud - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The identifier of the user who updated the volume last time - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` // The unique identifier of the volume - VolumeId types.String `tfsdk:"volume_id" tf:"optional"` + VolumeId types.String `tfsdk:"volume_id" tf:""` - VolumeType types.String `tfsdk:"volume_type" tf:"optional"` + VolumeType types.String `tfsdk:"volume_type" tf:""` } func (newState *VolumeInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan VolumeInfo) { @@ -18653,6 +19246,12 @@ func (newState *VolumeInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan VolumeI func (newState *VolumeInfo) SyncEffectiveFieldsDuringRead(existingState VolumeInfo) { } +func (c VolumeInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EncryptionDetails{}.ToSchema(cs, append(path, "encryption_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VolumeInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18747,9 +19346,9 @@ func (o *VolumeInfo) SetEncryptionDetails(ctx context.Context, v EncryptionDetai } type WorkspaceBinding struct { - BindingType types.String `tfsdk:"binding_type" tf:"optional"` + BindingType types.String `tfsdk:"binding_type" tf:""` - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` } func (newState *WorkspaceBinding) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceBinding) { @@ -18758,6 +19357,11 @@ func (newState *WorkspaceBinding) SyncEffectiveFieldsDuringCreateOrUpdate(plan W func (newState *WorkspaceBinding) SyncEffectiveFieldsDuringRead(existingState WorkspaceBinding) { } +func (c WorkspaceBinding) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceBinding. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -18794,11 +19398,11 @@ func (o WorkspaceBinding) Type(ctx context.Context) attr.Type { // Currently assigned workspace bindings type WorkspaceBindingsResponse struct { // List of workspace bindings - Bindings types.List `tfsdk:"bindings" tf:"optional"` + Bindings types.List `tfsdk:"bindings" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *WorkspaceBindingsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceBindingsResponse) { @@ -18807,6 +19411,12 @@ func (newState *WorkspaceBindingsResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *WorkspaceBindingsResponse) SyncEffectiveFieldsDuringRead(existingState WorkspaceBindingsResponse) { } +func (c WorkspaceBindingsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceBinding{}.ToSchema(cs, append(path, "bindings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceBindingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/cleanrooms_tf/legacy_model.go b/internal/service/cleanrooms_tf/legacy_model.go index 646aebd6d..8b62f1298 100755 --- a/internal/service/cleanrooms_tf/legacy_model.go +++ b/internal/service/cleanrooms_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/catalog_tf" "github.com/databricks/terraform-provider-databricks/internal/service/jobs_tf" @@ -29,33 +30,33 @@ type CleanRoom_SdkV2 struct { // Whether clean room access is restricted due to [CSP] // // [CSP]: https://docs.databricks.com/en/security/privacy/security-profile.html - AccessRestricted types.String `tfsdk:"access_restricted" tf:"computed"` + AccessRestricted types.String `tfsdk:"access_restricted" tf:""` - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // When the clean room was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"computed"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The alias of the collaborator tied to the local clean room. - LocalCollaboratorAlias types.String `tfsdk:"local_collaborator_alias" tf:"computed"` + LocalCollaboratorAlias types.String `tfsdk:"local_collaborator_alias" tf:""` // The name of the clean room. It should follow [UC securable naming // requirements]. // // [UC securable naming requirements]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Output catalog of the clean room. It is an output only field. Output // catalog is manipulated using the separate CreateCleanRoomOutputCatalog // API. - OutputCatalog types.List `tfsdk:"output_catalog" tf:"computed,object"` + OutputCatalog types.List `tfsdk:"output_catalog" tf:"object"` // This is Databricks username of the owner of the local clean room // securable for permission management. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Central clean room details. During creation, users need to specify // cloud_vendor, region, and collaborators.global_metastore_id. This field // will not be filled in the ListCleanRooms call. - RemoteDetailedInfo types.List `tfsdk:"remote_detailed_info" tf:"optional,object"` + RemoteDetailedInfo types.List `tfsdk:"remote_detailed_info" tf:"object"` // Clean room status. - Status types.String `tfsdk:"status" tf:"computed"` + Status types.String `tfsdk:"status" tf:""` // When the clean room was last updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"computed"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` } func (newState *CleanRoom_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoom_SdkV2) { @@ -64,6 +65,19 @@ func (newState *CleanRoom_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cl func (newState *CleanRoom_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoom_SdkV2) { } +func (c CleanRoom_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "access_restricted")...) + cs.SetComputed(append(path, "created_at")...) + cs.SetComputed(append(path, "local_collaborator_alias")...) + cs.SetComputed(append(path, "output_catalog")...) + CleanRoomOutputCatalog_SdkV2{}.ToSchema(cs, append(path, "output_catalog")...) + CleanRoomRemoteDetail_SdkV2{}.ToSchema(cs, append(path, "remote_detailed_info")...) + cs.SetComputed(append(path, "status")...) + cs.SetComputed(append(path, "updated_at")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoom. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -175,15 +189,15 @@ func (o *CleanRoom_SdkV2) SetRemoteDetailedInfo(ctx context.Context, v CleanRoom // Metadata of the clean room asset type CleanRoomAsset_SdkV2 struct { // When the asset is added to the clean room, in epoch milliseconds. - AddedAt types.Int64 `tfsdk:"added_at" tf:"computed"` + AddedAt types.Int64 `tfsdk:"added_at" tf:""` // The type of the asset. - AssetType types.String `tfsdk:"asset_type" tf:"optional"` + AssetType types.String `tfsdk:"asset_type" tf:""` // Foreign table details available to all collaborators of the clean room. // Present if and only if **asset_type** is **FOREIGN_TABLE** - ForeignTable types.List `tfsdk:"foreign_table" tf:"optional,object"` + ForeignTable types.List `tfsdk:"foreign_table" tf:"object"` // Local details for a foreign that are only available to its owner. Present // if and only if **asset_type** is **FOREIGN_TABLE** - ForeignTableLocalDetails types.List `tfsdk:"foreign_table_local_details" tf:"optional,object"` + ForeignTableLocalDetails types.List `tfsdk:"foreign_table_local_details" tf:"object"` // A fully qualified name that uniquely identifies the asset within the // clean room. This is also the name displayed in the clean room UI. // @@ -191,29 +205,29 @@ type CleanRoomAsset_SdkV2 struct { // *shared_catalog*.*shared_schema*.*asset_name* // // For notebooks, the name is the notebook file name. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Notebook details available to all collaborators of the clean room. // Present if and only if **asset_type** is **NOTEBOOK_FILE** - Notebook types.List `tfsdk:"notebook" tf:"optional,object"` + Notebook types.List `tfsdk:"notebook" tf:"object"` // The alias of the collaborator who owns this asset - OwnerCollaboratorAlias types.String `tfsdk:"owner_collaborator_alias" tf:"computed"` + OwnerCollaboratorAlias types.String `tfsdk:"owner_collaborator_alias" tf:""` // Status of the asset - Status types.String `tfsdk:"status" tf:"computed"` + Status types.String `tfsdk:"status" tf:""` // Table details available to all collaborators of the clean room. Present // if and only if **asset_type** is **TABLE** - Table types.List `tfsdk:"table" tf:"optional,object"` + Table types.List `tfsdk:"table" tf:"object"` // Local details for a table that are only available to its owner. Present // if and only if **asset_type** is **TABLE** - TableLocalDetails types.List `tfsdk:"table_local_details" tf:"optional,object"` + TableLocalDetails types.List `tfsdk:"table_local_details" tf:"object"` // View details available to all collaborators of the clean room. Present if // and only if **asset_type** is **VIEW** - View types.List `tfsdk:"view" tf:"optional,object"` + View types.List `tfsdk:"view" tf:"object"` // Local details for a view that are only available to its owner. Present if // and only if **asset_type** is **VIEW** - ViewLocalDetails types.List `tfsdk:"view_local_details" tf:"optional,object"` + ViewLocalDetails types.List `tfsdk:"view_local_details" tf:"object"` // Local details for a volume that are only available to its owner. Present // if and only if **asset_type** is **VOLUME** - VolumeLocalDetails types.List `tfsdk:"volume_local_details" tf:"optional,object"` + VolumeLocalDetails types.List `tfsdk:"volume_local_details" tf:"object"` } func (newState *CleanRoomAsset_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAsset_SdkV2) { @@ -222,6 +236,22 @@ func (newState *CleanRoomAsset_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CleanRoomAsset_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAsset_SdkV2) { } +func (c CleanRoomAsset_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "added_at")...) + CleanRoomAssetForeignTable_SdkV2{}.ToSchema(cs, append(path, "foreign_table")...) + CleanRoomAssetForeignTableLocalDetails_SdkV2{}.ToSchema(cs, append(path, "foreign_table_local_details")...) + CleanRoomAssetNotebook_SdkV2{}.ToSchema(cs, append(path, "notebook")...) + cs.SetComputed(append(path, "owner_collaborator_alias")...) + cs.SetComputed(append(path, "status")...) + CleanRoomAssetTable_SdkV2{}.ToSchema(cs, append(path, "table")...) + CleanRoomAssetTableLocalDetails_SdkV2{}.ToSchema(cs, append(path, "table_local_details")...) + CleanRoomAssetView_SdkV2{}.ToSchema(cs, append(path, "view")...) + CleanRoomAssetViewLocalDetails_SdkV2{}.ToSchema(cs, append(path, "view_local_details")...) + CleanRoomAssetVolumeLocalDetails_SdkV2{}.ToSchema(cs, append(path, "volume_local_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAsset. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -512,7 +542,7 @@ func (o *CleanRoomAsset_SdkV2) SetVolumeLocalDetails(ctx context.Context, v Clea type CleanRoomAssetForeignTable_SdkV2 struct { // The metadata information of the columns in the foreign table - Columns types.List `tfsdk:"columns" tf:"computed"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *CleanRoomAssetForeignTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetForeignTable_SdkV2) { @@ -521,6 +551,12 @@ func (newState *CleanRoomAssetForeignTable_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *CleanRoomAssetForeignTable_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetForeignTable_SdkV2) { } +func (c CleanRoomAssetForeignTable_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetForeignTable. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -585,7 +621,7 @@ func (o *CleanRoomAssetForeignTable_SdkV2) SetColumns(ctx context.Context, v []c type CleanRoomAssetForeignTableLocalDetails_SdkV2 struct { // The fully qualified name of the foreign table in its owner's local // metastore, in the format of *catalog*.*schema*.*foreign_table_name* - LocalName types.String `tfsdk:"local_name" tf:"optional"` + LocalName types.String `tfsdk:"local_name" tf:""` } func (newState *CleanRoomAssetForeignTableLocalDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetForeignTableLocalDetails_SdkV2) { @@ -594,6 +630,11 @@ func (newState *CleanRoomAssetForeignTableLocalDetails_SdkV2) SyncEffectiveField func (newState *CleanRoomAssetForeignTableLocalDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetForeignTableLocalDetails_SdkV2) { } +func (c CleanRoomAssetForeignTableLocalDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetForeignTableLocalDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -627,10 +668,10 @@ func (o CleanRoomAssetForeignTableLocalDetails_SdkV2) Type(ctx context.Context) type CleanRoomAssetNotebook_SdkV2 struct { // Server generated checksum that represents the notebook version. - Etag types.String `tfsdk:"etag" tf:"computed"` + Etag types.String `tfsdk:"etag" tf:""` // Base 64 representation of the notebook contents. This is the same format // as returned by :method:workspace/export with the format of **HTML**. - NotebookContent types.String `tfsdk:"notebook_content" tf:"optional"` + NotebookContent types.String `tfsdk:"notebook_content" tf:""` } func (newState *CleanRoomAssetNotebook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetNotebook_SdkV2) { @@ -639,6 +680,12 @@ func (newState *CleanRoomAssetNotebook_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CleanRoomAssetNotebook_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetNotebook_SdkV2) { } +func (c CleanRoomAssetNotebook_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetNotebook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -674,7 +721,7 @@ func (o CleanRoomAssetNotebook_SdkV2) Type(ctx context.Context) attr.Type { type CleanRoomAssetTable_SdkV2 struct { // The metadata information of the columns in the table - Columns types.List `tfsdk:"columns" tf:"computed"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *CleanRoomAssetTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetTable_SdkV2) { @@ -683,6 +730,12 @@ func (newState *CleanRoomAssetTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *CleanRoomAssetTable_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetTable_SdkV2) { } +func (c CleanRoomAssetTable_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetTable. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -747,9 +800,9 @@ func (o *CleanRoomAssetTable_SdkV2) SetColumns(ctx context.Context, v []catalog_ type CleanRoomAssetTableLocalDetails_SdkV2 struct { // The fully qualified name of the table in its owner's local metastore, in // the format of *catalog*.*schema*.*table_name* - LocalName types.String `tfsdk:"local_name" tf:"optional"` + LocalName types.String `tfsdk:"local_name" tf:""` // Partition filtering specification for a shared table. - Partitions types.List `tfsdk:"partitions" tf:"optional"` + Partitions types.List `tfsdk:"partitions" tf:""` } func (newState *CleanRoomAssetTableLocalDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetTableLocalDetails_SdkV2) { @@ -758,6 +811,11 @@ func (newState *CleanRoomAssetTableLocalDetails_SdkV2) SyncEffectiveFieldsDuring func (newState *CleanRoomAssetTableLocalDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetTableLocalDetails_SdkV2) { } +func (c CleanRoomAssetTableLocalDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetTableLocalDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -823,7 +881,7 @@ func (o *CleanRoomAssetTableLocalDetails_SdkV2) SetPartitions(ctx context.Contex type CleanRoomAssetView_SdkV2 struct { // The metadata information of the columns in the view - Columns types.List `tfsdk:"columns" tf:"computed"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *CleanRoomAssetView_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetView_SdkV2) { @@ -832,6 +890,12 @@ func (newState *CleanRoomAssetView_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CleanRoomAssetView_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetView_SdkV2) { } +func (c CleanRoomAssetView_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetView. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -896,7 +960,7 @@ func (o *CleanRoomAssetView_SdkV2) SetColumns(ctx context.Context, v []catalog_t type CleanRoomAssetViewLocalDetails_SdkV2 struct { // The fully qualified name of the view in its owner's local metastore, in // the format of *catalog*.*schema*.*view_name* - LocalName types.String `tfsdk:"local_name" tf:"optional"` + LocalName types.String `tfsdk:"local_name" tf:""` } func (newState *CleanRoomAssetViewLocalDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetViewLocalDetails_SdkV2) { @@ -905,6 +969,11 @@ func (newState *CleanRoomAssetViewLocalDetails_SdkV2) SyncEffectiveFieldsDuringC func (newState *CleanRoomAssetViewLocalDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetViewLocalDetails_SdkV2) { } +func (c CleanRoomAssetViewLocalDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetViewLocalDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -939,7 +1008,7 @@ func (o CleanRoomAssetViewLocalDetails_SdkV2) Type(ctx context.Context) attr.Typ type CleanRoomAssetVolumeLocalDetails_SdkV2 struct { // The fully qualified name of the volume in its owner's local metastore, in // the format of *catalog*.*schema*.*volume_name* - LocalName types.String `tfsdk:"local_name" tf:"optional"` + LocalName types.String `tfsdk:"local_name" tf:""` } func (newState *CleanRoomAssetVolumeLocalDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetVolumeLocalDetails_SdkV2) { @@ -948,6 +1017,11 @@ func (newState *CleanRoomAssetVolumeLocalDetails_SdkV2) SyncEffectiveFieldsDurin func (newState *CleanRoomAssetVolumeLocalDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetVolumeLocalDetails_SdkV2) { } +func (c CleanRoomAssetVolumeLocalDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetVolumeLocalDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -988,28 +1062,28 @@ type CleanRoomCollaborator_SdkV2 struct { // requirements]. // // [UC securable naming requirements]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements - CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:"optional"` + CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:""` // Generated display name for the collaborator. In the case of a single // metastore clean room, it is the clean room name. For x-metastore clean // rooms, it is the organization name of the metastore. It is not restricted // to these values and could change in the future - DisplayName types.String `tfsdk:"display_name" tf:"computed"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The global Unity Catalog metastore id of the collaborator. The identifier // is of format cloud:region:metastore-uuid. - GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:"optional"` + GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:""` // Email of the user who is receiving the clean room "invitation". It should // be empty for the creator of the clean room, and non-empty for the // invitees of the clean room. It is only returned in the output when clean // room creator calls GET - InviteRecipientEmail types.String `tfsdk:"invite_recipient_email" tf:"optional"` + InviteRecipientEmail types.String `tfsdk:"invite_recipient_email" tf:""` // Workspace ID of the user who is receiving the clean room "invitation". // Must be specified if invite_recipient_email is specified. It should be // empty when the collaborator is the creator of the clean room. - InviteRecipientWorkspaceId types.Int64 `tfsdk:"invite_recipient_workspace_id" tf:"optional"` + InviteRecipientWorkspaceId types.Int64 `tfsdk:"invite_recipient_workspace_id" tf:""` // [Organization // name](:method:metastores/list#metastores-delta_sharing_organization_name) // configured in the metastore - OrganizationName types.String `tfsdk:"organization_name" tf:"computed"` + OrganizationName types.String `tfsdk:"organization_name" tf:""` } func (newState *CleanRoomCollaborator_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomCollaborator_SdkV2) { @@ -1018,6 +1092,13 @@ func (newState *CleanRoomCollaborator_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CleanRoomCollaborator_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomCollaborator_SdkV2) { } +func (c CleanRoomCollaborator_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "display_name")...) + cs.SetComputed(append(path, "organization_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomCollaborator. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1065,21 +1146,21 @@ type CleanRoomNotebookTaskRun_SdkV2 struct { // only included in the LIST API. if the task was run within the same // workspace the API is being called. If the task run was in a different // workspace under the same metastore, only the workspace_id is included. - CollaboratorJobRunInfo types.List `tfsdk:"collaborator_job_run_info" tf:"optional,object"` + CollaboratorJobRunInfo types.List `tfsdk:"collaborator_job_run_info" tf:"object"` // State of the task run. - NotebookJobRunState types.List `tfsdk:"notebook_job_run_state" tf:"optional,object"` + NotebookJobRunState types.List `tfsdk:"notebook_job_run_state" tf:"object"` // Asset name of the notebook executed in this task run. - NotebookName types.String `tfsdk:"notebook_name" tf:"optional"` + NotebookName types.String `tfsdk:"notebook_name" tf:""` // Expiration time of the output schema of the task run (if any), in epoch // milliseconds. - OutputSchemaExpirationTime types.Int64 `tfsdk:"output_schema_expiration_time" tf:"optional"` + OutputSchemaExpirationTime types.Int64 `tfsdk:"output_schema_expiration_time" tf:""` // Name of the output schema associated with the clean rooms notebook task // run. - OutputSchemaName types.String `tfsdk:"output_schema_name" tf:"optional"` + OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // Duration of the task run, in milliseconds. - RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + RunDuration types.Int64 `tfsdk:"run_duration" tf:""` // When the task run started, in epoch milliseconds. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` } func (newState *CleanRoomNotebookTaskRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomNotebookTaskRun_SdkV2) { @@ -1088,6 +1169,13 @@ func (newState *CleanRoomNotebookTaskRun_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *CleanRoomNotebookTaskRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomNotebookTaskRun_SdkV2) { } +func (c CleanRoomNotebookTaskRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CollaboratorJobRunInfo_SdkV2{}.ToSchema(cs, append(path, "collaborator_job_run_info")...) + jobs_tf.CleanRoomTaskRunState_SdkV2{}.ToSchema(cs, append(path, "notebook_job_run_state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomNotebookTaskRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1195,9 +1283,9 @@ type CleanRoomOutputCatalog_SdkV2 struct { // naming requirements]. The field will always exist if status is CREATED. // // [UC securable naming requirements]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` - Status types.String `tfsdk:"status" tf:"computed"` + Status types.String `tfsdk:"status" tf:""` } func (newState *CleanRoomOutputCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomOutputCatalog_SdkV2) { @@ -1206,6 +1294,12 @@ func (newState *CleanRoomOutputCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CleanRoomOutputCatalog_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomOutputCatalog_SdkV2) { } +func (c CleanRoomOutputCatalog_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomOutputCatalog. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1242,9 +1336,9 @@ func (o CleanRoomOutputCatalog_SdkV2) Type(ctx context.Context) attr.Type { // Publicly visible central clean room details. type CleanRoomRemoteDetail_SdkV2 struct { // Central clean room ID. - CentralCleanRoomId types.String `tfsdk:"central_clean_room_id" tf:"computed"` + CentralCleanRoomId types.String `tfsdk:"central_clean_room_id" tf:""` // Cloud vendor (aws,azure,gcp) of the central clean room. - CloudVendor types.String `tfsdk:"cloud_vendor" tf:"optional"` + CloudVendor types.String `tfsdk:"cloud_vendor" tf:""` // Collaborators in the central clean room. There should one and only one // collaborator in the list that satisfies the owner condition: // @@ -1252,16 +1346,16 @@ type CleanRoomRemoteDetail_SdkV2 struct { // CreateCleanRoom). // // 2. Its invite_recipient_email is empty. - Collaborators types.List `tfsdk:"collaborators" tf:"optional"` + Collaborators types.List `tfsdk:"collaborators" tf:""` // The compliance security profile used to process regulated data following // compliance standards. - ComplianceSecurityProfile types.List `tfsdk:"compliance_security_profile" tf:"optional,object"` + ComplianceSecurityProfile types.List `tfsdk:"compliance_security_profile" tf:"object"` // Collaborator who creates the clean room. - Creator types.List `tfsdk:"creator" tf:"computed,object"` + Creator types.List `tfsdk:"creator" tf:"object"` // Egress network policy to apply to the central clean room workspace. - EgressNetworkPolicy types.List `tfsdk:"egress_network_policy" tf:"optional,object"` + EgressNetworkPolicy types.List `tfsdk:"egress_network_policy" tf:"object"` // Region of the central clean room. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *CleanRoomRemoteDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomRemoteDetail_SdkV2) { @@ -1270,6 +1364,17 @@ func (newState *CleanRoomRemoteDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CleanRoomRemoteDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomRemoteDetail_SdkV2) { } +func (c CleanRoomRemoteDetail_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "central_clean_room_id")...) + CleanRoomCollaborator_SdkV2{}.ToSchema(cs, append(path, "collaborators")...) + ComplianceSecurityProfile_SdkV2{}.ToSchema(cs, append(path, "compliance_security_profile")...) + cs.SetComputed(append(path, "creator")...) + CleanRoomCollaborator_SdkV2{}.ToSchema(cs, append(path, "creator")...) + settings_tf.EgressNetworkPolicy_SdkV2{}.ToSchema(cs, append(path, "egress_network_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomRemoteDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1432,15 +1537,15 @@ func (o *CleanRoomRemoteDetail_SdkV2) SetEgressNetworkPolicy(ctx context.Context type CollaboratorJobRunInfo_SdkV2 struct { // Alias of the collaborator that triggered the task run. - CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:"optional"` + CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:""` // Job ID of the task run in the collaborator's workspace. - CollaboratorJobId types.Int64 `tfsdk:"collaborator_job_id" tf:"optional"` + CollaboratorJobId types.Int64 `tfsdk:"collaborator_job_id" tf:""` // Job run ID of the task run in the collaborator's workspace. - CollaboratorJobRunId types.Int64 `tfsdk:"collaborator_job_run_id" tf:"optional"` + CollaboratorJobRunId types.Int64 `tfsdk:"collaborator_job_run_id" tf:""` // Task run ID of the task run in the collaborator's workspace. - CollaboratorTaskRunId types.Int64 `tfsdk:"collaborator_task_run_id" tf:"optional"` + CollaboratorTaskRunId types.Int64 `tfsdk:"collaborator_task_run_id" tf:""` // ID of the collaborator's workspace that triggered the task run. - CollaboratorWorkspaceId types.Int64 `tfsdk:"collaborator_workspace_id" tf:"optional"` + CollaboratorWorkspaceId types.Int64 `tfsdk:"collaborator_workspace_id" tf:""` } func (newState *CollaboratorJobRunInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CollaboratorJobRunInfo_SdkV2) { @@ -1449,6 +1554,11 @@ func (newState *CollaboratorJobRunInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CollaboratorJobRunInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CollaboratorJobRunInfo_SdkV2) { } +func (c CollaboratorJobRunInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CollaboratorJobRunInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1493,9 +1603,9 @@ func (o CollaboratorJobRunInfo_SdkV2) Type(ctx context.Context) attr.Type { type ComplianceSecurityProfile_SdkV2 struct { // The list of compliance standards that the compliance security profile is // configured to enforce. - ComplianceStandards types.List `tfsdk:"compliance_standards" tf:"optional"` + ComplianceStandards types.List `tfsdk:"compliance_standards" tf:""` // Whether the compliance security profile is enabled. - IsEnabled types.Bool `tfsdk:"is_enabled" tf:"optional"` + IsEnabled types.Bool `tfsdk:"is_enabled" tf:""` } func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplianceSecurityProfile_SdkV2) { @@ -1504,6 +1614,11 @@ func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComplianceSecurityProfile_SdkV2) { } +func (c ComplianceSecurityProfile_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplianceSecurityProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1570,17 +1685,11 @@ func (o *ComplianceSecurityProfile_SdkV2) SetComplianceStandards(ctx context.Con // Create an asset type CreateCleanRoomAssetRequest_SdkV2 struct { // Metadata of the clean room asset - Asset types.List `tfsdk:"asset" tf:"optional,object"` + Asset types.List `tfsdk:"asset" tf:"object"` // Name of the clean room. CleanRoomName types.String `tfsdk:"-"` } -func (newState *CreateCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomAssetRequest_SdkV2) { -} - -func (newState *CreateCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomAssetRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomAssetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1649,13 +1758,7 @@ type CreateCleanRoomOutputCatalogRequest_SdkV2 struct { // Name of the clean room. CleanRoomName types.String `tfsdk:"-"` - OutputCatalog types.List `tfsdk:"output_catalog" tf:"optional,object"` -} - -func (newState *CreateCleanRoomOutputCatalogRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomOutputCatalogRequest_SdkV2) { -} - -func (newState *CreateCleanRoomOutputCatalogRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomOutputCatalogRequest_SdkV2) { + OutputCatalog types.List `tfsdk:"output_catalog" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomOutputCatalogRequest. @@ -1722,7 +1825,7 @@ func (o *CreateCleanRoomOutputCatalogRequest_SdkV2) SetOutputCatalog(ctx context } type CreateCleanRoomOutputCatalogResponse_SdkV2 struct { - OutputCatalog types.List `tfsdk:"output_catalog" tf:"optional,object"` + OutputCatalog types.List `tfsdk:"output_catalog" tf:"object"` } func (newState *CreateCleanRoomOutputCatalogResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomOutputCatalogResponse_SdkV2) { @@ -1731,6 +1834,12 @@ func (newState *CreateCleanRoomOutputCatalogResponse_SdkV2) SyncEffectiveFieldsD func (newState *CreateCleanRoomOutputCatalogResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomOutputCatalogResponse_SdkV2) { } +func (c CreateCleanRoomOutputCatalogResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomOutputCatalog_SdkV2{}.ToSchema(cs, append(path, "output_catalog")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomOutputCatalogResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1794,13 +1903,7 @@ func (o *CreateCleanRoomOutputCatalogResponse_SdkV2) SetOutputCatalog(ctx contex // Create a clean room type CreateCleanRoomRequest_SdkV2 struct { - CleanRoom types.List `tfsdk:"clean_room" tf:"optional,object"` -} - -func (newState *CreateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomRequest_SdkV2) { -} - -func (newState *CreateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomRequest_SdkV2) { + CleanRoom types.List `tfsdk:"clean_room" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomRequest. @@ -1875,12 +1978,6 @@ type DeleteCleanRoomAssetRequest_SdkV2 struct { CleanRoomName types.String `tfsdk:"-"` } -func (newState *DeleteCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCleanRoomAssetRequest_SdkV2) { -} - -func (newState *DeleteCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCleanRoomAssetRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCleanRoomAssetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1927,6 +2024,11 @@ func (newState *DeleteCleanRoomAssetResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *DeleteCleanRoomAssetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCleanRoomAssetResponse_SdkV2) { } +func (c DeleteCleanRoomAssetResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCleanRoomAssetResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1960,12 +2062,6 @@ type DeleteCleanRoomRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCleanRoomRequest_SdkV2) { -} - -func (newState *DeleteCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCleanRoomRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCleanRoomRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2000,12 +2096,6 @@ func (o DeleteCleanRoomRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2044,12 +2134,6 @@ type GetCleanRoomAssetRequest_SdkV2 struct { CleanRoomName types.String `tfsdk:"-"` } -func (newState *GetCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCleanRoomAssetRequest_SdkV2) { -} - -func (newState *GetCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCleanRoomAssetRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCleanRoomAssetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2090,12 +2174,6 @@ type GetCleanRoomRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCleanRoomRequest_SdkV2) { -} - -func (newState *GetCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCleanRoomRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCleanRoomRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2135,12 +2213,6 @@ type ListCleanRoomAssetsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCleanRoomAssetsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomAssetsRequest_SdkV2) { -} - -func (newState *ListCleanRoomAssetsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomAssetsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomAssetsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2176,11 +2248,11 @@ func (o ListCleanRoomAssetsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListCleanRoomAssetsResponse_SdkV2 struct { // Assets in the clean room. - Assets types.List `tfsdk:"assets" tf:"optional"` + Assets types.List `tfsdk:"assets" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. page_token should be set to this value for the next request // (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListCleanRoomAssetsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomAssetsResponse_SdkV2) { @@ -2189,6 +2261,12 @@ func (newState *ListCleanRoomAssetsResponse_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *ListCleanRoomAssetsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomAssetsResponse_SdkV2) { } +func (c ListCleanRoomAssetsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomAsset_SdkV2{}.ToSchema(cs, append(path, "assets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomAssetsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2264,12 +2342,6 @@ type ListCleanRoomNotebookTaskRunsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCleanRoomNotebookTaskRunsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomNotebookTaskRunsRequest_SdkV2) { -} - -func (newState *ListCleanRoomNotebookTaskRunsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomNotebookTaskRunsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomNotebookTaskRunsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2311,9 +2383,9 @@ type ListCleanRoomNotebookTaskRunsResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. page_token should be set to this value for the next request // (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Name of the clean room. - Runs types.List `tfsdk:"runs" tf:"optional"` + Runs types.List `tfsdk:"runs" tf:""` } func (newState *ListCleanRoomNotebookTaskRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomNotebookTaskRunsResponse_SdkV2) { @@ -2322,6 +2394,12 @@ func (newState *ListCleanRoomNotebookTaskRunsResponse_SdkV2) SyncEffectiveFields func (newState *ListCleanRoomNotebookTaskRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomNotebookTaskRunsResponse_SdkV2) { } +func (c ListCleanRoomNotebookTaskRunsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomNotebookTaskRun_SdkV2{}.ToSchema(cs, append(path, "runs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomNotebookTaskRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2394,12 +2472,6 @@ type ListCleanRoomsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCleanRoomsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomsRequest_SdkV2) { -} - -func (newState *ListCleanRoomsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2434,11 +2506,11 @@ func (o ListCleanRoomsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListCleanRoomsResponse_SdkV2 struct { - CleanRooms types.List `tfsdk:"clean_rooms" tf:"optional"` + CleanRooms types.List `tfsdk:"clean_rooms" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. page_token should be set to this value for the next request // (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListCleanRoomsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomsResponse_SdkV2) { @@ -2447,6 +2519,12 @@ func (newState *ListCleanRoomsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *ListCleanRoomsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomsResponse_SdkV2) { } +func (c ListCleanRoomsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoom_SdkV2{}.ToSchema(cs, append(path, "clean_rooms")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2513,7 +2591,7 @@ func (o *ListCleanRoomsResponse_SdkV2) SetCleanRooms(ctx context.Context, v []Cl // Update an asset type UpdateCleanRoomAssetRequest_SdkV2 struct { // Metadata of the clean room asset - Asset types.List `tfsdk:"asset" tf:"optional,object"` + Asset types.List `tfsdk:"asset" tf:"object"` // The type of the asset. AssetType types.String `tfsdk:"-"` // Name of the clean room. @@ -2528,12 +2606,6 @@ type UpdateCleanRoomAssetRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *UpdateCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCleanRoomAssetRequest_SdkV2) { -} - -func (newState *UpdateCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCleanRoomAssetRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCleanRoomAssetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2602,7 +2674,7 @@ func (o *UpdateCleanRoomAssetRequest_SdkV2) SetAsset(ctx context.Context, v Clea } type UpdateCleanRoomRequest_SdkV2 struct { - CleanRoom types.List `tfsdk:"clean_room" tf:"optional,object"` + CleanRoom types.List `tfsdk:"clean_room" tf:"object"` // Name of the clean room. Name types.String `tfsdk:"-"` } @@ -2613,6 +2685,13 @@ func (newState *UpdateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *UpdateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCleanRoomRequest_SdkV2) { } +func (c UpdateCleanRoomRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoom_SdkV2{}.ToSchema(cs, append(path, "clean_room")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCleanRoomRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/cleanrooms_tf/model.go b/internal/service/cleanrooms_tf/model.go index 0f9a3581f..bf36b63f0 100755 --- a/internal/service/cleanrooms_tf/model.go +++ b/internal/service/cleanrooms_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/catalog_tf" "github.com/databricks/terraform-provider-databricks/internal/service/jobs_tf" @@ -29,33 +30,33 @@ type CleanRoom struct { // Whether clean room access is restricted due to [CSP] // // [CSP]: https://docs.databricks.com/en/security/privacy/security-profile.html - AccessRestricted types.String `tfsdk:"access_restricted" tf:"computed"` + AccessRestricted types.String `tfsdk:"access_restricted" tf:""` - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // When the clean room was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"computed"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The alias of the collaborator tied to the local clean room. - LocalCollaboratorAlias types.String `tfsdk:"local_collaborator_alias" tf:"computed"` + LocalCollaboratorAlias types.String `tfsdk:"local_collaborator_alias" tf:""` // The name of the clean room. It should follow [UC securable naming // requirements]. // // [UC securable naming requirements]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Output catalog of the clean room. It is an output only field. Output // catalog is manipulated using the separate CreateCleanRoomOutputCatalog // API. - OutputCatalog types.Object `tfsdk:"output_catalog" tf:"computed,object"` + OutputCatalog types.Object `tfsdk:"output_catalog" tf:"object"` // This is Databricks username of the owner of the local clean room // securable for permission management. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Central clean room details. During creation, users need to specify // cloud_vendor, region, and collaborators.global_metastore_id. This field // will not be filled in the ListCleanRooms call. - RemoteDetailedInfo types.Object `tfsdk:"remote_detailed_info" tf:"optional,object"` + RemoteDetailedInfo types.Object `tfsdk:"remote_detailed_info" tf:"object"` // Clean room status. - Status types.String `tfsdk:"status" tf:"computed"` + Status types.String `tfsdk:"status" tf:""` // When the clean room was last updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"computed"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` } func (newState *CleanRoom) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoom) { @@ -64,6 +65,19 @@ func (newState *CleanRoom) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoo func (newState *CleanRoom) SyncEffectiveFieldsDuringRead(existingState CleanRoom) { } +func (c CleanRoom) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "access_restricted")...) + cs.SetComputed(append(path, "created_at")...) + cs.SetComputed(append(path, "local_collaborator_alias")...) + cs.SetComputed(append(path, "output_catalog")...) + CleanRoomOutputCatalog{}.ToSchema(cs, append(path, "output_catalog")...) + CleanRoomRemoteDetail{}.ToSchema(cs, append(path, "remote_detailed_info")...) + cs.SetComputed(append(path, "status")...) + cs.SetComputed(append(path, "updated_at")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoom. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -175,15 +189,15 @@ func (o *CleanRoom) SetRemoteDetailedInfo(ctx context.Context, v CleanRoomRemote // Metadata of the clean room asset type CleanRoomAsset struct { // When the asset is added to the clean room, in epoch milliseconds. - AddedAt types.Int64 `tfsdk:"added_at" tf:"computed"` + AddedAt types.Int64 `tfsdk:"added_at" tf:""` // The type of the asset. - AssetType types.String `tfsdk:"asset_type" tf:"optional"` + AssetType types.String `tfsdk:"asset_type" tf:""` // Foreign table details available to all collaborators of the clean room. // Present if and only if **asset_type** is **FOREIGN_TABLE** - ForeignTable types.Object `tfsdk:"foreign_table" tf:"optional,object"` + ForeignTable types.Object `tfsdk:"foreign_table" tf:"object"` // Local details for a foreign that are only available to its owner. Present // if and only if **asset_type** is **FOREIGN_TABLE** - ForeignTableLocalDetails types.Object `tfsdk:"foreign_table_local_details" tf:"optional,object"` + ForeignTableLocalDetails types.Object `tfsdk:"foreign_table_local_details" tf:"object"` // A fully qualified name that uniquely identifies the asset within the // clean room. This is also the name displayed in the clean room UI. // @@ -191,29 +205,29 @@ type CleanRoomAsset struct { // *shared_catalog*.*shared_schema*.*asset_name* // // For notebooks, the name is the notebook file name. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Notebook details available to all collaborators of the clean room. // Present if and only if **asset_type** is **NOTEBOOK_FILE** - Notebook types.Object `tfsdk:"notebook" tf:"optional,object"` + Notebook types.Object `tfsdk:"notebook" tf:"object"` // The alias of the collaborator who owns this asset - OwnerCollaboratorAlias types.String `tfsdk:"owner_collaborator_alias" tf:"computed"` + OwnerCollaboratorAlias types.String `tfsdk:"owner_collaborator_alias" tf:""` // Status of the asset - Status types.String `tfsdk:"status" tf:"computed"` + Status types.String `tfsdk:"status" tf:""` // Table details available to all collaborators of the clean room. Present // if and only if **asset_type** is **TABLE** - Table types.Object `tfsdk:"table" tf:"optional,object"` + Table types.Object `tfsdk:"table" tf:"object"` // Local details for a table that are only available to its owner. Present // if and only if **asset_type** is **TABLE** - TableLocalDetails types.Object `tfsdk:"table_local_details" tf:"optional,object"` + TableLocalDetails types.Object `tfsdk:"table_local_details" tf:"object"` // View details available to all collaborators of the clean room. Present if // and only if **asset_type** is **VIEW** - View types.Object `tfsdk:"view" tf:"optional,object"` + View types.Object `tfsdk:"view" tf:"object"` // Local details for a view that are only available to its owner. Present if // and only if **asset_type** is **VIEW** - ViewLocalDetails types.Object `tfsdk:"view_local_details" tf:"optional,object"` + ViewLocalDetails types.Object `tfsdk:"view_local_details" tf:"object"` // Local details for a volume that are only available to its owner. Present // if and only if **asset_type** is **VOLUME** - VolumeLocalDetails types.Object `tfsdk:"volume_local_details" tf:"optional,object"` + VolumeLocalDetails types.Object `tfsdk:"volume_local_details" tf:"object"` } func (newState *CleanRoomAsset) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAsset) { @@ -222,6 +236,22 @@ func (newState *CleanRoomAsset) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cle func (newState *CleanRoomAsset) SyncEffectiveFieldsDuringRead(existingState CleanRoomAsset) { } +func (c CleanRoomAsset) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "added_at")...) + CleanRoomAssetForeignTable{}.ToSchema(cs, append(path, "foreign_table")...) + CleanRoomAssetForeignTableLocalDetails{}.ToSchema(cs, append(path, "foreign_table_local_details")...) + CleanRoomAssetNotebook{}.ToSchema(cs, append(path, "notebook")...) + cs.SetComputed(append(path, "owner_collaborator_alias")...) + cs.SetComputed(append(path, "status")...) + CleanRoomAssetTable{}.ToSchema(cs, append(path, "table")...) + CleanRoomAssetTableLocalDetails{}.ToSchema(cs, append(path, "table_local_details")...) + CleanRoomAssetView{}.ToSchema(cs, append(path, "view")...) + CleanRoomAssetViewLocalDetails{}.ToSchema(cs, append(path, "view_local_details")...) + CleanRoomAssetVolumeLocalDetails{}.ToSchema(cs, append(path, "volume_local_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAsset. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -512,7 +542,7 @@ func (o *CleanRoomAsset) SetVolumeLocalDetails(ctx context.Context, v CleanRoomA type CleanRoomAssetForeignTable struct { // The metadata information of the columns in the foreign table - Columns types.List `tfsdk:"columns" tf:"computed"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *CleanRoomAssetForeignTable) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetForeignTable) { @@ -521,6 +551,12 @@ func (newState *CleanRoomAssetForeignTable) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CleanRoomAssetForeignTable) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetForeignTable) { } +func (c CleanRoomAssetForeignTable) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetForeignTable. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -585,7 +621,7 @@ func (o *CleanRoomAssetForeignTable) SetColumns(ctx context.Context, v []catalog type CleanRoomAssetForeignTableLocalDetails struct { // The fully qualified name of the foreign table in its owner's local // metastore, in the format of *catalog*.*schema*.*foreign_table_name* - LocalName types.String `tfsdk:"local_name" tf:"optional"` + LocalName types.String `tfsdk:"local_name" tf:""` } func (newState *CleanRoomAssetForeignTableLocalDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetForeignTableLocalDetails) { @@ -594,6 +630,11 @@ func (newState *CleanRoomAssetForeignTableLocalDetails) SyncEffectiveFieldsDurin func (newState *CleanRoomAssetForeignTableLocalDetails) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetForeignTableLocalDetails) { } +func (c CleanRoomAssetForeignTableLocalDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetForeignTableLocalDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -627,10 +668,10 @@ func (o CleanRoomAssetForeignTableLocalDetails) Type(ctx context.Context) attr.T type CleanRoomAssetNotebook struct { // Server generated checksum that represents the notebook version. - Etag types.String `tfsdk:"etag" tf:"computed"` + Etag types.String `tfsdk:"etag" tf:""` // Base 64 representation of the notebook contents. This is the same format // as returned by :method:workspace/export with the format of **HTML**. - NotebookContent types.String `tfsdk:"notebook_content" tf:"optional"` + NotebookContent types.String `tfsdk:"notebook_content" tf:""` } func (newState *CleanRoomAssetNotebook) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetNotebook) { @@ -639,6 +680,12 @@ func (newState *CleanRoomAssetNotebook) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CleanRoomAssetNotebook) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetNotebook) { } +func (c CleanRoomAssetNotebook) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetNotebook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -674,7 +721,7 @@ func (o CleanRoomAssetNotebook) Type(ctx context.Context) attr.Type { type CleanRoomAssetTable struct { // The metadata information of the columns in the table - Columns types.List `tfsdk:"columns" tf:"computed"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *CleanRoomAssetTable) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetTable) { @@ -683,6 +730,12 @@ func (newState *CleanRoomAssetTable) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CleanRoomAssetTable) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetTable) { } +func (c CleanRoomAssetTable) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetTable. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -747,9 +800,9 @@ func (o *CleanRoomAssetTable) SetColumns(ctx context.Context, v []catalog_tf.Col type CleanRoomAssetTableLocalDetails struct { // The fully qualified name of the table in its owner's local metastore, in // the format of *catalog*.*schema*.*table_name* - LocalName types.String `tfsdk:"local_name" tf:"optional"` + LocalName types.String `tfsdk:"local_name" tf:""` // Partition filtering specification for a shared table. - Partitions types.List `tfsdk:"partitions" tf:"optional"` + Partitions types.List `tfsdk:"partitions" tf:""` } func (newState *CleanRoomAssetTableLocalDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetTableLocalDetails) { @@ -758,6 +811,11 @@ func (newState *CleanRoomAssetTableLocalDetails) SyncEffectiveFieldsDuringCreate func (newState *CleanRoomAssetTableLocalDetails) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetTableLocalDetails) { } +func (c CleanRoomAssetTableLocalDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetTableLocalDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -823,7 +881,7 @@ func (o *CleanRoomAssetTableLocalDetails) SetPartitions(ctx context.Context, v [ type CleanRoomAssetView struct { // The metadata information of the columns in the view - Columns types.List `tfsdk:"columns" tf:"computed"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *CleanRoomAssetView) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetView) { @@ -832,6 +890,12 @@ func (newState *CleanRoomAssetView) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CleanRoomAssetView) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetView) { } +func (c CleanRoomAssetView) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetView. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -896,7 +960,7 @@ func (o *CleanRoomAssetView) SetColumns(ctx context.Context, v []catalog_tf.Colu type CleanRoomAssetViewLocalDetails struct { // The fully qualified name of the view in its owner's local metastore, in // the format of *catalog*.*schema*.*view_name* - LocalName types.String `tfsdk:"local_name" tf:"optional"` + LocalName types.String `tfsdk:"local_name" tf:""` } func (newState *CleanRoomAssetViewLocalDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetViewLocalDetails) { @@ -905,6 +969,11 @@ func (newState *CleanRoomAssetViewLocalDetails) SyncEffectiveFieldsDuringCreateO func (newState *CleanRoomAssetViewLocalDetails) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetViewLocalDetails) { } +func (c CleanRoomAssetViewLocalDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetViewLocalDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -939,7 +1008,7 @@ func (o CleanRoomAssetViewLocalDetails) Type(ctx context.Context) attr.Type { type CleanRoomAssetVolumeLocalDetails struct { // The fully qualified name of the volume in its owner's local metastore, in // the format of *catalog*.*schema*.*volume_name* - LocalName types.String `tfsdk:"local_name" tf:"optional"` + LocalName types.String `tfsdk:"local_name" tf:""` } func (newState *CleanRoomAssetVolumeLocalDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetVolumeLocalDetails) { @@ -948,6 +1017,11 @@ func (newState *CleanRoomAssetVolumeLocalDetails) SyncEffectiveFieldsDuringCreat func (newState *CleanRoomAssetVolumeLocalDetails) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetVolumeLocalDetails) { } +func (c CleanRoomAssetVolumeLocalDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetVolumeLocalDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -988,28 +1062,28 @@ type CleanRoomCollaborator struct { // requirements]. // // [UC securable naming requirements]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements - CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:"optional"` + CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:""` // Generated display name for the collaborator. In the case of a single // metastore clean room, it is the clean room name. For x-metastore clean // rooms, it is the organization name of the metastore. It is not restricted // to these values and could change in the future - DisplayName types.String `tfsdk:"display_name" tf:"computed"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The global Unity Catalog metastore id of the collaborator. The identifier // is of format cloud:region:metastore-uuid. - GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:"optional"` + GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:""` // Email of the user who is receiving the clean room "invitation". It should // be empty for the creator of the clean room, and non-empty for the // invitees of the clean room. It is only returned in the output when clean // room creator calls GET - InviteRecipientEmail types.String `tfsdk:"invite_recipient_email" tf:"optional"` + InviteRecipientEmail types.String `tfsdk:"invite_recipient_email" tf:""` // Workspace ID of the user who is receiving the clean room "invitation". // Must be specified if invite_recipient_email is specified. It should be // empty when the collaborator is the creator of the clean room. - InviteRecipientWorkspaceId types.Int64 `tfsdk:"invite_recipient_workspace_id" tf:"optional"` + InviteRecipientWorkspaceId types.Int64 `tfsdk:"invite_recipient_workspace_id" tf:""` // [Organization // name](:method:metastores/list#metastores-delta_sharing_organization_name) // configured in the metastore - OrganizationName types.String `tfsdk:"organization_name" tf:"computed"` + OrganizationName types.String `tfsdk:"organization_name" tf:""` } func (newState *CleanRoomCollaborator) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomCollaborator) { @@ -1018,6 +1092,13 @@ func (newState *CleanRoomCollaborator) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CleanRoomCollaborator) SyncEffectiveFieldsDuringRead(existingState CleanRoomCollaborator) { } +func (c CleanRoomCollaborator) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "display_name")...) + cs.SetComputed(append(path, "organization_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomCollaborator. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1065,21 +1146,21 @@ type CleanRoomNotebookTaskRun struct { // only included in the LIST API. if the task was run within the same // workspace the API is being called. If the task run was in a different // workspace under the same metastore, only the workspace_id is included. - CollaboratorJobRunInfo types.Object `tfsdk:"collaborator_job_run_info" tf:"optional,object"` + CollaboratorJobRunInfo types.Object `tfsdk:"collaborator_job_run_info" tf:"object"` // State of the task run. - NotebookJobRunState types.Object `tfsdk:"notebook_job_run_state" tf:"optional,object"` + NotebookJobRunState types.Object `tfsdk:"notebook_job_run_state" tf:"object"` // Asset name of the notebook executed in this task run. - NotebookName types.String `tfsdk:"notebook_name" tf:"optional"` + NotebookName types.String `tfsdk:"notebook_name" tf:""` // Expiration time of the output schema of the task run (if any), in epoch // milliseconds. - OutputSchemaExpirationTime types.Int64 `tfsdk:"output_schema_expiration_time" tf:"optional"` + OutputSchemaExpirationTime types.Int64 `tfsdk:"output_schema_expiration_time" tf:""` // Name of the output schema associated with the clean rooms notebook task // run. - OutputSchemaName types.String `tfsdk:"output_schema_name" tf:"optional"` + OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // Duration of the task run, in milliseconds. - RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + RunDuration types.Int64 `tfsdk:"run_duration" tf:""` // When the task run started, in epoch milliseconds. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` } func (newState *CleanRoomNotebookTaskRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomNotebookTaskRun) { @@ -1088,6 +1169,13 @@ func (newState *CleanRoomNotebookTaskRun) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CleanRoomNotebookTaskRun) SyncEffectiveFieldsDuringRead(existingState CleanRoomNotebookTaskRun) { } +func (c CleanRoomNotebookTaskRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CollaboratorJobRunInfo{}.ToSchema(cs, append(path, "collaborator_job_run_info")...) + jobs_tf.CleanRoomTaskRunState{}.ToSchema(cs, append(path, "notebook_job_run_state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomNotebookTaskRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1195,9 +1283,9 @@ type CleanRoomOutputCatalog struct { // naming requirements]. The field will always exist if status is CREATED. // // [UC securable naming requirements]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` - Status types.String `tfsdk:"status" tf:"computed"` + Status types.String `tfsdk:"status" tf:""` } func (newState *CleanRoomOutputCatalog) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomOutputCatalog) { @@ -1206,6 +1294,12 @@ func (newState *CleanRoomOutputCatalog) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CleanRoomOutputCatalog) SyncEffectiveFieldsDuringRead(existingState CleanRoomOutputCatalog) { } +func (c CleanRoomOutputCatalog) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomOutputCatalog. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1242,9 +1336,9 @@ func (o CleanRoomOutputCatalog) Type(ctx context.Context) attr.Type { // Publicly visible central clean room details. type CleanRoomRemoteDetail struct { // Central clean room ID. - CentralCleanRoomId types.String `tfsdk:"central_clean_room_id" tf:"computed"` + CentralCleanRoomId types.String `tfsdk:"central_clean_room_id" tf:""` // Cloud vendor (aws,azure,gcp) of the central clean room. - CloudVendor types.String `tfsdk:"cloud_vendor" tf:"optional"` + CloudVendor types.String `tfsdk:"cloud_vendor" tf:""` // Collaborators in the central clean room. There should one and only one // collaborator in the list that satisfies the owner condition: // @@ -1252,16 +1346,16 @@ type CleanRoomRemoteDetail struct { // CreateCleanRoom). // // 2. Its invite_recipient_email is empty. - Collaborators types.List `tfsdk:"collaborators" tf:"optional"` + Collaborators types.List `tfsdk:"collaborators" tf:""` // The compliance security profile used to process regulated data following // compliance standards. - ComplianceSecurityProfile types.Object `tfsdk:"compliance_security_profile" tf:"optional,object"` + ComplianceSecurityProfile types.Object `tfsdk:"compliance_security_profile" tf:"object"` // Collaborator who creates the clean room. - Creator types.Object `tfsdk:"creator" tf:"computed,object"` + Creator types.Object `tfsdk:"creator" tf:"object"` // Egress network policy to apply to the central clean room workspace. - EgressNetworkPolicy types.Object `tfsdk:"egress_network_policy" tf:"optional,object"` + EgressNetworkPolicy types.Object `tfsdk:"egress_network_policy" tf:"object"` // Region of the central clean room. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *CleanRoomRemoteDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomRemoteDetail) { @@ -1270,6 +1364,17 @@ func (newState *CleanRoomRemoteDetail) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CleanRoomRemoteDetail) SyncEffectiveFieldsDuringRead(existingState CleanRoomRemoteDetail) { } +func (c CleanRoomRemoteDetail) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "central_clean_room_id")...) + CleanRoomCollaborator{}.ToSchema(cs, append(path, "collaborators")...) + ComplianceSecurityProfile{}.ToSchema(cs, append(path, "compliance_security_profile")...) + cs.SetComputed(append(path, "creator")...) + CleanRoomCollaborator{}.ToSchema(cs, append(path, "creator")...) + settings_tf.EgressNetworkPolicy{}.ToSchema(cs, append(path, "egress_network_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomRemoteDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1432,15 +1537,15 @@ func (o *CleanRoomRemoteDetail) SetEgressNetworkPolicy(ctx context.Context, v se type CollaboratorJobRunInfo struct { // Alias of the collaborator that triggered the task run. - CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:"optional"` + CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:""` // Job ID of the task run in the collaborator's workspace. - CollaboratorJobId types.Int64 `tfsdk:"collaborator_job_id" tf:"optional"` + CollaboratorJobId types.Int64 `tfsdk:"collaborator_job_id" tf:""` // Job run ID of the task run in the collaborator's workspace. - CollaboratorJobRunId types.Int64 `tfsdk:"collaborator_job_run_id" tf:"optional"` + CollaboratorJobRunId types.Int64 `tfsdk:"collaborator_job_run_id" tf:""` // Task run ID of the task run in the collaborator's workspace. - CollaboratorTaskRunId types.Int64 `tfsdk:"collaborator_task_run_id" tf:"optional"` + CollaboratorTaskRunId types.Int64 `tfsdk:"collaborator_task_run_id" tf:""` // ID of the collaborator's workspace that triggered the task run. - CollaboratorWorkspaceId types.Int64 `tfsdk:"collaborator_workspace_id" tf:"optional"` + CollaboratorWorkspaceId types.Int64 `tfsdk:"collaborator_workspace_id" tf:""` } func (newState *CollaboratorJobRunInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan CollaboratorJobRunInfo) { @@ -1449,6 +1554,11 @@ func (newState *CollaboratorJobRunInfo) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CollaboratorJobRunInfo) SyncEffectiveFieldsDuringRead(existingState CollaboratorJobRunInfo) { } +func (c CollaboratorJobRunInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CollaboratorJobRunInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1493,9 +1603,9 @@ func (o CollaboratorJobRunInfo) Type(ctx context.Context) attr.Type { type ComplianceSecurityProfile struct { // The list of compliance standards that the compliance security profile is // configured to enforce. - ComplianceStandards types.List `tfsdk:"compliance_standards" tf:"optional"` + ComplianceStandards types.List `tfsdk:"compliance_standards" tf:""` // Whether the compliance security profile is enabled. - IsEnabled types.Bool `tfsdk:"is_enabled" tf:"optional"` + IsEnabled types.Bool `tfsdk:"is_enabled" tf:""` } func (newState *ComplianceSecurityProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplianceSecurityProfile) { @@ -1504,6 +1614,11 @@ func (newState *ComplianceSecurityProfile) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ComplianceSecurityProfile) SyncEffectiveFieldsDuringRead(existingState ComplianceSecurityProfile) { } +func (c ComplianceSecurityProfile) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplianceSecurityProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1570,17 +1685,11 @@ func (o *ComplianceSecurityProfile) SetComplianceStandards(ctx context.Context, // Create an asset type CreateCleanRoomAssetRequest struct { // Metadata of the clean room asset - Asset types.Object `tfsdk:"asset" tf:"optional,object"` + Asset types.Object `tfsdk:"asset" tf:"object"` // Name of the clean room. CleanRoomName types.String `tfsdk:"-"` } -func (newState *CreateCleanRoomAssetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomAssetRequest) { -} - -func (newState *CreateCleanRoomAssetRequest) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomAssetRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomAssetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1649,13 +1758,7 @@ type CreateCleanRoomOutputCatalogRequest struct { // Name of the clean room. CleanRoomName types.String `tfsdk:"-"` - OutputCatalog types.Object `tfsdk:"output_catalog" tf:"optional,object"` -} - -func (newState *CreateCleanRoomOutputCatalogRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomOutputCatalogRequest) { -} - -func (newState *CreateCleanRoomOutputCatalogRequest) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomOutputCatalogRequest) { + OutputCatalog types.Object `tfsdk:"output_catalog" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomOutputCatalogRequest. @@ -1722,7 +1825,7 @@ func (o *CreateCleanRoomOutputCatalogRequest) SetOutputCatalog(ctx context.Conte } type CreateCleanRoomOutputCatalogResponse struct { - OutputCatalog types.Object `tfsdk:"output_catalog" tf:"optional,object"` + OutputCatalog types.Object `tfsdk:"output_catalog" tf:"object"` } func (newState *CreateCleanRoomOutputCatalogResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomOutputCatalogResponse) { @@ -1731,6 +1834,12 @@ func (newState *CreateCleanRoomOutputCatalogResponse) SyncEffectiveFieldsDuringC func (newState *CreateCleanRoomOutputCatalogResponse) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomOutputCatalogResponse) { } +func (c CreateCleanRoomOutputCatalogResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomOutputCatalog{}.ToSchema(cs, append(path, "output_catalog")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomOutputCatalogResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1794,13 +1903,7 @@ func (o *CreateCleanRoomOutputCatalogResponse) SetOutputCatalog(ctx context.Cont // Create a clean room type CreateCleanRoomRequest struct { - CleanRoom types.Object `tfsdk:"clean_room" tf:"optional,object"` -} - -func (newState *CreateCleanRoomRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomRequest) { -} - -func (newState *CreateCleanRoomRequest) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomRequest) { + CleanRoom types.Object `tfsdk:"clean_room" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomRequest. @@ -1875,12 +1978,6 @@ type DeleteCleanRoomAssetRequest struct { CleanRoomName types.String `tfsdk:"-"` } -func (newState *DeleteCleanRoomAssetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCleanRoomAssetRequest) { -} - -func (newState *DeleteCleanRoomAssetRequest) SyncEffectiveFieldsDuringRead(existingState DeleteCleanRoomAssetRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCleanRoomAssetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1927,6 +2024,11 @@ func (newState *DeleteCleanRoomAssetResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *DeleteCleanRoomAssetResponse) SyncEffectiveFieldsDuringRead(existingState DeleteCleanRoomAssetResponse) { } +func (c DeleteCleanRoomAssetResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCleanRoomAssetResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1960,12 +2062,6 @@ type DeleteCleanRoomRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteCleanRoomRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCleanRoomRequest) { -} - -func (newState *DeleteCleanRoomRequest) SyncEffectiveFieldsDuringRead(existingState DeleteCleanRoomRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCleanRoomRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2000,12 +2096,6 @@ func (o DeleteCleanRoomRequest) Type(ctx context.Context) attr.Type { type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2044,12 +2134,6 @@ type GetCleanRoomAssetRequest struct { CleanRoomName types.String `tfsdk:"-"` } -func (newState *GetCleanRoomAssetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCleanRoomAssetRequest) { -} - -func (newState *GetCleanRoomAssetRequest) SyncEffectiveFieldsDuringRead(existingState GetCleanRoomAssetRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCleanRoomAssetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2090,12 +2174,6 @@ type GetCleanRoomRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetCleanRoomRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCleanRoomRequest) { -} - -func (newState *GetCleanRoomRequest) SyncEffectiveFieldsDuringRead(existingState GetCleanRoomRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCleanRoomRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2135,12 +2213,6 @@ type ListCleanRoomAssetsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCleanRoomAssetsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomAssetsRequest) { -} - -func (newState *ListCleanRoomAssetsRequest) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomAssetsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomAssetsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2176,11 +2248,11 @@ func (o ListCleanRoomAssetsRequest) Type(ctx context.Context) attr.Type { type ListCleanRoomAssetsResponse struct { // Assets in the clean room. - Assets types.List `tfsdk:"assets" tf:"optional"` + Assets types.List `tfsdk:"assets" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. page_token should be set to this value for the next request // (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListCleanRoomAssetsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomAssetsResponse) { @@ -2189,6 +2261,12 @@ func (newState *ListCleanRoomAssetsResponse) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListCleanRoomAssetsResponse) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomAssetsResponse) { } +func (c ListCleanRoomAssetsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomAsset{}.ToSchema(cs, append(path, "assets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomAssetsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2264,12 +2342,6 @@ type ListCleanRoomNotebookTaskRunsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCleanRoomNotebookTaskRunsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomNotebookTaskRunsRequest) { -} - -func (newState *ListCleanRoomNotebookTaskRunsRequest) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomNotebookTaskRunsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomNotebookTaskRunsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2311,9 +2383,9 @@ type ListCleanRoomNotebookTaskRunsResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. page_token should be set to this value for the next request // (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Name of the clean room. - Runs types.List `tfsdk:"runs" tf:"optional"` + Runs types.List `tfsdk:"runs" tf:""` } func (newState *ListCleanRoomNotebookTaskRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomNotebookTaskRunsResponse) { @@ -2322,6 +2394,12 @@ func (newState *ListCleanRoomNotebookTaskRunsResponse) SyncEffectiveFieldsDuring func (newState *ListCleanRoomNotebookTaskRunsResponse) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomNotebookTaskRunsResponse) { } +func (c ListCleanRoomNotebookTaskRunsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomNotebookTaskRun{}.ToSchema(cs, append(path, "runs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomNotebookTaskRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2394,12 +2472,6 @@ type ListCleanRoomsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCleanRoomsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomsRequest) { -} - -func (newState *ListCleanRoomsRequest) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2434,11 +2506,11 @@ func (o ListCleanRoomsRequest) Type(ctx context.Context) attr.Type { } type ListCleanRoomsResponse struct { - CleanRooms types.List `tfsdk:"clean_rooms" tf:"optional"` + CleanRooms types.List `tfsdk:"clean_rooms" tf:""` // Opaque token to retrieve the next page of results. Absent if there are no // more pages. page_token should be set to this value for the next request // (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListCleanRoomsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomsResponse) { @@ -2447,6 +2519,12 @@ func (newState *ListCleanRoomsResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ListCleanRoomsResponse) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomsResponse) { } +func (c ListCleanRoomsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoom{}.ToSchema(cs, append(path, "clean_rooms")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2513,7 +2591,7 @@ func (o *ListCleanRoomsResponse) SetCleanRooms(ctx context.Context, v []CleanRoo // Update an asset type UpdateCleanRoomAssetRequest struct { // Metadata of the clean room asset - Asset types.Object `tfsdk:"asset" tf:"optional,object"` + Asset types.Object `tfsdk:"asset" tf:"object"` // The type of the asset. AssetType types.String `tfsdk:"-"` // Name of the clean room. @@ -2528,12 +2606,6 @@ type UpdateCleanRoomAssetRequest struct { Name types.String `tfsdk:"-"` } -func (newState *UpdateCleanRoomAssetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCleanRoomAssetRequest) { -} - -func (newState *UpdateCleanRoomAssetRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCleanRoomAssetRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCleanRoomAssetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2602,7 +2674,7 @@ func (o *UpdateCleanRoomAssetRequest) SetAsset(ctx context.Context, v CleanRoomA } type UpdateCleanRoomRequest struct { - CleanRoom types.Object `tfsdk:"clean_room" tf:"optional,object"` + CleanRoom types.Object `tfsdk:"clean_room" tf:"object"` // Name of the clean room. Name types.String `tfsdk:"-"` } @@ -2613,6 +2685,13 @@ func (newState *UpdateCleanRoomRequest) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *UpdateCleanRoomRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCleanRoomRequest) { } +func (c UpdateCleanRoomRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoom{}.ToSchema(cs, append(path, "clean_room")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCleanRoomRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/compute_tf/legacy_model.go b/internal/service/compute_tf/legacy_model.go index d99191ded..688552deb 100755 --- a/internal/service/compute_tf/legacy_model.go +++ b/internal/service/compute_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -30,7 +31,7 @@ type AddInstanceProfile_SdkV2 struct { // Otherwise, this field is optional. // // [Databricks SQL Serverless]: https://docs.databricks.com/sql/admin/serverless.html - IamRoleArn types.String `tfsdk:"iam_role_arn" tf:"optional"` + IamRoleArn types.String `tfsdk:"iam_role_arn" tf:""` // The AWS ARN of the instance profile to register with Databricks. This // field is required. InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` @@ -39,7 +40,7 @@ type AddInstanceProfile_SdkV2 struct { // profile contains an meta IAM role which could assume a wide range of // roles. Therefore it should always be used with authorization. This field // is optional, the default value is `false`. - IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:"optional"` + IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:""` // By default, Databricks validates that it has sufficient permissions to // launch instances with the instance profile. This validation uses AWS // dry-run mode for the RunInstances API. If validation fails with an error @@ -47,7 +48,7 @@ type AddInstanceProfile_SdkV2 struct { // “Your requested instance type is not supported in your requested // availability zone”), you can pass this flag to skip the validation and // forcibly add the instance profile. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *AddInstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddInstanceProfile_SdkV2) { @@ -56,6 +57,12 @@ func (newState *AddInstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *AddInstanceProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddInstanceProfile_SdkV2) { } +func (c AddInstanceProfile_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_profile_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddInstanceProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -96,12 +103,6 @@ func (o AddInstanceProfile_SdkV2) Type(ctx context.Context) attr.Type { type AddResponse_SdkV2 struct { } -func (newState *AddResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddResponse_SdkV2) { -} - -func (newState *AddResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -141,6 +142,12 @@ func (newState *Adlsgen2Info_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *Adlsgen2Info_SdkV2) SyncEffectiveFieldsDuringRead(existingState Adlsgen2Info_SdkV2) { } +func (c Adlsgen2Info_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Adlsgen2Info. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -176,11 +183,11 @@ type AutoScale_SdkV2 struct { // The maximum number of workers to which the cluster can scale up when // overloaded. Note that `max_workers` must be strictly greater than // `min_workers`. - MaxWorkers types.Int64 `tfsdk:"max_workers" tf:"optional"` + MaxWorkers types.Int64 `tfsdk:"max_workers" tf:""` // The minimum number of workers to which the cluster can scale down when // underutilized. It is also the initial number of workers the cluster will // have after creation. - MinWorkers types.Int64 `tfsdk:"min_workers" tf:"optional"` + MinWorkers types.Int64 `tfsdk:"min_workers" tf:""` } func (newState *AutoScale_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoScale_SdkV2) { @@ -189,6 +196,11 @@ func (newState *AutoScale_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Au func (newState *AutoScale_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutoScale_SdkV2) { } +func (c AutoScale_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoScale. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -228,7 +240,7 @@ type AwsAttributes_SdkV2 struct { // // Note: If `first_on_demand` is zero, this availability type will be used // for the entire cluster. - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // The number of volumes launched for each instance. Users can choose up to // 10 volumes. This feature is only enabled for supported node types. Legacy // node types cannot specify custom EBS volumes. For node types with no @@ -245,21 +257,21 @@ type AwsAttributes_SdkV2 struct { // // Please note that if EBS volumes are specified, then the Spark // configuration `spark.local.dir` will be overridden. - EbsVolumeCount types.Int64 `tfsdk:"ebs_volume_count" tf:"optional"` + EbsVolumeCount types.Int64 `tfsdk:"ebs_volume_count" tf:""` // If using gp3 volumes, what IOPS to use for the disk. If this is not set, // the maximum performance of a gp2 volume with the same volume size will be // used. - EbsVolumeIops types.Int64 `tfsdk:"ebs_volume_iops" tf:"optional"` + EbsVolumeIops types.Int64 `tfsdk:"ebs_volume_iops" tf:""` // The size of each EBS volume (in GiB) launched for each instance. For // general purpose SSD, this value must be within the range 100 - 4096. For // throughput optimized HDD, this value must be within the range 500 - 4096. - EbsVolumeSize types.Int64 `tfsdk:"ebs_volume_size" tf:"optional"` + EbsVolumeSize types.Int64 `tfsdk:"ebs_volume_size" tf:""` // If using gp3 volumes, what throughput to use for the disk. If this is not // set, the maximum performance of a gp2 volume with the same volume size // will be used. - EbsVolumeThroughput types.Int64 `tfsdk:"ebs_volume_throughput" tf:"optional"` + EbsVolumeThroughput types.Int64 `tfsdk:"ebs_volume_throughput" tf:""` // The type of EBS volumes that will be launched with this cluster. - EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:"optional"` + EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:""` // The first `first_on_demand` nodes of the cluster will be placed on // on-demand instances. If this value is greater than 0, the cluster driver // node in particular will be placed on an on-demand instance. If this value @@ -269,7 +281,7 @@ type AwsAttributes_SdkV2 struct { // instances and the remainder will be placed on `availability` instances. // Note that this value does not affect cluster size and cannot currently be // mutated over the lifetime of a cluster. - FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:"optional"` + FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:""` // Nodes for this cluster will only be placed on AWS instances with this // instance profile. If ommitted, nodes will be placed on instances without // an IAM instance profile. The instance profile must have previously been @@ -279,7 +291,7 @@ type AwsAttributes_SdkV2 struct { // // If this field is ommitted, we will pull in the default from the conf if // it exists. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The bid price for AWS spot instances, as a percentage of the // corresponding instance type's on-demand price. For example, if this field // is set to 50, and the cluster needs a new `r3.xlarge` spot instance, then @@ -294,7 +306,7 @@ type AwsAttributes_SdkV2 struct { // The default value and documentation here should be kept consistent with // CommonConf.defaultSpotBidPricePercent and // CommonConf.maxSpotBidPricePercent. - SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:"optional"` + SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:""` // Identifier for the availability zone/datacenter in which the cluster // resides. This string will be of a form like "us-west-2a". The provided // availability zone must be in the same region as the Databricks @@ -305,7 +317,7 @@ type AwsAttributes_SdkV2 struct { // in a zone with high availability, and will retry placement in a different // AZ if there is not enough capacity. The list of available zones as well // as the default value can be found by using the `List Zones` method. - ZoneId types.String `tfsdk:"zone_id" tf:"optional"` + ZoneId types.String `tfsdk:"zone_id" tf:""` } func (newState *AwsAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsAttributes_SdkV2) { @@ -314,6 +326,11 @@ func (newState *AwsAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *AwsAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsAttributes_SdkV2) { } +func (c AwsAttributes_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -368,7 +385,7 @@ type AzureAttributes_SdkV2 struct { // `first_on_demand` ones. Note: If `first_on_demand` is zero (which only // happens on pool clusters), this availability type will be used for the // entire cluster. - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // The first `first_on_demand` nodes of the cluster will be placed on // on-demand instances. This value should be greater than 0, to make sure // the cluster driver node is placed on an on-demand instance. If this value @@ -378,15 +395,15 @@ type AzureAttributes_SdkV2 struct { // instances and the remainder will be placed on `availability` instances. // Note that this value does not affect cluster size and cannot currently be // mutated over the lifetime of a cluster. - FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:"optional"` + FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:""` // Defines values necessary to configure and run Azure Log Analytics agent - LogAnalyticsInfo types.List `tfsdk:"log_analytics_info" tf:"optional,object"` + LogAnalyticsInfo types.List `tfsdk:"log_analytics_info" tf:"object"` // The max bid price to be used for Azure spot instances. The Max price for // the bid cannot be higher than the on-demand price of the instance. If not // specified, the default value is -1, which specifies that the instance // cannot be evicted on the basis of price, and only on the basis of // availability. Further, the value should > 0 or -1. - SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:"optional"` + SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:""` } func (newState *AzureAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureAttributes_SdkV2) { @@ -395,6 +412,12 @@ func (newState *AzureAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *AzureAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureAttributes_SdkV2) { } +func (c AzureAttributes_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LogAnalyticsInfo_SdkV2{}.ToSchema(cs, append(path, "log_analytics_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -463,11 +486,11 @@ func (o *AzureAttributes_SdkV2) SetLogAnalyticsInfo(ctx context.Context, v LogAn } type CancelCommand_SdkV2 struct { - ClusterId types.String `tfsdk:"clusterId" tf:"optional"` + ClusterId types.String `tfsdk:"clusterId" tf:""` - CommandId types.String `tfsdk:"commandId" tf:"optional"` + CommandId types.String `tfsdk:"commandId" tf:""` - ContextId types.String `tfsdk:"contextId" tf:"optional"` + ContextId types.String `tfsdk:"contextId" tf:""` } func (newState *CancelCommand_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelCommand_SdkV2) { @@ -476,6 +499,11 @@ func (newState *CancelCommand_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CancelCommand_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelCommand_SdkV2) { } +func (c CancelCommand_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelCommand. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -514,12 +542,6 @@ func (o CancelCommand_SdkV2) Type(ctx context.Context) attr.Type { type CancelResponse_SdkV2 struct { } -func (newState *CancelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelResponse_SdkV2) { -} - -func (newState *CancelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -560,6 +582,13 @@ func (newState *ChangeClusterOwner_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ChangeClusterOwner_SdkV2) SyncEffectiveFieldsDuringRead(existingState ChangeClusterOwner_SdkV2) { } +func (c ChangeClusterOwner_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + cs.SetRequired(append(path, "owner_username")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ChangeClusterOwner. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -602,6 +631,11 @@ func (newState *ChangeClusterOwnerResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ChangeClusterOwnerResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ChangeClusterOwnerResponse_SdkV2) { } +func (c ChangeClusterOwnerResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ChangeClusterOwnerResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -631,9 +665,9 @@ func (o ChangeClusterOwnerResponse_SdkV2) Type(ctx context.Context) attr.Type { type ClientsTypes_SdkV2 struct { // With jobs set, the cluster can be used for jobs - Jobs types.Bool `tfsdk:"jobs" tf:"optional"` + Jobs types.Bool `tfsdk:"jobs" tf:""` // With notebooks set, this cluster can be used for notebooks - Notebooks types.Bool `tfsdk:"notebooks" tf:"optional"` + Notebooks types.Bool `tfsdk:"notebooks" tf:""` } func (newState *ClientsTypes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClientsTypes_SdkV2) { @@ -642,6 +676,11 @@ func (newState *ClientsTypes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ClientsTypes_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClientsTypes_SdkV2) { } +func (c ClientsTypes_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClientsTypes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -686,6 +725,12 @@ func (newState *CloneCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CloneCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloneCluster_SdkV2) { } +func (c CloneCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "source_cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloneCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -718,7 +763,7 @@ func (o CloneCluster_SdkV2) Type(ctx context.Context) attr.Type { } type CloudProviderNodeInfo_SdkV2 struct { - Status types.List `tfsdk:"status" tf:"optional"` + Status types.List `tfsdk:"status" tf:""` } func (newState *CloudProviderNodeInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloudProviderNodeInfo_SdkV2) { @@ -727,6 +772,11 @@ func (newState *CloudProviderNodeInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CloudProviderNodeInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloudProviderNodeInfo_SdkV2) { } +func (c CloudProviderNodeInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloudProviderNodeInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -790,13 +840,13 @@ func (o *CloudProviderNodeInfo_SdkV2) SetStatus(ctx context.Context, v []types.S type ClusterAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ClusterAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAccessControlRequest_SdkV2) { @@ -805,6 +855,11 @@ func (newState *ClusterAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *ClusterAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAccessControlRequest_SdkV2) { } +func (c ClusterAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -844,15 +899,15 @@ func (o ClusterAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { type ClusterAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ClusterAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAccessControlResponse_SdkV2) { @@ -861,6 +916,12 @@ func (newState *ClusterAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *ClusterAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAccessControlResponse_SdkV2) { } +func (c ClusterAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -936,23 +997,23 @@ type ClusterAttributes_SdkV2 struct { // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -961,7 +1022,7 @@ type ClusterAttributes_SdkV2 struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -991,39 +1052,39 @@ type ClusterAttributes_SdkV2 struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.List `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -1031,15 +1092,15 @@ type ClusterAttributes_SdkV2 struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -1048,15 +1109,15 @@ type ClusterAttributes_SdkV2 struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -1070,7 +1131,7 @@ type ClusterAttributes_SdkV2 struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. @@ -1078,15 +1139,15 @@ type ClusterAttributes_SdkV2 struct { // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.List `tfsdk:"workload_type" tf:"object"` } func (newState *ClusterAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAttributes_SdkV2) { @@ -1095,6 +1156,19 @@ func (newState *ClusterAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ClusterAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAttributes_SdkV2) { } +func (c ClusterAttributes_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + ClusterLogConf_SdkV2{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage_SdkV2{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo_SdkV2{}.ToSchema(cs, append(path, "init_scripts")...) + cs.SetRequired(append(path, "spark_version")...) + WorkloadType_SdkV2{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1503,12 +1577,12 @@ type ClusterCompliance_SdkV2 struct { ClusterId types.String `tfsdk:"cluster_id" tf:""` // Whether this cluster is in compliance with the latest version of its // policy. - IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + IsCompliant types.Bool `tfsdk:"is_compliant" tf:""` // An object containing key-value mappings representing the first 200 policy // validation errors. The keys indicate the path where the policy validation // error is occurring. The values indicate an error message describing the // policy validation error. - Violations types.Map `tfsdk:"violations" tf:"optional"` + Violations types.Map `tfsdk:"violations" tf:""` } func (newState *ClusterCompliance_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterCompliance_SdkV2) { @@ -1517,6 +1591,12 @@ func (newState *ClusterCompliance_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ClusterCompliance_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterCompliance_SdkV2) { } +func (c ClusterCompliance_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterCompliance. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1586,47 +1666,47 @@ type ClusterDetails_SdkV2 struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.List `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // Number of CPU cores available for this cluster. Note that this can be // fractional, e.g. 7.5 cores, since certain node types are configured to // share cores between Spark nodes on the same instance. - ClusterCores types.Float64 `tfsdk:"cluster_cores" tf:"optional"` + ClusterCores types.Float64 `tfsdk:"cluster_cores" tf:""` // Canonical identifier for the cluster. This id is retained during cluster // restarts and resizes, while each new cluster has a globally unique id. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"object"` // Cluster log delivery status. - ClusterLogStatus types.List `tfsdk:"cluster_log_status" tf:"optional,object"` + ClusterLogStatus types.List `tfsdk:"cluster_log_status" tf:"object"` // Total amount of cluster memory, in megabytes - ClusterMemoryMb types.Int64 `tfsdk:"cluster_memory_mb" tf:"optional"` + ClusterMemoryMb types.Int64 `tfsdk:"cluster_memory_mb" tf:""` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Determines whether the cluster was created by a user through the UI, // created by the Databricks Jobs Scheduler, or through an API request. This // is the same as cluster_creator, but read only. - ClusterSource types.String `tfsdk:"cluster_source" tf:"optional"` + ClusterSource types.String `tfsdk:"cluster_source" tf:""` // Creator user name. The field won't be included in the response if the // user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -1635,7 +1715,7 @@ type ClusterDetails_SdkV2 struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -1665,7 +1745,7 @@ type ClusterDetails_SdkV2 struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` // Tags that are added by Databricks regardless of any `custom_tags`, // including: // @@ -1678,48 +1758,48 @@ type ClusterDetails_SdkV2 struct { // - ClusterId: // // - Name: - DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` + DefaultTags types.Map `tfsdk:"default_tags" tf:""` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.List `tfsdk:"docker_image" tf:"object"` // Node on which the Spark driver resides. The driver node contains the // Spark master and the Databricks application that manages the per-notebook // Spark REPLs. - Driver types.List `tfsdk:"driver" tf:"optional,object"` + Driver types.List `tfsdk:"driver" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Nodes on which the Spark executors reside. - Executors types.List `tfsdk:"executors" tf:"optional"` + Executors types.List `tfsdk:"executors" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // Port on which Spark JDBC server is listening, in the driver nod. No // service will be listeningon on this port in executor nodes. - JdbcPort types.Int64 `tfsdk:"jdbc_port" tf:"optional"` + JdbcPort types.Int64 `tfsdk:"jdbc_port" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -1727,18 +1807,18 @@ type ClusterDetails_SdkV2 struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // the timestamp that the cluster was started/restarted - LastRestartedTime types.Int64 `tfsdk:"last_restarted_time" tf:"optional"` + LastRestartedTime types.Int64 `tfsdk:"last_restarted_time" tf:""` // Time when the cluster driver last lost its state (due to a restart or // driver failure). - LastStateLossTime types.Int64 `tfsdk:"last_state_loss_time" tf:"optional"` + LastStateLossTime types.Int64 `tfsdk:"last_state_loss_time" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -1749,9 +1829,9 @@ type ClusterDetails_SdkV2 struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -1760,19 +1840,19 @@ type ClusterDetails_SdkV2 struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // A canonical SparkContext identifier. This value *does* change when the // Spark driver restarts. The pair `(cluster_id, spark_context_id)` is a // globally unique identifier over all Spark contexts. - SparkContextId types.Int64 `tfsdk:"spark_context_id" tf:"optional"` + SparkContextId types.Int64 `tfsdk:"spark_context_id" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -1786,42 +1866,42 @@ type ClusterDetails_SdkV2 struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - SparkVersion types.String `tfsdk:"spark_version" tf:"optional"` + SparkVersion types.String `tfsdk:"spark_version" tf:""` // `spec` contains a snapshot of the field values that were used to create // or edit this cluster. The contents of `spec` can be used in the body of a // create cluster request. This field might not be populated for older // clusters. Note: not included in the response of the ListClusters API. - Spec types.List `tfsdk:"spec" tf:"optional,object"` + Spec types.List `tfsdk:"spec" tf:"object"` // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // Time (in epoch milliseconds) when the cluster creation request was // received (when the cluster entered a `PENDING` state). - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Current state of the cluster. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // A message associated with the most recent state transition (e.g., the // reason why the cluster entered a `TERMINATED` state). - StateMessage types.String `tfsdk:"state_message" tf:"optional"` + StateMessage types.String `tfsdk:"state_message" tf:""` // Time (in epoch milliseconds) when the cluster was terminated, if // applicable. - TerminatedTime types.Int64 `tfsdk:"terminated_time" tf:"optional"` + TerminatedTime types.Int64 `tfsdk:"terminated_time" tf:""` // Information about why the cluster was terminated. This field only appears // when the cluster is in a `TERMINATING` or `TERMINATED` state. - TerminationReason types.List `tfsdk:"termination_reason" tf:"optional,object"` + TerminationReason types.List `tfsdk:"termination_reason" tf:"object"` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.List `tfsdk:"workload_type" tf:"object"` } func (newState *ClusterDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterDetails_SdkV2) { @@ -1830,6 +1910,24 @@ func (newState *ClusterDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ClusterDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterDetails_SdkV2) { } +func (c ClusterDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale_SdkV2{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + ClusterLogConf_SdkV2{}.ToSchema(cs, append(path, "cluster_log_conf")...) + LogSyncStatus_SdkV2{}.ToSchema(cs, append(path, "cluster_log_status")...) + DockerImage_SdkV2{}.ToSchema(cs, append(path, "docker_image")...) + SparkNode_SdkV2{}.ToSchema(cs, append(path, "driver")...) + SparkNode_SdkV2{}.ToSchema(cs, append(path, "executors")...) + GcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo_SdkV2{}.ToSchema(cs, append(path, "init_scripts")...) + ClusterSpec_SdkV2{}.ToSchema(cs, append(path, "spec")...) + TerminationReason_SdkV2{}.ToSchema(cs, append(path, "termination_reason")...) + WorkloadType_SdkV2{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2482,15 +2580,15 @@ type ClusterEvent_SdkV2 struct { // ClusterId types.String `tfsdk:"cluster_id" tf:""` // - DataPlaneEventDetails types.List `tfsdk:"data_plane_event_details" tf:"optional,object"` + DataPlaneEventDetails types.List `tfsdk:"data_plane_event_details" tf:"object"` // - Details types.List `tfsdk:"details" tf:"optional,object"` + Details types.List `tfsdk:"details" tf:"object"` // The timestamp when the event occurred, stored as the number of // milliseconds since the Unix epoch. If not provided, this will be assigned // by the Timeline service. - Timestamp types.Int64 `tfsdk:"timestamp" tf:"optional"` + Timestamp types.Int64 `tfsdk:"timestamp" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *ClusterEvent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterEvent_SdkV2) { @@ -2499,6 +2597,14 @@ func (newState *ClusterEvent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ClusterEvent_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterEvent_SdkV2) { } +func (c ClusterEvent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + DataPlaneEventDetails_SdkV2{}.ToSchema(cs, append(path, "data_plane_event_details")...) + EventDetails_SdkV2{}.ToSchema(cs, append(path, "details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterEvent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2599,9 +2705,9 @@ func (o *ClusterEvent_SdkV2) SetDetails(ctx context.Context, v EventDetails_SdkV type ClusterLibraryStatuses_SdkV2 struct { // Unique identifier for the cluster. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // Status of all libraries on the cluster. - LibraryStatuses types.List `tfsdk:"library_statuses" tf:"optional"` + LibraryStatuses types.List `tfsdk:"library_statuses" tf:""` } func (newState *ClusterLibraryStatuses_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterLibraryStatuses_SdkV2) { @@ -2610,6 +2716,12 @@ func (newState *ClusterLibraryStatuses_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *ClusterLibraryStatuses_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterLibraryStatuses_SdkV2) { } +func (c ClusterLibraryStatuses_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LibraryFullStatus_SdkV2{}.ToSchema(cs, append(path, "library_statuses")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterLibraryStatuses. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2676,13 +2788,13 @@ func (o *ClusterLibraryStatuses_SdkV2) SetLibraryStatuses(ctx context.Context, v type ClusterLogConf_SdkV2 struct { // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : // "dbfs:/home/cluster_log" } }` - Dbfs types.List `tfsdk:"dbfs" tf:"optional,object"` + Dbfs types.List `tfsdk:"dbfs" tf:"object"` // destination and either the region or endpoint need to be provided. e.g. // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : // "us-west-2" } }` Cluster iam role is used to access s3, please make sure // the cluster iam role in `instance_profile_arn` has permission to write // data to the s3 destination. - S3 types.List `tfsdk:"s3" tf:"optional,object"` + S3 types.List `tfsdk:"s3" tf:"object"` } func (newState *ClusterLogConf_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterLogConf_SdkV2) { @@ -2691,6 +2803,13 @@ func (newState *ClusterLogConf_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ClusterLogConf_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterLogConf_SdkV2) { } +func (c ClusterLogConf_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DbfsStorageInfo_SdkV2{}.ToSchema(cs, append(path, "dbfs")...) + S3StorageInfo_SdkV2{}.ToSchema(cs, append(path, "s3")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterLogConf. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2784,11 +2903,11 @@ func (o *ClusterLogConf_SdkV2) SetS3(ctx context.Context, v S3StorageInfo_SdkV2) } type ClusterPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ClusterPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermission_SdkV2) { @@ -2797,6 +2916,11 @@ func (newState *ClusterPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ClusterPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPermission_SdkV2) { } +func (c ClusterPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2863,11 +2987,11 @@ func (o *ClusterPermission_SdkV2) SetInheritedFromObject(ctx context.Context, v } type ClusterPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ClusterPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermissions_SdkV2) { @@ -2876,6 +3000,12 @@ func (newState *ClusterPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ClusterPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPermissions_SdkV2) { } +func (c ClusterPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2942,9 +3072,9 @@ func (o *ClusterPermissions_SdkV2) SetAccessControlList(ctx context.Context, v [ } type ClusterPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ClusterPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermissionsDescription_SdkV2) { @@ -2953,6 +3083,11 @@ func (newState *ClusterPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCr func (newState *ClusterPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPermissionsDescription_SdkV2) { } +func (c ClusterPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2987,7 +3122,7 @@ func (o ClusterPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type } type ClusterPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The cluster for which to get or manage permissions. ClusterId types.String `tfsdk:"-"` } @@ -2998,6 +3133,13 @@ func (newState *ClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPermissionsRequest_SdkV2) { } +func (c ClusterPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3063,13 +3205,13 @@ func (o *ClusterPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Conte type ClusterPolicyAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ClusterPolicyAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyAccessControlRequest_SdkV2) { @@ -3078,6 +3220,11 @@ func (newState *ClusterPolicyAccessControlRequest_SdkV2) SyncEffectiveFieldsDuri func (newState *ClusterPolicyAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyAccessControlRequest_SdkV2) { } +func (c ClusterPolicyAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3117,15 +3264,15 @@ func (o ClusterPolicyAccessControlRequest_SdkV2) Type(ctx context.Context) attr. type ClusterPolicyAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ClusterPolicyAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyAccessControlResponse_SdkV2) { @@ -3134,6 +3281,12 @@ func (newState *ClusterPolicyAccessControlResponse_SdkV2) SyncEffectiveFieldsDur func (newState *ClusterPolicyAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyAccessControlResponse_SdkV2) { } +func (c ClusterPolicyAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPolicyPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3204,11 +3357,11 @@ func (o *ClusterPolicyAccessControlResponse_SdkV2) SetAllPermissions(ctx context } type ClusterPolicyPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ClusterPolicyPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermission_SdkV2) { @@ -3217,6 +3370,11 @@ func (newState *ClusterPolicyPermission_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ClusterPolicyPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermission_SdkV2) { } +func (c ClusterPolicyPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3283,11 +3441,11 @@ func (o *ClusterPolicyPermission_SdkV2) SetInheritedFromObject(ctx context.Conte } type ClusterPolicyPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ClusterPolicyPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermissions_SdkV2) { @@ -3296,6 +3454,12 @@ func (newState *ClusterPolicyPermissions_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *ClusterPolicyPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissions_SdkV2) { } +func (c ClusterPolicyPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPolicyAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3362,9 +3526,9 @@ func (o *ClusterPolicyPermissions_SdkV2) SetAccessControlList(ctx context.Contex } type ClusterPolicyPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ClusterPolicyPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermissionsDescription_SdkV2) { @@ -3373,6 +3537,11 @@ func (newState *ClusterPolicyPermissionsDescription_SdkV2) SyncEffectiveFieldsDu func (newState *ClusterPolicyPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissionsDescription_SdkV2) { } +func (c ClusterPolicyPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3407,7 +3576,7 @@ func (o ClusterPolicyPermissionsDescription_SdkV2) Type(ctx context.Context) att } type ClusterPolicyPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The cluster policy for which to get or manage permissions. ClusterPolicyId types.String `tfsdk:"-"` } @@ -3418,6 +3587,13 @@ func (newState *ClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuring func (newState *ClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissionsRequest_SdkV2) { } +func (c ClusterPolicyPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPolicyAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "cluster_policy_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3485,17 +3661,17 @@ func (o *ClusterPolicyPermissionsRequest_SdkV2) SetAccessControlList(ctx context // become compliant with its policy. type ClusterSettingsChange_SdkV2 struct { // The field where this change would be made. - Field types.String `tfsdk:"field" tf:"optional"` + Field types.String `tfsdk:"field" tf:""` // The new value of this field after enforcing policy compliance (either a // number, a boolean, or a string) converted to a string. This is intended // to be read by a human. The typed new value of this field can be retrieved // by reading the settings field in the API response. - NewValue types.String `tfsdk:"new_value" tf:"optional"` + NewValue types.String `tfsdk:"new_value" tf:""` // The previous value of this field before enforcing policy compliance // (either a number, a boolean, or a string) converted to a string. This is // intended to be read by a human. The type of the field can be retrieved by // reading the settings field in the API response. - PreviousValue types.String `tfsdk:"previous_value" tf:"optional"` + PreviousValue types.String `tfsdk:"previous_value" tf:""` } func (newState *ClusterSettingsChange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSettingsChange_SdkV2) { @@ -3504,6 +3680,11 @@ func (newState *ClusterSettingsChange_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ClusterSettingsChange_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterSettingsChange_SdkV2) { } +func (c ClusterSettingsChange_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSettingsChange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3543,7 +3724,7 @@ type ClusterSize_SdkV2 struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.List `tfsdk:"autoscale" tf:"object"` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -3554,7 +3735,7 @@ type ClusterSize_SdkV2 struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` } func (newState *ClusterSize_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSize_SdkV2) { @@ -3563,6 +3744,12 @@ func (newState *ClusterSize_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ClusterSize_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterSize_SdkV2) { } +func (c ClusterSize_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale_SdkV2{}.ToSchema(cs, append(path, "autoscale")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSize. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3630,33 +3817,33 @@ type ClusterSpec_SdkV2 struct { // When set to true, fixed and default values from the policy will be used // for fields that are omitted. When set to false, only fixed values from // the policy will be applied. - ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:""` // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.List `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -3665,7 +3852,7 @@ type ClusterSpec_SdkV2 struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -3695,39 +3882,39 @@ type ClusterSpec_SdkV2 struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.List `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -3735,13 +3922,13 @@ type ClusterSpec_SdkV2 struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -3752,9 +3939,9 @@ type ClusterSpec_SdkV2 struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -3763,15 +3950,15 @@ type ClusterSpec_SdkV2 struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -3785,23 +3972,23 @@ type ClusterSpec_SdkV2 struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - SparkVersion types.String `tfsdk:"spark_version" tf:"optional"` + SparkVersion types.String `tfsdk:"spark_version" tf:""` // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.List `tfsdk:"workload_type" tf:"object"` } func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSpec_SdkV2) { @@ -3810,6 +3997,19 @@ func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterSpec_SdkV2) { } +func (c ClusterSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale_SdkV2{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + ClusterLogConf_SdkV2{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage_SdkV2{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo_SdkV2{}.ToSchema(cs, append(path, "init_scripts")...) + WorkloadType_SdkV2{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4254,12 +4454,6 @@ type ClusterStatus_SdkV2 struct { ClusterId types.String `tfsdk:"-"` } -func (newState *ClusterStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterStatus_SdkV2) { -} - -func (newState *ClusterStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterStatus_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4293,13 +4487,13 @@ func (o ClusterStatus_SdkV2) Type(ctx context.Context) attr.Type { type Command_SdkV2 struct { // Running cluster id - ClusterId types.String `tfsdk:"clusterId" tf:"optional"` + ClusterId types.String `tfsdk:"clusterId" tf:""` // Executable code - Command types.String `tfsdk:"command" tf:"optional"` + Command types.String `tfsdk:"command" tf:""` // Running context id - ContextId types.String `tfsdk:"contextId" tf:"optional"` + ContextId types.String `tfsdk:"contextId" tf:""` - Language types.String `tfsdk:"language" tf:"optional"` + Language types.String `tfsdk:"language" tf:""` } func (newState *Command_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Command_SdkV2) { @@ -4308,6 +4502,11 @@ func (newState *Command_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Comm func (newState *Command_SdkV2) SyncEffectiveFieldsDuringRead(existingState Command_SdkV2) { } +func (c Command_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Command. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4354,12 +4553,6 @@ type CommandStatusRequest_SdkV2 struct { ContextId types.String `tfsdk:"-"` } -func (newState *CommandStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CommandStatusRequest_SdkV2) { -} - -func (newState *CommandStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CommandStatusRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CommandStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4396,11 +4589,11 @@ func (o CommandStatusRequest_SdkV2) Type(ctx context.Context) attr.Type { } type CommandStatusResponse_SdkV2 struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Results types.List `tfsdk:"results" tf:"optional,object"` + Results types.List `tfsdk:"results" tf:"object"` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *CommandStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CommandStatusResponse_SdkV2) { @@ -4409,6 +4602,12 @@ func (newState *CommandStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CommandStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CommandStatusResponse_SdkV2) { } +func (c CommandStatusResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Results_SdkV2{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CommandStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4481,12 +4680,6 @@ type ContextStatusRequest_SdkV2 struct { ContextId types.String `tfsdk:"-"` } -func (newState *ContextStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContextStatusRequest_SdkV2) { -} - -func (newState *ContextStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ContextStatusRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ContextStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4521,9 +4714,9 @@ func (o ContextStatusRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ContextStatusResponse_SdkV2 struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *ContextStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContextStatusResponse_SdkV2) { @@ -4532,6 +4725,11 @@ func (newState *ContextStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ContextStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ContextStatusResponse_SdkV2) { } +func (c ContextStatusResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ContextStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4569,36 +4767,36 @@ type CreateCluster_SdkV2 struct { // When set to true, fixed and default values from the policy will be used // for fields that are omitted. When set to false, only fixed values from // the policy will be applied. - ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:""` // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.List `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // When specified, this clones libraries from a source cluster during the // creation of a new cluster. - CloneFrom types.List `tfsdk:"clone_from" tf:"optional,object"` + CloneFrom types.List `tfsdk:"clone_from" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -4607,7 +4805,7 @@ type CreateCluster_SdkV2 struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -4637,39 +4835,39 @@ type CreateCluster_SdkV2 struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.List `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -4677,13 +4875,13 @@ type CreateCluster_SdkV2 struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -4694,9 +4892,9 @@ type CreateCluster_SdkV2 struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -4705,15 +4903,15 @@ type CreateCluster_SdkV2 struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -4727,7 +4925,7 @@ type CreateCluster_SdkV2 struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. @@ -4735,15 +4933,15 @@ type CreateCluster_SdkV2 struct { // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.List `tfsdk:"workload_type" tf:"object"` } func (newState *CreateCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCluster_SdkV2) { @@ -4752,6 +4950,21 @@ func (newState *CreateCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CreateCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCluster_SdkV2) { } +func (c CreateCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale_SdkV2{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + CloneCluster_SdkV2{}.ToSchema(cs, append(path, "clone_from")...) + ClusterLogConf_SdkV2{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage_SdkV2{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo_SdkV2{}.ToSchema(cs, append(path, "init_scripts")...) + cs.SetRequired(append(path, "spark_version")...) + WorkloadType_SdkV2{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5222,7 +5435,7 @@ func (o *CreateCluster_SdkV2) SetWorkloadType(ctx context.Context, v WorkloadTyp } type CreateClusterResponse_SdkV2 struct { - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` } func (newState *CreateClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateClusterResponse_SdkV2) { @@ -5231,6 +5444,11 @@ func (newState *CreateClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateClusterResponse_SdkV2) { } +func (c CreateClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5264,9 +5482,9 @@ func (o CreateClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { type CreateContext_SdkV2 struct { // Running cluster id - ClusterId types.String `tfsdk:"clusterId" tf:"optional"` + ClusterId types.String `tfsdk:"clusterId" tf:""` - Language types.String `tfsdk:"language" tf:"optional"` + Language types.String `tfsdk:"language" tf:""` } func (newState *CreateContext_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateContext_SdkV2) { @@ -5275,6 +5493,11 @@ func (newState *CreateContext_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CreateContext_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateContext_SdkV2) { } +func (c CreateContext_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateContext. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5311,28 +5534,28 @@ func (o CreateContext_SdkV2) Type(ctx context.Context) attr.Type { type CreateInstancePool_SdkV2 struct { // Attributes related to instance pools running on Amazon Web Services. If // not specified at pool creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to instance pools running on Azure. If not specified // at pool creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // Additional tags for pool resources. Databricks will tag all pool // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: // // - Currently, Databricks allows at most 45 custom tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Defines the specification of the disks that will be attached to all spark // containers. - DiskSpec types.List `tfsdk:"disk_spec" tf:"optional,object"` + DiskSpec types.List `tfsdk:"disk_spec" tf:"object"` // Autoscaling Local Storage: when enabled, this instances in this pool will // dynamically acquire additional disk space when its Spark workers are // running low on disk space. In AWS, this feature requires specific AWS // permissions to function correctly - refer to the User Guide for more // details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Attributes related to instance pools running on Google Cloud Platform. If // not specified at pool creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -5340,16 +5563,16 @@ type CreateInstancePool_SdkV2 struct { // threshold must be between 0 and 10000 minutes. Users can also set this // value to 0 to instantly remove idle instances from the cache if min cache // size could still hold. - IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:""` // Pool name requested by the user. Pool name must be unique. Length must be // between 1 and 100 characters. InstancePoolName types.String `tfsdk:"instance_pool_name" tf:""` // Maximum number of outstanding instances to keep in the pool, including // both instances used by clusters and idle instances. Clusters that require // further instance provisioning will fail during upsize requests. - MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:""` // Minimum number of idle instances to keep in the instance pool - MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A @@ -5357,12 +5580,12 @@ type CreateInstancePool_SdkV2 struct { // :method:clusters/listNodeTypes API call. NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Custom Docker Image BYOC - PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:"optional"` + PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:""` // A list containing at most one preloaded Spark image version for the pool. // Pool-backed clusters started with the preloaded Spark version will start // faster. A list of available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:"optional"` + PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:""` } func (newState *CreateInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstancePool_SdkV2) { @@ -5371,6 +5594,18 @@ func (newState *CreateInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateInstancePool_SdkV2) { } +func (c CreateInstancePool_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + InstancePoolAzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + DiskSpec_SdkV2{}.ToSchema(cs, append(path, "disk_spec")...) + InstancePoolGcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + cs.SetRequired(append(path, "instance_pool_name")...) + cs.SetRequired(append(path, "node_type_id")...) + DockerImage_SdkV2{}.ToSchema(cs, append(path, "preloaded_docker_images")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateInstancePool. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5632,7 +5867,7 @@ func (o *CreateInstancePool_SdkV2) SetPreloadedSparkVersions(ctx context.Context type CreateInstancePoolResponse_SdkV2 struct { // The ID of the created instance pool. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` } func (newState *CreateInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstancePoolResponse_SdkV2) { @@ -5641,6 +5876,11 @@ func (newState *CreateInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *CreateInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateInstancePoolResponse_SdkV2) { } +func (c CreateInstancePoolResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateInstancePoolResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5677,18 +5917,18 @@ type CreatePolicy_SdkV2 struct { // Definition Language]. // // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - Definition types.String `tfsdk:"definition" tf:"optional"` + Definition types.String `tfsdk:"definition" tf:""` // Additional human-readable description of the cluster policy. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // A list of libraries to be installed on the next cluster restart that uses // this policy. The maximum number of libraries is 500. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Max number of clusters per user that can be active using this policy. If // not present, there is no max limit. - MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:"optional"` + MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:""` // Cluster Policy name requested by the user. This has to be unique. Length // must be between 1 and 100 characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Policy definition JSON document expressed in [Databricks Policy // Definition Language]. The JSON document must be passed as a string and // cannot be embedded in the requests. @@ -5698,14 +5938,14 @@ type CreatePolicy_SdkV2 struct { // policy definition. // // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:"optional"` + PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:""` // ID of the policy family. The cluster policy's policy definition inherits // the policy family's policy definition. // // Cannot be used with `definition`. Use // `policy_family_definition_overrides` instead to customize the policy // definition. - PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:""` } func (newState *CreatePolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePolicy_SdkV2) { @@ -5714,6 +5954,12 @@ func (newState *CreatePolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreatePolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePolicy_SdkV2) { } +func (c CreatePolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Library_SdkV2{}.ToSchema(cs, append(path, "libraries")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5789,7 +6035,7 @@ func (o *CreatePolicy_SdkV2) SetLibraries(ctx context.Context, v []Library_SdkV2 type CreatePolicyResponse_SdkV2 struct { // Canonical unique identifier for the cluster policy. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` } func (newState *CreatePolicyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePolicyResponse_SdkV2) { @@ -5798,6 +6044,11 @@ func (newState *CreatePolicyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CreatePolicyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePolicyResponse_SdkV2) { } +func (c CreatePolicyResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePolicyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5831,13 +6082,7 @@ func (o CreatePolicyResponse_SdkV2) Type(ctx context.Context) attr.Type { type CreateResponse_SdkV2 struct { // The global init script ID. - ScriptId types.String `tfsdk:"script_id" tf:"optional"` -} - -func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse_SdkV2) { -} - -func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateResponse_SdkV2) { + ScriptId types.String `tfsdk:"script_id" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. @@ -5872,7 +6117,7 @@ func (o CreateResponse_SdkV2) Type(ctx context.Context) attr.Type { } type Created_SdkV2 struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *Created_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Created_SdkV2) { @@ -5881,6 +6126,11 @@ func (newState *Created_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Crea func (newState *Created_SdkV2) SyncEffectiveFieldsDuringRead(existingState Created_SdkV2) { } +func (c Created_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Created. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5914,13 +6164,13 @@ func (o Created_SdkV2) Type(ctx context.Context) attr.Type { type DataPlaneEventDetails_SdkV2 struct { // - EventType types.String `tfsdk:"event_type" tf:"optional"` + EventType types.String `tfsdk:"event_type" tf:""` // - ExecutorFailures types.Int64 `tfsdk:"executor_failures" tf:"optional"` + ExecutorFailures types.Int64 `tfsdk:"executor_failures" tf:""` // - HostId types.String `tfsdk:"host_id" tf:"optional"` + HostId types.String `tfsdk:"host_id" tf:""` // - Timestamp types.Int64 `tfsdk:"timestamp" tf:"optional"` + Timestamp types.Int64 `tfsdk:"timestamp" tf:""` } func (newState *DataPlaneEventDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPlaneEventDetails_SdkV2) { @@ -5929,6 +6179,11 @@ func (newState *DataPlaneEventDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *DataPlaneEventDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataPlaneEventDetails_SdkV2) { } +func (c DataPlaneEventDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataPlaneEventDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5977,6 +6232,12 @@ func (newState *DbfsStorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *DbfsStorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState DbfsStorageInfo_SdkV2) { } +func (c DbfsStorageInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DbfsStorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6019,6 +6280,12 @@ func (newState *DeleteCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *DeleteCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCluster_SdkV2) { } +func (c DeleteCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6059,6 +6326,11 @@ func (newState *DeleteClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *DeleteClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteClusterResponse_SdkV2) { } +func (c DeleteClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6092,12 +6364,6 @@ type DeleteGlobalInitScriptRequest_SdkV2 struct { ScriptId types.String `tfsdk:"-"` } -func (newState *DeleteGlobalInitScriptRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteGlobalInitScriptRequest_SdkV2) { -} - -func (newState *DeleteGlobalInitScriptRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteGlobalInitScriptRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteGlobalInitScriptRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6140,6 +6406,12 @@ func (newState *DeleteInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *DeleteInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteInstancePool_SdkV2) { } +func (c DeleteInstancePool_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_pool_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstancePool. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6180,6 +6452,11 @@ func (newState *DeleteInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *DeleteInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteInstancePoolResponse_SdkV2) { } +func (c DeleteInstancePoolResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstancePoolResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6218,6 +6495,12 @@ func (newState *DeletePolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DeletePolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePolicy_SdkV2) { } +func (c DeletePolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "policy_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6258,6 +6541,11 @@ func (newState *DeletePolicyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *DeletePolicyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePolicyResponse_SdkV2) { } +func (c DeletePolicyResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePolicyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6288,12 +6576,6 @@ func (o DeletePolicyResponse_SdkV2) Type(ctx context.Context) attr.Type { type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6333,6 +6615,13 @@ func (newState *DestroyContext_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DestroyContext_SdkV2) SyncEffectiveFieldsDuringRead(existingState DestroyContext_SdkV2) { } +func (c DestroyContext_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "clusterId")...) + cs.SetRequired(append(path, "contextId")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DestroyContext. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6369,12 +6658,6 @@ func (o DestroyContext_SdkV2) Type(ctx context.Context) attr.Type { type DestroyResponse_SdkV2 struct { } -func (newState *DestroyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DestroyResponse_SdkV2) { -} - -func (newState *DestroyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DestroyResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DestroyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6419,9 +6702,9 @@ type DiskSpec_SdkV2 struct { // // Disks will be mounted at: - For AWS: `/ebs0`, `/ebs1`, and etc. - For // Azure: `/remote_volume0`, `/remote_volume1`, and etc. - DiskCount types.Int64 `tfsdk:"disk_count" tf:"optional"` + DiskCount types.Int64 `tfsdk:"disk_count" tf:""` - DiskIops types.Int64 `tfsdk:"disk_iops" tf:"optional"` + DiskIops types.Int64 `tfsdk:"disk_iops" tf:""` // The size of each disk (in GiB) launched for each instance. Values must // fall into the supported range for a particular instance type. // @@ -6430,11 +6713,11 @@ type DiskSpec_SdkV2 struct { // // For Azure: - Premium LRS (SSD): 1 - 1023 GiB - Standard LRS (HDD): 1- // 1023 GiB - DiskSize types.Int64 `tfsdk:"disk_size" tf:"optional"` + DiskSize types.Int64 `tfsdk:"disk_size" tf:""` - DiskThroughput types.Int64 `tfsdk:"disk_throughput" tf:"optional"` + DiskThroughput types.Int64 `tfsdk:"disk_throughput" tf:""` // The type of disks that will be launched with this cluster. - DiskType types.List `tfsdk:"disk_type" tf:"optional,object"` + DiskType types.List `tfsdk:"disk_type" tf:"object"` } func (newState *DiskSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DiskSpec_SdkV2) { @@ -6443,6 +6726,12 @@ func (newState *DiskSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dis func (newState *DiskSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState DiskSpec_SdkV2) { } +func (c DiskSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DiskType_SdkV2{}.ToSchema(cs, append(path, "disk_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DiskSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6513,9 +6802,9 @@ func (o *DiskSpec_SdkV2) SetDiskType(ctx context.Context, v DiskType_SdkV2) { } type DiskType_SdkV2 struct { - AzureDiskVolumeType types.String `tfsdk:"azure_disk_volume_type" tf:"optional"` + AzureDiskVolumeType types.String `tfsdk:"azure_disk_volume_type" tf:""` - EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:"optional"` + EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:""` } func (newState *DiskType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DiskType_SdkV2) { @@ -6524,6 +6813,11 @@ func (newState *DiskType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dis func (newState *DiskType_SdkV2) SyncEffectiveFieldsDuringRead(existingState DiskType_SdkV2) { } +func (c DiskType_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DiskType. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6559,9 +6853,9 @@ func (o DiskType_SdkV2) Type(ctx context.Context) attr.Type { type DockerBasicAuth_SdkV2 struct { // Password of the user - Password types.String `tfsdk:"password" tf:"optional"` + Password types.String `tfsdk:"password" tf:""` // Name of the user - Username types.String `tfsdk:"username" tf:"optional"` + Username types.String `tfsdk:"username" tf:""` } func (newState *DockerBasicAuth_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DockerBasicAuth_SdkV2) { @@ -6570,6 +6864,11 @@ func (newState *DockerBasicAuth_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *DockerBasicAuth_SdkV2) SyncEffectiveFieldsDuringRead(existingState DockerBasicAuth_SdkV2) { } +func (c DockerBasicAuth_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DockerBasicAuth. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6604,9 +6903,9 @@ func (o DockerBasicAuth_SdkV2) Type(ctx context.Context) attr.Type { } type DockerImage_SdkV2 struct { - BasicAuth types.List `tfsdk:"basic_auth" tf:"optional,object"` + BasicAuth types.List `tfsdk:"basic_auth" tf:"object"` // URL of the docker image. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *DockerImage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DockerImage_SdkV2) { @@ -6615,6 +6914,12 @@ func (newState *DockerImage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DockerImage_SdkV2) SyncEffectiveFieldsDuringRead(existingState DockerImage_SdkV2) { } +func (c DockerImage_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DockerBasicAuth_SdkV2{}.ToSchema(cs, append(path, "basic_auth")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DockerImage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6682,23 +6987,23 @@ type EditCluster_SdkV2 struct { // When set to true, fixed and default values from the policy will be used // for fields that are omitted. When set to false, only fixed values from // the policy will be applied. - ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:""` // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.List `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // ID of the cluster ClusterId types.String `tfsdk:"cluster_id" tf:""` // The configuration for delivering spark logs to a long-term storage @@ -6707,10 +7012,10 @@ type EditCluster_SdkV2 struct { // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -6719,7 +7024,7 @@ type EditCluster_SdkV2 struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -6749,39 +7054,39 @@ type EditCluster_SdkV2 struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.List `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -6789,13 +7094,13 @@ type EditCluster_SdkV2 struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -6806,9 +7111,9 @@ type EditCluster_SdkV2 struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -6817,15 +7122,15 @@ type EditCluster_SdkV2 struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -6839,7 +7144,7 @@ type EditCluster_SdkV2 struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. @@ -6847,15 +7152,15 @@ type EditCluster_SdkV2 struct { // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.List `tfsdk:"workload_type" tf:"object"` } func (newState *EditCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditCluster_SdkV2) { @@ -6864,6 +7169,21 @@ func (newState *EditCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EditCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditCluster_SdkV2) { } +func (c EditCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale_SdkV2{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + cs.SetRequired(append(path, "cluster_id")...) + ClusterLogConf_SdkV2{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage_SdkV2{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo_SdkV2{}.ToSchema(cs, append(path, "init_scripts")...) + cs.SetRequired(append(path, "spark_version")...) + WorkloadType_SdkV2{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7313,6 +7633,11 @@ func (newState *EditClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *EditClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditClusterResponse_SdkV2) { } +func (c EditClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7346,7 +7671,7 @@ type EditInstancePool_SdkV2 struct { // addition to `default_tags`. Notes: // // - Currently, Databricks allows at most 45 custom tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -7354,7 +7679,7 @@ type EditInstancePool_SdkV2 struct { // threshold must be between 0 and 10000 minutes. Users can also set this // value to 0 to instantly remove idle instances from the cache if min cache // size could still hold. - IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:""` // Instance pool ID InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // Pool name requested by the user. Pool name must be unique. Length must be @@ -7363,9 +7688,9 @@ type EditInstancePool_SdkV2 struct { // Maximum number of outstanding instances to keep in the pool, including // both instances used by clusters and idle instances. Clusters that require // further instance provisioning will fail during upsize requests. - MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:""` // Minimum number of idle instances to keep in the instance pool - MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A @@ -7380,6 +7705,14 @@ func (newState *EditInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *EditInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditInstancePool_SdkV2) { } +func (c EditInstancePool_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_pool_id")...) + cs.SetRequired(append(path, "instance_pool_name")...) + cs.SetRequired(append(path, "node_type_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditInstancePool. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7462,6 +7795,11 @@ func (newState *EditInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *EditInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditInstancePoolResponse_SdkV2) { } +func (c EditInstancePoolResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditInstancePoolResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7494,18 +7832,18 @@ type EditPolicy_SdkV2 struct { // Definition Language]. // // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - Definition types.String `tfsdk:"definition" tf:"optional"` + Definition types.String `tfsdk:"definition" tf:""` // Additional human-readable description of the cluster policy. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // A list of libraries to be installed on the next cluster restart that uses // this policy. The maximum number of libraries is 500. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Max number of clusters per user that can be active using this policy. If // not present, there is no max limit. - MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:"optional"` + MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:""` // Cluster Policy name requested by the user. This has to be unique. Length // must be between 1 and 100 characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Policy definition JSON document expressed in [Databricks Policy // Definition Language]. The JSON document must be passed as a string and // cannot be embedded in the requests. @@ -7515,14 +7853,14 @@ type EditPolicy_SdkV2 struct { // policy definition. // // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:"optional"` + PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:""` // ID of the policy family. The cluster policy's policy definition inherits // the policy family's policy definition. // // Cannot be used with `definition`. Use // `policy_family_definition_overrides` instead to customize the policy // definition. - PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:""` // The ID of the policy to update. PolicyId types.String `tfsdk:"policy_id" tf:""` } @@ -7533,6 +7871,13 @@ func (newState *EditPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan E func (newState *EditPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPolicy_SdkV2) { } +func (c EditPolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Library_SdkV2{}.ToSchema(cs, append(path, "libraries")...) + cs.SetRequired(append(path, "policy_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7617,7 +7962,12 @@ func (newState *EditPolicyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *EditPolicyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPolicyResponse_SdkV2) { } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPolicyResponse. +func (c EditPolicyResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPolicyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to // retrieve the type information of the elements in complex fields at runtime. The values of the map @@ -7647,12 +7997,6 @@ func (o EditPolicyResponse_SdkV2) Type(ctx context.Context) attr.Type { type EditResponse_SdkV2 struct { } -func (newState *EditResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditResponse_SdkV2) { -} - -func (newState *EditResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7685,7 +8029,7 @@ type EnforceClusterComplianceRequest_SdkV2 struct { ClusterId types.String `tfsdk:"cluster_id" tf:""` // If set, previews the changes that would be made to a cluster to enforce // compliance but does not update the cluster. - ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` + ValidateOnly types.Bool `tfsdk:"validate_only" tf:""` } func (newState *EnforceClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforceClusterComplianceRequest_SdkV2) { @@ -7694,6 +8038,12 @@ func (newState *EnforceClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuring func (newState *EnforceClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforceClusterComplianceRequest_SdkV2) { } +func (c EnforceClusterComplianceRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforceClusterComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7730,10 +8080,10 @@ func (o EnforceClusterComplianceRequest_SdkV2) Type(ctx context.Context) attr.Ty type EnforceClusterComplianceResponse_SdkV2 struct { // A list of changes that have been made to the cluster settings for the // cluster to become compliant with its policy. - Changes types.List `tfsdk:"changes" tf:"optional"` + Changes types.List `tfsdk:"changes" tf:""` // Whether any changes have been made to the cluster settings for the // cluster to become compliant with its policy. - HasChanges types.Bool `tfsdk:"has_changes" tf:"optional"` + HasChanges types.Bool `tfsdk:"has_changes" tf:""` } func (newState *EnforceClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforceClusterComplianceResponse_SdkV2) { @@ -7742,6 +8092,12 @@ func (newState *EnforceClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDurin func (newState *EnforceClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforceClusterComplianceResponse_SdkV2) { } +func (c EnforceClusterComplianceResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterSettingsChange_SdkV2{}.ToSchema(cs, append(path, "changes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforceClusterComplianceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7820,7 +8176,7 @@ type Environment_SdkV2 struct { // dependency could be , , (WSFS or Volumes in Databricks), E.g. // dependencies: ["foo==0.0.1", "-r /Workspace/test/requirements.txt"] - Dependencies types.List `tfsdk:"dependencies" tf:"optional"` + Dependencies types.List `tfsdk:"dependencies" tf:""` } func (newState *Environment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Environment_SdkV2) { @@ -7829,6 +8185,12 @@ func (newState *Environment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *Environment_SdkV2) SyncEffectiveFieldsDuringRead(existingState Environment_SdkV2) { } +func (c Environment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "client")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Environment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7895,52 +8257,52 @@ func (o *Environment_SdkV2) SetDependencies(ctx context.Context, v []types.Strin type EventDetails_SdkV2 struct { // * For created clusters, the attributes of the cluster. * For edited // clusters, the new attributes of the cluster. - Attributes types.List `tfsdk:"attributes" tf:"optional,object"` + Attributes types.List `tfsdk:"attributes" tf:"object"` // The cause of a change in target size. - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` // The actual cluster size that was set in the cluster creation or edit. - ClusterSize types.List `tfsdk:"cluster_size" tf:"optional,object"` + ClusterSize types.List `tfsdk:"cluster_size" tf:"object"` // The current number of vCPUs in the cluster. - CurrentNumVcpus types.Int64 `tfsdk:"current_num_vcpus" tf:"optional"` + CurrentNumVcpus types.Int64 `tfsdk:"current_num_vcpus" tf:""` // The current number of nodes in the cluster. - CurrentNumWorkers types.Int64 `tfsdk:"current_num_workers" tf:"optional"` + CurrentNumWorkers types.Int64 `tfsdk:"current_num_workers" tf:""` // - DidNotExpandReason types.String `tfsdk:"did_not_expand_reason" tf:"optional"` + DidNotExpandReason types.String `tfsdk:"did_not_expand_reason" tf:""` // Current disk size in bytes - DiskSize types.Int64 `tfsdk:"disk_size" tf:"optional"` + DiskSize types.Int64 `tfsdk:"disk_size" tf:""` // More details about the change in driver's state - DriverStateMessage types.String `tfsdk:"driver_state_message" tf:"optional"` + DriverStateMessage types.String `tfsdk:"driver_state_message" tf:""` // Whether or not a blocklisted node should be terminated. For // ClusterEventType NODE_BLACKLISTED. - EnableTerminationForNodeBlocklisted types.Bool `tfsdk:"enable_termination_for_node_blocklisted" tf:"optional"` + EnableTerminationForNodeBlocklisted types.Bool `tfsdk:"enable_termination_for_node_blocklisted" tf:""` // - FreeSpace types.Int64 `tfsdk:"free_space" tf:"optional"` + FreeSpace types.Int64 `tfsdk:"free_space" tf:""` // List of global and cluster init scripts associated with this cluster // event. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional,object"` + InitScripts types.List `tfsdk:"init_scripts" tf:"object"` // Instance Id where the event originated from - InstanceId types.String `tfsdk:"instance_id" tf:"optional"` + InstanceId types.String `tfsdk:"instance_id" tf:""` // Unique identifier of the specific job run associated with this cluster // event * For clusters created for jobs, this will be the same as the // cluster name - JobRunName types.String `tfsdk:"job_run_name" tf:"optional"` + JobRunName types.String `tfsdk:"job_run_name" tf:""` // The cluster attributes before a cluster was edited. - PreviousAttributes types.List `tfsdk:"previous_attributes" tf:"optional,object"` + PreviousAttributes types.List `tfsdk:"previous_attributes" tf:"object"` // The size of the cluster before an edit or resize. - PreviousClusterSize types.List `tfsdk:"previous_cluster_size" tf:"optional,object"` + PreviousClusterSize types.List `tfsdk:"previous_cluster_size" tf:"object"` // Previous disk size in bytes - PreviousDiskSize types.Int64 `tfsdk:"previous_disk_size" tf:"optional"` + PreviousDiskSize types.Int64 `tfsdk:"previous_disk_size" tf:""` // A termination reason: * On a TERMINATED event, this is the reason of the // termination. * On a RESIZE_COMPLETE event, this indicates the reason that // we failed to acquire some nodes. - Reason types.List `tfsdk:"reason" tf:"optional,object"` + Reason types.List `tfsdk:"reason" tf:"object"` // The targeted number of vCPUs in the cluster. - TargetNumVcpus types.Int64 `tfsdk:"target_num_vcpus" tf:"optional"` + TargetNumVcpus types.Int64 `tfsdk:"target_num_vcpus" tf:""` // The targeted number of nodes in the cluster. - TargetNumWorkers types.Int64 `tfsdk:"target_num_workers" tf:"optional"` + TargetNumWorkers types.Int64 `tfsdk:"target_num_workers" tf:""` // The user that caused the event to occur. (Empty if it was done by the // control plane.) - User types.String `tfsdk:"user" tf:"optional"` + User types.String `tfsdk:"user" tf:""` } func (newState *EventDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EventDetails_SdkV2) { @@ -7949,6 +8311,17 @@ func (newState *EventDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EventDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState EventDetails_SdkV2) { } +func (c EventDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAttributes_SdkV2{}.ToSchema(cs, append(path, "attributes")...) + ClusterSize_SdkV2{}.ToSchema(cs, append(path, "cluster_size")...) + InitScriptEventDetails_SdkV2{}.ToSchema(cs, append(path, "init_scripts")...) + ClusterAttributes_SdkV2{}.ToSchema(cs, append(path, "previous_attributes")...) + ClusterSize_SdkV2{}.ToSchema(cs, append(path, "previous_cluster_size")...) + TerminationReason_SdkV2{}.ToSchema(cs, append(path, "reason")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EventDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8197,26 +8570,26 @@ type GcpAttributes_SdkV2 struct { // This field determines whether the instance pool will contain preemptible // VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs // if the former is unavailable. - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // boot disk size in GB - BootDiskSize types.Int64 `tfsdk:"boot_disk_size" tf:"optional"` + BootDiskSize types.Int64 `tfsdk:"boot_disk_size" tf:""` // If provided, the cluster will impersonate the google service account when // accessing gcloud services (like GCS). The google service account must // have previously been added to the Databricks environment by an account // administrator. - GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` + GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:""` // If provided, each node (workers and driver) in the cluster will have this // number of local SSDs attached. Each local SSD is 375GB in size. Refer to // [GCP documentation] for the supported number of local SSDs for each // instance type. // // [GCP documentation]: https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:"optional"` + LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:""` // This field determines whether the spark executors will be scheduled to // run on preemptible VMs (when set to true) versus standard compute engine // VMs (when set to false; default). Note: Soon to be deprecated, use the // availability field instead. - UsePreemptibleExecutors types.Bool `tfsdk:"use_preemptible_executors" tf:"optional"` + UsePreemptibleExecutors types.Bool `tfsdk:"use_preemptible_executors" tf:""` // Identifier for the availability zone in which the cluster resides. This // can be one of the following: - "HA" => High availability, spread nodes // across availability zones for a Databricks deployment region [default] - @@ -8224,7 +8597,7 @@ type GcpAttributes_SdkV2 struct { // on. - A GCP availability zone => Pick One of the available zones for // (machine type + region) from // https://cloud.google.com/compute/docs/regions-zones. - ZoneId types.String `tfsdk:"zone_id" tf:"optional"` + ZoneId types.String `tfsdk:"zone_id" tf:""` } func (newState *GcpAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpAttributes_SdkV2) { @@ -8233,6 +8606,11 @@ func (newState *GcpAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *GcpAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpAttributes_SdkV2) { } +func (c GcpAttributes_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8285,6 +8663,12 @@ func (newState *GcsStorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *GcsStorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcsStorageInfo_SdkV2) { } +func (c GcsStorageInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcsStorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8322,12 +8706,6 @@ type GetClusterComplianceRequest_SdkV2 struct { ClusterId types.String `tfsdk:"-"` } -func (newState *GetClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterComplianceRequest_SdkV2) { -} - -func (newState *GetClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterComplianceRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8363,12 +8741,12 @@ type GetClusterComplianceResponse_SdkV2 struct { // Whether the cluster is compliant with its policy or not. Clusters could // be out of compliance if the policy was updated after the cluster was last // edited. - IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + IsCompliant types.Bool `tfsdk:"is_compliant" tf:""` // An object containing key-value mappings representing the first 200 policy // validation errors. The keys indicate the path where the policy validation // error is occurring. The values indicate an error message describing the // policy validation error. - Violations types.Map `tfsdk:"violations" tf:"optional"` + Violations types.Map `tfsdk:"violations" tf:""` } func (newState *GetClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterComplianceResponse_SdkV2) { @@ -8377,6 +8755,11 @@ func (newState *GetClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *GetClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterComplianceResponse_SdkV2) { } +func (c GetClusterComplianceResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterComplianceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8446,12 +8829,6 @@ type GetClusterPermissionLevelsRequest_SdkV2 struct { ClusterId types.String `tfsdk:"-"` } -func (newState *GetClusterPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetClusterPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8485,7 +8862,7 @@ func (o GetClusterPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr. type GetClusterPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetClusterPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPermissionLevelsResponse_SdkV2) { @@ -8494,6 +8871,12 @@ func (newState *GetClusterPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDur func (newState *GetClusterPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPermissionLevelsResponse_SdkV2) { } +func (c GetClusterPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8561,12 +8944,6 @@ type GetClusterPermissionsRequest_SdkV2 struct { ClusterId types.String `tfsdk:"-"` } -func (newState *GetClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPermissionsRequest_SdkV2) { -} - -func (newState *GetClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8604,12 +8981,6 @@ type GetClusterPolicyPermissionLevelsRequest_SdkV2 struct { ClusterPolicyId types.String `tfsdk:"-"` } -func (newState *GetClusterPolicyPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetClusterPolicyPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8643,7 +9014,7 @@ func (o GetClusterPolicyPermissionLevelsRequest_SdkV2) Type(ctx context.Context) type GetClusterPolicyPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetClusterPolicyPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyPermissionLevelsResponse_SdkV2) { @@ -8652,6 +9023,12 @@ func (newState *GetClusterPolicyPermissionLevelsResponse_SdkV2) SyncEffectiveFie func (newState *GetClusterPolicyPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyPermissionLevelsResponse_SdkV2) { } +func (c GetClusterPolicyPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPolicyPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8719,12 +9096,6 @@ type GetClusterPolicyPermissionsRequest_SdkV2 struct { ClusterPolicyId types.String `tfsdk:"-"` } -func (newState *GetClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyPermissionsRequest_SdkV2) { -} - -func (newState *GetClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8762,12 +9133,6 @@ type GetClusterPolicyRequest_SdkV2 struct { PolicyId types.String `tfsdk:"-"` } -func (newState *GetClusterPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyRequest_SdkV2) { -} - -func (newState *GetClusterPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8805,12 +9170,6 @@ type GetClusterRequest_SdkV2 struct { ClusterId types.String `tfsdk:"-"` } -func (newState *GetClusterRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterRequest_SdkV2) { -} - -func (newState *GetClusterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8847,22 +9206,22 @@ type GetEvents_SdkV2 struct { ClusterId types.String `tfsdk:"cluster_id" tf:""` // The end time in epoch milliseconds. If empty, returns events up to the // current time. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // An optional set of event types to filter on. If empty, all event types // are returned. - EventTypes types.List `tfsdk:"event_types" tf:"optional"` + EventTypes types.List `tfsdk:"event_types" tf:""` // The maximum number of events to include in a page of events. Defaults to // 50, and maximum allowed value is 500. - Limit types.Int64 `tfsdk:"limit" tf:"optional"` + Limit types.Int64 `tfsdk:"limit" tf:""` // The offset in the result set. Defaults to 0 (no offset). When an offset // is specified and the results are requested in descending order, the // end_time field is required. - Offset types.Int64 `tfsdk:"offset" tf:"optional"` + Offset types.Int64 `tfsdk:"offset" tf:""` // The order to list events in; either "ASC" or "DESC". Defaults to "DESC". - Order types.String `tfsdk:"order" tf:"optional"` + Order types.String `tfsdk:"order" tf:""` // The start time in epoch milliseconds. If empty, returns events starting // from the beginning of time. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` } func (newState *GetEvents_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEvents_SdkV2) { @@ -8871,6 +9230,12 @@ func (newState *GetEvents_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ge func (newState *GetEvents_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEvents_SdkV2) { } +func (c GetEvents_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEvents. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8946,13 +9311,13 @@ func (o *GetEvents_SdkV2) SetEventTypes(ctx context.Context, v []types.String) { type GetEventsResponse_SdkV2 struct { // - Events types.List `tfsdk:"events" tf:"optional"` + Events types.List `tfsdk:"events" tf:""` // The parameters required to retrieve the next page of events. Omitted if // there are no more events to read. - NextPage types.List `tfsdk:"next_page" tf:"optional,object"` + NextPage types.List `tfsdk:"next_page" tf:"object"` // The total number of events filtered by the start_time, end_time, and // event_types. - TotalCount types.Int64 `tfsdk:"total_count" tf:"optional"` + TotalCount types.Int64 `tfsdk:"total_count" tf:""` } func (newState *GetEventsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEventsResponse_SdkV2) { @@ -8961,6 +9326,13 @@ func (newState *GetEventsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *GetEventsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEventsResponse_SdkV2) { } +func (c GetEventsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterEvent_SdkV2{}.ToSchema(cs, append(path, "events")...) + GetEvents_SdkV2{}.ToSchema(cs, append(path, "next_page")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEventsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9061,12 +9433,6 @@ type GetGlobalInitScriptRequest_SdkV2 struct { ScriptId types.String `tfsdk:"-"` } -func (newState *GetGlobalInitScriptRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetGlobalInitScriptRequest_SdkV2) { -} - -func (newState *GetGlobalInitScriptRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetGlobalInitScriptRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetGlobalInitScriptRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9101,16 +9467,16 @@ func (o GetGlobalInitScriptRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetInstancePool_SdkV2 struct { // Attributes related to instance pools running on Amazon Web Services. If // not specified at pool creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to instance pools running on Azure. If not specified // at pool creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // Additional tags for pool resources. Databricks will tag all pool // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: // // - Currently, Databricks allows at most 45 custom tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Tags that are added by Databricks regardless of any `custom_tags`, // including: // @@ -9121,19 +9487,19 @@ type GetInstancePool_SdkV2 struct { // - InstancePoolName: // // - InstancePoolId: - DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` + DefaultTags types.Map `tfsdk:"default_tags" tf:""` // Defines the specification of the disks that will be attached to all spark // containers. - DiskSpec types.List `tfsdk:"disk_spec" tf:"optional,object"` + DiskSpec types.List `tfsdk:"disk_spec" tf:"object"` // Autoscaling Local Storage: when enabled, this instances in this pool will // dynamically acquire additional disk space when its Spark workers are // running low on disk space. In AWS, this feature requires specific AWS // permissions to function correctly - refer to the User Guide for more // details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Attributes related to instance pools running on Google Cloud Platform. If // not specified at pool creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -9141,37 +9507,37 @@ type GetInstancePool_SdkV2 struct { // threshold must be between 0 and 10000 minutes. Users can also set this // value to 0 to instantly remove idle instances from the cache if min cache // size could still hold. - IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:""` // Canonical unique identifier for the pool. InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // Pool name requested by the user. Pool name must be unique. Length must be // between 1 and 100 characters. - InstancePoolName types.String `tfsdk:"instance_pool_name" tf:"optional"` + InstancePoolName types.String `tfsdk:"instance_pool_name" tf:""` // Maximum number of outstanding instances to keep in the pool, including // both instances used by clusters and idle instances. Clusters that require // further instance provisioning will fail during upsize requests. - MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:""` // Minimum number of idle instances to keep in the instance pool - MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Custom Docker Image BYOC - PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:"optional"` + PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:""` // A list containing at most one preloaded Spark image version for the pool. // Pool-backed clusters started with the preloaded Spark version will start // faster. A list of available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:"optional"` + PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:""` // Current state of the instance pool. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Usage statistics about the instance pool. - Stats types.List `tfsdk:"stats" tf:"optional,object"` + Stats types.List `tfsdk:"stats" tf:"object"` // Status of failed pending instances in the pool. - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.List `tfsdk:"status" tf:"object"` } func (newState *GetInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePool_SdkV2) { @@ -9180,6 +9546,19 @@ func (newState *GetInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *GetInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePool_SdkV2) { } +func (c GetInstancePool_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + InstancePoolAzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + DiskSpec_SdkV2{}.ToSchema(cs, append(path, "disk_spec")...) + InstancePoolGcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + cs.SetRequired(append(path, "instance_pool_id")...) + DockerImage_SdkV2{}.ToSchema(cs, append(path, "preloaded_docker_images")...) + InstancePoolStats_SdkV2{}.ToSchema(cs, append(path, "stats")...) + InstancePoolStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePool. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9542,12 +9921,6 @@ type GetInstancePoolPermissionLevelsRequest_SdkV2 struct { InstancePoolId types.String `tfsdk:"-"` } -func (newState *GetInstancePoolPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetInstancePoolPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9581,7 +9954,7 @@ func (o GetInstancePoolPermissionLevelsRequest_SdkV2) Type(ctx context.Context) type GetInstancePoolPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetInstancePoolPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolPermissionLevelsResponse_SdkV2) { @@ -9590,6 +9963,12 @@ func (newState *GetInstancePoolPermissionLevelsResponse_SdkV2) SyncEffectiveFiel func (newState *GetInstancePoolPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolPermissionLevelsResponse_SdkV2) { } +func (c GetInstancePoolPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9657,12 +10036,6 @@ type GetInstancePoolPermissionsRequest_SdkV2 struct { InstancePoolId types.String `tfsdk:"-"` } -func (newState *GetInstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolPermissionsRequest_SdkV2) { -} - -func (newState *GetInstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9700,12 +10073,6 @@ type GetInstancePoolRequest_SdkV2 struct { InstancePoolId types.String `tfsdk:"-"` } -func (newState *GetInstancePoolRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolRequest_SdkV2) { -} - -func (newState *GetInstancePoolRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9746,12 +10113,6 @@ type GetPolicyFamilyRequest_SdkV2 struct { Version types.Int64 `tfsdk:"-"` } -func (newState *GetPolicyFamilyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPolicyFamilyRequest_SdkV2) { -} - -func (newState *GetPolicyFamilyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPolicyFamilyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPolicyFamilyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9787,7 +10148,7 @@ func (o GetPolicyFamilyRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetSparkVersionsResponse_SdkV2 struct { // All the available Spark versions. - Versions types.List `tfsdk:"versions" tf:"optional"` + Versions types.List `tfsdk:"versions" tf:""` } func (newState *GetSparkVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSparkVersionsResponse_SdkV2) { @@ -9796,6 +10157,12 @@ func (newState *GetSparkVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *GetSparkVersionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSparkVersionsResponse_SdkV2) { } +func (c GetSparkVersionsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparkVersion_SdkV2{}.ToSchema(cs, append(path, "versions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSparkVersionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9859,7 +10226,7 @@ func (o *GetSparkVersionsResponse_SdkV2) SetVersions(ctx context.Context, v []Sp type GlobalInitScriptCreateRequest_SdkV2 struct { // Specifies whether the script is enabled. The script runs only if enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the script Name types.String `tfsdk:"name" tf:""` // The position of a global init script, where 0 represents the first script @@ -9873,7 +10240,7 @@ type GlobalInitScriptCreateRequest_SdkV2 struct { // position. If an explicit position value conflicts with an existing script // value, your request succeeds, but the original script at that position // and all later scripts have their positions incremented by 1. - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The Base64-encoded content of the script. Script types.String `tfsdk:"script" tf:""` } @@ -9884,6 +10251,13 @@ func (newState *GlobalInitScriptCreateRequest_SdkV2) SyncEffectiveFieldsDuringCr func (newState *GlobalInitScriptCreateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptCreateRequest_SdkV2) { } +func (c GlobalInitScriptCreateRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "script")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptCreateRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9924,23 +10298,23 @@ func (o GlobalInitScriptCreateRequest_SdkV2) Type(ctx context.Context) attr.Type type GlobalInitScriptDetails_SdkV2 struct { // Time when the script was created, represented as a Unix timestamp in // milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The username of the user who created the script. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Specifies whether the script is enabled. The script runs only if enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the script - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The position of a script, where 0 represents the first script to run, 1 // is the second script to run, in ascending order. - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The global init script ID. - ScriptId types.String `tfsdk:"script_id" tf:"optional"` + ScriptId types.String `tfsdk:"script_id" tf:""` // Time when the script was updated, represented as a Unix timestamp in // milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The username of the user who last updated the script - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *GlobalInitScriptDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptDetails_SdkV2) { @@ -9949,6 +10323,11 @@ func (newState *GlobalInitScriptDetails_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *GlobalInitScriptDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptDetails_SdkV2) { } +func (c GlobalInitScriptDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9997,25 +10376,25 @@ func (o GlobalInitScriptDetails_SdkV2) Type(ctx context.Context) attr.Type { type GlobalInitScriptDetailsWithContent_SdkV2 struct { // Time when the script was created, represented as a Unix timestamp in // milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The username of the user who created the script. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Specifies whether the script is enabled. The script runs only if enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the script - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The position of a script, where 0 represents the first script to run, 1 // is the second script to run, in ascending order. - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The Base64-encoded content of the script. - Script types.String `tfsdk:"script" tf:"optional"` + Script types.String `tfsdk:"script" tf:""` // The global init script ID. - ScriptId types.String `tfsdk:"script_id" tf:"optional"` + ScriptId types.String `tfsdk:"script_id" tf:""` // Time when the script was updated, represented as a Unix timestamp in // milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The username of the user who last updated the script - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *GlobalInitScriptDetailsWithContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptDetailsWithContent_SdkV2) { @@ -10024,6 +10403,11 @@ func (newState *GlobalInitScriptDetailsWithContent_SdkV2) SyncEffectiveFieldsDur func (newState *GlobalInitScriptDetailsWithContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptDetailsWithContent_SdkV2) { } +func (c GlobalInitScriptDetailsWithContent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptDetailsWithContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10073,7 +10457,7 @@ func (o GlobalInitScriptDetailsWithContent_SdkV2) Type(ctx context.Context) attr type GlobalInitScriptUpdateRequest_SdkV2 struct { // Specifies whether the script is enabled. The script runs only if enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the script Name types.String `tfsdk:"name" tf:""` // The position of a script, where 0 represents the first script to run, 1 @@ -10088,7 +10472,7 @@ type GlobalInitScriptUpdateRequest_SdkV2 struct { // If an explicit position value conflicts with an existing script, your // request succeeds, but the original script at that position and all later // scripts have their positions incremented by 1. - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The Base64-encoded content of the script. Script types.String `tfsdk:"script" tf:""` // The ID of the global init script. @@ -10101,6 +10485,14 @@ func (newState *GlobalInitScriptUpdateRequest_SdkV2) SyncEffectiveFieldsDuringCr func (newState *GlobalInitScriptUpdateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptUpdateRequest_SdkV2) { } +func (c GlobalInitScriptUpdateRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "script")...) + cs.SetRequired(append(path, "script_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptUpdateRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10142,11 +10534,11 @@ func (o GlobalInitScriptUpdateRequest_SdkV2) Type(ctx context.Context) attr.Type type InitScriptEventDetails_SdkV2 struct { // The cluster scoped init scripts associated with this cluster event - Cluster types.List `tfsdk:"cluster" tf:"optional"` + Cluster types.List `tfsdk:"cluster" tf:""` // The global init scripts associated with this cluster event - Global types.List `tfsdk:"global" tf:"optional"` + Global types.List `tfsdk:"global" tf:""` // The private ip address of the node where the init scripts were run. - ReportedForNode types.String `tfsdk:"reported_for_node" tf:"optional"` + ReportedForNode types.String `tfsdk:"reported_for_node" tf:""` } func (newState *InitScriptEventDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptEventDetails_SdkV2) { @@ -10155,6 +10547,13 @@ func (newState *InitScriptEventDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *InitScriptEventDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState InitScriptEventDetails_SdkV2) { } +func (c InitScriptEventDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InitScriptInfoAndExecutionDetails_SdkV2{}.ToSchema(cs, append(path, "cluster")...) + InitScriptInfoAndExecutionDetails_SdkV2{}.ToSchema(cs, append(path, "global")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptEventDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10251,11 +10650,11 @@ func (o *InitScriptEventDetails_SdkV2) SetGlobal(ctx context.Context, v []InitSc type InitScriptExecutionDetails_SdkV2 struct { // Addition details regarding errors. - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` // The duration of the script execution in seconds. - ExecutionDurationSeconds types.Int64 `tfsdk:"execution_duration_seconds" tf:"optional"` + ExecutionDurationSeconds types.Int64 `tfsdk:"execution_duration_seconds" tf:""` // The current status of the script - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *InitScriptExecutionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptExecutionDetails_SdkV2) { @@ -10264,6 +10663,11 @@ func (newState *InitScriptExecutionDetails_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *InitScriptExecutionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState InitScriptExecutionDetails_SdkV2) { } +func (c InitScriptExecutionDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptExecutionDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10303,28 +10707,28 @@ type InitScriptInfo_SdkV2 struct { // destination needs to be provided. e.g. `{ "abfss" : { "destination" : // "abfss://@.dfs.core.windows.net/" // } } - Abfss types.List `tfsdk:"abfss" tf:"optional,object"` + Abfss types.List `tfsdk:"abfss" tf:"object"` // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : // "dbfs:/home/cluster_log" } }` - Dbfs types.List `tfsdk:"dbfs" tf:"optional,object"` + Dbfs types.List `tfsdk:"dbfs" tf:"object"` // destination needs to be provided. e.g. `{ "file" : { "destination" : // "file:/my/local/file.sh" } }` - File types.List `tfsdk:"file" tf:"optional,object"` + File types.List `tfsdk:"file" tf:"object"` // destination needs to be provided. e.g. `{ "gcs": { "destination": // "gs://my-bucket/file.sh" } }` - Gcs types.List `tfsdk:"gcs" tf:"optional,object"` + Gcs types.List `tfsdk:"gcs" tf:"object"` // destination and either the region or endpoint need to be provided. e.g. // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : // "us-west-2" } }` Cluster iam role is used to access s3, please make sure // the cluster iam role in `instance_profile_arn` has permission to write // data to the s3 destination. - S3 types.List `tfsdk:"s3" tf:"optional,object"` + S3 types.List `tfsdk:"s3" tf:"object"` // destination needs to be provided. e.g. `{ "volumes" : { "destination" : // "/Volumes/my-init.sh" } }` - Volumes types.List `tfsdk:"volumes" tf:"optional,object"` + Volumes types.List `tfsdk:"volumes" tf:"object"` // destination needs to be provided. e.g. `{ "workspace" : { "destination" : // "/Users/user1@databricks.com/my-init.sh" } }` - Workspace types.List `tfsdk:"workspace" tf:"optional,object"` + Workspace types.List `tfsdk:"workspace" tf:"object"` } func (newState *InitScriptInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptInfo_SdkV2) { @@ -10333,6 +10737,18 @@ func (newState *InitScriptInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *InitScriptInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState InitScriptInfo_SdkV2) { } +func (c InitScriptInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Adlsgen2Info_SdkV2{}.ToSchema(cs, append(path, "abfss")...) + DbfsStorageInfo_SdkV2{}.ToSchema(cs, append(path, "dbfs")...) + LocalFileInfo_SdkV2{}.ToSchema(cs, append(path, "file")...) + GcsStorageInfo_SdkV2{}.ToSchema(cs, append(path, "gcs")...) + S3StorageInfo_SdkV2{}.ToSchema(cs, append(path, "s3")...) + VolumesStorageInfo_SdkV2{}.ToSchema(cs, append(path, "volumes")...) + WorkspaceStorageInfo_SdkV2{}.ToSchema(cs, append(path, "workspace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10582,9 +10998,9 @@ func (o *InitScriptInfo_SdkV2) SetWorkspace(ctx context.Context, v WorkspaceStor type InitScriptInfoAndExecutionDetails_SdkV2 struct { // Details about the script - ExecutionDetails types.List `tfsdk:"execution_details" tf:"optional,object"` + ExecutionDetails types.List `tfsdk:"execution_details" tf:"object"` // The script - Script types.List `tfsdk:"script" tf:"optional,object"` + Script types.List `tfsdk:"script" tf:"object"` } func (newState *InitScriptInfoAndExecutionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptInfoAndExecutionDetails_SdkV2) { @@ -10593,6 +11009,13 @@ func (newState *InitScriptInfoAndExecutionDetails_SdkV2) SyncEffectiveFieldsDuri func (newState *InitScriptInfoAndExecutionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState InitScriptInfoAndExecutionDetails_SdkV2) { } +func (c InitScriptInfoAndExecutionDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InitScriptExecutionDetails_SdkV2{}.ToSchema(cs, append(path, "execution_details")...) + InitScriptInfo_SdkV2{}.ToSchema(cs, append(path, "script")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptInfoAndExecutionDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10698,6 +11121,14 @@ func (newState *InstallLibraries_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *InstallLibraries_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstallLibraries_SdkV2) { } +func (c InstallLibraries_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + cs.SetRequired(append(path, "libraries")...) + Library_SdkV2{}.ToSchema(cs, append(path, "libraries")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstallLibraries. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10770,6 +11201,11 @@ func (newState *InstallLibrariesResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *InstallLibrariesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstallLibrariesResponse_SdkV2) { } +func (c InstallLibrariesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstallLibrariesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10799,13 +11235,13 @@ func (o InstallLibrariesResponse_SdkV2) Type(ctx context.Context) attr.Type { type InstancePoolAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *InstancePoolAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAccessControlRequest_SdkV2) { @@ -10814,6 +11250,11 @@ func (newState *InstancePoolAccessControlRequest_SdkV2) SyncEffectiveFieldsDurin func (newState *InstancePoolAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAccessControlRequest_SdkV2) { } +func (c InstancePoolAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10853,15 +11294,15 @@ func (o InstancePoolAccessControlRequest_SdkV2) Type(ctx context.Context) attr.T type InstancePoolAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *InstancePoolAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAccessControlResponse_SdkV2) { @@ -10870,6 +11311,12 @@ func (newState *InstancePoolAccessControlResponse_SdkV2) SyncEffectiveFieldsDuri func (newState *InstancePoolAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAccessControlResponse_SdkV2) { } +func (c InstancePoolAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10942,16 +11389,16 @@ func (o *InstancePoolAccessControlResponse_SdkV2) SetAllPermissions(ctx context. type InstancePoolAndStats_SdkV2 struct { // Attributes related to instance pools running on Amazon Web Services. If // not specified at pool creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to instance pools running on Azure. If not specified // at pool creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // Additional tags for pool resources. Databricks will tag all pool // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: // // - Currently, Databricks allows at most 45 custom tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Tags that are added by Databricks regardless of any `custom_tags`, // including: // @@ -10962,19 +11409,19 @@ type InstancePoolAndStats_SdkV2 struct { // - InstancePoolName: // // - InstancePoolId: - DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` + DefaultTags types.Map `tfsdk:"default_tags" tf:""` // Defines the specification of the disks that will be attached to all spark // containers. - DiskSpec types.List `tfsdk:"disk_spec" tf:"optional,object"` + DiskSpec types.List `tfsdk:"disk_spec" tf:"object"` // Autoscaling Local Storage: when enabled, this instances in this pool will // dynamically acquire additional disk space when its Spark workers are // running low on disk space. In AWS, this feature requires specific AWS // permissions to function correctly - refer to the User Guide for more // details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Attributes related to instance pools running on Google Cloud Platform. If // not specified at pool creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -10982,37 +11429,37 @@ type InstancePoolAndStats_SdkV2 struct { // threshold must be between 0 and 10000 minutes. Users can also set this // value to 0 to instantly remove idle instances from the cache if min cache // size could still hold. - IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:""` // Canonical unique identifier for the pool. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // Pool name requested by the user. Pool name must be unique. Length must be // between 1 and 100 characters. - InstancePoolName types.String `tfsdk:"instance_pool_name" tf:"optional"` + InstancePoolName types.String `tfsdk:"instance_pool_name" tf:""` // Maximum number of outstanding instances to keep in the pool, including // both instances used by clusters and idle instances. Clusters that require // further instance provisioning will fail during upsize requests. - MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:""` // Minimum number of idle instances to keep in the instance pool - MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Custom Docker Image BYOC - PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:"optional"` + PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:""` // A list containing at most one preloaded Spark image version for the pool. // Pool-backed clusters started with the preloaded Spark version will start // faster. A list of available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:"optional"` + PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:""` // Current state of the instance pool. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Usage statistics about the instance pool. - Stats types.List `tfsdk:"stats" tf:"optional,object"` + Stats types.List `tfsdk:"stats" tf:"object"` // Status of failed pending instances in the pool. - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.List `tfsdk:"status" tf:"object"` } func (newState *InstancePoolAndStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAndStats_SdkV2) { @@ -11021,6 +11468,18 @@ func (newState *InstancePoolAndStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *InstancePoolAndStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAndStats_SdkV2) { } +func (c InstancePoolAndStats_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + InstancePoolAzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + DiskSpec_SdkV2{}.ToSchema(cs, append(path, "disk_spec")...) + InstancePoolGcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + DockerImage_SdkV2{}.ToSchema(cs, append(path, "preloaded_docker_images")...) + InstancePoolStats_SdkV2{}.ToSchema(cs, append(path, "stats")...) + InstancePoolStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAndStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11382,7 +11841,7 @@ type InstancePoolAwsAttributes_SdkV2 struct { // // The default value is defined by // InstancePoolConf.instancePoolDefaultAwsAvailability - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // Calculates the bid price for AWS spot instances, as a percentage of the // corresponding instance type's on-demand price. For example, if this field // is set to 50, and the cluster needs a new `r3.xlarge` spot instance, then @@ -11397,7 +11856,7 @@ type InstancePoolAwsAttributes_SdkV2 struct { // The default value and documentation here should be kept consistent with // CommonConf.defaultSpotBidPricePercent and // CommonConf.maxSpotBidPricePercent. - SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:"optional"` + SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:""` // Identifier for the availability zone/datacenter in which the cluster // resides. This string will be of a form like "us-west-2a". The provided // availability zone must be in the same region as the Databricks @@ -11406,7 +11865,7 @@ type InstancePoolAwsAttributes_SdkV2 struct { // optional field at cluster creation, and if not specified, a default zone // will be used. The list of available zones as well as the default value // can be found by using the `List Zones` method. - ZoneId types.String `tfsdk:"zone_id" tf:"optional"` + ZoneId types.String `tfsdk:"zone_id" tf:""` } func (newState *InstancePoolAwsAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAwsAttributes_SdkV2) { @@ -11415,6 +11874,11 @@ func (newState *InstancePoolAwsAttributes_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *InstancePoolAwsAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAwsAttributes_SdkV2) { } +func (c InstancePoolAwsAttributes_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAwsAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11455,10 +11919,10 @@ type InstancePoolAzureAttributes_SdkV2 struct { // // The default value is defined by // InstancePoolConf.instancePoolDefaultAzureAvailability - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // The default value and documentation here should be kept consistent with // CommonConf.defaultSpotBidMaxPrice. - SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:"optional"` + SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:""` } func (newState *InstancePoolAzureAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAzureAttributes_SdkV2) { @@ -11467,6 +11931,11 @@ func (newState *InstancePoolAzureAttributes_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *InstancePoolAzureAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAzureAttributes_SdkV2) { } +func (c InstancePoolAzureAttributes_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAzureAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11504,14 +11973,14 @@ type InstancePoolGcpAttributes_SdkV2 struct { // This field determines whether the instance pool will contain preemptible // VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs // if the former is unavailable. - GcpAvailability types.String `tfsdk:"gcp_availability" tf:"optional"` + GcpAvailability types.String `tfsdk:"gcp_availability" tf:""` // If provided, each node in the instance pool will have this number of // local SSDs attached. Each local SSD is 375GB in size. Refer to [GCP // documentation] for the supported number of local SSDs for each instance // type. // // [GCP documentation]: https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:"optional"` + LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:""` // Identifier for the availability zone/datacenter in which the cluster // resides. This string will be of a form like "us-west1-a". The provided // availability zone must be in the same region as the Databricks workspace. @@ -11528,7 +11997,7 @@ type InstancePoolGcpAttributes_SdkV2 struct { // // If empty, Databricks picks an availability zone to schedule the cluster // on. - ZoneId types.String `tfsdk:"zone_id" tf:"optional"` + ZoneId types.String `tfsdk:"zone_id" tf:""` } func (newState *InstancePoolGcpAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolGcpAttributes_SdkV2) { @@ -11537,6 +12006,11 @@ func (newState *InstancePoolGcpAttributes_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *InstancePoolGcpAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolGcpAttributes_SdkV2) { } +func (c InstancePoolGcpAttributes_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolGcpAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11573,11 +12047,11 @@ func (o InstancePoolGcpAttributes_SdkV2) Type(ctx context.Context) attr.Type { } type InstancePoolPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *InstancePoolPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermission_SdkV2) { @@ -11586,6 +12060,11 @@ func (newState *InstancePoolPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *InstancePoolPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermission_SdkV2) { } +func (c InstancePoolPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11652,11 +12131,11 @@ func (o *InstancePoolPermission_SdkV2) SetInheritedFromObject(ctx context.Contex } type InstancePoolPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *InstancePoolPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermissions_SdkV2) { @@ -11665,6 +12144,12 @@ func (newState *InstancePoolPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *InstancePoolPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissions_SdkV2) { } +func (c InstancePoolPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11731,9 +12216,9 @@ func (o *InstancePoolPermissions_SdkV2) SetAccessControlList(ctx context.Context } type InstancePoolPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *InstancePoolPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermissionsDescription_SdkV2) { @@ -11742,6 +12227,11 @@ func (newState *InstancePoolPermissionsDescription_SdkV2) SyncEffectiveFieldsDur func (newState *InstancePoolPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissionsDescription_SdkV2) { } +func (c InstancePoolPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11776,7 +12266,7 @@ func (o InstancePoolPermissionsDescription_SdkV2) Type(ctx context.Context) attr } type InstancePoolPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The instance pool for which to get or manage permissions. InstancePoolId types.String `tfsdk:"-"` } @@ -11787,6 +12277,13 @@ func (newState *InstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringC func (newState *InstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissionsRequest_SdkV2) { } +func (c InstancePoolPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "instance_pool_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11852,13 +12349,13 @@ func (o *InstancePoolPermissionsRequest_SdkV2) SetAccessControlList(ctx context. type InstancePoolStats_SdkV2 struct { // Number of active instances in the pool that are NOT part of a cluster. - IdleCount types.Int64 `tfsdk:"idle_count" tf:"optional"` + IdleCount types.Int64 `tfsdk:"idle_count" tf:""` // Number of pending instances in the pool that are NOT part of a cluster. - PendingIdleCount types.Int64 `tfsdk:"pending_idle_count" tf:"optional"` + PendingIdleCount types.Int64 `tfsdk:"pending_idle_count" tf:""` // Number of pending instances in the pool that are part of a cluster. - PendingUsedCount types.Int64 `tfsdk:"pending_used_count" tf:"optional"` + PendingUsedCount types.Int64 `tfsdk:"pending_used_count" tf:""` // Number of active instances in the pool that are part of a cluster. - UsedCount types.Int64 `tfsdk:"used_count" tf:"optional"` + UsedCount types.Int64 `tfsdk:"used_count" tf:""` } func (newState *InstancePoolStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolStats_SdkV2) { @@ -11867,6 +12364,11 @@ func (newState *InstancePoolStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *InstancePoolStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolStats_SdkV2) { } +func (c InstancePoolStats_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11909,7 +12411,7 @@ type InstancePoolStatus_SdkV2 struct { // pending_instance_errors follows FIFO with maximum length of the min_idle // of the pool. The pending_instance_errors is emptied once the number of // exiting available instances reaches the min_idle of the pool. - PendingInstanceErrors types.List `tfsdk:"pending_instance_errors" tf:"optional"` + PendingInstanceErrors types.List `tfsdk:"pending_instance_errors" tf:""` } func (newState *InstancePoolStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolStatus_SdkV2) { @@ -11918,6 +12420,12 @@ func (newState *InstancePoolStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *InstancePoolStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolStatus_SdkV2) { } +func (c InstancePoolStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PendingInstanceError_SdkV2{}.ToSchema(cs, append(path, "pending_instance_errors")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11988,7 +12496,7 @@ type InstanceProfile_SdkV2 struct { // Otherwise, this field is optional. // // [Databricks SQL Serverless]: https://docs.databricks.com/sql/admin/serverless.html - IamRoleArn types.String `tfsdk:"iam_role_arn" tf:"optional"` + IamRoleArn types.String `tfsdk:"iam_role_arn" tf:""` // The AWS ARN of the instance profile to register with Databricks. This // field is required. InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` @@ -11997,7 +12505,7 @@ type InstanceProfile_SdkV2 struct { // profile contains an meta IAM role which could assume a wide range of // roles. Therefore it should always be used with authorization. This field // is optional, the default value is `false`. - IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:"optional"` + IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:""` } func (newState *InstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstanceProfile_SdkV2) { @@ -12006,6 +12514,12 @@ func (newState *InstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *InstanceProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstanceProfile_SdkV2) { } +func (c InstanceProfile_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_profile_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstanceProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12043,11 +12557,11 @@ func (o InstanceProfile_SdkV2) Type(ctx context.Context) attr.Type { type Library_SdkV2 struct { // Specification of a CRAN library to be installed as part of the library - Cran types.List `tfsdk:"cran" tf:"optional,object"` + Cran types.List `tfsdk:"cran" tf:"object"` // Deprecated. URI of the egg library to install. Installing Python egg // files is deprecated and is not supported in Databricks Runtime 14.0 and // above. - Egg types.String `tfsdk:"egg" tf:"optional"` + Egg types.String `tfsdk:"egg" tf:""` // URI of the JAR library to install. Supported URIs include Workspace // paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "jar": // "/Workspace/path/to/library.jar" }`, `{ "jar" : @@ -12055,18 +12569,18 @@ type Library_SdkV2 struct { // "s3://my-bucket/library.jar" }`. If S3 is used, please make sure the // cluster has read access on the library. You may need to launch the // cluster with an IAM role to access the S3 URI. - Jar types.String `tfsdk:"jar" tf:"optional"` + Jar types.String `tfsdk:"jar" tf:""` // Specification of a maven library to be installed. For example: `{ // "coordinates": "org.jsoup:jsoup:1.7.2" }` - Maven types.List `tfsdk:"maven" tf:"optional,object"` + Maven types.List `tfsdk:"maven" tf:"object"` // Specification of a PyPi library to be installed. For example: `{ // "package": "simplejson" }` - Pypi types.List `tfsdk:"pypi" tf:"optional,object"` + Pypi types.List `tfsdk:"pypi" tf:"object"` // URI of the requirements.txt file to install. Only Workspace paths and // Unity Catalog Volumes paths are supported. For example: `{ // "requirements": "/Workspace/path/to/requirements.txt" }` or `{ // "requirements" : "/Volumes/path/to/requirements.txt" }` - Requirements types.String `tfsdk:"requirements" tf:"optional"` + Requirements types.String `tfsdk:"requirements" tf:""` // URI of the wheel library to install. Supported URIs include Workspace // paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "whl": // "/Workspace/path/to/library.whl" }`, `{ "whl" : @@ -12074,7 +12588,7 @@ type Library_SdkV2 struct { // "s3://my-bucket/library.whl" }`. If S3 is used, please make sure the // cluster has read access on the library. You may need to launch the // cluster with an IAM role to access the S3 URI. - Whl types.String `tfsdk:"whl" tf:"optional"` + Whl types.String `tfsdk:"whl" tf:""` } func (newState *Library_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Library_SdkV2) { @@ -12083,6 +12597,14 @@ func (newState *Library_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Libr func (newState *Library_SdkV2) SyncEffectiveFieldsDuringRead(existingState Library_SdkV2) { } +func (c Library_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RCranLibrary_SdkV2{}.ToSchema(cs, append(path, "cran")...) + MavenLibrary_SdkV2{}.ToSchema(cs, append(path, "maven")...) + PythonPyPiLibrary_SdkV2{}.ToSchema(cs, append(path, "pypi")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Library. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12218,14 +12740,14 @@ func (o *Library_SdkV2) SetPypi(ctx context.Context, v PythonPyPiLibrary_SdkV2) type LibraryFullStatus_SdkV2 struct { // Whether the library was set to be installed on all clusters via the // libraries UI. - IsLibraryForAllClusters types.Bool `tfsdk:"is_library_for_all_clusters" tf:"optional"` + IsLibraryForAllClusters types.Bool `tfsdk:"is_library_for_all_clusters" tf:""` // Unique identifier for the library. - Library types.List `tfsdk:"library" tf:"optional,object"` + Library types.List `tfsdk:"library" tf:"object"` // All the info and warning messages that have occurred so far for this // library. - Messages types.List `tfsdk:"messages" tf:"optional"` + Messages types.List `tfsdk:"messages" tf:""` // Status of installing the library on the cluster. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *LibraryFullStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LibraryFullStatus_SdkV2) { @@ -12234,6 +12756,12 @@ func (newState *LibraryFullStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *LibraryFullStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState LibraryFullStatus_SdkV2) { } +func (c LibraryFullStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Library_SdkV2{}.ToSchema(cs, append(path, "library")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LibraryFullStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12332,7 +12860,7 @@ func (o *LibraryFullStatus_SdkV2) SetMessages(ctx context.Context, v []types.Str type ListAllClusterLibraryStatusesResponse_SdkV2 struct { // A list of cluster statuses. - Statuses types.List `tfsdk:"statuses" tf:"optional"` + Statuses types.List `tfsdk:"statuses" tf:""` } func (newState *ListAllClusterLibraryStatusesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllClusterLibraryStatusesResponse_SdkV2) { @@ -12341,6 +12869,12 @@ func (newState *ListAllClusterLibraryStatusesResponse_SdkV2) SyncEffectiveFields func (newState *ListAllClusterLibraryStatusesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllClusterLibraryStatusesResponse_SdkV2) { } +func (c ListAllClusterLibraryStatusesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterLibraryStatuses_SdkV2{}.ToSchema(cs, append(path, "statuses")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllClusterLibraryStatusesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12405,9 +12939,9 @@ func (o *ListAllClusterLibraryStatusesResponse_SdkV2) SetStatuses(ctx context.Co type ListAvailableZonesResponse_SdkV2 struct { // The availability zone if no `zone_id` is provided in the cluster creation // request. - DefaultZone types.String `tfsdk:"default_zone" tf:"optional"` + DefaultZone types.String `tfsdk:"default_zone" tf:""` // The list of available zones (e.g., ['us-west-2c', 'us-east-2']). - Zones types.List `tfsdk:"zones" tf:"optional"` + Zones types.List `tfsdk:"zones" tf:""` } func (newState *ListAvailableZonesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAvailableZonesResponse_SdkV2) { @@ -12416,6 +12950,11 @@ func (newState *ListAvailableZonesResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ListAvailableZonesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAvailableZonesResponse_SdkV2) { } +func (c ListAvailableZonesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAvailableZonesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12492,12 +13031,6 @@ type ListClusterCompliancesRequest_SdkV2 struct { PolicyId types.String `tfsdk:"-"` } -func (newState *ListClusterCompliancesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClusterCompliancesRequest_SdkV2) { -} - -func (newState *ListClusterCompliancesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClusterCompliancesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClusterCompliancesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12535,14 +13068,14 @@ func (o ListClusterCompliancesRequest_SdkV2) Type(ctx context.Context) attr.Type type ListClusterCompliancesResponse_SdkV2 struct { // A list of clusters and their policy compliance statuses. - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // This field represents the pagination token to retrieve the next page of // results. If the value is "", it means no further results for the request. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // This field represents the pagination token to retrieve the previous page // of results. If the value is "", it means no further results for the // request. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListClusterCompliancesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClusterCompliancesResponse_SdkV2) { @@ -12551,6 +13084,12 @@ func (newState *ListClusterCompliancesResponse_SdkV2) SyncEffectiveFieldsDuringC func (newState *ListClusterCompliancesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClusterCompliancesResponse_SdkV2) { } +func (c ListClusterCompliancesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterCompliance_SdkV2{}.ToSchema(cs, append(path, "clusters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClusterCompliancesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12627,12 +13166,6 @@ type ListClusterPoliciesRequest_SdkV2 struct { SortOrder types.String `tfsdk:"-"` } -func (newState *ListClusterPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClusterPoliciesRequest_SdkV2) { -} - -func (newState *ListClusterPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClusterPoliciesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClusterPoliciesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12668,13 +13201,13 @@ func (o ListClusterPoliciesRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListClustersFilterBy_SdkV2 struct { // The source of cluster creation. - ClusterSources types.List `tfsdk:"cluster_sources" tf:"optional"` + ClusterSources types.List `tfsdk:"cluster_sources" tf:""` // The current state of the clusters. - ClusterStates types.List `tfsdk:"cluster_states" tf:"optional"` + ClusterStates types.List `tfsdk:"cluster_states" tf:""` // Whether the clusters are pinned or not. - IsPinned types.Bool `tfsdk:"is_pinned" tf:"optional"` + IsPinned types.Bool `tfsdk:"is_pinned" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` } func (newState *ListClustersFilterBy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersFilterBy_SdkV2) { @@ -12683,6 +13216,11 @@ func (newState *ListClustersFilterBy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListClustersFilterBy_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClustersFilterBy_SdkV2) { } +func (c ListClustersFilterBy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersFilterBy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12794,12 +13332,6 @@ type ListClustersRequest_SdkV2 struct { SortBy types.List `tfsdk:"-"` } -func (newState *ListClustersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersRequest_SdkV2) { -} - -func (newState *ListClustersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClustersRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12898,14 +13430,14 @@ func (o *ListClustersRequest_SdkV2) SetSortBy(ctx context.Context, v ListCluster type ListClustersResponse_SdkV2 struct { // - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // This field represents the pagination token to retrieve the next page of // results. If the value is "", it means no further results for the request. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // This field represents the pagination token to retrieve the previous page // of results. If the value is "", it means no further results for the // request. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListClustersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersResponse_SdkV2) { @@ -12914,6 +13446,12 @@ func (newState *ListClustersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListClustersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClustersResponse_SdkV2) { } +func (c ListClustersResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterDetails_SdkV2{}.ToSchema(cs, append(path, "clusters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12981,11 +13519,11 @@ func (o *ListClustersResponse_SdkV2) SetClusters(ctx context.Context, v []Cluste type ListClustersSortBy_SdkV2 struct { // The direction to sort by. - Direction types.String `tfsdk:"direction" tf:"optional"` + Direction types.String `tfsdk:"direction" tf:""` // The sorting criteria. By default, clusters are sorted by 3 columns from // highest to lowest precedence: cluster state, pinned or unpinned, then // cluster name. - Field types.String `tfsdk:"field" tf:"optional"` + Field types.String `tfsdk:"field" tf:""` } func (newState *ListClustersSortBy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersSortBy_SdkV2) { @@ -12994,6 +13532,11 @@ func (newState *ListClustersSortBy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListClustersSortBy_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClustersSortBy_SdkV2) { } +func (c ListClustersSortBy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersSortBy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13028,7 +13571,7 @@ func (o ListClustersSortBy_SdkV2) Type(ctx context.Context) attr.Type { } type ListGlobalInitScriptsResponse_SdkV2 struct { - Scripts types.List `tfsdk:"scripts" tf:"optional"` + Scripts types.List `tfsdk:"scripts" tf:""` } func (newState *ListGlobalInitScriptsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListGlobalInitScriptsResponse_SdkV2) { @@ -13037,6 +13580,12 @@ func (newState *ListGlobalInitScriptsResponse_SdkV2) SyncEffectiveFieldsDuringCr func (newState *ListGlobalInitScriptsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListGlobalInitScriptsResponse_SdkV2) { } +func (c ListGlobalInitScriptsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GlobalInitScriptDetails_SdkV2{}.ToSchema(cs, append(path, "scripts")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGlobalInitScriptsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13099,7 +13648,7 @@ func (o *ListGlobalInitScriptsResponse_SdkV2) SetScripts(ctx context.Context, v } type ListInstancePools_SdkV2 struct { - InstancePools types.List `tfsdk:"instance_pools" tf:"optional"` + InstancePools types.List `tfsdk:"instance_pools" tf:""` } func (newState *ListInstancePools_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstancePools_SdkV2) { @@ -13108,6 +13657,12 @@ func (newState *ListInstancePools_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ListInstancePools_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListInstancePools_SdkV2) { } +func (c ListInstancePools_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAndStats_SdkV2{}.ToSchema(cs, append(path, "instance_pools")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstancePools. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13171,7 +13726,7 @@ func (o *ListInstancePools_SdkV2) SetInstancePools(ctx context.Context, v []Inst type ListInstanceProfilesResponse_SdkV2 struct { // A list of instance profiles that the user can access. - InstanceProfiles types.List `tfsdk:"instance_profiles" tf:"optional"` + InstanceProfiles types.List `tfsdk:"instance_profiles" tf:""` } func (newState *ListInstanceProfilesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstanceProfilesResponse_SdkV2) { @@ -13180,6 +13735,12 @@ func (newState *ListInstanceProfilesResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *ListInstanceProfilesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListInstanceProfilesResponse_SdkV2) { } +func (c ListInstanceProfilesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstanceProfile_SdkV2{}.ToSchema(cs, append(path, "instance_profiles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstanceProfilesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13243,7 +13804,7 @@ func (o *ListInstanceProfilesResponse_SdkV2) SetInstanceProfiles(ctx context.Con type ListNodeTypesResponse_SdkV2 struct { // The list of available Spark node types. - NodeTypes types.List `tfsdk:"node_types" tf:"optional"` + NodeTypes types.List `tfsdk:"node_types" tf:""` } func (newState *ListNodeTypesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNodeTypesResponse_SdkV2) { @@ -13252,6 +13813,12 @@ func (newState *ListNodeTypesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListNodeTypesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNodeTypesResponse_SdkV2) { } +func (c ListNodeTypesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NodeType_SdkV2{}.ToSchema(cs, append(path, "node_types")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNodeTypesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13315,7 +13882,7 @@ func (o *ListNodeTypesResponse_SdkV2) SetNodeTypes(ctx context.Context, v []Node type ListPoliciesResponse_SdkV2 struct { // List of policies. - Policies types.List `tfsdk:"policies" tf:"optional"` + Policies types.List `tfsdk:"policies" tf:""` } func (newState *ListPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPoliciesResponse_SdkV2) { @@ -13324,6 +13891,12 @@ func (newState *ListPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPoliciesResponse_SdkV2) { } +func (c ListPoliciesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Policy_SdkV2{}.ToSchema(cs, append(path, "policies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPoliciesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13393,12 +13966,6 @@ type ListPolicyFamiliesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListPolicyFamiliesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPolicyFamiliesRequest_SdkV2) { -} - -func (newState *ListPolicyFamiliesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPolicyFamiliesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPolicyFamiliesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13435,9 +14002,9 @@ func (o ListPolicyFamiliesRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListPolicyFamiliesResponse_SdkV2 struct { // A token that can be used to get the next page of results. If not present, // there are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // List of policy families. - PolicyFamilies types.List `tfsdk:"policy_families" tf:"optional"` + PolicyFamilies types.List `tfsdk:"policy_families" tf:""` } func (newState *ListPolicyFamiliesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPolicyFamiliesResponse_SdkV2) { @@ -13446,6 +14013,12 @@ func (newState *ListPolicyFamiliesResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ListPolicyFamiliesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPolicyFamiliesResponse_SdkV2) { } +func (c ListPolicyFamiliesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PolicyFamily_SdkV2{}.ToSchema(cs, append(path, "policy_families")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPolicyFamiliesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13520,6 +14093,12 @@ func (newState *LocalFileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *LocalFileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState LocalFileInfo_SdkV2) { } +func (c LocalFileInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LocalFileInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13553,9 +14132,9 @@ func (o LocalFileInfo_SdkV2) Type(ctx context.Context) attr.Type { type LogAnalyticsInfo_SdkV2 struct { // - LogAnalyticsPrimaryKey types.String `tfsdk:"log_analytics_primary_key" tf:"optional"` + LogAnalyticsPrimaryKey types.String `tfsdk:"log_analytics_primary_key" tf:""` // - LogAnalyticsWorkspaceId types.String `tfsdk:"log_analytics_workspace_id" tf:"optional"` + LogAnalyticsWorkspaceId types.String `tfsdk:"log_analytics_workspace_id" tf:""` } func (newState *LogAnalyticsInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogAnalyticsInfo_SdkV2) { @@ -13564,6 +14143,11 @@ func (newState *LogAnalyticsInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *LogAnalyticsInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogAnalyticsInfo_SdkV2) { } +func (c LogAnalyticsInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogAnalyticsInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13600,10 +14184,10 @@ func (o LogAnalyticsInfo_SdkV2) Type(ctx context.Context) attr.Type { type LogSyncStatus_SdkV2 struct { // The timestamp of last attempt. If the last attempt fails, // `last_exception` will contain the exception in the last attempt. - LastAttempted types.Int64 `tfsdk:"last_attempted" tf:"optional"` + LastAttempted types.Int64 `tfsdk:"last_attempted" tf:""` // The exception thrown in the last attempt, it would be null (omitted in // the response) if there is no exception in last attempted. - LastException types.String `tfsdk:"last_exception" tf:"optional"` + LastException types.String `tfsdk:"last_exception" tf:""` } func (newState *LogSyncStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogSyncStatus_SdkV2) { @@ -13612,6 +14196,11 @@ func (newState *LogSyncStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *LogSyncStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogSyncStatus_SdkV2) { } +func (c LogSyncStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogSyncStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13653,10 +14242,10 @@ type MavenLibrary_SdkV2 struct { // // Maven dependency exclusions: // https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html. - Exclusions types.List `tfsdk:"exclusions" tf:"optional"` + Exclusions types.List `tfsdk:"exclusions" tf:""` // Maven repo to install the Maven package from. If omitted, both Maven // Central Repository and Spark Packages are searched. - Repo types.String `tfsdk:"repo" tf:"optional"` + Repo types.String `tfsdk:"repo" tf:""` } func (newState *MavenLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MavenLibrary_SdkV2) { @@ -13665,6 +14254,12 @@ func (newState *MavenLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *MavenLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState MavenLibrary_SdkV2) { } +func (c MavenLibrary_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "coordinates")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MavenLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13731,15 +14326,15 @@ func (o *MavenLibrary_SdkV2) SetExclusions(ctx context.Context, v []types.String } type NodeInstanceType_SdkV2 struct { - InstanceTypeId types.String `tfsdk:"instance_type_id" tf:"optional"` + InstanceTypeId types.String `tfsdk:"instance_type_id" tf:""` - LocalDiskSizeGb types.Int64 `tfsdk:"local_disk_size_gb" tf:"optional"` + LocalDiskSizeGb types.Int64 `tfsdk:"local_disk_size_gb" tf:""` - LocalDisks types.Int64 `tfsdk:"local_disks" tf:"optional"` + LocalDisks types.Int64 `tfsdk:"local_disks" tf:""` - LocalNvmeDiskSizeGb types.Int64 `tfsdk:"local_nvme_disk_size_gb" tf:"optional"` + LocalNvmeDiskSizeGb types.Int64 `tfsdk:"local_nvme_disk_size_gb" tf:""` - LocalNvmeDisks types.Int64 `tfsdk:"local_nvme_disks" tf:"optional"` + LocalNvmeDisks types.Int64 `tfsdk:"local_nvme_disks" tf:""` } func (newState *NodeInstanceType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NodeInstanceType_SdkV2) { @@ -13748,6 +14343,11 @@ func (newState *NodeInstanceType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *NodeInstanceType_SdkV2) SyncEffectiveFieldsDuringRead(existingState NodeInstanceType_SdkV2) { } +func (c NodeInstanceType_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NodeInstanceType. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13788,32 +14388,32 @@ func (o NodeInstanceType_SdkV2) Type(ctx context.Context) attr.Type { } type NodeType_SdkV2 struct { - Category types.String `tfsdk:"category" tf:"optional"` + Category types.String `tfsdk:"category" tf:""` // A string description associated with this node type, e.g., "r3.xlarge". Description types.String `tfsdk:"description" tf:""` - DisplayOrder types.Int64 `tfsdk:"display_order" tf:"optional"` + DisplayOrder types.Int64 `tfsdk:"display_order" tf:""` // An identifier for the type of hardware that this node runs on, e.g., // "r3.2xlarge" in AWS. InstanceTypeId types.String `tfsdk:"instance_type_id" tf:""` // Whether the node type is deprecated. Non-deprecated node types offer // greater performance. - IsDeprecated types.Bool `tfsdk:"is_deprecated" tf:"optional"` + IsDeprecated types.Bool `tfsdk:"is_deprecated" tf:""` // AWS specific, whether this instance supports encryption in transit, used // for hipaa and pci workloads. - IsEncryptedInTransit types.Bool `tfsdk:"is_encrypted_in_transit" tf:"optional"` + IsEncryptedInTransit types.Bool `tfsdk:"is_encrypted_in_transit" tf:""` - IsGraviton types.Bool `tfsdk:"is_graviton" tf:"optional"` + IsGraviton types.Bool `tfsdk:"is_graviton" tf:""` - IsHidden types.Bool `tfsdk:"is_hidden" tf:"optional"` + IsHidden types.Bool `tfsdk:"is_hidden" tf:""` - IsIoCacheEnabled types.Bool `tfsdk:"is_io_cache_enabled" tf:"optional"` + IsIoCacheEnabled types.Bool `tfsdk:"is_io_cache_enabled" tf:""` // Memory (in MB) available for this node type. MemoryMb types.Int64 `tfsdk:"memory_mb" tf:""` - NodeInfo types.List `tfsdk:"node_info" tf:"optional,object"` + NodeInfo types.List `tfsdk:"node_info" tf:"object"` - NodeInstanceType types.List `tfsdk:"node_instance_type" tf:"optional,object"` + NodeInstanceType types.List `tfsdk:"node_instance_type" tf:"object"` // Unique identifier for this node type. NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of CPU cores available for this node type. Note that this can be @@ -13821,20 +14421,20 @@ type NodeType_SdkV2 struct { // instance is not divisible by the number of Spark nodes on that machine. NumCores types.Float64 `tfsdk:"num_cores" tf:""` - NumGpus types.Int64 `tfsdk:"num_gpus" tf:"optional"` + NumGpus types.Int64 `tfsdk:"num_gpus" tf:""` - PhotonDriverCapable types.Bool `tfsdk:"photon_driver_capable" tf:"optional"` + PhotonDriverCapable types.Bool `tfsdk:"photon_driver_capable" tf:""` - PhotonWorkerCapable types.Bool `tfsdk:"photon_worker_capable" tf:"optional"` + PhotonWorkerCapable types.Bool `tfsdk:"photon_worker_capable" tf:""` - SupportClusterTags types.Bool `tfsdk:"support_cluster_tags" tf:"optional"` + SupportClusterTags types.Bool `tfsdk:"support_cluster_tags" tf:""` - SupportEbsVolumes types.Bool `tfsdk:"support_ebs_volumes" tf:"optional"` + SupportEbsVolumes types.Bool `tfsdk:"support_ebs_volumes" tf:""` - SupportPortForwarding types.Bool `tfsdk:"support_port_forwarding" tf:"optional"` + SupportPortForwarding types.Bool `tfsdk:"support_port_forwarding" tf:""` // Indicates if this node type can be used for an instance pool or cluster // with elastic disk enabled. This is true for most node types. - SupportsElasticDisk types.Bool `tfsdk:"supports_elastic_disk" tf:"optional"` + SupportsElasticDisk types.Bool `tfsdk:"supports_elastic_disk" tf:""` } func (newState *NodeType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NodeType_SdkV2) { @@ -13843,6 +14443,18 @@ func (newState *NodeType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Nod func (newState *NodeType_SdkV2) SyncEffectiveFieldsDuringRead(existingState NodeType_SdkV2) { } +func (c NodeType_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "description")...) + cs.SetRequired(append(path, "instance_type_id")...) + cs.SetRequired(append(path, "memory_mb")...) + CloudProviderNodeInfo_SdkV2{}.ToSchema(cs, append(path, "node_info")...) + NodeInstanceType_SdkV2{}.ToSchema(cs, append(path, "node_instance_type")...) + cs.SetRequired(append(path, "node_type_id")...) + cs.SetRequired(append(path, "num_cores")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NodeType. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13974,9 +14586,9 @@ func (o *NodeType_SdkV2) SetNodeInstanceType(ctx context.Context, v NodeInstance } type PendingInstanceError_SdkV2 struct { - InstanceId types.String `tfsdk:"instance_id" tf:"optional"` + InstanceId types.String `tfsdk:"instance_id" tf:""` - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *PendingInstanceError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PendingInstanceError_SdkV2) { @@ -13985,6 +14597,11 @@ func (newState *PendingInstanceError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *PendingInstanceError_SdkV2) SyncEffectiveFieldsDuringRead(existingState PendingInstanceError_SdkV2) { } +func (c PendingInstanceError_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PendingInstanceError. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14029,6 +14646,12 @@ func (newState *PermanentDeleteCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *PermanentDeleteCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermanentDeleteCluster_SdkV2) { } +func (c PermanentDeleteCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermanentDeleteCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14069,6 +14692,11 @@ func (newState *PermanentDeleteClusterResponse_SdkV2) SyncEffectiveFieldsDuringC func (newState *PermanentDeleteClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermanentDeleteClusterResponse_SdkV2) { } +func (c PermanentDeleteClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermanentDeleteClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14107,6 +14735,12 @@ func (newState *PinCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan P func (newState *PinCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState PinCluster_SdkV2) { } +func (c PinCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PinCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14147,6 +14781,11 @@ func (newState *PinClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *PinClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PinClusterResponse_SdkV2) { } +func (c PinClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PinClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14178,30 +14817,30 @@ func (o PinClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { type Policy_SdkV2 struct { // Creation time. The timestamp (in millisecond) when this Cluster Policy // was created. - CreatedAtTimestamp types.Int64 `tfsdk:"created_at_timestamp" tf:"optional"` + CreatedAtTimestamp types.Int64 `tfsdk:"created_at_timestamp" tf:""` // Creator user name. The field won't be included in the response if the // user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Policy definition document expressed in [Databricks Cluster Policy // Definition Language]. // // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - Definition types.String `tfsdk:"definition" tf:"optional"` + Definition types.String `tfsdk:"definition" tf:""` // Additional human-readable description of the cluster policy. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // If true, policy is a default policy created and managed by Databricks. // Default policies cannot be deleted, and their policy families cannot be // changed. - IsDefault types.Bool `tfsdk:"is_default" tf:"optional"` + IsDefault types.Bool `tfsdk:"is_default" tf:""` // A list of libraries to be installed on the next cluster restart that uses // this policy. The maximum number of libraries is 500. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Max number of clusters per user that can be active using this policy. If // not present, there is no max limit. - MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:"optional"` + MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:""` // Cluster Policy name requested by the user. This has to be unique. Length // must be between 1 and 100 characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Policy definition JSON document expressed in [Databricks Policy // Definition Language]. The JSON document must be passed as a string and // cannot be embedded in the requests. @@ -14211,16 +14850,16 @@ type Policy_SdkV2 struct { // policy definition. // // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:"optional"` + PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:""` // ID of the policy family. The cluster policy's policy definition inherits // the policy family's policy definition. // // Cannot be used with `definition`. Use // `policy_family_definition_overrides` instead to customize the policy // definition. - PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:""` // Canonical unique identifier for the Cluster Policy. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` } func (newState *Policy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Policy_SdkV2) { @@ -14229,6 +14868,12 @@ func (newState *Policy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Polic func (newState *Policy_SdkV2) SyncEffectiveFieldsDuringRead(existingState Policy_SdkV2) { } +func (c Policy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Library_SdkV2{}.ToSchema(cs, append(path, "libraries")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Policy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14315,13 +14960,13 @@ type PolicyFamily_SdkV2 struct { // Definition Language]. // // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - Definition types.String `tfsdk:"definition" tf:"optional"` + Definition types.String `tfsdk:"definition" tf:""` // Human-readable description of the purpose of the policy family. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Name of the policy family. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Unique identifier for the policy family. - PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:""` } func (newState *PolicyFamily_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PolicyFamily_SdkV2) { @@ -14330,6 +14975,11 @@ func (newState *PolicyFamily_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PolicyFamily_SdkV2) SyncEffectiveFieldsDuringRead(existingState PolicyFamily_SdkV2) { } +func (c PolicyFamily_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PolicyFamily. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14374,7 +15024,7 @@ type PythonPyPiLibrary_SdkV2 struct { Package types.String `tfsdk:"package" tf:""` // The repository where the package can be found. If not specified, the // default pip index is used. - Repo types.String `tfsdk:"repo" tf:"optional"` + Repo types.String `tfsdk:"repo" tf:""` } func (newState *PythonPyPiLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PythonPyPiLibrary_SdkV2) { @@ -14383,6 +15033,12 @@ func (newState *PythonPyPiLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *PythonPyPiLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState PythonPyPiLibrary_SdkV2) { } +func (c PythonPyPiLibrary_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "package")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PythonPyPiLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14421,7 +15077,7 @@ type RCranLibrary_SdkV2 struct { Package types.String `tfsdk:"package" tf:""` // The repository where the package can be found. If not specified, the // default CRAN repo is used. - Repo types.String `tfsdk:"repo" tf:"optional"` + Repo types.String `tfsdk:"repo" tf:""` } func (newState *RCranLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RCranLibrary_SdkV2) { @@ -14430,6 +15086,12 @@ func (newState *RCranLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RCranLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState RCranLibrary_SdkV2) { } +func (c RCranLibrary_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "package")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RCranLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14474,6 +15136,12 @@ func (newState *RemoveInstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *RemoveInstanceProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState RemoveInstanceProfile_SdkV2) { } +func (c RemoveInstanceProfile_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_profile_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveInstanceProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14508,12 +15176,6 @@ func (o RemoveInstanceProfile_SdkV2) Type(ctx context.Context) attr.Type { type RemoveResponse_SdkV2 struct { } -func (newState *RemoveResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveResponse_SdkV2) { -} - -func (newState *RemoveResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RemoveResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14545,7 +15207,7 @@ type ResizeCluster_SdkV2 struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.List `tfsdk:"autoscale" tf:"object"` // The cluster to be resized. ClusterId types.String `tfsdk:"cluster_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one @@ -14558,7 +15220,7 @@ type ResizeCluster_SdkV2 struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` } func (newState *ResizeCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResizeCluster_SdkV2) { @@ -14567,6 +15229,13 @@ func (newState *ResizeCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ResizeCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResizeCluster_SdkV2) { } +func (c ResizeCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale_SdkV2{}.ToSchema(cs, append(path, "autoscale")...) + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResizeCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14641,6 +15310,11 @@ func (newState *ResizeClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ResizeClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResizeClusterResponse_SdkV2) { } +func (c ResizeClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResizeClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14672,7 +15346,7 @@ type RestartCluster_SdkV2 struct { // The cluster to be started. ClusterId types.String `tfsdk:"cluster_id" tf:""` // - RestartUser types.String `tfsdk:"restart_user" tf:"optional"` + RestartUser types.String `tfsdk:"restart_user" tf:""` } func (newState *RestartCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestartCluster_SdkV2) { @@ -14681,6 +15355,12 @@ func (newState *RestartCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *RestartCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestartCluster_SdkV2) { } +func (c RestartCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestartCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14723,6 +15403,11 @@ func (newState *RestartClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *RestartClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestartClusterResponse_SdkV2) { } +func (c RestartClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestartClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14752,26 +15437,26 @@ func (o RestartClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { type Results_SdkV2 struct { // The cause of the error - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` - Data types.Object `tfsdk:"data" tf:"optional"` + Data types.Object `tfsdk:"data" tf:""` // The image filename - FileName types.String `tfsdk:"fileName" tf:"optional"` + FileName types.String `tfsdk:"fileName" tf:""` - FileNames types.List `tfsdk:"fileNames" tf:"optional"` + FileNames types.List `tfsdk:"fileNames" tf:""` // true if a JSON schema is returned instead of a string representation of // the Hive type. - IsJsonSchema types.Bool `tfsdk:"isJsonSchema" tf:"optional"` + IsJsonSchema types.Bool `tfsdk:"isJsonSchema" tf:""` // internal field used by SDK - Pos types.Int64 `tfsdk:"pos" tf:"optional"` + Pos types.Int64 `tfsdk:"pos" tf:""` - ResultType types.String `tfsdk:"resultType" tf:"optional"` + ResultType types.String `tfsdk:"resultType" tf:""` // The table schema - Schema types.List `tfsdk:"schema" tf:"optional"` + Schema types.List `tfsdk:"schema" tf:""` // The summary of the error - Summary types.String `tfsdk:"summary" tf:"optional"` + Summary types.String `tfsdk:"summary" tf:""` // true if partial results are returned. - Truncated types.Bool `tfsdk:"truncated" tf:"optional"` + Truncated types.Bool `tfsdk:"truncated" tf:""` } func (newState *Results_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Results_SdkV2) { @@ -14780,6 +15465,11 @@ func (newState *Results_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Resu func (newState *Results_SdkV2) SyncEffectiveFieldsDuringRead(existingState Results_SdkV2) { } +func (c Results_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Results. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14900,27 +15590,27 @@ type S3StorageInfo_SdkV2 struct { // controls. If you are using cross account role for writing data, you may // want to set `bucket-owner-full-control` to make bucket owner able to read // the logs. - CannedAcl types.String `tfsdk:"canned_acl" tf:"optional"` + CannedAcl types.String `tfsdk:"canned_acl" tf:""` // S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be // delivered using cluster iam role, please make sure you set cluster iam // role and the role has write access to the destination. Please also note // that you cannot use AWS keys to deliver logs. Destination types.String `tfsdk:"destination" tf:""` // (Optional) Flag to enable server side encryption, `false` by default. - EnableEncryption types.Bool `tfsdk:"enable_encryption" tf:"optional"` + EnableEncryption types.Bool `tfsdk:"enable_encryption" tf:""` // (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It // will be used only when encryption is enabled and the default type is // `sse-s3`. - EncryptionType types.String `tfsdk:"encryption_type" tf:"optional"` + EncryptionType types.String `tfsdk:"encryption_type" tf:""` // S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or // endpoint needs to be set. If both are set, endpoint will be used. - Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + Endpoint types.String `tfsdk:"endpoint" tf:""` // (Optional) Kms key which will be used if encryption is enabled and // encryption type is set to `sse-kms`. - KmsKey types.String `tfsdk:"kms_key" tf:"optional"` + KmsKey types.String `tfsdk:"kms_key" tf:""` // S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. // If both are set, endpoint will be used. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *S3StorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S3StorageInfo_SdkV2) { @@ -14929,6 +15619,12 @@ func (newState *S3StorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *S3StorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState S3StorageInfo_SdkV2) { } +func (c S3StorageInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in S3StorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14974,30 +15670,30 @@ func (o S3StorageInfo_SdkV2) Type(ctx context.Context) attr.Type { type SparkNode_SdkV2 struct { // The private IP address of the host instance. - HostPrivateIp types.String `tfsdk:"host_private_ip" tf:"optional"` + HostPrivateIp types.String `tfsdk:"host_private_ip" tf:""` // Globally unique identifier for the host instance from the cloud provider. - InstanceId types.String `tfsdk:"instance_id" tf:"optional"` + InstanceId types.String `tfsdk:"instance_id" tf:""` // Attributes specific to AWS for a Spark node. - NodeAwsAttributes types.List `tfsdk:"node_aws_attributes" tf:"optional,object"` + NodeAwsAttributes types.List `tfsdk:"node_aws_attributes" tf:"object"` // Globally unique identifier for this node. - NodeId types.String `tfsdk:"node_id" tf:"optional"` + NodeId types.String `tfsdk:"node_id" tf:""` // Private IP address (typically a 10.x.x.x address) of the Spark node. Note // that this is different from the private IP address of the host instance. - PrivateIp types.String `tfsdk:"private_ip" tf:"optional"` + PrivateIp types.String `tfsdk:"private_ip" tf:""` // Public DNS address of this node. This address can be used to access the // Spark JDBC server on the driver node. To communicate with the JDBC // server, traffic must be manually authorized by adding security group // rules to the "worker-unmanaged" security group via the AWS console. // // Actually it's the public DNS address of the host instance. - PublicDns types.String `tfsdk:"public_dns" tf:"optional"` + PublicDns types.String `tfsdk:"public_dns" tf:""` // The timestamp (in millisecond) when the Spark node is launched. // // The start_timestamp is set right before the container is being launched. // The timestamp when the container is placed on the ResourceManager, before // its launch and setup by the NodeDaemon. This timestamp is the same as the // creation timestamp in the database. - StartTimestamp types.Int64 `tfsdk:"start_timestamp" tf:"optional"` + StartTimestamp types.Int64 `tfsdk:"start_timestamp" tf:""` } func (newState *SparkNode_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkNode_SdkV2) { @@ -15006,6 +15702,12 @@ func (newState *SparkNode_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sp func (newState *SparkNode_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkNode_SdkV2) { } +func (c SparkNode_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparkNodeAwsAttributes_SdkV2{}.ToSchema(cs, append(path, "node_aws_attributes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkNode. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15081,7 +15783,7 @@ func (o *SparkNode_SdkV2) SetNodeAwsAttributes(ctx context.Context, v SparkNodeA type SparkNodeAwsAttributes_SdkV2 struct { // Whether this node is on an Amazon spot instance. - IsSpot types.Bool `tfsdk:"is_spot" tf:"optional"` + IsSpot types.Bool `tfsdk:"is_spot" tf:""` } func (newState *SparkNodeAwsAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkNodeAwsAttributes_SdkV2) { @@ -15090,6 +15792,11 @@ func (newState *SparkNodeAwsAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *SparkNodeAwsAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkNodeAwsAttributes_SdkV2) { } +func (c SparkNodeAwsAttributes_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkNodeAwsAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15127,9 +15834,9 @@ type SparkVersion_SdkV2 struct { // Note that the exact Spark version may change over time for a "wildcard" // version (i.e., "2.1.x-scala2.11" is a "wildcard" version) with minor bug // fixes. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // A descriptive name for this Spark version, for example "Spark 2.1". - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *SparkVersion_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkVersion_SdkV2) { @@ -15138,6 +15845,11 @@ func (newState *SparkVersion_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SparkVersion_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkVersion_SdkV2) { } +func (c SparkVersion_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkVersion. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15182,6 +15894,12 @@ func (newState *StartCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *StartCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartCluster_SdkV2) { } +func (c StartCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15222,6 +15940,11 @@ func (newState *StartClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *StartClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartClusterResponse_SdkV2) { } +func (c StartClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15251,12 +15974,12 @@ func (o StartClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { type TerminationReason_SdkV2 struct { // status code indicating why the cluster was terminated - Code types.String `tfsdk:"code" tf:"optional"` + Code types.String `tfsdk:"code" tf:""` // list of parameters that provide additional information about why the // cluster was terminated - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` // type of the termination - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TerminationReason_SdkV2) { @@ -15265,6 +15988,11 @@ func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringRead(existingState TerminationReason_SdkV2) { } +func (c TerminationReason_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TerminationReason. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15343,6 +16071,14 @@ func (newState *UninstallLibraries_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *UninstallLibraries_SdkV2) SyncEffectiveFieldsDuringRead(existingState UninstallLibraries_SdkV2) { } +func (c UninstallLibraries_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + cs.SetRequired(append(path, "libraries")...) + Library_SdkV2{}.ToSchema(cs, append(path, "libraries")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UninstallLibraries. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15415,6 +16151,11 @@ func (newState *UninstallLibrariesResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *UninstallLibrariesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UninstallLibrariesResponse_SdkV2) { } +func (c UninstallLibrariesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UninstallLibrariesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15453,6 +16194,12 @@ func (newState *UnpinCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UnpinCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnpinCluster_SdkV2) { } +func (c UnpinCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpinCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15493,6 +16240,11 @@ func (newState *UnpinClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UnpinClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnpinClusterResponse_SdkV2) { } +func (c UnpinClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpinClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15522,7 +16274,7 @@ func (o UnpinClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateCluster_SdkV2 struct { // The cluster to be updated. - Cluster types.List `tfsdk:"cluster" tf:"optional,object"` + Cluster types.List `tfsdk:"cluster" tf:"object"` // ID of the cluster. ClusterId types.String `tfsdk:"cluster_id" tf:""` // Specifies which fields of the cluster will be updated. This is required @@ -15539,6 +16291,14 @@ func (newState *UpdateCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *UpdateCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCluster_SdkV2) { } +func (c UpdateCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateClusterResource_SdkV2{}.ToSchema(cs, append(path, "cluster")...) + cs.SetRequired(append(path, "cluster_id")...) + cs.SetRequired(append(path, "update_mask")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15608,29 +16368,29 @@ type UpdateClusterResource_SdkV2 struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.List `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -15639,7 +16399,7 @@ type UpdateClusterResource_SdkV2 struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -15669,39 +16429,39 @@ type UpdateClusterResource_SdkV2 struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.List `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -15709,13 +16469,13 @@ type UpdateClusterResource_SdkV2 struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -15726,9 +16486,9 @@ type UpdateClusterResource_SdkV2 struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -15737,15 +16497,15 @@ type UpdateClusterResource_SdkV2 struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -15759,23 +16519,23 @@ type UpdateClusterResource_SdkV2 struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - SparkVersion types.String `tfsdk:"spark_version" tf:"optional"` + SparkVersion types.String `tfsdk:"spark_version" tf:""` // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.List `tfsdk:"workload_type" tf:"object"` } func (newState *UpdateClusterResource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateClusterResource_SdkV2) { @@ -15784,6 +16544,19 @@ func (newState *UpdateClusterResource_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *UpdateClusterResource_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateClusterResource_SdkV2) { } +func (c UpdateClusterResource_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale_SdkV2{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + ClusterLogConf_SdkV2{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage_SdkV2{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo_SdkV2{}.ToSchema(cs, append(path, "init_scripts")...) + WorkloadType_SdkV2{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateClusterResource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16229,6 +17002,11 @@ func (newState *UpdateClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *UpdateClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateClusterResponse_SdkV2) { } +func (c UpdateClusterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16259,12 +17037,6 @@ func (o UpdateClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateResponse_SdkV2 struct { } -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { -} - -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16303,6 +17075,12 @@ func (newState *VolumesStorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *VolumesStorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState VolumesStorageInfo_SdkV2) { } +func (c VolumesStorageInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VolumesStorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16345,6 +17123,13 @@ func (newState *WorkloadType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *WorkloadType_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkloadType_SdkV2) { } +func (c WorkloadType_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "clients")...) + ClientsTypes_SdkV2{}.ToSchema(cs, append(path, "clients")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkloadType. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16418,6 +17203,12 @@ func (newState *WorkspaceStorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *WorkspaceStorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceStorageInfo_SdkV2) { } +func (c WorkspaceStorageInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceStorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/compute_tf/model.go b/internal/service/compute_tf/model.go index b62fa06c3..5d8ee6e7e 100755 --- a/internal/service/compute_tf/model.go +++ b/internal/service/compute_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -30,7 +31,7 @@ type AddInstanceProfile struct { // Otherwise, this field is optional. // // [Databricks SQL Serverless]: https://docs.databricks.com/sql/admin/serverless.html - IamRoleArn types.String `tfsdk:"iam_role_arn" tf:"optional"` + IamRoleArn types.String `tfsdk:"iam_role_arn" tf:""` // The AWS ARN of the instance profile to register with Databricks. This // field is required. InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` @@ -39,7 +40,7 @@ type AddInstanceProfile struct { // profile contains an meta IAM role which could assume a wide range of // roles. Therefore it should always be used with authorization. This field // is optional, the default value is `false`. - IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:"optional"` + IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:""` // By default, Databricks validates that it has sufficient permissions to // launch instances with the instance profile. This validation uses AWS // dry-run mode for the RunInstances API. If validation fails with an error @@ -47,7 +48,7 @@ type AddInstanceProfile struct { // “Your requested instance type is not supported in your requested // availability zone”), you can pass this flag to skip the validation and // forcibly add the instance profile. - SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + SkipValidation types.Bool `tfsdk:"skip_validation" tf:""` } func (newState *AddInstanceProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddInstanceProfile) { @@ -56,6 +57,12 @@ func (newState *AddInstanceProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AddInstanceProfile) SyncEffectiveFieldsDuringRead(existingState AddInstanceProfile) { } +func (c AddInstanceProfile) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_profile_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddInstanceProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -96,12 +103,6 @@ func (o AddInstanceProfile) Type(ctx context.Context) attr.Type { type AddResponse struct { } -func (newState *AddResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddResponse) { -} - -func (newState *AddResponse) SyncEffectiveFieldsDuringRead(existingState AddResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -141,6 +142,12 @@ func (newState *Adlsgen2Info) SyncEffectiveFieldsDuringCreateOrUpdate(plan Adlsg func (newState *Adlsgen2Info) SyncEffectiveFieldsDuringRead(existingState Adlsgen2Info) { } +func (c Adlsgen2Info) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Adlsgen2Info. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -176,11 +183,11 @@ type AutoScale struct { // The maximum number of workers to which the cluster can scale up when // overloaded. Note that `max_workers` must be strictly greater than // `min_workers`. - MaxWorkers types.Int64 `tfsdk:"max_workers" tf:"optional"` + MaxWorkers types.Int64 `tfsdk:"max_workers" tf:""` // The minimum number of workers to which the cluster can scale down when // underutilized. It is also the initial number of workers the cluster will // have after creation. - MinWorkers types.Int64 `tfsdk:"min_workers" tf:"optional"` + MinWorkers types.Int64 `tfsdk:"min_workers" tf:""` } func (newState *AutoScale) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoScale) { @@ -189,6 +196,11 @@ func (newState *AutoScale) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoScal func (newState *AutoScale) SyncEffectiveFieldsDuringRead(existingState AutoScale) { } +func (c AutoScale) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoScale. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -228,7 +240,7 @@ type AwsAttributes struct { // // Note: If `first_on_demand` is zero, this availability type will be used // for the entire cluster. - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // The number of volumes launched for each instance. Users can choose up to // 10 volumes. This feature is only enabled for supported node types. Legacy // node types cannot specify custom EBS volumes. For node types with no @@ -245,21 +257,21 @@ type AwsAttributes struct { // // Please note that if EBS volumes are specified, then the Spark // configuration `spark.local.dir` will be overridden. - EbsVolumeCount types.Int64 `tfsdk:"ebs_volume_count" tf:"optional"` + EbsVolumeCount types.Int64 `tfsdk:"ebs_volume_count" tf:""` // If using gp3 volumes, what IOPS to use for the disk. If this is not set, // the maximum performance of a gp2 volume with the same volume size will be // used. - EbsVolumeIops types.Int64 `tfsdk:"ebs_volume_iops" tf:"optional"` + EbsVolumeIops types.Int64 `tfsdk:"ebs_volume_iops" tf:""` // The size of each EBS volume (in GiB) launched for each instance. For // general purpose SSD, this value must be within the range 100 - 4096. For // throughput optimized HDD, this value must be within the range 500 - 4096. - EbsVolumeSize types.Int64 `tfsdk:"ebs_volume_size" tf:"optional"` + EbsVolumeSize types.Int64 `tfsdk:"ebs_volume_size" tf:""` // If using gp3 volumes, what throughput to use for the disk. If this is not // set, the maximum performance of a gp2 volume with the same volume size // will be used. - EbsVolumeThroughput types.Int64 `tfsdk:"ebs_volume_throughput" tf:"optional"` + EbsVolumeThroughput types.Int64 `tfsdk:"ebs_volume_throughput" tf:""` // The type of EBS volumes that will be launched with this cluster. - EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:"optional"` + EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:""` // The first `first_on_demand` nodes of the cluster will be placed on // on-demand instances. If this value is greater than 0, the cluster driver // node in particular will be placed on an on-demand instance. If this value @@ -269,7 +281,7 @@ type AwsAttributes struct { // instances and the remainder will be placed on `availability` instances. // Note that this value does not affect cluster size and cannot currently be // mutated over the lifetime of a cluster. - FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:"optional"` + FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:""` // Nodes for this cluster will only be placed on AWS instances with this // instance profile. If ommitted, nodes will be placed on instances without // an IAM instance profile. The instance profile must have previously been @@ -279,7 +291,7 @@ type AwsAttributes struct { // // If this field is ommitted, we will pull in the default from the conf if // it exists. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The bid price for AWS spot instances, as a percentage of the // corresponding instance type's on-demand price. For example, if this field // is set to 50, and the cluster needs a new `r3.xlarge` spot instance, then @@ -294,7 +306,7 @@ type AwsAttributes struct { // The default value and documentation here should be kept consistent with // CommonConf.defaultSpotBidPricePercent and // CommonConf.maxSpotBidPricePercent. - SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:"optional"` + SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:""` // Identifier for the availability zone/datacenter in which the cluster // resides. This string will be of a form like "us-west-2a". The provided // availability zone must be in the same region as the Databricks @@ -305,7 +317,7 @@ type AwsAttributes struct { // in a zone with high availability, and will retry placement in a different // AZ if there is not enough capacity. The list of available zones as well // as the default value can be found by using the `List Zones` method. - ZoneId types.String `tfsdk:"zone_id" tf:"optional"` + ZoneId types.String `tfsdk:"zone_id" tf:""` } func (newState *AwsAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsAttributes) { @@ -314,6 +326,11 @@ func (newState *AwsAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsA func (newState *AwsAttributes) SyncEffectiveFieldsDuringRead(existingState AwsAttributes) { } +func (c AwsAttributes) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -368,7 +385,7 @@ type AzureAttributes struct { // `first_on_demand` ones. Note: If `first_on_demand` is zero (which only // happens on pool clusters), this availability type will be used for the // entire cluster. - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // The first `first_on_demand` nodes of the cluster will be placed on // on-demand instances. This value should be greater than 0, to make sure // the cluster driver node is placed on an on-demand instance. If this value @@ -378,15 +395,15 @@ type AzureAttributes struct { // instances and the remainder will be placed on `availability` instances. // Note that this value does not affect cluster size and cannot currently be // mutated over the lifetime of a cluster. - FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:"optional"` + FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:""` // Defines values necessary to configure and run Azure Log Analytics agent - LogAnalyticsInfo types.Object `tfsdk:"log_analytics_info" tf:"optional,object"` + LogAnalyticsInfo types.Object `tfsdk:"log_analytics_info" tf:"object"` // The max bid price to be used for Azure spot instances. The Max price for // the bid cannot be higher than the on-demand price of the instance. If not // specified, the default value is -1, which specifies that the instance // cannot be evicted on the basis of price, and only on the basis of // availability. Further, the value should > 0 or -1. - SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:"optional"` + SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:""` } func (newState *AzureAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureAttributes) { @@ -395,6 +412,12 @@ func (newState *AzureAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan Az func (newState *AzureAttributes) SyncEffectiveFieldsDuringRead(existingState AzureAttributes) { } +func (c AzureAttributes) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LogAnalyticsInfo{}.ToSchema(cs, append(path, "log_analytics_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -463,11 +486,11 @@ func (o *AzureAttributes) SetLogAnalyticsInfo(ctx context.Context, v LogAnalytic } type CancelCommand struct { - ClusterId types.String `tfsdk:"clusterId" tf:"optional"` + ClusterId types.String `tfsdk:"clusterId" tf:""` - CommandId types.String `tfsdk:"commandId" tf:"optional"` + CommandId types.String `tfsdk:"commandId" tf:""` - ContextId types.String `tfsdk:"contextId" tf:"optional"` + ContextId types.String `tfsdk:"contextId" tf:""` } func (newState *CancelCommand) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelCommand) { @@ -476,6 +499,11 @@ func (newState *CancelCommand) SyncEffectiveFieldsDuringCreateOrUpdate(plan Canc func (newState *CancelCommand) SyncEffectiveFieldsDuringRead(existingState CancelCommand) { } +func (c CancelCommand) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelCommand. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -514,12 +542,6 @@ func (o CancelCommand) Type(ctx context.Context) attr.Type { type CancelResponse struct { } -func (newState *CancelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelResponse) { -} - -func (newState *CancelResponse) SyncEffectiveFieldsDuringRead(existingState CancelResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -560,6 +582,13 @@ func (newState *ChangeClusterOwner) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ChangeClusterOwner) SyncEffectiveFieldsDuringRead(existingState ChangeClusterOwner) { } +func (c ChangeClusterOwner) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + cs.SetRequired(append(path, "owner_username")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ChangeClusterOwner. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -602,6 +631,11 @@ func (newState *ChangeClusterOwnerResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ChangeClusterOwnerResponse) SyncEffectiveFieldsDuringRead(existingState ChangeClusterOwnerResponse) { } +func (c ChangeClusterOwnerResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ChangeClusterOwnerResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -631,9 +665,9 @@ func (o ChangeClusterOwnerResponse) Type(ctx context.Context) attr.Type { type ClientsTypes struct { // With jobs set, the cluster can be used for jobs - Jobs types.Bool `tfsdk:"jobs" tf:"optional"` + Jobs types.Bool `tfsdk:"jobs" tf:""` // With notebooks set, this cluster can be used for notebooks - Notebooks types.Bool `tfsdk:"notebooks" tf:"optional"` + Notebooks types.Bool `tfsdk:"notebooks" tf:""` } func (newState *ClientsTypes) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClientsTypes) { @@ -642,6 +676,11 @@ func (newState *ClientsTypes) SyncEffectiveFieldsDuringCreateOrUpdate(plan Clien func (newState *ClientsTypes) SyncEffectiveFieldsDuringRead(existingState ClientsTypes) { } +func (c ClientsTypes) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClientsTypes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -686,6 +725,12 @@ func (newState *CloneCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan Clone func (newState *CloneCluster) SyncEffectiveFieldsDuringRead(existingState CloneCluster) { } +func (c CloneCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "source_cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloneCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -718,7 +763,7 @@ func (o CloneCluster) Type(ctx context.Context) attr.Type { } type CloudProviderNodeInfo struct { - Status types.List `tfsdk:"status" tf:"optional"` + Status types.List `tfsdk:"status" tf:""` } func (newState *CloudProviderNodeInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloudProviderNodeInfo) { @@ -727,6 +772,11 @@ func (newState *CloudProviderNodeInfo) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CloudProviderNodeInfo) SyncEffectiveFieldsDuringRead(existingState CloudProviderNodeInfo) { } +func (c CloudProviderNodeInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloudProviderNodeInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -790,13 +840,13 @@ func (o *CloudProviderNodeInfo) SetStatus(ctx context.Context, v []types.String) type ClusterAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ClusterAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAccessControlRequest) { @@ -805,6 +855,11 @@ func (newState *ClusterAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUp func (newState *ClusterAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState ClusterAccessControlRequest) { } +func (c ClusterAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -844,15 +899,15 @@ func (o ClusterAccessControlRequest) Type(ctx context.Context) attr.Type { type ClusterAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ClusterAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAccessControlResponse) { @@ -861,6 +916,12 @@ func (newState *ClusterAccessControlResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *ClusterAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState ClusterAccessControlResponse) { } +func (c ClusterAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -936,23 +997,23 @@ type ClusterAttributes struct { // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -961,7 +1022,7 @@ type ClusterAttributes struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -991,39 +1052,39 @@ type ClusterAttributes struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -1031,15 +1092,15 @@ type ClusterAttributes struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -1048,15 +1109,15 @@ type ClusterAttributes struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -1070,7 +1131,7 @@ type ClusterAttributes struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. @@ -1078,15 +1139,15 @@ type ClusterAttributes struct { // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"object"` } func (newState *ClusterAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAttributes) { @@ -1095,6 +1156,19 @@ func (newState *ClusterAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ClusterAttributes) SyncEffectiveFieldsDuringRead(existingState ClusterAttributes) { } +func (c ClusterAttributes) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + ClusterLogConf{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo{}.ToSchema(cs, append(path, "init_scripts")...) + cs.SetRequired(append(path, "spark_version")...) + WorkloadType{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1503,12 +1577,12 @@ type ClusterCompliance struct { ClusterId types.String `tfsdk:"cluster_id" tf:""` // Whether this cluster is in compliance with the latest version of its // policy. - IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + IsCompliant types.Bool `tfsdk:"is_compliant" tf:""` // An object containing key-value mappings representing the first 200 policy // validation errors. The keys indicate the path where the policy validation // error is occurring. The values indicate an error message describing the // policy validation error. - Violations types.Map `tfsdk:"violations" tf:"optional"` + Violations types.Map `tfsdk:"violations" tf:""` } func (newState *ClusterCompliance) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterCompliance) { @@ -1517,6 +1591,12 @@ func (newState *ClusterCompliance) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ClusterCompliance) SyncEffectiveFieldsDuringRead(existingState ClusterCompliance) { } +func (c ClusterCompliance) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterCompliance. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1586,47 +1666,47 @@ type ClusterDetails struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // Number of CPU cores available for this cluster. Note that this can be // fractional, e.g. 7.5 cores, since certain node types are configured to // share cores between Spark nodes on the same instance. - ClusterCores types.Float64 `tfsdk:"cluster_cores" tf:"optional"` + ClusterCores types.Float64 `tfsdk:"cluster_cores" tf:""` // Canonical identifier for the cluster. This id is retained during cluster // restarts and resizes, while each new cluster has a globally unique id. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"object"` // Cluster log delivery status. - ClusterLogStatus types.Object `tfsdk:"cluster_log_status" tf:"optional,object"` + ClusterLogStatus types.Object `tfsdk:"cluster_log_status" tf:"object"` // Total amount of cluster memory, in megabytes - ClusterMemoryMb types.Int64 `tfsdk:"cluster_memory_mb" tf:"optional"` + ClusterMemoryMb types.Int64 `tfsdk:"cluster_memory_mb" tf:""` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Determines whether the cluster was created by a user through the UI, // created by the Databricks Jobs Scheduler, or through an API request. This // is the same as cluster_creator, but read only. - ClusterSource types.String `tfsdk:"cluster_source" tf:"optional"` + ClusterSource types.String `tfsdk:"cluster_source" tf:""` // Creator user name. The field won't be included in the response if the // user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -1635,7 +1715,7 @@ type ClusterDetails struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -1665,7 +1745,7 @@ type ClusterDetails struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` // Tags that are added by Databricks regardless of any `custom_tags`, // including: // @@ -1678,48 +1758,48 @@ type ClusterDetails struct { // - ClusterId: // // - Name: - DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` + DefaultTags types.Map `tfsdk:"default_tags" tf:""` - DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"object"` // Node on which the Spark driver resides. The driver node contains the // Spark master and the Databricks application that manages the per-notebook // Spark REPLs. - Driver types.Object `tfsdk:"driver" tf:"optional,object"` + Driver types.Object `tfsdk:"driver" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Nodes on which the Spark executors reside. - Executors types.List `tfsdk:"executors" tf:"optional"` + Executors types.List `tfsdk:"executors" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // Port on which Spark JDBC server is listening, in the driver nod. No // service will be listeningon on this port in executor nodes. - JdbcPort types.Int64 `tfsdk:"jdbc_port" tf:"optional"` + JdbcPort types.Int64 `tfsdk:"jdbc_port" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -1727,18 +1807,18 @@ type ClusterDetails struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // the timestamp that the cluster was started/restarted - LastRestartedTime types.Int64 `tfsdk:"last_restarted_time" tf:"optional"` + LastRestartedTime types.Int64 `tfsdk:"last_restarted_time" tf:""` // Time when the cluster driver last lost its state (due to a restart or // driver failure). - LastStateLossTime types.Int64 `tfsdk:"last_state_loss_time" tf:"optional"` + LastStateLossTime types.Int64 `tfsdk:"last_state_loss_time" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -1749,9 +1829,9 @@ type ClusterDetails struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -1760,19 +1840,19 @@ type ClusterDetails struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // A canonical SparkContext identifier. This value *does* change when the // Spark driver restarts. The pair `(cluster_id, spark_context_id)` is a // globally unique identifier over all Spark contexts. - SparkContextId types.Int64 `tfsdk:"spark_context_id" tf:"optional"` + SparkContextId types.Int64 `tfsdk:"spark_context_id" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -1786,42 +1866,42 @@ type ClusterDetails struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - SparkVersion types.String `tfsdk:"spark_version" tf:"optional"` + SparkVersion types.String `tfsdk:"spark_version" tf:""` // `spec` contains a snapshot of the field values that were used to create // or edit this cluster. The contents of `spec` can be used in the body of a // create cluster request. This field might not be populated for older // clusters. Note: not included in the response of the ListClusters API. - Spec types.Object `tfsdk:"spec" tf:"optional,object"` + Spec types.Object `tfsdk:"spec" tf:"object"` // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // Time (in epoch milliseconds) when the cluster creation request was // received (when the cluster entered a `PENDING` state). - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Current state of the cluster. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // A message associated with the most recent state transition (e.g., the // reason why the cluster entered a `TERMINATED` state). - StateMessage types.String `tfsdk:"state_message" tf:"optional"` + StateMessage types.String `tfsdk:"state_message" tf:""` // Time (in epoch milliseconds) when the cluster was terminated, if // applicable. - TerminatedTime types.Int64 `tfsdk:"terminated_time" tf:"optional"` + TerminatedTime types.Int64 `tfsdk:"terminated_time" tf:""` // Information about why the cluster was terminated. This field only appears // when the cluster is in a `TERMINATING` or `TERMINATED` state. - TerminationReason types.Object `tfsdk:"termination_reason" tf:"optional,object"` + TerminationReason types.Object `tfsdk:"termination_reason" tf:"object"` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"object"` } func (newState *ClusterDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterDetails) { @@ -1830,6 +1910,24 @@ func (newState *ClusterDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan Clu func (newState *ClusterDetails) SyncEffectiveFieldsDuringRead(existingState ClusterDetails) { } +func (c ClusterDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + ClusterLogConf{}.ToSchema(cs, append(path, "cluster_log_conf")...) + LogSyncStatus{}.ToSchema(cs, append(path, "cluster_log_status")...) + DockerImage{}.ToSchema(cs, append(path, "docker_image")...) + SparkNode{}.ToSchema(cs, append(path, "driver")...) + SparkNode{}.ToSchema(cs, append(path, "executors")...) + GcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo{}.ToSchema(cs, append(path, "init_scripts")...) + ClusterSpec{}.ToSchema(cs, append(path, "spec")...) + TerminationReason{}.ToSchema(cs, append(path, "termination_reason")...) + WorkloadType{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2482,15 +2580,15 @@ type ClusterEvent struct { // ClusterId types.String `tfsdk:"cluster_id" tf:""` // - DataPlaneEventDetails types.Object `tfsdk:"data_plane_event_details" tf:"optional,object"` + DataPlaneEventDetails types.Object `tfsdk:"data_plane_event_details" tf:"object"` // - Details types.Object `tfsdk:"details" tf:"optional,object"` + Details types.Object `tfsdk:"details" tf:"object"` // The timestamp when the event occurred, stored as the number of // milliseconds since the Unix epoch. If not provided, this will be assigned // by the Timeline service. - Timestamp types.Int64 `tfsdk:"timestamp" tf:"optional"` + Timestamp types.Int64 `tfsdk:"timestamp" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *ClusterEvent) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterEvent) { @@ -2499,6 +2597,14 @@ func (newState *ClusterEvent) SyncEffectiveFieldsDuringCreateOrUpdate(plan Clust func (newState *ClusterEvent) SyncEffectiveFieldsDuringRead(existingState ClusterEvent) { } +func (c ClusterEvent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + DataPlaneEventDetails{}.ToSchema(cs, append(path, "data_plane_event_details")...) + EventDetails{}.ToSchema(cs, append(path, "details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterEvent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2599,9 +2705,9 @@ func (o *ClusterEvent) SetDetails(ctx context.Context, v EventDetails) { type ClusterLibraryStatuses struct { // Unique identifier for the cluster. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // Status of all libraries on the cluster. - LibraryStatuses types.List `tfsdk:"library_statuses" tf:"optional"` + LibraryStatuses types.List `tfsdk:"library_statuses" tf:""` } func (newState *ClusterLibraryStatuses) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterLibraryStatuses) { @@ -2610,6 +2716,12 @@ func (newState *ClusterLibraryStatuses) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ClusterLibraryStatuses) SyncEffectiveFieldsDuringRead(existingState ClusterLibraryStatuses) { } +func (c ClusterLibraryStatuses) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LibraryFullStatus{}.ToSchema(cs, append(path, "library_statuses")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterLibraryStatuses. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2676,13 +2788,13 @@ func (o *ClusterLibraryStatuses) SetLibraryStatuses(ctx context.Context, v []Lib type ClusterLogConf struct { // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : // "dbfs:/home/cluster_log" } }` - Dbfs types.Object `tfsdk:"dbfs" tf:"optional,object"` + Dbfs types.Object `tfsdk:"dbfs" tf:"object"` // destination and either the region or endpoint need to be provided. e.g. // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : // "us-west-2" } }` Cluster iam role is used to access s3, please make sure // the cluster iam role in `instance_profile_arn` has permission to write // data to the s3 destination. - S3 types.Object `tfsdk:"s3" tf:"optional,object"` + S3 types.Object `tfsdk:"s3" tf:"object"` } func (newState *ClusterLogConf) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterLogConf) { @@ -2691,6 +2803,13 @@ func (newState *ClusterLogConf) SyncEffectiveFieldsDuringCreateOrUpdate(plan Clu func (newState *ClusterLogConf) SyncEffectiveFieldsDuringRead(existingState ClusterLogConf) { } +func (c ClusterLogConf) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DbfsStorageInfo{}.ToSchema(cs, append(path, "dbfs")...) + S3StorageInfo{}.ToSchema(cs, append(path, "s3")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterLogConf. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2784,11 +2903,11 @@ func (o *ClusterLogConf) SetS3(ctx context.Context, v S3StorageInfo) { } type ClusterPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ClusterPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermission) { @@ -2797,6 +2916,11 @@ func (newState *ClusterPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ClusterPermission) SyncEffectiveFieldsDuringRead(existingState ClusterPermission) { } +func (c ClusterPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2863,11 +2987,11 @@ func (o *ClusterPermission) SetInheritedFromObject(ctx context.Context, v []type } type ClusterPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ClusterPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermissions) { @@ -2876,6 +3000,12 @@ func (newState *ClusterPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ClusterPermissions) SyncEffectiveFieldsDuringRead(existingState ClusterPermissions) { } +func (c ClusterPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2942,9 +3072,9 @@ func (o *ClusterPermissions) SetAccessControlList(ctx context.Context, v []Clust } type ClusterPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ClusterPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermissionsDescription) { @@ -2953,6 +3083,11 @@ func (newState *ClusterPermissionsDescription) SyncEffectiveFieldsDuringCreateOr func (newState *ClusterPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState ClusterPermissionsDescription) { } +func (c ClusterPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2987,7 +3122,7 @@ func (o ClusterPermissionsDescription) Type(ctx context.Context) attr.Type { } type ClusterPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The cluster for which to get or manage permissions. ClusterId types.String `tfsdk:"-"` } @@ -2998,6 +3133,13 @@ func (newState *ClusterPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ClusterPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState ClusterPermissionsRequest) { } +func (c ClusterPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3063,13 +3205,13 @@ func (o *ClusterPermissionsRequest) SetAccessControlList(ctx context.Context, v type ClusterPolicyAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ClusterPolicyAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyAccessControlRequest) { @@ -3078,6 +3220,11 @@ func (newState *ClusterPolicyAccessControlRequest) SyncEffectiveFieldsDuringCrea func (newState *ClusterPolicyAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyAccessControlRequest) { } +func (c ClusterPolicyAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3117,15 +3264,15 @@ func (o ClusterPolicyAccessControlRequest) Type(ctx context.Context) attr.Type { type ClusterPolicyAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ClusterPolicyAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyAccessControlResponse) { @@ -3134,6 +3281,12 @@ func (newState *ClusterPolicyAccessControlResponse) SyncEffectiveFieldsDuringCre func (newState *ClusterPolicyAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyAccessControlResponse) { } +func (c ClusterPolicyAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPolicyPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3204,11 +3357,11 @@ func (o *ClusterPolicyAccessControlResponse) SetAllPermissions(ctx context.Conte } type ClusterPolicyPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ClusterPolicyPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermission) { @@ -3217,6 +3370,11 @@ func (newState *ClusterPolicyPermission) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ClusterPolicyPermission) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermission) { } +func (c ClusterPolicyPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3283,11 +3441,11 @@ func (o *ClusterPolicyPermission) SetInheritedFromObject(ctx context.Context, v } type ClusterPolicyPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ClusterPolicyPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermissions) { @@ -3296,6 +3454,12 @@ func (newState *ClusterPolicyPermissions) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ClusterPolicyPermissions) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissions) { } +func (c ClusterPolicyPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPolicyAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3362,9 +3526,9 @@ func (o *ClusterPolicyPermissions) SetAccessControlList(ctx context.Context, v [ } type ClusterPolicyPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ClusterPolicyPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermissionsDescription) { @@ -3373,6 +3537,11 @@ func (newState *ClusterPolicyPermissionsDescription) SyncEffectiveFieldsDuringCr func (newState *ClusterPolicyPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissionsDescription) { } +func (c ClusterPolicyPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3407,7 +3576,7 @@ func (o ClusterPolicyPermissionsDescription) Type(ctx context.Context) attr.Type } type ClusterPolicyPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The cluster policy for which to get or manage permissions. ClusterPolicyId types.String `tfsdk:"-"` } @@ -3418,6 +3587,13 @@ func (newState *ClusterPolicyPermissionsRequest) SyncEffectiveFieldsDuringCreate func (newState *ClusterPolicyPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissionsRequest) { } +func (c ClusterPolicyPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPolicyAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "cluster_policy_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3485,17 +3661,17 @@ func (o *ClusterPolicyPermissionsRequest) SetAccessControlList(ctx context.Conte // become compliant with its policy. type ClusterSettingsChange struct { // The field where this change would be made. - Field types.String `tfsdk:"field" tf:"optional"` + Field types.String `tfsdk:"field" tf:""` // The new value of this field after enforcing policy compliance (either a // number, a boolean, or a string) converted to a string. This is intended // to be read by a human. The typed new value of this field can be retrieved // by reading the settings field in the API response. - NewValue types.String `tfsdk:"new_value" tf:"optional"` + NewValue types.String `tfsdk:"new_value" tf:""` // The previous value of this field before enforcing policy compliance // (either a number, a boolean, or a string) converted to a string. This is // intended to be read by a human. The type of the field can be retrieved by // reading the settings field in the API response. - PreviousValue types.String `tfsdk:"previous_value" tf:"optional"` + PreviousValue types.String `tfsdk:"previous_value" tf:""` } func (newState *ClusterSettingsChange) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSettingsChange) { @@ -3504,6 +3680,11 @@ func (newState *ClusterSettingsChange) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ClusterSettingsChange) SyncEffectiveFieldsDuringRead(existingState ClusterSettingsChange) { } +func (c ClusterSettingsChange) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSettingsChange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3543,7 +3724,7 @@ type ClusterSize struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"object"` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -3554,7 +3735,7 @@ type ClusterSize struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` } func (newState *ClusterSize) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSize) { @@ -3563,6 +3744,12 @@ func (newState *ClusterSize) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cluste func (newState *ClusterSize) SyncEffectiveFieldsDuringRead(existingState ClusterSize) { } +func (c ClusterSize) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale{}.ToSchema(cs, append(path, "autoscale")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSize. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3630,33 +3817,33 @@ type ClusterSpec struct { // When set to true, fixed and default values from the policy will be used // for fields that are omitted. When set to false, only fixed values from // the policy will be applied. - ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:""` // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -3665,7 +3852,7 @@ type ClusterSpec struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -3695,39 +3882,39 @@ type ClusterSpec struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -3735,13 +3922,13 @@ type ClusterSpec struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -3752,9 +3939,9 @@ type ClusterSpec struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -3763,15 +3950,15 @@ type ClusterSpec struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -3785,23 +3972,23 @@ type ClusterSpec struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - SparkVersion types.String `tfsdk:"spark_version" tf:"optional"` + SparkVersion types.String `tfsdk:"spark_version" tf:""` // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"object"` } func (newState *ClusterSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSpec) { @@ -3810,6 +3997,19 @@ func (newState *ClusterSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cluste func (newState *ClusterSpec) SyncEffectiveFieldsDuringRead(existingState ClusterSpec) { } +func (c ClusterSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + ClusterLogConf{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo{}.ToSchema(cs, append(path, "init_scripts")...) + WorkloadType{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4254,12 +4454,6 @@ type ClusterStatus struct { ClusterId types.String `tfsdk:"-"` } -func (newState *ClusterStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterStatus) { -} - -func (newState *ClusterStatus) SyncEffectiveFieldsDuringRead(existingState ClusterStatus) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4293,13 +4487,13 @@ func (o ClusterStatus) Type(ctx context.Context) attr.Type { type Command struct { // Running cluster id - ClusterId types.String `tfsdk:"clusterId" tf:"optional"` + ClusterId types.String `tfsdk:"clusterId" tf:""` // Executable code - Command types.String `tfsdk:"command" tf:"optional"` + Command types.String `tfsdk:"command" tf:""` // Running context id - ContextId types.String `tfsdk:"contextId" tf:"optional"` + ContextId types.String `tfsdk:"contextId" tf:""` - Language types.String `tfsdk:"language" tf:"optional"` + Language types.String `tfsdk:"language" tf:""` } func (newState *Command) SyncEffectiveFieldsDuringCreateOrUpdate(plan Command) { @@ -4308,6 +4502,11 @@ func (newState *Command) SyncEffectiveFieldsDuringCreateOrUpdate(plan Command) { func (newState *Command) SyncEffectiveFieldsDuringRead(existingState Command) { } +func (c Command) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Command. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4354,12 +4553,6 @@ type CommandStatusRequest struct { ContextId types.String `tfsdk:"-"` } -func (newState *CommandStatusRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CommandStatusRequest) { -} - -func (newState *CommandStatusRequest) SyncEffectiveFieldsDuringRead(existingState CommandStatusRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CommandStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4396,11 +4589,11 @@ func (o CommandStatusRequest) Type(ctx context.Context) attr.Type { } type CommandStatusResponse struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Results types.Object `tfsdk:"results" tf:"optional,object"` + Results types.Object `tfsdk:"results" tf:"object"` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *CommandStatusResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CommandStatusResponse) { @@ -4409,6 +4602,12 @@ func (newState *CommandStatusResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CommandStatusResponse) SyncEffectiveFieldsDuringRead(existingState CommandStatusResponse) { } +func (c CommandStatusResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Results{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CommandStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4481,12 +4680,6 @@ type ContextStatusRequest struct { ContextId types.String `tfsdk:"-"` } -func (newState *ContextStatusRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContextStatusRequest) { -} - -func (newState *ContextStatusRequest) SyncEffectiveFieldsDuringRead(existingState ContextStatusRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ContextStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4521,9 +4714,9 @@ func (o ContextStatusRequest) Type(ctx context.Context) attr.Type { } type ContextStatusResponse struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *ContextStatusResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContextStatusResponse) { @@ -4532,6 +4725,11 @@ func (newState *ContextStatusResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ContextStatusResponse) SyncEffectiveFieldsDuringRead(existingState ContextStatusResponse) { } +func (c ContextStatusResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ContextStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4569,36 +4767,36 @@ type CreateCluster struct { // When set to true, fixed and default values from the policy will be used // for fields that are omitted. When set to false, only fixed values from // the policy will be applied. - ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:""` // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // When specified, this clones libraries from a source cluster during the // creation of a new cluster. - CloneFrom types.Object `tfsdk:"clone_from" tf:"optional,object"` + CloneFrom types.Object `tfsdk:"clone_from" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -4607,7 +4805,7 @@ type CreateCluster struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -4637,39 +4835,39 @@ type CreateCluster struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -4677,13 +4875,13 @@ type CreateCluster struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -4694,9 +4892,9 @@ type CreateCluster struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -4705,15 +4903,15 @@ type CreateCluster struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -4727,7 +4925,7 @@ type CreateCluster struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. @@ -4735,15 +4933,15 @@ type CreateCluster struct { // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"object"` } func (newState *CreateCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCluster) { @@ -4752,6 +4950,21 @@ func (newState *CreateCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan Crea func (newState *CreateCluster) SyncEffectiveFieldsDuringRead(existingState CreateCluster) { } +func (c CreateCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + CloneCluster{}.ToSchema(cs, append(path, "clone_from")...) + ClusterLogConf{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo{}.ToSchema(cs, append(path, "init_scripts")...) + cs.SetRequired(append(path, "spark_version")...) + WorkloadType{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5222,7 +5435,7 @@ func (o *CreateCluster) SetWorkloadType(ctx context.Context, v WorkloadType) { } type CreateClusterResponse struct { - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` } func (newState *CreateClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateClusterResponse) { @@ -5231,6 +5444,11 @@ func (newState *CreateClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateClusterResponse) SyncEffectiveFieldsDuringRead(existingState CreateClusterResponse) { } +func (c CreateClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5264,9 +5482,9 @@ func (o CreateClusterResponse) Type(ctx context.Context) attr.Type { type CreateContext struct { // Running cluster id - ClusterId types.String `tfsdk:"clusterId" tf:"optional"` + ClusterId types.String `tfsdk:"clusterId" tf:""` - Language types.String `tfsdk:"language" tf:"optional"` + Language types.String `tfsdk:"language" tf:""` } func (newState *CreateContext) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateContext) { @@ -5275,6 +5493,11 @@ func (newState *CreateContext) SyncEffectiveFieldsDuringCreateOrUpdate(plan Crea func (newState *CreateContext) SyncEffectiveFieldsDuringRead(existingState CreateContext) { } +func (c CreateContext) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateContext. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5311,28 +5534,28 @@ func (o CreateContext) Type(ctx context.Context) attr.Type { type CreateInstancePool struct { // Attributes related to instance pools running on Amazon Web Services. If // not specified at pool creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to instance pools running on Azure. If not specified // at pool creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // Additional tags for pool resources. Databricks will tag all pool // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: // // - Currently, Databricks allows at most 45 custom tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Defines the specification of the disks that will be attached to all spark // containers. - DiskSpec types.Object `tfsdk:"disk_spec" tf:"optional,object"` + DiskSpec types.Object `tfsdk:"disk_spec" tf:"object"` // Autoscaling Local Storage: when enabled, this instances in this pool will // dynamically acquire additional disk space when its Spark workers are // running low on disk space. In AWS, this feature requires specific AWS // permissions to function correctly - refer to the User Guide for more // details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Attributes related to instance pools running on Google Cloud Platform. If // not specified at pool creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -5340,16 +5563,16 @@ type CreateInstancePool struct { // threshold must be between 0 and 10000 minutes. Users can also set this // value to 0 to instantly remove idle instances from the cache if min cache // size could still hold. - IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:""` // Pool name requested by the user. Pool name must be unique. Length must be // between 1 and 100 characters. InstancePoolName types.String `tfsdk:"instance_pool_name" tf:""` // Maximum number of outstanding instances to keep in the pool, including // both instances used by clusters and idle instances. Clusters that require // further instance provisioning will fail during upsize requests. - MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:""` // Minimum number of idle instances to keep in the instance pool - MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A @@ -5357,12 +5580,12 @@ type CreateInstancePool struct { // :method:clusters/listNodeTypes API call. NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Custom Docker Image BYOC - PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:"optional"` + PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:""` // A list containing at most one preloaded Spark image version for the pool. // Pool-backed clusters started with the preloaded Spark version will start // faster. A list of available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:"optional"` + PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:""` } func (newState *CreateInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstancePool) { @@ -5371,6 +5594,18 @@ func (newState *CreateInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateInstancePool) SyncEffectiveFieldsDuringRead(existingState CreateInstancePool) { } +func (c CreateInstancePool) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + InstancePoolAzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + DiskSpec{}.ToSchema(cs, append(path, "disk_spec")...) + InstancePoolGcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + cs.SetRequired(append(path, "instance_pool_name")...) + cs.SetRequired(append(path, "node_type_id")...) + DockerImage{}.ToSchema(cs, append(path, "preloaded_docker_images")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateInstancePool. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5632,7 +5867,7 @@ func (o *CreateInstancePool) SetPreloadedSparkVersions(ctx context.Context, v [] type CreateInstancePoolResponse struct { // The ID of the created instance pool. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` } func (newState *CreateInstancePoolResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstancePoolResponse) { @@ -5641,6 +5876,11 @@ func (newState *CreateInstancePoolResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CreateInstancePoolResponse) SyncEffectiveFieldsDuringRead(existingState CreateInstancePoolResponse) { } +func (c CreateInstancePoolResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateInstancePoolResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5677,18 +5917,18 @@ type CreatePolicy struct { // Definition Language]. // // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - Definition types.String `tfsdk:"definition" tf:"optional"` + Definition types.String `tfsdk:"definition" tf:""` // Additional human-readable description of the cluster policy. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // A list of libraries to be installed on the next cluster restart that uses // this policy. The maximum number of libraries is 500. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Max number of clusters per user that can be active using this policy. If // not present, there is no max limit. - MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:"optional"` + MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:""` // Cluster Policy name requested by the user. This has to be unique. Length // must be between 1 and 100 characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Policy definition JSON document expressed in [Databricks Policy // Definition Language]. The JSON document must be passed as a string and // cannot be embedded in the requests. @@ -5698,14 +5938,14 @@ type CreatePolicy struct { // policy definition. // // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:"optional"` + PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:""` // ID of the policy family. The cluster policy's policy definition inherits // the policy family's policy definition. // // Cannot be used with `definition`. Use // `policy_family_definition_overrides` instead to customize the policy // definition. - PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:""` } func (newState *CreatePolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePolicy) { @@ -5714,6 +5954,12 @@ func (newState *CreatePolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan Creat func (newState *CreatePolicy) SyncEffectiveFieldsDuringRead(existingState CreatePolicy) { } +func (c CreatePolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Library{}.ToSchema(cs, append(path, "libraries")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5789,7 +6035,7 @@ func (o *CreatePolicy) SetLibraries(ctx context.Context, v []Library) { type CreatePolicyResponse struct { // Canonical unique identifier for the cluster policy. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` } func (newState *CreatePolicyResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePolicyResponse) { @@ -5798,6 +6044,11 @@ func (newState *CreatePolicyResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CreatePolicyResponse) SyncEffectiveFieldsDuringRead(existingState CreatePolicyResponse) { } +func (c CreatePolicyResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePolicyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5831,13 +6082,7 @@ func (o CreatePolicyResponse) Type(ctx context.Context) attr.Type { type CreateResponse struct { // The global init script ID. - ScriptId types.String `tfsdk:"script_id" tf:"optional"` -} - -func (newState *CreateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse) { -} - -func (newState *CreateResponse) SyncEffectiveFieldsDuringRead(existingState CreateResponse) { + ScriptId types.String `tfsdk:"script_id" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. @@ -5872,7 +6117,7 @@ func (o CreateResponse) Type(ctx context.Context) attr.Type { } type Created struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *Created) SyncEffectiveFieldsDuringCreateOrUpdate(plan Created) { @@ -5881,6 +6126,11 @@ func (newState *Created) SyncEffectiveFieldsDuringCreateOrUpdate(plan Created) { func (newState *Created) SyncEffectiveFieldsDuringRead(existingState Created) { } +func (c Created) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Created. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5914,13 +6164,13 @@ func (o Created) Type(ctx context.Context) attr.Type { type DataPlaneEventDetails struct { // - EventType types.String `tfsdk:"event_type" tf:"optional"` + EventType types.String `tfsdk:"event_type" tf:""` // - ExecutorFailures types.Int64 `tfsdk:"executor_failures" tf:"optional"` + ExecutorFailures types.Int64 `tfsdk:"executor_failures" tf:""` // - HostId types.String `tfsdk:"host_id" tf:"optional"` + HostId types.String `tfsdk:"host_id" tf:""` // - Timestamp types.Int64 `tfsdk:"timestamp" tf:"optional"` + Timestamp types.Int64 `tfsdk:"timestamp" tf:""` } func (newState *DataPlaneEventDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPlaneEventDetails) { @@ -5929,6 +6179,11 @@ func (newState *DataPlaneEventDetails) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *DataPlaneEventDetails) SyncEffectiveFieldsDuringRead(existingState DataPlaneEventDetails) { } +func (c DataPlaneEventDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataPlaneEventDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5977,6 +6232,12 @@ func (newState *DbfsStorageInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Db func (newState *DbfsStorageInfo) SyncEffectiveFieldsDuringRead(existingState DbfsStorageInfo) { } +func (c DbfsStorageInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DbfsStorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6019,6 +6280,12 @@ func (newState *DeleteCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dele func (newState *DeleteCluster) SyncEffectiveFieldsDuringRead(existingState DeleteCluster) { } +func (c DeleteCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6059,6 +6326,11 @@ func (newState *DeleteClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *DeleteClusterResponse) SyncEffectiveFieldsDuringRead(existingState DeleteClusterResponse) { } +func (c DeleteClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6092,12 +6364,6 @@ type DeleteGlobalInitScriptRequest struct { ScriptId types.String `tfsdk:"-"` } -func (newState *DeleteGlobalInitScriptRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteGlobalInitScriptRequest) { -} - -func (newState *DeleteGlobalInitScriptRequest) SyncEffectiveFieldsDuringRead(existingState DeleteGlobalInitScriptRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteGlobalInitScriptRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6140,6 +6406,12 @@ func (newState *DeleteInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DeleteInstancePool) SyncEffectiveFieldsDuringRead(existingState DeleteInstancePool) { } +func (c DeleteInstancePool) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_pool_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstancePool. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6180,6 +6452,11 @@ func (newState *DeleteInstancePoolResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *DeleteInstancePoolResponse) SyncEffectiveFieldsDuringRead(existingState DeleteInstancePoolResponse) { } +func (c DeleteInstancePoolResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstancePoolResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6218,6 +6495,12 @@ func (newState *DeletePolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delet func (newState *DeletePolicy) SyncEffectiveFieldsDuringRead(existingState DeletePolicy) { } +func (c DeletePolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "policy_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6258,6 +6541,11 @@ func (newState *DeletePolicyResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DeletePolicyResponse) SyncEffectiveFieldsDuringRead(existingState DeletePolicyResponse) { } +func (c DeletePolicyResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePolicyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6288,12 +6576,6 @@ func (o DeletePolicyResponse) Type(ctx context.Context) attr.Type { type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6333,6 +6615,13 @@ func (newState *DestroyContext) SyncEffectiveFieldsDuringCreateOrUpdate(plan Des func (newState *DestroyContext) SyncEffectiveFieldsDuringRead(existingState DestroyContext) { } +func (c DestroyContext) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "clusterId")...) + cs.SetRequired(append(path, "contextId")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DestroyContext. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6369,12 +6658,6 @@ func (o DestroyContext) Type(ctx context.Context) attr.Type { type DestroyResponse struct { } -func (newState *DestroyResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DestroyResponse) { -} - -func (newState *DestroyResponse) SyncEffectiveFieldsDuringRead(existingState DestroyResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DestroyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6419,9 +6702,9 @@ type DiskSpec struct { // // Disks will be mounted at: - For AWS: `/ebs0`, `/ebs1`, and etc. - For // Azure: `/remote_volume0`, `/remote_volume1`, and etc. - DiskCount types.Int64 `tfsdk:"disk_count" tf:"optional"` + DiskCount types.Int64 `tfsdk:"disk_count" tf:""` - DiskIops types.Int64 `tfsdk:"disk_iops" tf:"optional"` + DiskIops types.Int64 `tfsdk:"disk_iops" tf:""` // The size of each disk (in GiB) launched for each instance. Values must // fall into the supported range for a particular instance type. // @@ -6430,11 +6713,11 @@ type DiskSpec struct { // // For Azure: - Premium LRS (SSD): 1 - 1023 GiB - Standard LRS (HDD): 1- // 1023 GiB - DiskSize types.Int64 `tfsdk:"disk_size" tf:"optional"` + DiskSize types.Int64 `tfsdk:"disk_size" tf:""` - DiskThroughput types.Int64 `tfsdk:"disk_throughput" tf:"optional"` + DiskThroughput types.Int64 `tfsdk:"disk_throughput" tf:""` // The type of disks that will be launched with this cluster. - DiskType types.Object `tfsdk:"disk_type" tf:"optional,object"` + DiskType types.Object `tfsdk:"disk_type" tf:"object"` } func (newState *DiskSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan DiskSpec) { @@ -6443,6 +6726,12 @@ func (newState *DiskSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan DiskSpec) func (newState *DiskSpec) SyncEffectiveFieldsDuringRead(existingState DiskSpec) { } +func (c DiskSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DiskType{}.ToSchema(cs, append(path, "disk_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DiskSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6513,9 +6802,9 @@ func (o *DiskSpec) SetDiskType(ctx context.Context, v DiskType) { } type DiskType struct { - AzureDiskVolumeType types.String `tfsdk:"azure_disk_volume_type" tf:"optional"` + AzureDiskVolumeType types.String `tfsdk:"azure_disk_volume_type" tf:""` - EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:"optional"` + EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:""` } func (newState *DiskType) SyncEffectiveFieldsDuringCreateOrUpdate(plan DiskType) { @@ -6524,6 +6813,11 @@ func (newState *DiskType) SyncEffectiveFieldsDuringCreateOrUpdate(plan DiskType) func (newState *DiskType) SyncEffectiveFieldsDuringRead(existingState DiskType) { } +func (c DiskType) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DiskType. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6559,9 +6853,9 @@ func (o DiskType) Type(ctx context.Context) attr.Type { type DockerBasicAuth struct { // Password of the user - Password types.String `tfsdk:"password" tf:"optional"` + Password types.String `tfsdk:"password" tf:""` // Name of the user - Username types.String `tfsdk:"username" tf:"optional"` + Username types.String `tfsdk:"username" tf:""` } func (newState *DockerBasicAuth) SyncEffectiveFieldsDuringCreateOrUpdate(plan DockerBasicAuth) { @@ -6570,6 +6864,11 @@ func (newState *DockerBasicAuth) SyncEffectiveFieldsDuringCreateOrUpdate(plan Do func (newState *DockerBasicAuth) SyncEffectiveFieldsDuringRead(existingState DockerBasicAuth) { } +func (c DockerBasicAuth) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DockerBasicAuth. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6604,9 +6903,9 @@ func (o DockerBasicAuth) Type(ctx context.Context) attr.Type { } type DockerImage struct { - BasicAuth types.Object `tfsdk:"basic_auth" tf:"optional,object"` + BasicAuth types.Object `tfsdk:"basic_auth" tf:"object"` // URL of the docker image. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *DockerImage) SyncEffectiveFieldsDuringCreateOrUpdate(plan DockerImage) { @@ -6615,6 +6914,12 @@ func (newState *DockerImage) SyncEffectiveFieldsDuringCreateOrUpdate(plan Docker func (newState *DockerImage) SyncEffectiveFieldsDuringRead(existingState DockerImage) { } +func (c DockerImage) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DockerBasicAuth{}.ToSchema(cs, append(path, "basic_auth")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DockerImage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6682,23 +6987,23 @@ type EditCluster struct { // When set to true, fixed and default values from the policy will be used // for fields that are omitted. When set to false, only fixed values from // the policy will be applied. - ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:""` // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // ID of the cluster ClusterId types.String `tfsdk:"cluster_id" tf:""` // The configuration for delivering spark logs to a long-term storage @@ -6707,10 +7012,10 @@ type EditCluster struct { // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -6719,7 +7024,7 @@ type EditCluster struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -6749,39 +7054,39 @@ type EditCluster struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -6789,13 +7094,13 @@ type EditCluster struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -6806,9 +7111,9 @@ type EditCluster struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -6817,15 +7122,15 @@ type EditCluster struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -6839,7 +7144,7 @@ type EditCluster struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. @@ -6847,15 +7152,15 @@ type EditCluster struct { // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"object"` } func (newState *EditCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditCluster) { @@ -6864,6 +7169,21 @@ func (newState *EditCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditCl func (newState *EditCluster) SyncEffectiveFieldsDuringRead(existingState EditCluster) { } +func (c EditCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + cs.SetRequired(append(path, "cluster_id")...) + ClusterLogConf{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo{}.ToSchema(cs, append(path, "init_scripts")...) + cs.SetRequired(append(path, "spark_version")...) + WorkloadType{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7313,6 +7633,11 @@ func (newState *EditClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *EditClusterResponse) SyncEffectiveFieldsDuringRead(existingState EditClusterResponse) { } +func (c EditClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7346,7 +7671,7 @@ type EditInstancePool struct { // addition to `default_tags`. Notes: // // - Currently, Databricks allows at most 45 custom tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -7354,7 +7679,7 @@ type EditInstancePool struct { // threshold must be between 0 and 10000 minutes. Users can also set this // value to 0 to instantly remove idle instances from the cache if min cache // size could still hold. - IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:""` // Instance pool ID InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // Pool name requested by the user. Pool name must be unique. Length must be @@ -7363,9 +7688,9 @@ type EditInstancePool struct { // Maximum number of outstanding instances to keep in the pool, including // both instances used by clusters and idle instances. Clusters that require // further instance provisioning will fail during upsize requests. - MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:""` // Minimum number of idle instances to keep in the instance pool - MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A @@ -7380,6 +7705,14 @@ func (newState *EditInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan E func (newState *EditInstancePool) SyncEffectiveFieldsDuringRead(existingState EditInstancePool) { } +func (c EditInstancePool) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_pool_id")...) + cs.SetRequired(append(path, "instance_pool_name")...) + cs.SetRequired(append(path, "node_type_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditInstancePool. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7462,6 +7795,11 @@ func (newState *EditInstancePoolResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *EditInstancePoolResponse) SyncEffectiveFieldsDuringRead(existingState EditInstancePoolResponse) { } +func (c EditInstancePoolResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditInstancePoolResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7494,18 +7832,18 @@ type EditPolicy struct { // Definition Language]. // // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - Definition types.String `tfsdk:"definition" tf:"optional"` + Definition types.String `tfsdk:"definition" tf:""` // Additional human-readable description of the cluster policy. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // A list of libraries to be installed on the next cluster restart that uses // this policy. The maximum number of libraries is 500. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Max number of clusters per user that can be active using this policy. If // not present, there is no max limit. - MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:"optional"` + MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:""` // Cluster Policy name requested by the user. This has to be unique. Length // must be between 1 and 100 characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Policy definition JSON document expressed in [Databricks Policy // Definition Language]. The JSON document must be passed as a string and // cannot be embedded in the requests. @@ -7515,14 +7853,14 @@ type EditPolicy struct { // policy definition. // // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:"optional"` + PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:""` // ID of the policy family. The cluster policy's policy definition inherits // the policy family's policy definition. // // Cannot be used with `definition`. Use // `policy_family_definition_overrides` instead to customize the policy // definition. - PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:""` // The ID of the policy to update. PolicyId types.String `tfsdk:"policy_id" tf:""` } @@ -7533,6 +7871,13 @@ func (newState *EditPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPol func (newState *EditPolicy) SyncEffectiveFieldsDuringRead(existingState EditPolicy) { } +func (c EditPolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Library{}.ToSchema(cs, append(path, "libraries")...) + cs.SetRequired(append(path, "policy_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7617,7 +7962,12 @@ func (newState *EditPolicyResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EditPolicyResponse) SyncEffectiveFieldsDuringRead(existingState EditPolicyResponse) { } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPolicyResponse. +func (c EditPolicyResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPolicyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to // retrieve the type information of the elements in complex fields at runtime. The values of the map @@ -7647,12 +7997,6 @@ func (o EditPolicyResponse) Type(ctx context.Context) attr.Type { type EditResponse struct { } -func (newState *EditResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditResponse) { -} - -func (newState *EditResponse) SyncEffectiveFieldsDuringRead(existingState EditResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7685,7 +8029,7 @@ type EnforceClusterComplianceRequest struct { ClusterId types.String `tfsdk:"cluster_id" tf:""` // If set, previews the changes that would be made to a cluster to enforce // compliance but does not update the cluster. - ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` + ValidateOnly types.Bool `tfsdk:"validate_only" tf:""` } func (newState *EnforceClusterComplianceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforceClusterComplianceRequest) { @@ -7694,6 +8038,12 @@ func (newState *EnforceClusterComplianceRequest) SyncEffectiveFieldsDuringCreate func (newState *EnforceClusterComplianceRequest) SyncEffectiveFieldsDuringRead(existingState EnforceClusterComplianceRequest) { } +func (c EnforceClusterComplianceRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforceClusterComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7730,10 +8080,10 @@ func (o EnforceClusterComplianceRequest) Type(ctx context.Context) attr.Type { type EnforceClusterComplianceResponse struct { // A list of changes that have been made to the cluster settings for the // cluster to become compliant with its policy. - Changes types.List `tfsdk:"changes" tf:"optional"` + Changes types.List `tfsdk:"changes" tf:""` // Whether any changes have been made to the cluster settings for the // cluster to become compliant with its policy. - HasChanges types.Bool `tfsdk:"has_changes" tf:"optional"` + HasChanges types.Bool `tfsdk:"has_changes" tf:""` } func (newState *EnforceClusterComplianceResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforceClusterComplianceResponse) { @@ -7742,6 +8092,12 @@ func (newState *EnforceClusterComplianceResponse) SyncEffectiveFieldsDuringCreat func (newState *EnforceClusterComplianceResponse) SyncEffectiveFieldsDuringRead(existingState EnforceClusterComplianceResponse) { } +func (c EnforceClusterComplianceResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterSettingsChange{}.ToSchema(cs, append(path, "changes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforceClusterComplianceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7820,7 +8176,7 @@ type Environment struct { // dependency could be , , (WSFS or Volumes in Databricks), E.g. // dependencies: ["foo==0.0.1", "-r /Workspace/test/requirements.txt"] - Dependencies types.List `tfsdk:"dependencies" tf:"optional"` + Dependencies types.List `tfsdk:"dependencies" tf:""` } func (newState *Environment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Environment) { @@ -7829,6 +8185,12 @@ func (newState *Environment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Enviro func (newState *Environment) SyncEffectiveFieldsDuringRead(existingState Environment) { } +func (c Environment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "client")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Environment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7895,52 +8257,52 @@ func (o *Environment) SetDependencies(ctx context.Context, v []types.String) { type EventDetails struct { // * For created clusters, the attributes of the cluster. * For edited // clusters, the new attributes of the cluster. - Attributes types.Object `tfsdk:"attributes" tf:"optional,object"` + Attributes types.Object `tfsdk:"attributes" tf:"object"` // The cause of a change in target size. - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` // The actual cluster size that was set in the cluster creation or edit. - ClusterSize types.Object `tfsdk:"cluster_size" tf:"optional,object"` + ClusterSize types.Object `tfsdk:"cluster_size" tf:"object"` // The current number of vCPUs in the cluster. - CurrentNumVcpus types.Int64 `tfsdk:"current_num_vcpus" tf:"optional"` + CurrentNumVcpus types.Int64 `tfsdk:"current_num_vcpus" tf:""` // The current number of nodes in the cluster. - CurrentNumWorkers types.Int64 `tfsdk:"current_num_workers" tf:"optional"` + CurrentNumWorkers types.Int64 `tfsdk:"current_num_workers" tf:""` // - DidNotExpandReason types.String `tfsdk:"did_not_expand_reason" tf:"optional"` + DidNotExpandReason types.String `tfsdk:"did_not_expand_reason" tf:""` // Current disk size in bytes - DiskSize types.Int64 `tfsdk:"disk_size" tf:"optional"` + DiskSize types.Int64 `tfsdk:"disk_size" tf:""` // More details about the change in driver's state - DriverStateMessage types.String `tfsdk:"driver_state_message" tf:"optional"` + DriverStateMessage types.String `tfsdk:"driver_state_message" tf:""` // Whether or not a blocklisted node should be terminated. For // ClusterEventType NODE_BLACKLISTED. - EnableTerminationForNodeBlocklisted types.Bool `tfsdk:"enable_termination_for_node_blocklisted" tf:"optional"` + EnableTerminationForNodeBlocklisted types.Bool `tfsdk:"enable_termination_for_node_blocklisted" tf:""` // - FreeSpace types.Int64 `tfsdk:"free_space" tf:"optional"` + FreeSpace types.Int64 `tfsdk:"free_space" tf:""` // List of global and cluster init scripts associated with this cluster // event. - InitScripts types.Object `tfsdk:"init_scripts" tf:"optional,object"` + InitScripts types.Object `tfsdk:"init_scripts" tf:"object"` // Instance Id where the event originated from - InstanceId types.String `tfsdk:"instance_id" tf:"optional"` + InstanceId types.String `tfsdk:"instance_id" tf:""` // Unique identifier of the specific job run associated with this cluster // event * For clusters created for jobs, this will be the same as the // cluster name - JobRunName types.String `tfsdk:"job_run_name" tf:"optional"` + JobRunName types.String `tfsdk:"job_run_name" tf:""` // The cluster attributes before a cluster was edited. - PreviousAttributes types.Object `tfsdk:"previous_attributes" tf:"optional,object"` + PreviousAttributes types.Object `tfsdk:"previous_attributes" tf:"object"` // The size of the cluster before an edit or resize. - PreviousClusterSize types.Object `tfsdk:"previous_cluster_size" tf:"optional,object"` + PreviousClusterSize types.Object `tfsdk:"previous_cluster_size" tf:"object"` // Previous disk size in bytes - PreviousDiskSize types.Int64 `tfsdk:"previous_disk_size" tf:"optional"` + PreviousDiskSize types.Int64 `tfsdk:"previous_disk_size" tf:""` // A termination reason: * On a TERMINATED event, this is the reason of the // termination. * On a RESIZE_COMPLETE event, this indicates the reason that // we failed to acquire some nodes. - Reason types.Object `tfsdk:"reason" tf:"optional,object"` + Reason types.Object `tfsdk:"reason" tf:"object"` // The targeted number of vCPUs in the cluster. - TargetNumVcpus types.Int64 `tfsdk:"target_num_vcpus" tf:"optional"` + TargetNumVcpus types.Int64 `tfsdk:"target_num_vcpus" tf:""` // The targeted number of nodes in the cluster. - TargetNumWorkers types.Int64 `tfsdk:"target_num_workers" tf:"optional"` + TargetNumWorkers types.Int64 `tfsdk:"target_num_workers" tf:""` // The user that caused the event to occur. (Empty if it was done by the // control plane.) - User types.String `tfsdk:"user" tf:"optional"` + User types.String `tfsdk:"user" tf:""` } func (newState *EventDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan EventDetails) { @@ -7949,6 +8311,17 @@ func (newState *EventDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan Event func (newState *EventDetails) SyncEffectiveFieldsDuringRead(existingState EventDetails) { } +func (c EventDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAttributes{}.ToSchema(cs, append(path, "attributes")...) + ClusterSize{}.ToSchema(cs, append(path, "cluster_size")...) + InitScriptEventDetails{}.ToSchema(cs, append(path, "init_scripts")...) + ClusterAttributes{}.ToSchema(cs, append(path, "previous_attributes")...) + ClusterSize{}.ToSchema(cs, append(path, "previous_cluster_size")...) + TerminationReason{}.ToSchema(cs, append(path, "reason")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EventDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8197,26 +8570,26 @@ type GcpAttributes struct { // This field determines whether the instance pool will contain preemptible // VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs // if the former is unavailable. - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // boot disk size in GB - BootDiskSize types.Int64 `tfsdk:"boot_disk_size" tf:"optional"` + BootDiskSize types.Int64 `tfsdk:"boot_disk_size" tf:""` // If provided, the cluster will impersonate the google service account when // accessing gcloud services (like GCS). The google service account must // have previously been added to the Databricks environment by an account // administrator. - GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` + GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:""` // If provided, each node (workers and driver) in the cluster will have this // number of local SSDs attached. Each local SSD is 375GB in size. Refer to // [GCP documentation] for the supported number of local SSDs for each // instance type. // // [GCP documentation]: https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:"optional"` + LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:""` // This field determines whether the spark executors will be scheduled to // run on preemptible VMs (when set to true) versus standard compute engine // VMs (when set to false; default). Note: Soon to be deprecated, use the // availability field instead. - UsePreemptibleExecutors types.Bool `tfsdk:"use_preemptible_executors" tf:"optional"` + UsePreemptibleExecutors types.Bool `tfsdk:"use_preemptible_executors" tf:""` // Identifier for the availability zone in which the cluster resides. This // can be one of the following: - "HA" => High availability, spread nodes // across availability zones for a Databricks deployment region [default] - @@ -8224,7 +8597,7 @@ type GcpAttributes struct { // on. - A GCP availability zone => Pick One of the available zones for // (machine type + region) from // https://cloud.google.com/compute/docs/regions-zones. - ZoneId types.String `tfsdk:"zone_id" tf:"optional"` + ZoneId types.String `tfsdk:"zone_id" tf:""` } func (newState *GcpAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpAttributes) { @@ -8233,6 +8606,11 @@ func (newState *GcpAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpA func (newState *GcpAttributes) SyncEffectiveFieldsDuringRead(existingState GcpAttributes) { } +func (c GcpAttributes) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8285,6 +8663,12 @@ func (newState *GcsStorageInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Gcs func (newState *GcsStorageInfo) SyncEffectiveFieldsDuringRead(existingState GcsStorageInfo) { } +func (c GcsStorageInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcsStorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8322,12 +8706,6 @@ type GetClusterComplianceRequest struct { ClusterId types.String `tfsdk:"-"` } -func (newState *GetClusterComplianceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterComplianceRequest) { -} - -func (newState *GetClusterComplianceRequest) SyncEffectiveFieldsDuringRead(existingState GetClusterComplianceRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8363,12 +8741,12 @@ type GetClusterComplianceResponse struct { // Whether the cluster is compliant with its policy or not. Clusters could // be out of compliance if the policy was updated after the cluster was last // edited. - IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + IsCompliant types.Bool `tfsdk:"is_compliant" tf:""` // An object containing key-value mappings representing the first 200 policy // validation errors. The keys indicate the path where the policy validation // error is occurring. The values indicate an error message describing the // policy validation error. - Violations types.Map `tfsdk:"violations" tf:"optional"` + Violations types.Map `tfsdk:"violations" tf:""` } func (newState *GetClusterComplianceResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterComplianceResponse) { @@ -8377,6 +8755,11 @@ func (newState *GetClusterComplianceResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *GetClusterComplianceResponse) SyncEffectiveFieldsDuringRead(existingState GetClusterComplianceResponse) { } +func (c GetClusterComplianceResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterComplianceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8446,12 +8829,6 @@ type GetClusterPermissionLevelsRequest struct { ClusterId types.String `tfsdk:"-"` } -func (newState *GetClusterPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPermissionLevelsRequest) { -} - -func (newState *GetClusterPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetClusterPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8485,7 +8862,7 @@ func (o GetClusterPermissionLevelsRequest) Type(ctx context.Context) attr.Type { type GetClusterPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetClusterPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPermissionLevelsResponse) { @@ -8494,6 +8871,12 @@ func (newState *GetClusterPermissionLevelsResponse) SyncEffectiveFieldsDuringCre func (newState *GetClusterPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetClusterPermissionLevelsResponse) { } +func (c GetClusterPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8561,12 +8944,6 @@ type GetClusterPermissionsRequest struct { ClusterId types.String `tfsdk:"-"` } -func (newState *GetClusterPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPermissionsRequest) { -} - -func (newState *GetClusterPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetClusterPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8604,12 +8981,6 @@ type GetClusterPolicyPermissionLevelsRequest struct { ClusterPolicyId types.String `tfsdk:"-"` } -func (newState *GetClusterPolicyPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyPermissionLevelsRequest) { -} - -func (newState *GetClusterPolicyPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8643,7 +9014,7 @@ func (o GetClusterPolicyPermissionLevelsRequest) Type(ctx context.Context) attr. type GetClusterPolicyPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetClusterPolicyPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyPermissionLevelsResponse) { @@ -8652,6 +9023,12 @@ func (newState *GetClusterPolicyPermissionLevelsResponse) SyncEffectiveFieldsDur func (newState *GetClusterPolicyPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyPermissionLevelsResponse) { } +func (c GetClusterPolicyPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterPolicyPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8719,12 +9096,6 @@ type GetClusterPolicyPermissionsRequest struct { ClusterPolicyId types.String `tfsdk:"-"` } -func (newState *GetClusterPolicyPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyPermissionsRequest) { -} - -func (newState *GetClusterPolicyPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8762,12 +9133,6 @@ type GetClusterPolicyRequest struct { PolicyId types.String `tfsdk:"-"` } -func (newState *GetClusterPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyRequest) { -} - -func (newState *GetClusterPolicyRequest) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8805,12 +9170,6 @@ type GetClusterRequest struct { ClusterId types.String `tfsdk:"-"` } -func (newState *GetClusterRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterRequest) { -} - -func (newState *GetClusterRequest) SyncEffectiveFieldsDuringRead(existingState GetClusterRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8847,22 +9206,22 @@ type GetEvents struct { ClusterId types.String `tfsdk:"cluster_id" tf:""` // The end time in epoch milliseconds. If empty, returns events up to the // current time. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // An optional set of event types to filter on. If empty, all event types // are returned. - EventTypes types.List `tfsdk:"event_types" tf:"optional"` + EventTypes types.List `tfsdk:"event_types" tf:""` // The maximum number of events to include in a page of events. Defaults to // 50, and maximum allowed value is 500. - Limit types.Int64 `tfsdk:"limit" tf:"optional"` + Limit types.Int64 `tfsdk:"limit" tf:""` // The offset in the result set. Defaults to 0 (no offset). When an offset // is specified and the results are requested in descending order, the // end_time field is required. - Offset types.Int64 `tfsdk:"offset" tf:"optional"` + Offset types.Int64 `tfsdk:"offset" tf:""` // The order to list events in; either "ASC" or "DESC". Defaults to "DESC". - Order types.String `tfsdk:"order" tf:"optional"` + Order types.String `tfsdk:"order" tf:""` // The start time in epoch milliseconds. If empty, returns events starting // from the beginning of time. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` } func (newState *GetEvents) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEvents) { @@ -8871,6 +9230,12 @@ func (newState *GetEvents) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEvent func (newState *GetEvents) SyncEffectiveFieldsDuringRead(existingState GetEvents) { } +func (c GetEvents) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEvents. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8946,13 +9311,13 @@ func (o *GetEvents) SetEventTypes(ctx context.Context, v []types.String) { type GetEventsResponse struct { // - Events types.List `tfsdk:"events" tf:"optional"` + Events types.List `tfsdk:"events" tf:""` // The parameters required to retrieve the next page of events. Omitted if // there are no more events to read. - NextPage types.Object `tfsdk:"next_page" tf:"optional,object"` + NextPage types.Object `tfsdk:"next_page" tf:"object"` // The total number of events filtered by the start_time, end_time, and // event_types. - TotalCount types.Int64 `tfsdk:"total_count" tf:"optional"` + TotalCount types.Int64 `tfsdk:"total_count" tf:""` } func (newState *GetEventsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEventsResponse) { @@ -8961,6 +9326,13 @@ func (newState *GetEventsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *GetEventsResponse) SyncEffectiveFieldsDuringRead(existingState GetEventsResponse) { } +func (c GetEventsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterEvent{}.ToSchema(cs, append(path, "events")...) + GetEvents{}.ToSchema(cs, append(path, "next_page")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEventsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9061,12 +9433,6 @@ type GetGlobalInitScriptRequest struct { ScriptId types.String `tfsdk:"-"` } -func (newState *GetGlobalInitScriptRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetGlobalInitScriptRequest) { -} - -func (newState *GetGlobalInitScriptRequest) SyncEffectiveFieldsDuringRead(existingState GetGlobalInitScriptRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetGlobalInitScriptRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9101,16 +9467,16 @@ func (o GetGlobalInitScriptRequest) Type(ctx context.Context) attr.Type { type GetInstancePool struct { // Attributes related to instance pools running on Amazon Web Services. If // not specified at pool creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to instance pools running on Azure. If not specified // at pool creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // Additional tags for pool resources. Databricks will tag all pool // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: // // - Currently, Databricks allows at most 45 custom tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Tags that are added by Databricks regardless of any `custom_tags`, // including: // @@ -9121,19 +9487,19 @@ type GetInstancePool struct { // - InstancePoolName: // // - InstancePoolId: - DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` + DefaultTags types.Map `tfsdk:"default_tags" tf:""` // Defines the specification of the disks that will be attached to all spark // containers. - DiskSpec types.Object `tfsdk:"disk_spec" tf:"optional,object"` + DiskSpec types.Object `tfsdk:"disk_spec" tf:"object"` // Autoscaling Local Storage: when enabled, this instances in this pool will // dynamically acquire additional disk space when its Spark workers are // running low on disk space. In AWS, this feature requires specific AWS // permissions to function correctly - refer to the User Guide for more // details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Attributes related to instance pools running on Google Cloud Platform. If // not specified at pool creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -9141,37 +9507,37 @@ type GetInstancePool struct { // threshold must be between 0 and 10000 minutes. Users can also set this // value to 0 to instantly remove idle instances from the cache if min cache // size could still hold. - IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:""` // Canonical unique identifier for the pool. InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // Pool name requested by the user. Pool name must be unique. Length must be // between 1 and 100 characters. - InstancePoolName types.String `tfsdk:"instance_pool_name" tf:"optional"` + InstancePoolName types.String `tfsdk:"instance_pool_name" tf:""` // Maximum number of outstanding instances to keep in the pool, including // both instances used by clusters and idle instances. Clusters that require // further instance provisioning will fail during upsize requests. - MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:""` // Minimum number of idle instances to keep in the instance pool - MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Custom Docker Image BYOC - PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:"optional"` + PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:""` // A list containing at most one preloaded Spark image version for the pool. // Pool-backed clusters started with the preloaded Spark version will start // faster. A list of available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:"optional"` + PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:""` // Current state of the instance pool. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Usage statistics about the instance pool. - Stats types.Object `tfsdk:"stats" tf:"optional,object"` + Stats types.Object `tfsdk:"stats" tf:"object"` // Status of failed pending instances in the pool. - Status types.Object `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"object"` } func (newState *GetInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePool) { @@ -9180,6 +9546,19 @@ func (newState *GetInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ge func (newState *GetInstancePool) SyncEffectiveFieldsDuringRead(existingState GetInstancePool) { } +func (c GetInstancePool) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + InstancePoolAzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + DiskSpec{}.ToSchema(cs, append(path, "disk_spec")...) + InstancePoolGcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + cs.SetRequired(append(path, "instance_pool_id")...) + DockerImage{}.ToSchema(cs, append(path, "preloaded_docker_images")...) + InstancePoolStats{}.ToSchema(cs, append(path, "stats")...) + InstancePoolStatus{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePool. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9542,12 +9921,6 @@ type GetInstancePoolPermissionLevelsRequest struct { InstancePoolId types.String `tfsdk:"-"` } -func (newState *GetInstancePoolPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolPermissionLevelsRequest) { -} - -func (newState *GetInstancePoolPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9581,7 +9954,7 @@ func (o GetInstancePoolPermissionLevelsRequest) Type(ctx context.Context) attr.T type GetInstancePoolPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetInstancePoolPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolPermissionLevelsResponse) { @@ -9590,6 +9963,12 @@ func (newState *GetInstancePoolPermissionLevelsResponse) SyncEffectiveFieldsDuri func (newState *GetInstancePoolPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolPermissionLevelsResponse) { } +func (c GetInstancePoolPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9657,12 +10036,6 @@ type GetInstancePoolPermissionsRequest struct { InstancePoolId types.String `tfsdk:"-"` } -func (newState *GetInstancePoolPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolPermissionsRequest) { -} - -func (newState *GetInstancePoolPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9700,12 +10073,6 @@ type GetInstancePoolRequest struct { InstancePoolId types.String `tfsdk:"-"` } -func (newState *GetInstancePoolRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolRequest) { -} - -func (newState *GetInstancePoolRequest) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9746,12 +10113,6 @@ type GetPolicyFamilyRequest struct { Version types.Int64 `tfsdk:"-"` } -func (newState *GetPolicyFamilyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPolicyFamilyRequest) { -} - -func (newState *GetPolicyFamilyRequest) SyncEffectiveFieldsDuringRead(existingState GetPolicyFamilyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPolicyFamilyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9787,7 +10148,7 @@ func (o GetPolicyFamilyRequest) Type(ctx context.Context) attr.Type { type GetSparkVersionsResponse struct { // All the available Spark versions. - Versions types.List `tfsdk:"versions" tf:"optional"` + Versions types.List `tfsdk:"versions" tf:""` } func (newState *GetSparkVersionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSparkVersionsResponse) { @@ -9796,6 +10157,12 @@ func (newState *GetSparkVersionsResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *GetSparkVersionsResponse) SyncEffectiveFieldsDuringRead(existingState GetSparkVersionsResponse) { } +func (c GetSparkVersionsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparkVersion{}.ToSchema(cs, append(path, "versions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSparkVersionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9859,7 +10226,7 @@ func (o *GetSparkVersionsResponse) SetVersions(ctx context.Context, v []SparkVer type GlobalInitScriptCreateRequest struct { // Specifies whether the script is enabled. The script runs only if enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the script Name types.String `tfsdk:"name" tf:""` // The position of a global init script, where 0 represents the first script @@ -9873,7 +10240,7 @@ type GlobalInitScriptCreateRequest struct { // position. If an explicit position value conflicts with an existing script // value, your request succeeds, but the original script at that position // and all later scripts have their positions incremented by 1. - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The Base64-encoded content of the script. Script types.String `tfsdk:"script" tf:""` } @@ -9884,6 +10251,13 @@ func (newState *GlobalInitScriptCreateRequest) SyncEffectiveFieldsDuringCreateOr func (newState *GlobalInitScriptCreateRequest) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptCreateRequest) { } +func (c GlobalInitScriptCreateRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "script")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptCreateRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9924,23 +10298,23 @@ func (o GlobalInitScriptCreateRequest) Type(ctx context.Context) attr.Type { type GlobalInitScriptDetails struct { // Time when the script was created, represented as a Unix timestamp in // milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The username of the user who created the script. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Specifies whether the script is enabled. The script runs only if enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the script - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The position of a script, where 0 represents the first script to run, 1 // is the second script to run, in ascending order. - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The global init script ID. - ScriptId types.String `tfsdk:"script_id" tf:"optional"` + ScriptId types.String `tfsdk:"script_id" tf:""` // Time when the script was updated, represented as a Unix timestamp in // milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The username of the user who last updated the script - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *GlobalInitScriptDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptDetails) { @@ -9949,6 +10323,11 @@ func (newState *GlobalInitScriptDetails) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *GlobalInitScriptDetails) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptDetails) { } +func (c GlobalInitScriptDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9997,25 +10376,25 @@ func (o GlobalInitScriptDetails) Type(ctx context.Context) attr.Type { type GlobalInitScriptDetailsWithContent struct { // Time when the script was created, represented as a Unix timestamp in // milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The username of the user who created the script. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Specifies whether the script is enabled. The script runs only if enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the script - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The position of a script, where 0 represents the first script to run, 1 // is the second script to run, in ascending order. - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The Base64-encoded content of the script. - Script types.String `tfsdk:"script" tf:"optional"` + Script types.String `tfsdk:"script" tf:""` // The global init script ID. - ScriptId types.String `tfsdk:"script_id" tf:"optional"` + ScriptId types.String `tfsdk:"script_id" tf:""` // Time when the script was updated, represented as a Unix timestamp in // milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // The username of the user who last updated the script - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *GlobalInitScriptDetailsWithContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptDetailsWithContent) { @@ -10024,6 +10403,11 @@ func (newState *GlobalInitScriptDetailsWithContent) SyncEffectiveFieldsDuringCre func (newState *GlobalInitScriptDetailsWithContent) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptDetailsWithContent) { } +func (c GlobalInitScriptDetailsWithContent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptDetailsWithContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10073,7 +10457,7 @@ func (o GlobalInitScriptDetailsWithContent) Type(ctx context.Context) attr.Type type GlobalInitScriptUpdateRequest struct { // Specifies whether the script is enabled. The script runs only if enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the script Name types.String `tfsdk:"name" tf:""` // The position of a script, where 0 represents the first script to run, 1 @@ -10088,7 +10472,7 @@ type GlobalInitScriptUpdateRequest struct { // If an explicit position value conflicts with an existing script, your // request succeeds, but the original script at that position and all later // scripts have their positions incremented by 1. - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The Base64-encoded content of the script. Script types.String `tfsdk:"script" tf:""` // The ID of the global init script. @@ -10101,6 +10485,14 @@ func (newState *GlobalInitScriptUpdateRequest) SyncEffectiveFieldsDuringCreateOr func (newState *GlobalInitScriptUpdateRequest) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptUpdateRequest) { } +func (c GlobalInitScriptUpdateRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "script")...) + cs.SetRequired(append(path, "script_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptUpdateRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10142,11 +10534,11 @@ func (o GlobalInitScriptUpdateRequest) Type(ctx context.Context) attr.Type { type InitScriptEventDetails struct { // The cluster scoped init scripts associated with this cluster event - Cluster types.List `tfsdk:"cluster" tf:"optional"` + Cluster types.List `tfsdk:"cluster" tf:""` // The global init scripts associated with this cluster event - Global types.List `tfsdk:"global" tf:"optional"` + Global types.List `tfsdk:"global" tf:""` // The private ip address of the node where the init scripts were run. - ReportedForNode types.String `tfsdk:"reported_for_node" tf:"optional"` + ReportedForNode types.String `tfsdk:"reported_for_node" tf:""` } func (newState *InitScriptEventDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptEventDetails) { @@ -10155,6 +10547,13 @@ func (newState *InitScriptEventDetails) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *InitScriptEventDetails) SyncEffectiveFieldsDuringRead(existingState InitScriptEventDetails) { } +func (c InitScriptEventDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InitScriptInfoAndExecutionDetails{}.ToSchema(cs, append(path, "cluster")...) + InitScriptInfoAndExecutionDetails{}.ToSchema(cs, append(path, "global")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptEventDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10251,11 +10650,11 @@ func (o *InitScriptEventDetails) SetGlobal(ctx context.Context, v []InitScriptIn type InitScriptExecutionDetails struct { // Addition details regarding errors. - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` // The duration of the script execution in seconds. - ExecutionDurationSeconds types.Int64 `tfsdk:"execution_duration_seconds" tf:"optional"` + ExecutionDurationSeconds types.Int64 `tfsdk:"execution_duration_seconds" tf:""` // The current status of the script - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *InitScriptExecutionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptExecutionDetails) { @@ -10264,6 +10663,11 @@ func (newState *InitScriptExecutionDetails) SyncEffectiveFieldsDuringCreateOrUpd func (newState *InitScriptExecutionDetails) SyncEffectiveFieldsDuringRead(existingState InitScriptExecutionDetails) { } +func (c InitScriptExecutionDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptExecutionDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10303,28 +10707,28 @@ type InitScriptInfo struct { // destination needs to be provided. e.g. `{ "abfss" : { "destination" : // "abfss://@.dfs.core.windows.net/" // } } - Abfss types.Object `tfsdk:"abfss" tf:"optional,object"` + Abfss types.Object `tfsdk:"abfss" tf:"object"` // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : // "dbfs:/home/cluster_log" } }` - Dbfs types.Object `tfsdk:"dbfs" tf:"optional,object"` + Dbfs types.Object `tfsdk:"dbfs" tf:"object"` // destination needs to be provided. e.g. `{ "file" : { "destination" : // "file:/my/local/file.sh" } }` - File types.Object `tfsdk:"file" tf:"optional,object"` + File types.Object `tfsdk:"file" tf:"object"` // destination needs to be provided. e.g. `{ "gcs": { "destination": // "gs://my-bucket/file.sh" } }` - Gcs types.Object `tfsdk:"gcs" tf:"optional,object"` + Gcs types.Object `tfsdk:"gcs" tf:"object"` // destination and either the region or endpoint need to be provided. e.g. // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : // "us-west-2" } }` Cluster iam role is used to access s3, please make sure // the cluster iam role in `instance_profile_arn` has permission to write // data to the s3 destination. - S3 types.Object `tfsdk:"s3" tf:"optional,object"` + S3 types.Object `tfsdk:"s3" tf:"object"` // destination needs to be provided. e.g. `{ "volumes" : { "destination" : // "/Volumes/my-init.sh" } }` - Volumes types.Object `tfsdk:"volumes" tf:"optional,object"` + Volumes types.Object `tfsdk:"volumes" tf:"object"` // destination needs to be provided. e.g. `{ "workspace" : { "destination" : // "/Users/user1@databricks.com/my-init.sh" } }` - Workspace types.Object `tfsdk:"workspace" tf:"optional,object"` + Workspace types.Object `tfsdk:"workspace" tf:"object"` } func (newState *InitScriptInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptInfo) { @@ -10333,6 +10737,18 @@ func (newState *InitScriptInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ini func (newState *InitScriptInfo) SyncEffectiveFieldsDuringRead(existingState InitScriptInfo) { } +func (c InitScriptInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Adlsgen2Info{}.ToSchema(cs, append(path, "abfss")...) + DbfsStorageInfo{}.ToSchema(cs, append(path, "dbfs")...) + LocalFileInfo{}.ToSchema(cs, append(path, "file")...) + GcsStorageInfo{}.ToSchema(cs, append(path, "gcs")...) + S3StorageInfo{}.ToSchema(cs, append(path, "s3")...) + VolumesStorageInfo{}.ToSchema(cs, append(path, "volumes")...) + WorkspaceStorageInfo{}.ToSchema(cs, append(path, "workspace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10582,9 +10998,9 @@ func (o *InitScriptInfo) SetWorkspace(ctx context.Context, v WorkspaceStorageInf type InitScriptInfoAndExecutionDetails struct { // Details about the script - ExecutionDetails types.Object `tfsdk:"execution_details" tf:"optional,object"` + ExecutionDetails types.Object `tfsdk:"execution_details" tf:"object"` // The script - Script types.Object `tfsdk:"script" tf:"optional,object"` + Script types.Object `tfsdk:"script" tf:"object"` } func (newState *InitScriptInfoAndExecutionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptInfoAndExecutionDetails) { @@ -10593,6 +11009,13 @@ func (newState *InitScriptInfoAndExecutionDetails) SyncEffectiveFieldsDuringCrea func (newState *InitScriptInfoAndExecutionDetails) SyncEffectiveFieldsDuringRead(existingState InitScriptInfoAndExecutionDetails) { } +func (c InitScriptInfoAndExecutionDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InitScriptExecutionDetails{}.ToSchema(cs, append(path, "execution_details")...) + InitScriptInfo{}.ToSchema(cs, append(path, "script")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptInfoAndExecutionDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10698,6 +11121,14 @@ func (newState *InstallLibraries) SyncEffectiveFieldsDuringCreateOrUpdate(plan I func (newState *InstallLibraries) SyncEffectiveFieldsDuringRead(existingState InstallLibraries) { } +func (c InstallLibraries) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + cs.SetRequired(append(path, "libraries")...) + Library{}.ToSchema(cs, append(path, "libraries")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstallLibraries. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10770,6 +11201,11 @@ func (newState *InstallLibrariesResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *InstallLibrariesResponse) SyncEffectiveFieldsDuringRead(existingState InstallLibrariesResponse) { } +func (c InstallLibrariesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstallLibrariesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10799,13 +11235,13 @@ func (o InstallLibrariesResponse) Type(ctx context.Context) attr.Type { type InstancePoolAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *InstancePoolAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAccessControlRequest) { @@ -10814,6 +11250,11 @@ func (newState *InstancePoolAccessControlRequest) SyncEffectiveFieldsDuringCreat func (newState *InstancePoolAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState InstancePoolAccessControlRequest) { } +func (c InstancePoolAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10853,15 +11294,15 @@ func (o InstancePoolAccessControlRequest) Type(ctx context.Context) attr.Type { type InstancePoolAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *InstancePoolAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAccessControlResponse) { @@ -10870,6 +11311,12 @@ func (newState *InstancePoolAccessControlResponse) SyncEffectiveFieldsDuringCrea func (newState *InstancePoolAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState InstancePoolAccessControlResponse) { } +func (c InstancePoolAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10942,16 +11389,16 @@ func (o *InstancePoolAccessControlResponse) SetAllPermissions(ctx context.Contex type InstancePoolAndStats struct { // Attributes related to instance pools running on Amazon Web Services. If // not specified at pool creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to instance pools running on Azure. If not specified // at pool creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // Additional tags for pool resources. Databricks will tag all pool // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: // // - Currently, Databricks allows at most 45 custom tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Tags that are added by Databricks regardless of any `custom_tags`, // including: // @@ -10962,19 +11409,19 @@ type InstancePoolAndStats struct { // - InstancePoolName: // // - InstancePoolId: - DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` + DefaultTags types.Map `tfsdk:"default_tags" tf:""` // Defines the specification of the disks that will be attached to all spark // containers. - DiskSpec types.Object `tfsdk:"disk_spec" tf:"optional,object"` + DiskSpec types.Object `tfsdk:"disk_spec" tf:"object"` // Autoscaling Local Storage: when enabled, this instances in this pool will // dynamically acquire additional disk space when its Spark workers are // running low on disk space. In AWS, this feature requires specific AWS // permissions to function correctly - refer to the User Guide for more // details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Attributes related to instance pools running on Google Cloud Platform. If // not specified at pool creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -10982,37 +11429,37 @@ type InstancePoolAndStats struct { // threshold must be between 0 and 10000 minutes. Users can also set this // value to 0 to instantly remove idle instances from the cache if min cache // size could still hold. - IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:""` // Canonical unique identifier for the pool. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // Pool name requested by the user. Pool name must be unique. Length must be // between 1 and 100 characters. - InstancePoolName types.String `tfsdk:"instance_pool_name" tf:"optional"` + InstancePoolName types.String `tfsdk:"instance_pool_name" tf:""` // Maximum number of outstanding instances to keep in the pool, including // both instances used by clusters and idle instances. Clusters that require // further instance provisioning will fail during upsize requests. - MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:""` // Minimum number of idle instances to keep in the instance pool - MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Custom Docker Image BYOC - PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:"optional"` + PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:""` // A list containing at most one preloaded Spark image version for the pool. // Pool-backed clusters started with the preloaded Spark version will start // faster. A list of available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:"optional"` + PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:""` // Current state of the instance pool. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Usage statistics about the instance pool. - Stats types.Object `tfsdk:"stats" tf:"optional,object"` + Stats types.Object `tfsdk:"stats" tf:"object"` // Status of failed pending instances in the pool. - Status types.Object `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"object"` } func (newState *InstancePoolAndStats) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAndStats) { @@ -11021,6 +11468,18 @@ func (newState *InstancePoolAndStats) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *InstancePoolAndStats) SyncEffectiveFieldsDuringRead(existingState InstancePoolAndStats) { } +func (c InstancePoolAndStats) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + InstancePoolAzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + DiskSpec{}.ToSchema(cs, append(path, "disk_spec")...) + InstancePoolGcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + DockerImage{}.ToSchema(cs, append(path, "preloaded_docker_images")...) + InstancePoolStats{}.ToSchema(cs, append(path, "stats")...) + InstancePoolStatus{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAndStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11382,7 +11841,7 @@ type InstancePoolAwsAttributes struct { // // The default value is defined by // InstancePoolConf.instancePoolDefaultAwsAvailability - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // Calculates the bid price for AWS spot instances, as a percentage of the // corresponding instance type's on-demand price. For example, if this field // is set to 50, and the cluster needs a new `r3.xlarge` spot instance, then @@ -11397,7 +11856,7 @@ type InstancePoolAwsAttributes struct { // The default value and documentation here should be kept consistent with // CommonConf.defaultSpotBidPricePercent and // CommonConf.maxSpotBidPricePercent. - SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:"optional"` + SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:""` // Identifier for the availability zone/datacenter in which the cluster // resides. This string will be of a form like "us-west-2a". The provided // availability zone must be in the same region as the Databricks @@ -11406,7 +11865,7 @@ type InstancePoolAwsAttributes struct { // optional field at cluster creation, and if not specified, a default zone // will be used. The list of available zones as well as the default value // can be found by using the `List Zones` method. - ZoneId types.String `tfsdk:"zone_id" tf:"optional"` + ZoneId types.String `tfsdk:"zone_id" tf:""` } func (newState *InstancePoolAwsAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAwsAttributes) { @@ -11415,6 +11874,11 @@ func (newState *InstancePoolAwsAttributes) SyncEffectiveFieldsDuringCreateOrUpda func (newState *InstancePoolAwsAttributes) SyncEffectiveFieldsDuringRead(existingState InstancePoolAwsAttributes) { } +func (c InstancePoolAwsAttributes) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAwsAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11455,10 +11919,10 @@ type InstancePoolAzureAttributes struct { // // The default value is defined by // InstancePoolConf.instancePoolDefaultAzureAvailability - Availability types.String `tfsdk:"availability" tf:"optional"` + Availability types.String `tfsdk:"availability" tf:""` // The default value and documentation here should be kept consistent with // CommonConf.defaultSpotBidMaxPrice. - SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:"optional"` + SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:""` } func (newState *InstancePoolAzureAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAzureAttributes) { @@ -11467,6 +11931,11 @@ func (newState *InstancePoolAzureAttributes) SyncEffectiveFieldsDuringCreateOrUp func (newState *InstancePoolAzureAttributes) SyncEffectiveFieldsDuringRead(existingState InstancePoolAzureAttributes) { } +func (c InstancePoolAzureAttributes) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAzureAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11504,14 +11973,14 @@ type InstancePoolGcpAttributes struct { // This field determines whether the instance pool will contain preemptible // VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs // if the former is unavailable. - GcpAvailability types.String `tfsdk:"gcp_availability" tf:"optional"` + GcpAvailability types.String `tfsdk:"gcp_availability" tf:""` // If provided, each node in the instance pool will have this number of // local SSDs attached. Each local SSD is 375GB in size. Refer to [GCP // documentation] for the supported number of local SSDs for each instance // type. // // [GCP documentation]: https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds - LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:"optional"` + LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:""` // Identifier for the availability zone/datacenter in which the cluster // resides. This string will be of a form like "us-west1-a". The provided // availability zone must be in the same region as the Databricks workspace. @@ -11528,7 +11997,7 @@ type InstancePoolGcpAttributes struct { // // If empty, Databricks picks an availability zone to schedule the cluster // on. - ZoneId types.String `tfsdk:"zone_id" tf:"optional"` + ZoneId types.String `tfsdk:"zone_id" tf:""` } func (newState *InstancePoolGcpAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolGcpAttributes) { @@ -11537,6 +12006,11 @@ func (newState *InstancePoolGcpAttributes) SyncEffectiveFieldsDuringCreateOrUpda func (newState *InstancePoolGcpAttributes) SyncEffectiveFieldsDuringRead(existingState InstancePoolGcpAttributes) { } +func (c InstancePoolGcpAttributes) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolGcpAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11573,11 +12047,11 @@ func (o InstancePoolGcpAttributes) Type(ctx context.Context) attr.Type { } type InstancePoolPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *InstancePoolPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermission) { @@ -11586,6 +12060,11 @@ func (newState *InstancePoolPermission) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *InstancePoolPermission) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermission) { } +func (c InstancePoolPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11652,11 +12131,11 @@ func (o *InstancePoolPermission) SetInheritedFromObject(ctx context.Context, v [ } type InstancePoolPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *InstancePoolPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermissions) { @@ -11665,6 +12144,12 @@ func (newState *InstancePoolPermissions) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *InstancePoolPermissions) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissions) { } +func (c InstancePoolPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11731,9 +12216,9 @@ func (o *InstancePoolPermissions) SetAccessControlList(ctx context.Context, v [] } type InstancePoolPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *InstancePoolPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermissionsDescription) { @@ -11742,6 +12227,11 @@ func (newState *InstancePoolPermissionsDescription) SyncEffectiveFieldsDuringCre func (newState *InstancePoolPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissionsDescription) { } +func (c InstancePoolPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11776,7 +12266,7 @@ func (o InstancePoolPermissionsDescription) Type(ctx context.Context) attr.Type } type InstancePoolPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The instance pool for which to get or manage permissions. InstancePoolId types.String `tfsdk:"-"` } @@ -11787,6 +12277,13 @@ func (newState *InstancePoolPermissionsRequest) SyncEffectiveFieldsDuringCreateO func (newState *InstancePoolPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissionsRequest) { } +func (c InstancePoolPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "instance_pool_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11852,13 +12349,13 @@ func (o *InstancePoolPermissionsRequest) SetAccessControlList(ctx context.Contex type InstancePoolStats struct { // Number of active instances in the pool that are NOT part of a cluster. - IdleCount types.Int64 `tfsdk:"idle_count" tf:"optional"` + IdleCount types.Int64 `tfsdk:"idle_count" tf:""` // Number of pending instances in the pool that are NOT part of a cluster. - PendingIdleCount types.Int64 `tfsdk:"pending_idle_count" tf:"optional"` + PendingIdleCount types.Int64 `tfsdk:"pending_idle_count" tf:""` // Number of pending instances in the pool that are part of a cluster. - PendingUsedCount types.Int64 `tfsdk:"pending_used_count" tf:"optional"` + PendingUsedCount types.Int64 `tfsdk:"pending_used_count" tf:""` // Number of active instances in the pool that are part of a cluster. - UsedCount types.Int64 `tfsdk:"used_count" tf:"optional"` + UsedCount types.Int64 `tfsdk:"used_count" tf:""` } func (newState *InstancePoolStats) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolStats) { @@ -11867,6 +12364,11 @@ func (newState *InstancePoolStats) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *InstancePoolStats) SyncEffectiveFieldsDuringRead(existingState InstancePoolStats) { } +func (c InstancePoolStats) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11909,7 +12411,7 @@ type InstancePoolStatus struct { // pending_instance_errors follows FIFO with maximum length of the min_idle // of the pool. The pending_instance_errors is emptied once the number of // exiting available instances reaches the min_idle of the pool. - PendingInstanceErrors types.List `tfsdk:"pending_instance_errors" tf:"optional"` + PendingInstanceErrors types.List `tfsdk:"pending_instance_errors" tf:""` } func (newState *InstancePoolStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolStatus) { @@ -11918,6 +12420,12 @@ func (newState *InstancePoolStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *InstancePoolStatus) SyncEffectiveFieldsDuringRead(existingState InstancePoolStatus) { } +func (c InstancePoolStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PendingInstanceError{}.ToSchema(cs, append(path, "pending_instance_errors")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11988,7 +12496,7 @@ type InstanceProfile struct { // Otherwise, this field is optional. // // [Databricks SQL Serverless]: https://docs.databricks.com/sql/admin/serverless.html - IamRoleArn types.String `tfsdk:"iam_role_arn" tf:"optional"` + IamRoleArn types.String `tfsdk:"iam_role_arn" tf:""` // The AWS ARN of the instance profile to register with Databricks. This // field is required. InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` @@ -11997,7 +12505,7 @@ type InstanceProfile struct { // profile contains an meta IAM role which could assume a wide range of // roles. Therefore it should always be used with authorization. This field // is optional, the default value is `false`. - IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:"optional"` + IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:""` } func (newState *InstanceProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstanceProfile) { @@ -12006,6 +12514,12 @@ func (newState *InstanceProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan In func (newState *InstanceProfile) SyncEffectiveFieldsDuringRead(existingState InstanceProfile) { } +func (c InstanceProfile) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_profile_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstanceProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12043,11 +12557,11 @@ func (o InstanceProfile) Type(ctx context.Context) attr.Type { type Library struct { // Specification of a CRAN library to be installed as part of the library - Cran types.Object `tfsdk:"cran" tf:"optional,object"` + Cran types.Object `tfsdk:"cran" tf:"object"` // Deprecated. URI of the egg library to install. Installing Python egg // files is deprecated and is not supported in Databricks Runtime 14.0 and // above. - Egg types.String `tfsdk:"egg" tf:"optional"` + Egg types.String `tfsdk:"egg" tf:""` // URI of the JAR library to install. Supported URIs include Workspace // paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "jar": // "/Workspace/path/to/library.jar" }`, `{ "jar" : @@ -12055,18 +12569,18 @@ type Library struct { // "s3://my-bucket/library.jar" }`. If S3 is used, please make sure the // cluster has read access on the library. You may need to launch the // cluster with an IAM role to access the S3 URI. - Jar types.String `tfsdk:"jar" tf:"optional"` + Jar types.String `tfsdk:"jar" tf:""` // Specification of a maven library to be installed. For example: `{ // "coordinates": "org.jsoup:jsoup:1.7.2" }` - Maven types.Object `tfsdk:"maven" tf:"optional,object"` + Maven types.Object `tfsdk:"maven" tf:"object"` // Specification of a PyPi library to be installed. For example: `{ // "package": "simplejson" }` - Pypi types.Object `tfsdk:"pypi" tf:"optional,object"` + Pypi types.Object `tfsdk:"pypi" tf:"object"` // URI of the requirements.txt file to install. Only Workspace paths and // Unity Catalog Volumes paths are supported. For example: `{ // "requirements": "/Workspace/path/to/requirements.txt" }` or `{ // "requirements" : "/Volumes/path/to/requirements.txt" }` - Requirements types.String `tfsdk:"requirements" tf:"optional"` + Requirements types.String `tfsdk:"requirements" tf:""` // URI of the wheel library to install. Supported URIs include Workspace // paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "whl": // "/Workspace/path/to/library.whl" }`, `{ "whl" : @@ -12074,7 +12588,7 @@ type Library struct { // "s3://my-bucket/library.whl" }`. If S3 is used, please make sure the // cluster has read access on the library. You may need to launch the // cluster with an IAM role to access the S3 URI. - Whl types.String `tfsdk:"whl" tf:"optional"` + Whl types.String `tfsdk:"whl" tf:""` } func (newState *Library) SyncEffectiveFieldsDuringCreateOrUpdate(plan Library) { @@ -12083,6 +12597,14 @@ func (newState *Library) SyncEffectiveFieldsDuringCreateOrUpdate(plan Library) { func (newState *Library) SyncEffectiveFieldsDuringRead(existingState Library) { } +func (c Library) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RCranLibrary{}.ToSchema(cs, append(path, "cran")...) + MavenLibrary{}.ToSchema(cs, append(path, "maven")...) + PythonPyPiLibrary{}.ToSchema(cs, append(path, "pypi")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Library. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12218,14 +12740,14 @@ func (o *Library) SetPypi(ctx context.Context, v PythonPyPiLibrary) { type LibraryFullStatus struct { // Whether the library was set to be installed on all clusters via the // libraries UI. - IsLibraryForAllClusters types.Bool `tfsdk:"is_library_for_all_clusters" tf:"optional"` + IsLibraryForAllClusters types.Bool `tfsdk:"is_library_for_all_clusters" tf:""` // Unique identifier for the library. - Library types.Object `tfsdk:"library" tf:"optional,object"` + Library types.Object `tfsdk:"library" tf:"object"` // All the info and warning messages that have occurred so far for this // library. - Messages types.List `tfsdk:"messages" tf:"optional"` + Messages types.List `tfsdk:"messages" tf:""` // Status of installing the library on the cluster. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *LibraryFullStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan LibraryFullStatus) { @@ -12234,6 +12756,12 @@ func (newState *LibraryFullStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *LibraryFullStatus) SyncEffectiveFieldsDuringRead(existingState LibraryFullStatus) { } +func (c LibraryFullStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Library{}.ToSchema(cs, append(path, "library")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LibraryFullStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12332,7 +12860,7 @@ func (o *LibraryFullStatus) SetMessages(ctx context.Context, v []types.String) { type ListAllClusterLibraryStatusesResponse struct { // A list of cluster statuses. - Statuses types.List `tfsdk:"statuses" tf:"optional"` + Statuses types.List `tfsdk:"statuses" tf:""` } func (newState *ListAllClusterLibraryStatusesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllClusterLibraryStatusesResponse) { @@ -12341,6 +12869,12 @@ func (newState *ListAllClusterLibraryStatusesResponse) SyncEffectiveFieldsDuring func (newState *ListAllClusterLibraryStatusesResponse) SyncEffectiveFieldsDuringRead(existingState ListAllClusterLibraryStatusesResponse) { } +func (c ListAllClusterLibraryStatusesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterLibraryStatuses{}.ToSchema(cs, append(path, "statuses")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllClusterLibraryStatusesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12405,9 +12939,9 @@ func (o *ListAllClusterLibraryStatusesResponse) SetStatuses(ctx context.Context, type ListAvailableZonesResponse struct { // The availability zone if no `zone_id` is provided in the cluster creation // request. - DefaultZone types.String `tfsdk:"default_zone" tf:"optional"` + DefaultZone types.String `tfsdk:"default_zone" tf:""` // The list of available zones (e.g., ['us-west-2c', 'us-east-2']). - Zones types.List `tfsdk:"zones" tf:"optional"` + Zones types.List `tfsdk:"zones" tf:""` } func (newState *ListAvailableZonesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAvailableZonesResponse) { @@ -12416,6 +12950,11 @@ func (newState *ListAvailableZonesResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListAvailableZonesResponse) SyncEffectiveFieldsDuringRead(existingState ListAvailableZonesResponse) { } +func (c ListAvailableZonesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAvailableZonesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12492,12 +13031,6 @@ type ListClusterCompliancesRequest struct { PolicyId types.String `tfsdk:"-"` } -func (newState *ListClusterCompliancesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClusterCompliancesRequest) { -} - -func (newState *ListClusterCompliancesRequest) SyncEffectiveFieldsDuringRead(existingState ListClusterCompliancesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClusterCompliancesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12535,14 +13068,14 @@ func (o ListClusterCompliancesRequest) Type(ctx context.Context) attr.Type { type ListClusterCompliancesResponse struct { // A list of clusters and their policy compliance statuses. - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // This field represents the pagination token to retrieve the next page of // results. If the value is "", it means no further results for the request. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // This field represents the pagination token to retrieve the previous page // of results. If the value is "", it means no further results for the // request. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListClusterCompliancesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClusterCompliancesResponse) { @@ -12551,6 +13084,12 @@ func (newState *ListClusterCompliancesResponse) SyncEffectiveFieldsDuringCreateO func (newState *ListClusterCompliancesResponse) SyncEffectiveFieldsDuringRead(existingState ListClusterCompliancesResponse) { } +func (c ListClusterCompliancesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterCompliance{}.ToSchema(cs, append(path, "clusters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClusterCompliancesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12627,12 +13166,6 @@ type ListClusterPoliciesRequest struct { SortOrder types.String `tfsdk:"-"` } -func (newState *ListClusterPoliciesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClusterPoliciesRequest) { -} - -func (newState *ListClusterPoliciesRequest) SyncEffectiveFieldsDuringRead(existingState ListClusterPoliciesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClusterPoliciesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12668,13 +13201,13 @@ func (o ListClusterPoliciesRequest) Type(ctx context.Context) attr.Type { type ListClustersFilterBy struct { // The source of cluster creation. - ClusterSources types.List `tfsdk:"cluster_sources" tf:"optional"` + ClusterSources types.List `tfsdk:"cluster_sources" tf:""` // The current state of the clusters. - ClusterStates types.List `tfsdk:"cluster_states" tf:"optional"` + ClusterStates types.List `tfsdk:"cluster_states" tf:""` // Whether the clusters are pinned or not. - IsPinned types.Bool `tfsdk:"is_pinned" tf:"optional"` + IsPinned types.Bool `tfsdk:"is_pinned" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` } func (newState *ListClustersFilterBy) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersFilterBy) { @@ -12683,6 +13216,11 @@ func (newState *ListClustersFilterBy) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ListClustersFilterBy) SyncEffectiveFieldsDuringRead(existingState ListClustersFilterBy) { } +func (c ListClustersFilterBy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersFilterBy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12794,12 +13332,6 @@ type ListClustersRequest struct { SortBy types.Object `tfsdk:"-"` } -func (newState *ListClustersRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersRequest) { -} - -func (newState *ListClustersRequest) SyncEffectiveFieldsDuringRead(existingState ListClustersRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12898,14 +13430,14 @@ func (o *ListClustersRequest) SetSortBy(ctx context.Context, v ListClustersSortB type ListClustersResponse struct { // - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // This field represents the pagination token to retrieve the next page of // results. If the value is "", it means no further results for the request. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // This field represents the pagination token to retrieve the previous page // of results. If the value is "", it means no further results for the // request. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListClustersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersResponse) { @@ -12914,6 +13446,12 @@ func (newState *ListClustersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ListClustersResponse) SyncEffectiveFieldsDuringRead(existingState ListClustersResponse) { } +func (c ListClustersResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterDetails{}.ToSchema(cs, append(path, "clusters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12981,11 +13519,11 @@ func (o *ListClustersResponse) SetClusters(ctx context.Context, v []ClusterDetai type ListClustersSortBy struct { // The direction to sort by. - Direction types.String `tfsdk:"direction" tf:"optional"` + Direction types.String `tfsdk:"direction" tf:""` // The sorting criteria. By default, clusters are sorted by 3 columns from // highest to lowest precedence: cluster state, pinned or unpinned, then // cluster name. - Field types.String `tfsdk:"field" tf:"optional"` + Field types.String `tfsdk:"field" tf:""` } func (newState *ListClustersSortBy) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersSortBy) { @@ -12994,6 +13532,11 @@ func (newState *ListClustersSortBy) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListClustersSortBy) SyncEffectiveFieldsDuringRead(existingState ListClustersSortBy) { } +func (c ListClustersSortBy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersSortBy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13028,7 +13571,7 @@ func (o ListClustersSortBy) Type(ctx context.Context) attr.Type { } type ListGlobalInitScriptsResponse struct { - Scripts types.List `tfsdk:"scripts" tf:"optional"` + Scripts types.List `tfsdk:"scripts" tf:""` } func (newState *ListGlobalInitScriptsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListGlobalInitScriptsResponse) { @@ -13037,6 +13580,12 @@ func (newState *ListGlobalInitScriptsResponse) SyncEffectiveFieldsDuringCreateOr func (newState *ListGlobalInitScriptsResponse) SyncEffectiveFieldsDuringRead(existingState ListGlobalInitScriptsResponse) { } +func (c ListGlobalInitScriptsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GlobalInitScriptDetails{}.ToSchema(cs, append(path, "scripts")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGlobalInitScriptsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13099,7 +13648,7 @@ func (o *ListGlobalInitScriptsResponse) SetScripts(ctx context.Context, v []Glob } type ListInstancePools struct { - InstancePools types.List `tfsdk:"instance_pools" tf:"optional"` + InstancePools types.List `tfsdk:"instance_pools" tf:""` } func (newState *ListInstancePools) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstancePools) { @@ -13108,6 +13657,12 @@ func (newState *ListInstancePools) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListInstancePools) SyncEffectiveFieldsDuringRead(existingState ListInstancePools) { } +func (c ListInstancePools) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstancePoolAndStats{}.ToSchema(cs, append(path, "instance_pools")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstancePools. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13171,7 +13726,7 @@ func (o *ListInstancePools) SetInstancePools(ctx context.Context, v []InstancePo type ListInstanceProfilesResponse struct { // A list of instance profiles that the user can access. - InstanceProfiles types.List `tfsdk:"instance_profiles" tf:"optional"` + InstanceProfiles types.List `tfsdk:"instance_profiles" tf:""` } func (newState *ListInstanceProfilesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstanceProfilesResponse) { @@ -13180,6 +13735,12 @@ func (newState *ListInstanceProfilesResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *ListInstanceProfilesResponse) SyncEffectiveFieldsDuringRead(existingState ListInstanceProfilesResponse) { } +func (c ListInstanceProfilesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstanceProfile{}.ToSchema(cs, append(path, "instance_profiles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstanceProfilesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13243,7 +13804,7 @@ func (o *ListInstanceProfilesResponse) SetInstanceProfiles(ctx context.Context, type ListNodeTypesResponse struct { // The list of available Spark node types. - NodeTypes types.List `tfsdk:"node_types" tf:"optional"` + NodeTypes types.List `tfsdk:"node_types" tf:""` } func (newState *ListNodeTypesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNodeTypesResponse) { @@ -13252,6 +13813,12 @@ func (newState *ListNodeTypesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListNodeTypesResponse) SyncEffectiveFieldsDuringRead(existingState ListNodeTypesResponse) { } +func (c ListNodeTypesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NodeType{}.ToSchema(cs, append(path, "node_types")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNodeTypesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13315,7 +13882,7 @@ func (o *ListNodeTypesResponse) SetNodeTypes(ctx context.Context, v []NodeType) type ListPoliciesResponse struct { // List of policies. - Policies types.List `tfsdk:"policies" tf:"optional"` + Policies types.List `tfsdk:"policies" tf:""` } func (newState *ListPoliciesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPoliciesResponse) { @@ -13324,6 +13891,12 @@ func (newState *ListPoliciesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ListPoliciesResponse) SyncEffectiveFieldsDuringRead(existingState ListPoliciesResponse) { } +func (c ListPoliciesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Policy{}.ToSchema(cs, append(path, "policies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPoliciesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13393,12 +13966,6 @@ type ListPolicyFamiliesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListPolicyFamiliesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPolicyFamiliesRequest) { -} - -func (newState *ListPolicyFamiliesRequest) SyncEffectiveFieldsDuringRead(existingState ListPolicyFamiliesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPolicyFamiliesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13435,9 +14002,9 @@ func (o ListPolicyFamiliesRequest) Type(ctx context.Context) attr.Type { type ListPolicyFamiliesResponse struct { // A token that can be used to get the next page of results. If not present, // there are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // List of policy families. - PolicyFamilies types.List `tfsdk:"policy_families" tf:"optional"` + PolicyFamilies types.List `tfsdk:"policy_families" tf:""` } func (newState *ListPolicyFamiliesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPolicyFamiliesResponse) { @@ -13446,6 +14013,12 @@ func (newState *ListPolicyFamiliesResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListPolicyFamiliesResponse) SyncEffectiveFieldsDuringRead(existingState ListPolicyFamiliesResponse) { } +func (c ListPolicyFamiliesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PolicyFamily{}.ToSchema(cs, append(path, "policy_families")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPolicyFamiliesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13520,6 +14093,12 @@ func (newState *LocalFileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Loca func (newState *LocalFileInfo) SyncEffectiveFieldsDuringRead(existingState LocalFileInfo) { } +func (c LocalFileInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LocalFileInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13553,9 +14132,9 @@ func (o LocalFileInfo) Type(ctx context.Context) attr.Type { type LogAnalyticsInfo struct { // - LogAnalyticsPrimaryKey types.String `tfsdk:"log_analytics_primary_key" tf:"optional"` + LogAnalyticsPrimaryKey types.String `tfsdk:"log_analytics_primary_key" tf:""` // - LogAnalyticsWorkspaceId types.String `tfsdk:"log_analytics_workspace_id" tf:"optional"` + LogAnalyticsWorkspaceId types.String `tfsdk:"log_analytics_workspace_id" tf:""` } func (newState *LogAnalyticsInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogAnalyticsInfo) { @@ -13564,6 +14143,11 @@ func (newState *LogAnalyticsInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan L func (newState *LogAnalyticsInfo) SyncEffectiveFieldsDuringRead(existingState LogAnalyticsInfo) { } +func (c LogAnalyticsInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogAnalyticsInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13600,10 +14184,10 @@ func (o LogAnalyticsInfo) Type(ctx context.Context) attr.Type { type LogSyncStatus struct { // The timestamp of last attempt. If the last attempt fails, // `last_exception` will contain the exception in the last attempt. - LastAttempted types.Int64 `tfsdk:"last_attempted" tf:"optional"` + LastAttempted types.Int64 `tfsdk:"last_attempted" tf:""` // The exception thrown in the last attempt, it would be null (omitted in // the response) if there is no exception in last attempted. - LastException types.String `tfsdk:"last_exception" tf:"optional"` + LastException types.String `tfsdk:"last_exception" tf:""` } func (newState *LogSyncStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogSyncStatus) { @@ -13612,6 +14196,11 @@ func (newState *LogSyncStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogS func (newState *LogSyncStatus) SyncEffectiveFieldsDuringRead(existingState LogSyncStatus) { } +func (c LogSyncStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogSyncStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13653,10 +14242,10 @@ type MavenLibrary struct { // // Maven dependency exclusions: // https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html. - Exclusions types.List `tfsdk:"exclusions" tf:"optional"` + Exclusions types.List `tfsdk:"exclusions" tf:""` // Maven repo to install the Maven package from. If omitted, both Maven // Central Repository and Spark Packages are searched. - Repo types.String `tfsdk:"repo" tf:"optional"` + Repo types.String `tfsdk:"repo" tf:""` } func (newState *MavenLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan MavenLibrary) { @@ -13665,6 +14254,12 @@ func (newState *MavenLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan Maven func (newState *MavenLibrary) SyncEffectiveFieldsDuringRead(existingState MavenLibrary) { } +func (c MavenLibrary) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "coordinates")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MavenLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13731,15 +14326,15 @@ func (o *MavenLibrary) SetExclusions(ctx context.Context, v []types.String) { } type NodeInstanceType struct { - InstanceTypeId types.String `tfsdk:"instance_type_id" tf:"optional"` + InstanceTypeId types.String `tfsdk:"instance_type_id" tf:""` - LocalDiskSizeGb types.Int64 `tfsdk:"local_disk_size_gb" tf:"optional"` + LocalDiskSizeGb types.Int64 `tfsdk:"local_disk_size_gb" tf:""` - LocalDisks types.Int64 `tfsdk:"local_disks" tf:"optional"` + LocalDisks types.Int64 `tfsdk:"local_disks" tf:""` - LocalNvmeDiskSizeGb types.Int64 `tfsdk:"local_nvme_disk_size_gb" tf:"optional"` + LocalNvmeDiskSizeGb types.Int64 `tfsdk:"local_nvme_disk_size_gb" tf:""` - LocalNvmeDisks types.Int64 `tfsdk:"local_nvme_disks" tf:"optional"` + LocalNvmeDisks types.Int64 `tfsdk:"local_nvme_disks" tf:""` } func (newState *NodeInstanceType) SyncEffectiveFieldsDuringCreateOrUpdate(plan NodeInstanceType) { @@ -13748,6 +14343,11 @@ func (newState *NodeInstanceType) SyncEffectiveFieldsDuringCreateOrUpdate(plan N func (newState *NodeInstanceType) SyncEffectiveFieldsDuringRead(existingState NodeInstanceType) { } +func (c NodeInstanceType) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NodeInstanceType. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13788,32 +14388,32 @@ func (o NodeInstanceType) Type(ctx context.Context) attr.Type { } type NodeType struct { - Category types.String `tfsdk:"category" tf:"optional"` + Category types.String `tfsdk:"category" tf:""` // A string description associated with this node type, e.g., "r3.xlarge". Description types.String `tfsdk:"description" tf:""` - DisplayOrder types.Int64 `tfsdk:"display_order" tf:"optional"` + DisplayOrder types.Int64 `tfsdk:"display_order" tf:""` // An identifier for the type of hardware that this node runs on, e.g., // "r3.2xlarge" in AWS. InstanceTypeId types.String `tfsdk:"instance_type_id" tf:""` // Whether the node type is deprecated. Non-deprecated node types offer // greater performance. - IsDeprecated types.Bool `tfsdk:"is_deprecated" tf:"optional"` + IsDeprecated types.Bool `tfsdk:"is_deprecated" tf:""` // AWS specific, whether this instance supports encryption in transit, used // for hipaa and pci workloads. - IsEncryptedInTransit types.Bool `tfsdk:"is_encrypted_in_transit" tf:"optional"` + IsEncryptedInTransit types.Bool `tfsdk:"is_encrypted_in_transit" tf:""` - IsGraviton types.Bool `tfsdk:"is_graviton" tf:"optional"` + IsGraviton types.Bool `tfsdk:"is_graviton" tf:""` - IsHidden types.Bool `tfsdk:"is_hidden" tf:"optional"` + IsHidden types.Bool `tfsdk:"is_hidden" tf:""` - IsIoCacheEnabled types.Bool `tfsdk:"is_io_cache_enabled" tf:"optional"` + IsIoCacheEnabled types.Bool `tfsdk:"is_io_cache_enabled" tf:""` // Memory (in MB) available for this node type. MemoryMb types.Int64 `tfsdk:"memory_mb" tf:""` - NodeInfo types.Object `tfsdk:"node_info" tf:"optional,object"` + NodeInfo types.Object `tfsdk:"node_info" tf:"object"` - NodeInstanceType types.Object `tfsdk:"node_instance_type" tf:"optional,object"` + NodeInstanceType types.Object `tfsdk:"node_instance_type" tf:"object"` // Unique identifier for this node type. NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of CPU cores available for this node type. Note that this can be @@ -13821,20 +14421,20 @@ type NodeType struct { // instance is not divisible by the number of Spark nodes on that machine. NumCores types.Float64 `tfsdk:"num_cores" tf:""` - NumGpus types.Int64 `tfsdk:"num_gpus" tf:"optional"` + NumGpus types.Int64 `tfsdk:"num_gpus" tf:""` - PhotonDriverCapable types.Bool `tfsdk:"photon_driver_capable" tf:"optional"` + PhotonDriverCapable types.Bool `tfsdk:"photon_driver_capable" tf:""` - PhotonWorkerCapable types.Bool `tfsdk:"photon_worker_capable" tf:"optional"` + PhotonWorkerCapable types.Bool `tfsdk:"photon_worker_capable" tf:""` - SupportClusterTags types.Bool `tfsdk:"support_cluster_tags" tf:"optional"` + SupportClusterTags types.Bool `tfsdk:"support_cluster_tags" tf:""` - SupportEbsVolumes types.Bool `tfsdk:"support_ebs_volumes" tf:"optional"` + SupportEbsVolumes types.Bool `tfsdk:"support_ebs_volumes" tf:""` - SupportPortForwarding types.Bool `tfsdk:"support_port_forwarding" tf:"optional"` + SupportPortForwarding types.Bool `tfsdk:"support_port_forwarding" tf:""` // Indicates if this node type can be used for an instance pool or cluster // with elastic disk enabled. This is true for most node types. - SupportsElasticDisk types.Bool `tfsdk:"supports_elastic_disk" tf:"optional"` + SupportsElasticDisk types.Bool `tfsdk:"supports_elastic_disk" tf:""` } func (newState *NodeType) SyncEffectiveFieldsDuringCreateOrUpdate(plan NodeType) { @@ -13843,6 +14443,18 @@ func (newState *NodeType) SyncEffectiveFieldsDuringCreateOrUpdate(plan NodeType) func (newState *NodeType) SyncEffectiveFieldsDuringRead(existingState NodeType) { } +func (c NodeType) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "description")...) + cs.SetRequired(append(path, "instance_type_id")...) + cs.SetRequired(append(path, "memory_mb")...) + CloudProviderNodeInfo{}.ToSchema(cs, append(path, "node_info")...) + NodeInstanceType{}.ToSchema(cs, append(path, "node_instance_type")...) + cs.SetRequired(append(path, "node_type_id")...) + cs.SetRequired(append(path, "num_cores")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NodeType. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13974,9 +14586,9 @@ func (o *NodeType) SetNodeInstanceType(ctx context.Context, v NodeInstanceType) } type PendingInstanceError struct { - InstanceId types.String `tfsdk:"instance_id" tf:"optional"` + InstanceId types.String `tfsdk:"instance_id" tf:""` - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *PendingInstanceError) SyncEffectiveFieldsDuringCreateOrUpdate(plan PendingInstanceError) { @@ -13985,6 +14597,11 @@ func (newState *PendingInstanceError) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *PendingInstanceError) SyncEffectiveFieldsDuringRead(existingState PendingInstanceError) { } +func (c PendingInstanceError) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PendingInstanceError. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14029,6 +14646,12 @@ func (newState *PermanentDeleteCluster) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *PermanentDeleteCluster) SyncEffectiveFieldsDuringRead(existingState PermanentDeleteCluster) { } +func (c PermanentDeleteCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermanentDeleteCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14069,6 +14692,11 @@ func (newState *PermanentDeleteClusterResponse) SyncEffectiveFieldsDuringCreateO func (newState *PermanentDeleteClusterResponse) SyncEffectiveFieldsDuringRead(existingState PermanentDeleteClusterResponse) { } +func (c PermanentDeleteClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermanentDeleteClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14107,6 +14735,12 @@ func (newState *PinCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan PinClus func (newState *PinCluster) SyncEffectiveFieldsDuringRead(existingState PinCluster) { } +func (c PinCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PinCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14147,6 +14781,11 @@ func (newState *PinClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PinClusterResponse) SyncEffectiveFieldsDuringRead(existingState PinClusterResponse) { } +func (c PinClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PinClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14178,30 +14817,30 @@ func (o PinClusterResponse) Type(ctx context.Context) attr.Type { type Policy struct { // Creation time. The timestamp (in millisecond) when this Cluster Policy // was created. - CreatedAtTimestamp types.Int64 `tfsdk:"created_at_timestamp" tf:"optional"` + CreatedAtTimestamp types.Int64 `tfsdk:"created_at_timestamp" tf:""` // Creator user name. The field won't be included in the response if the // user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Policy definition document expressed in [Databricks Cluster Policy // Definition Language]. // // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - Definition types.String `tfsdk:"definition" tf:"optional"` + Definition types.String `tfsdk:"definition" tf:""` // Additional human-readable description of the cluster policy. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // If true, policy is a default policy created and managed by Databricks. // Default policies cannot be deleted, and their policy families cannot be // changed. - IsDefault types.Bool `tfsdk:"is_default" tf:"optional"` + IsDefault types.Bool `tfsdk:"is_default" tf:""` // A list of libraries to be installed on the next cluster restart that uses // this policy. The maximum number of libraries is 500. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Max number of clusters per user that can be active using this policy. If // not present, there is no max limit. - MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:"optional"` + MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:""` // Cluster Policy name requested by the user. This has to be unique. Length // must be between 1 and 100 characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Policy definition JSON document expressed in [Databricks Policy // Definition Language]. The JSON document must be passed as a string and // cannot be embedded in the requests. @@ -14211,16 +14850,16 @@ type Policy struct { // policy definition. // // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:"optional"` + PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:""` // ID of the policy family. The cluster policy's policy definition inherits // the policy family's policy definition. // // Cannot be used with `definition`. Use // `policy_family_definition_overrides` instead to customize the policy // definition. - PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:""` // Canonical unique identifier for the Cluster Policy. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` } func (newState *Policy) SyncEffectiveFieldsDuringCreateOrUpdate(plan Policy) { @@ -14229,6 +14868,12 @@ func (newState *Policy) SyncEffectiveFieldsDuringCreateOrUpdate(plan Policy) { func (newState *Policy) SyncEffectiveFieldsDuringRead(existingState Policy) { } +func (c Policy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Library{}.ToSchema(cs, append(path, "libraries")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Policy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14315,13 +14960,13 @@ type PolicyFamily struct { // Definition Language]. // // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html - Definition types.String `tfsdk:"definition" tf:"optional"` + Definition types.String `tfsdk:"definition" tf:""` // Human-readable description of the purpose of the policy family. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Name of the policy family. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Unique identifier for the policy family. - PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:""` } func (newState *PolicyFamily) SyncEffectiveFieldsDuringCreateOrUpdate(plan PolicyFamily) { @@ -14330,6 +14975,11 @@ func (newState *PolicyFamily) SyncEffectiveFieldsDuringCreateOrUpdate(plan Polic func (newState *PolicyFamily) SyncEffectiveFieldsDuringRead(existingState PolicyFamily) { } +func (c PolicyFamily) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PolicyFamily. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14374,7 +15024,7 @@ type PythonPyPiLibrary struct { Package types.String `tfsdk:"package" tf:""` // The repository where the package can be found. If not specified, the // default pip index is used. - Repo types.String `tfsdk:"repo" tf:"optional"` + Repo types.String `tfsdk:"repo" tf:""` } func (newState *PythonPyPiLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan PythonPyPiLibrary) { @@ -14383,6 +15033,12 @@ func (newState *PythonPyPiLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PythonPyPiLibrary) SyncEffectiveFieldsDuringRead(existingState PythonPyPiLibrary) { } +func (c PythonPyPiLibrary) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "package")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PythonPyPiLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14421,7 +15077,7 @@ type RCranLibrary struct { Package types.String `tfsdk:"package" tf:""` // The repository where the package can be found. If not specified, the // default CRAN repo is used. - Repo types.String `tfsdk:"repo" tf:"optional"` + Repo types.String `tfsdk:"repo" tf:""` } func (newState *RCranLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan RCranLibrary) { @@ -14430,6 +15086,12 @@ func (newState *RCranLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan RCran func (newState *RCranLibrary) SyncEffectiveFieldsDuringRead(existingState RCranLibrary) { } +func (c RCranLibrary) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "package")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RCranLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14474,6 +15136,12 @@ func (newState *RemoveInstanceProfile) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *RemoveInstanceProfile) SyncEffectiveFieldsDuringRead(existingState RemoveInstanceProfile) { } +func (c RemoveInstanceProfile) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "instance_profile_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveInstanceProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14508,12 +15176,6 @@ func (o RemoveInstanceProfile) Type(ctx context.Context) attr.Type { type RemoveResponse struct { } -func (newState *RemoveResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveResponse) { -} - -func (newState *RemoveResponse) SyncEffectiveFieldsDuringRead(existingState RemoveResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14545,7 +15207,7 @@ type ResizeCluster struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"object"` // The cluster to be resized. ClusterId types.String `tfsdk:"cluster_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one @@ -14558,7 +15220,7 @@ type ResizeCluster struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` } func (newState *ResizeCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResizeCluster) { @@ -14567,6 +15229,13 @@ func (newState *ResizeCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan Resi func (newState *ResizeCluster) SyncEffectiveFieldsDuringRead(existingState ResizeCluster) { } +func (c ResizeCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale{}.ToSchema(cs, append(path, "autoscale")...) + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResizeCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14641,6 +15310,11 @@ func (newState *ResizeClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ResizeClusterResponse) SyncEffectiveFieldsDuringRead(existingState ResizeClusterResponse) { } +func (c ResizeClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResizeClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14672,7 +15346,7 @@ type RestartCluster struct { // The cluster to be started. ClusterId types.String `tfsdk:"cluster_id" tf:""` // - RestartUser types.String `tfsdk:"restart_user" tf:"optional"` + RestartUser types.String `tfsdk:"restart_user" tf:""` } func (newState *RestartCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestartCluster) { @@ -14681,6 +15355,12 @@ func (newState *RestartCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan Res func (newState *RestartCluster) SyncEffectiveFieldsDuringRead(existingState RestartCluster) { } +func (c RestartCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestartCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14723,6 +15403,11 @@ func (newState *RestartClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *RestartClusterResponse) SyncEffectiveFieldsDuringRead(existingState RestartClusterResponse) { } +func (c RestartClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestartClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14752,26 +15437,26 @@ func (o RestartClusterResponse) Type(ctx context.Context) attr.Type { type Results struct { // The cause of the error - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` - Data types.Object `tfsdk:"data" tf:"optional"` + Data types.Object `tfsdk:"data" tf:""` // The image filename - FileName types.String `tfsdk:"fileName" tf:"optional"` + FileName types.String `tfsdk:"fileName" tf:""` - FileNames types.List `tfsdk:"fileNames" tf:"optional"` + FileNames types.List `tfsdk:"fileNames" tf:""` // true if a JSON schema is returned instead of a string representation of // the Hive type. - IsJsonSchema types.Bool `tfsdk:"isJsonSchema" tf:"optional"` + IsJsonSchema types.Bool `tfsdk:"isJsonSchema" tf:""` // internal field used by SDK - Pos types.Int64 `tfsdk:"pos" tf:"optional"` + Pos types.Int64 `tfsdk:"pos" tf:""` - ResultType types.String `tfsdk:"resultType" tf:"optional"` + ResultType types.String `tfsdk:"resultType" tf:""` // The table schema - Schema types.List `tfsdk:"schema" tf:"optional"` + Schema types.List `tfsdk:"schema" tf:""` // The summary of the error - Summary types.String `tfsdk:"summary" tf:"optional"` + Summary types.String `tfsdk:"summary" tf:""` // true if partial results are returned. - Truncated types.Bool `tfsdk:"truncated" tf:"optional"` + Truncated types.Bool `tfsdk:"truncated" tf:""` } func (newState *Results) SyncEffectiveFieldsDuringCreateOrUpdate(plan Results) { @@ -14780,6 +15465,11 @@ func (newState *Results) SyncEffectiveFieldsDuringCreateOrUpdate(plan Results) { func (newState *Results) SyncEffectiveFieldsDuringRead(existingState Results) { } +func (c Results) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Results. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14900,27 +15590,27 @@ type S3StorageInfo struct { // controls. If you are using cross account role for writing data, you may // want to set `bucket-owner-full-control` to make bucket owner able to read // the logs. - CannedAcl types.String `tfsdk:"canned_acl" tf:"optional"` + CannedAcl types.String `tfsdk:"canned_acl" tf:""` // S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be // delivered using cluster iam role, please make sure you set cluster iam // role and the role has write access to the destination. Please also note // that you cannot use AWS keys to deliver logs. Destination types.String `tfsdk:"destination" tf:""` // (Optional) Flag to enable server side encryption, `false` by default. - EnableEncryption types.Bool `tfsdk:"enable_encryption" tf:"optional"` + EnableEncryption types.Bool `tfsdk:"enable_encryption" tf:""` // (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It // will be used only when encryption is enabled and the default type is // `sse-s3`. - EncryptionType types.String `tfsdk:"encryption_type" tf:"optional"` + EncryptionType types.String `tfsdk:"encryption_type" tf:""` // S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or // endpoint needs to be set. If both are set, endpoint will be used. - Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + Endpoint types.String `tfsdk:"endpoint" tf:""` // (Optional) Kms key which will be used if encryption is enabled and // encryption type is set to `sse-kms`. - KmsKey types.String `tfsdk:"kms_key" tf:"optional"` + KmsKey types.String `tfsdk:"kms_key" tf:""` // S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. // If both are set, endpoint will be used. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *S3StorageInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan S3StorageInfo) { @@ -14929,6 +15619,12 @@ func (newState *S3StorageInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan S3St func (newState *S3StorageInfo) SyncEffectiveFieldsDuringRead(existingState S3StorageInfo) { } +func (c S3StorageInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in S3StorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14974,30 +15670,30 @@ func (o S3StorageInfo) Type(ctx context.Context) attr.Type { type SparkNode struct { // The private IP address of the host instance. - HostPrivateIp types.String `tfsdk:"host_private_ip" tf:"optional"` + HostPrivateIp types.String `tfsdk:"host_private_ip" tf:""` // Globally unique identifier for the host instance from the cloud provider. - InstanceId types.String `tfsdk:"instance_id" tf:"optional"` + InstanceId types.String `tfsdk:"instance_id" tf:""` // Attributes specific to AWS for a Spark node. - NodeAwsAttributes types.Object `tfsdk:"node_aws_attributes" tf:"optional,object"` + NodeAwsAttributes types.Object `tfsdk:"node_aws_attributes" tf:"object"` // Globally unique identifier for this node. - NodeId types.String `tfsdk:"node_id" tf:"optional"` + NodeId types.String `tfsdk:"node_id" tf:""` // Private IP address (typically a 10.x.x.x address) of the Spark node. Note // that this is different from the private IP address of the host instance. - PrivateIp types.String `tfsdk:"private_ip" tf:"optional"` + PrivateIp types.String `tfsdk:"private_ip" tf:""` // Public DNS address of this node. This address can be used to access the // Spark JDBC server on the driver node. To communicate with the JDBC // server, traffic must be manually authorized by adding security group // rules to the "worker-unmanaged" security group via the AWS console. // // Actually it's the public DNS address of the host instance. - PublicDns types.String `tfsdk:"public_dns" tf:"optional"` + PublicDns types.String `tfsdk:"public_dns" tf:""` // The timestamp (in millisecond) when the Spark node is launched. // // The start_timestamp is set right before the container is being launched. // The timestamp when the container is placed on the ResourceManager, before // its launch and setup by the NodeDaemon. This timestamp is the same as the // creation timestamp in the database. - StartTimestamp types.Int64 `tfsdk:"start_timestamp" tf:"optional"` + StartTimestamp types.Int64 `tfsdk:"start_timestamp" tf:""` } func (newState *SparkNode) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkNode) { @@ -15006,6 +15702,12 @@ func (newState *SparkNode) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkNod func (newState *SparkNode) SyncEffectiveFieldsDuringRead(existingState SparkNode) { } +func (c SparkNode) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparkNodeAwsAttributes{}.ToSchema(cs, append(path, "node_aws_attributes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkNode. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15081,7 +15783,7 @@ func (o *SparkNode) SetNodeAwsAttributes(ctx context.Context, v SparkNodeAwsAttr type SparkNodeAwsAttributes struct { // Whether this node is on an Amazon spot instance. - IsSpot types.Bool `tfsdk:"is_spot" tf:"optional"` + IsSpot types.Bool `tfsdk:"is_spot" tf:""` } func (newState *SparkNodeAwsAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkNodeAwsAttributes) { @@ -15090,6 +15792,11 @@ func (newState *SparkNodeAwsAttributes) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *SparkNodeAwsAttributes) SyncEffectiveFieldsDuringRead(existingState SparkNodeAwsAttributes) { } +func (c SparkNodeAwsAttributes) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkNodeAwsAttributes. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15127,9 +15834,9 @@ type SparkVersion struct { // Note that the exact Spark version may change over time for a "wildcard" // version (i.e., "2.1.x-scala2.11" is a "wildcard" version) with minor bug // fixes. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // A descriptive name for this Spark version, for example "Spark 2.1". - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *SparkVersion) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkVersion) { @@ -15138,6 +15845,11 @@ func (newState *SparkVersion) SyncEffectiveFieldsDuringCreateOrUpdate(plan Spark func (newState *SparkVersion) SyncEffectiveFieldsDuringRead(existingState SparkVersion) { } +func (c SparkVersion) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkVersion. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15182,6 +15894,12 @@ func (newState *StartCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan Start func (newState *StartCluster) SyncEffectiveFieldsDuringRead(existingState StartCluster) { } +func (c StartCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15222,6 +15940,11 @@ func (newState *StartClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *StartClusterResponse) SyncEffectiveFieldsDuringRead(existingState StartClusterResponse) { } +func (c StartClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15251,12 +15974,12 @@ func (o StartClusterResponse) Type(ctx context.Context) attr.Type { type TerminationReason struct { // status code indicating why the cluster was terminated - Code types.String `tfsdk:"code" tf:"optional"` + Code types.String `tfsdk:"code" tf:""` // list of parameters that provide additional information about why the // cluster was terminated - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` // type of the termination - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *TerminationReason) SyncEffectiveFieldsDuringCreateOrUpdate(plan TerminationReason) { @@ -15265,6 +15988,11 @@ func (newState *TerminationReason) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *TerminationReason) SyncEffectiveFieldsDuringRead(existingState TerminationReason) { } +func (c TerminationReason) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TerminationReason. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15343,6 +16071,14 @@ func (newState *UninstallLibraries) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UninstallLibraries) SyncEffectiveFieldsDuringRead(existingState UninstallLibraries) { } +func (c UninstallLibraries) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + cs.SetRequired(append(path, "libraries")...) + Library{}.ToSchema(cs, append(path, "libraries")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UninstallLibraries. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15415,6 +16151,11 @@ func (newState *UninstallLibrariesResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UninstallLibrariesResponse) SyncEffectiveFieldsDuringRead(existingState UninstallLibrariesResponse) { } +func (c UninstallLibrariesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UninstallLibrariesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15453,6 +16194,12 @@ func (newState *UnpinCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan Unpin func (newState *UnpinCluster) SyncEffectiveFieldsDuringRead(existingState UnpinCluster) { } +func (c UnpinCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "cluster_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpinCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15493,6 +16240,11 @@ func (newState *UnpinClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *UnpinClusterResponse) SyncEffectiveFieldsDuringRead(existingState UnpinClusterResponse) { } +func (c UnpinClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpinClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15522,7 +16274,7 @@ func (o UnpinClusterResponse) Type(ctx context.Context) attr.Type { type UpdateCluster struct { // The cluster to be updated. - Cluster types.Object `tfsdk:"cluster" tf:"optional,object"` + Cluster types.Object `tfsdk:"cluster" tf:"object"` // ID of the cluster. ClusterId types.String `tfsdk:"cluster_id" tf:""` // Specifies which fields of the cluster will be updated. This is required @@ -15539,6 +16291,14 @@ func (newState *UpdateCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan Upda func (newState *UpdateCluster) SyncEffectiveFieldsDuringRead(existingState UpdateCluster) { } +func (c UpdateCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateClusterResource{}.ToSchema(cs, append(path, "cluster")...) + cs.SetRequired(append(path, "cluster_id")...) + cs.SetRequired(append(path, "update_mask")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15608,29 +16368,29 @@ type UpdateClusterResource struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 // minutes. Users can also set this value to 0 to explicitly disable // automatic termination. - AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:""` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. - ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + ClusterName types.String `tfsdk:"cluster_name" tf:""` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -15639,7 +16399,7 @@ type UpdateClusterResource struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // Data security mode decides what data governance model to use when // accessing data from a cluster. // @@ -15669,39 +16429,39 @@ type UpdateClusterResource struct { // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This // mode provides a way that doesn’t have UC nor passthrough enabled. - DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` + DataSecurityMode types.String `tfsdk:"data_security_mode" tf:""` - DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Autoscaling Local Storage: when enabled, this cluster will dynamically // acquire additional disk space when its Spark workers are running low on // disk space. This feature requires specific AWS permissions to function // correctly - refer to the User Guide for more details. - EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:""` // Whether to enable LUKS on cluster VMs' local disks - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // This field can only be used with `kind`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` - IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:""` // The kind of compute described by this compute specification. // // Depending on `kind`, different validations and default values will be @@ -15709,13 +16469,13 @@ type UpdateClusterResource struct { // // The first usage of this value is for the simple cluster form where it // sets `kind = CLASSIC_PREVIEW`. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -15726,9 +16486,9 @@ type UpdateClusterResource struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // Determines the cluster's runtime engine, either standard or Photon. // // This field is not compatible with legacy `spark_version` values that @@ -15737,15 +16497,15 @@ type UpdateClusterResource struct { // // If left unspecified, the runtime engine defaults to standard unless the // spark_version contains -photon-, in which case Photon will be used. - RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:""` // Single user name if data_security_mode is `SINGLE_USER` - SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + SingleUserName types.String `tfsdk:"single_user_name" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. Users can also pass in a string of extra // JVM options to the driver and the executors via // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` // respectively. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -15759,23 +16519,23 @@ type UpdateClusterResource struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of // available Spark versions can be retrieved by using the // :method:clusters/sparkVersions API call. - SparkVersion types.String `tfsdk:"spark_version" tf:"optional"` + SparkVersion types.String `tfsdk:"spark_version" tf:""` // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. - UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:""` - WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"object"` } func (newState *UpdateClusterResource) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateClusterResource) { @@ -15784,6 +16544,19 @@ func (newState *UpdateClusterResource) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *UpdateClusterResource) SyncEffectiveFieldsDuringRead(existingState UpdateClusterResource) { } +func (c UpdateClusterResource) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoScale{}.ToSchema(cs, append(path, "autoscale")...) + AwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + AzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + ClusterLogConf{}.ToSchema(cs, append(path, "cluster_log_conf")...) + DockerImage{}.ToSchema(cs, append(path, "docker_image")...) + GcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + InitScriptInfo{}.ToSchema(cs, append(path, "init_scripts")...) + WorkloadType{}.ToSchema(cs, append(path, "workload_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateClusterResource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16229,6 +17002,11 @@ func (newState *UpdateClusterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *UpdateClusterResponse) SyncEffectiveFieldsDuringRead(existingState UpdateClusterResponse) { } +func (c UpdateClusterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateClusterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16259,12 +17037,6 @@ func (o UpdateClusterResponse) Type(ctx context.Context) attr.Type { type UpdateResponse struct { } -func (newState *UpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse) { -} - -func (newState *UpdateResponse) SyncEffectiveFieldsDuringRead(existingState UpdateResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16303,6 +17075,12 @@ func (newState *VolumesStorageInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *VolumesStorageInfo) SyncEffectiveFieldsDuringRead(existingState VolumesStorageInfo) { } +func (c VolumesStorageInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VolumesStorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16345,6 +17123,13 @@ func (newState *WorkloadType) SyncEffectiveFieldsDuringCreateOrUpdate(plan Workl func (newState *WorkloadType) SyncEffectiveFieldsDuringRead(existingState WorkloadType) { } +func (c WorkloadType) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "clients")...) + ClientsTypes{}.ToSchema(cs, append(path, "clients")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkloadType. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16418,6 +17203,12 @@ func (newState *WorkspaceStorageInfo) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *WorkspaceStorageInfo) SyncEffectiveFieldsDuringRead(existingState WorkspaceStorageInfo) { } +func (c WorkspaceStorageInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceStorageInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/dashboards_tf/legacy_model.go b/internal/service/dashboards_tf/legacy_model.go index 5016d5f4b..be66ca8b8 100755 --- a/internal/service/dashboards_tf/legacy_model.go +++ b/internal/service/dashboards_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/sql_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -24,13 +25,7 @@ import ( // Create dashboard type CreateDashboardRequest_SdkV2 struct { - Dashboard types.List `tfsdk:"dashboard" tf:"optional,object"` -} - -func (newState *CreateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDashboardRequest_SdkV2) { -} - -func (newState *CreateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateDashboardRequest_SdkV2) { + Dashboard types.List `tfsdk:"dashboard" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDashboardRequest. @@ -99,13 +94,7 @@ type CreateScheduleRequest_SdkV2 struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` -} - -func (newState *CreateScheduleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScheduleRequest_SdkV2) { -} - -func (newState *CreateScheduleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateScheduleRequest_SdkV2) { + Schedule types.List `tfsdk:"schedule" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateScheduleRequest. @@ -178,13 +167,7 @@ type CreateSubscriptionRequest_SdkV2 struct { // UUID identifying the schedule to which the subscription belongs. ScheduleId types.String `tfsdk:"-"` - Subscription types.List `tfsdk:"subscription" tf:"optional,object"` -} - -func (newState *CreateSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateSubscriptionRequest_SdkV2) { -} - -func (newState *CreateSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateSubscriptionRequest_SdkV2) { + Subscription types.List `tfsdk:"subscription" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateSubscriptionRequest. @@ -271,6 +254,13 @@ func (newState *CronSchedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CronSchedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState CronSchedule_SdkV2) { } +func (c CronSchedule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "quartz_cron_expression")...) + cs.SetRequired(append(path, "timezone_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CronSchedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -306,25 +296,25 @@ func (o CronSchedule_SdkV2) Type(ctx context.Context) attr.Type { type Dashboard_SdkV2 struct { // The timestamp of when the dashboard was created. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // UUID identifying the dashboard. - DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The display name of the dashboard. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The etag for the dashboard. Can be optionally provided on updates to // ensure that the dashboard has not been modified since the last read. This // field is excluded in List Dashboards responses. - Etag types.String `tfsdk:"etag" tf:"computed"` + Etag types.String `tfsdk:"etag" tf:""` // The state of the dashboard resource. Used for tracking trashed status. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"computed"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // The workspace path of the folder containing the dashboard. Includes // leading slash and no trailing slash. This field is excluded in List // Dashboards responses. - ParentPath types.String `tfsdk:"parent_path" tf:"computed"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // The workspace path of the dashboard asset, including the file name. // Exported dashboards always have the file extension `.lvdash.json`. This // field is excluded in List Dashboards responses. - Path types.String `tfsdk:"path" tf:"computed"` + Path types.String `tfsdk:"path" tf:""` // The contents of the dashboard in serialized string form. This field is // excluded in List Dashboards responses. Use the [get dashboard API] to // retrieve an example response, which includes the `serialized_dashboard` @@ -332,12 +322,12 @@ type Dashboard_SdkV2 struct { // represents the dashboard's layout and components. // // [get dashboard API]: https://docs.databricks.com/api/workspace/lakeview/get - SerializedDashboard types.String `tfsdk:"serialized_dashboard" tf:"optional"` + SerializedDashboard types.String `tfsdk:"serialized_dashboard" tf:""` // The timestamp of when the dashboard was last updated by the user. This // field is excluded in List Dashboards responses. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // The warehouse ID used to run the dashboard. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dashboard_SdkV2) { @@ -346,6 +336,18 @@ func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Da func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState Dashboard_SdkV2) { } +func (c Dashboard_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + cs.SetComputed(append(path, "dashboard_id")...) + cs.SetComputed(append(path, "etag")...) + cs.SetComputed(append(path, "lifecycle_state")...) + cs.SetComputed(append(path, "parent_path")...) + cs.SetComputed(append(path, "path")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Dashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -406,12 +408,6 @@ type DeleteScheduleRequest_SdkV2 struct { ScheduleId types.String `tfsdk:"-"` } -func (newState *DeleteScheduleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScheduleRequest_SdkV2) { -} - -func (newState *DeleteScheduleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteScheduleRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScheduleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -450,12 +446,6 @@ func (o DeleteScheduleRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteScheduleResponse_SdkV2 struct { } -func (newState *DeleteScheduleResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScheduleResponse_SdkV2) { -} - -func (newState *DeleteScheduleResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteScheduleResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScheduleResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -496,12 +486,6 @@ type DeleteSubscriptionRequest_SdkV2 struct { SubscriptionId types.String `tfsdk:"-"` } -func (newState *DeleteSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSubscriptionRequest_SdkV2) { -} - -func (newState *DeleteSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSubscriptionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSubscriptionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -542,12 +526,6 @@ func (o DeleteSubscriptionRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteSubscriptionResponse_SdkV2 struct { } -func (newState *DeleteSubscriptionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSubscriptionResponse_SdkV2) { -} - -func (newState *DeleteSubscriptionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSubscriptionResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSubscriptionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -577,9 +555,9 @@ func (o DeleteSubscriptionResponse_SdkV2) Type(ctx context.Context) attr.Type { // Genie AI Response type GenieAttachment_SdkV2 struct { - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.List `tfsdk:"query" tf:"object"` - Text types.List `tfsdk:"text" tf:"optional,object"` + Text types.List `tfsdk:"text" tf:"object"` } func (newState *GenieAttachment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieAttachment_SdkV2) { @@ -588,6 +566,13 @@ func (newState *GenieAttachment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *GenieAttachment_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieAttachment_SdkV2) { } +func (c GenieAttachment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryAttachment_SdkV2{}.ToSchema(cs, append(path, "query")...) + TextAttachment_SdkV2{}.ToSchema(cs, append(path, "text")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieAttachment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -682,11 +667,11 @@ func (o *GenieAttachment_SdkV2) SetText(ctx context.Context, v TextAttachment_Sd type GenieConversation_SdkV2 struct { // Timestamp when the message was created - CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:"optional"` + CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:""` // Conversation ID Id types.String `tfsdk:"id" tf:""` // Timestamp when the message was last updated - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Genie space ID SpaceId types.String `tfsdk:"space_id" tf:""` // Conversation title @@ -701,6 +686,15 @@ func (newState *GenieConversation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *GenieConversation_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieConversation_SdkV2) { } +func (c GenieConversation_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "space_id")...) + cs.SetRequired(append(path, "title")...) + cs.SetRequired(append(path, "user_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieConversation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -757,6 +751,14 @@ func (newState *GenieCreateConversationMessageRequest_SdkV2) SyncEffectiveFields func (newState *GenieCreateConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieCreateConversationMessageRequest_SdkV2) { } +func (c GenieCreateConversationMessageRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "content")...) + cs.SetRequired(append(path, "conversation_id")...) + cs.SetRequired(append(path, "space_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieCreateConversationMessageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -802,12 +804,6 @@ type GenieExecuteMessageQueryRequest_SdkV2 struct { SpaceId types.String `tfsdk:"-"` } -func (newState *GenieExecuteMessageQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieExecuteMessageQueryRequest_SdkV2) { -} - -func (newState *GenieExecuteMessageQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieExecuteMessageQueryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieExecuteMessageQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -855,12 +851,6 @@ type GenieGetConversationMessageRequest_SdkV2 struct { SpaceId types.String `tfsdk:"-"` } -func (newState *GenieGetConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetConversationMessageRequest_SdkV2) { -} - -func (newState *GenieGetConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieGetConversationMessageRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetConversationMessageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -906,12 +896,6 @@ type GenieGetMessageQueryResultRequest_SdkV2 struct { SpaceId types.String `tfsdk:"-"` } -func (newState *GenieGetMessageQueryResultRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetMessageQueryResultRequest_SdkV2) { -} - -func (newState *GenieGetMessageQueryResultRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieGetMessageQueryResultRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetMessageQueryResultRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -950,7 +934,7 @@ func (o GenieGetMessageQueryResultRequest_SdkV2) Type(ctx context.Context) attr. type GenieGetMessageQueryResultResponse_SdkV2 struct { // SQL Statement Execution response. See [Get status, manifest, and result // first chunk](:method:statementexecution/getstatement) for more details. - StatementResponse types.List `tfsdk:"statement_response" tf:"optional,object"` + StatementResponse types.List `tfsdk:"statement_response" tf:"object"` } func (newState *GenieGetMessageQueryResultResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetMessageQueryResultResponse_SdkV2) { @@ -959,6 +943,12 @@ func (newState *GenieGetMessageQueryResultResponse_SdkV2) SyncEffectiveFieldsDur func (newState *GenieGetMessageQueryResultResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieGetMessageQueryResultResponse_SdkV2) { } +func (c GenieGetMessageQueryResultResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + sql_tf.StatementResponse_SdkV2{}.ToSchema(cs, append(path, "statement_response")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetMessageQueryResultResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1022,21 +1012,21 @@ func (o *GenieGetMessageQueryResultResponse_SdkV2) SetStatementResponse(ctx cont type GenieMessage_SdkV2 struct { // AI produced response to the message - Attachments types.List `tfsdk:"attachments" tf:"optional"` + Attachments types.List `tfsdk:"attachments" tf:""` // User message content Content types.String `tfsdk:"content" tf:""` // Conversation ID ConversationId types.String `tfsdk:"conversation_id" tf:""` // Timestamp when the message was created - CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:"optional"` + CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:""` // Error message if AI failed to respond to the message - Error types.List `tfsdk:"error" tf:"optional,object"` + Error types.List `tfsdk:"error" tf:"object"` // Message ID Id types.String `tfsdk:"id" tf:""` // Timestamp when the message was last updated - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // The result of SQL query if the message has a query attachment - QueryResult types.List `tfsdk:"query_result" tf:"optional,object"` + QueryResult types.List `tfsdk:"query_result" tf:"object"` // Genie space ID SpaceId types.String `tfsdk:"space_id" tf:""` // MesssageStatus. The possible values are: * `FETCHING_METADATA`: Fetching @@ -1055,9 +1045,9 @@ type GenieMessage_SdkV2 struct { // * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL // result is not available anymore. The user needs to execute the query // again. * `CANCELLED`: Message has been cancelled. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // ID of the user who created the message - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` } func (newState *GenieMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieMessage_SdkV2) { @@ -1066,6 +1056,18 @@ func (newState *GenieMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *GenieMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieMessage_SdkV2) { } +func (c GenieMessage_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GenieAttachment_SdkV2{}.ToSchema(cs, append(path, "attachments")...) + cs.SetRequired(append(path, "content")...) + cs.SetRequired(append(path, "conversation_id")...) + MessageError_SdkV2{}.ToSchema(cs, append(path, "error")...) + cs.SetRequired(append(path, "id")...) + Result_SdkV2{}.ToSchema(cs, append(path, "query_result")...) + cs.SetRequired(append(path, "space_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1219,6 +1221,13 @@ func (newState *GenieStartConversationMessageRequest_SdkV2) SyncEffectiveFieldsD func (newState *GenieStartConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieStartConversationMessageRequest_SdkV2) { } +func (c GenieStartConversationMessageRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "content")...) + cs.SetRequired(append(path, "space_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieStartConversationMessageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1253,11 +1262,11 @@ func (o GenieStartConversationMessageRequest_SdkV2) Type(ctx context.Context) at } type GenieStartConversationResponse_SdkV2 struct { - Conversation types.List `tfsdk:"conversation" tf:"optional,object"` + Conversation types.List `tfsdk:"conversation" tf:"object"` // Conversation ID ConversationId types.String `tfsdk:"conversation_id" tf:""` - Message types.List `tfsdk:"message" tf:"optional,object"` + Message types.List `tfsdk:"message" tf:"object"` // Message ID MessageId types.String `tfsdk:"message_id" tf:""` } @@ -1268,6 +1277,15 @@ func (newState *GenieStartConversationResponse_SdkV2) SyncEffectiveFieldsDuringC func (newState *GenieStartConversationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieStartConversationResponse_SdkV2) { } +func (c GenieStartConversationResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GenieConversation_SdkV2{}.ToSchema(cs, append(path, "conversation")...) + cs.SetRequired(append(path, "conversation_id")...) + GenieMessage_SdkV2{}.ToSchema(cs, append(path, "message")...) + cs.SetRequired(append(path, "message_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieStartConversationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1370,12 +1388,6 @@ type GetDashboardRequest_SdkV2 struct { DashboardId types.String `tfsdk:"-"` } -func (newState *GetDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDashboardRequest_SdkV2) { -} - -func (newState *GetDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDashboardRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1413,12 +1425,6 @@ type GetPublishedDashboardRequest_SdkV2 struct { DashboardId types.String `tfsdk:"-"` } -func (newState *GetPublishedDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedDashboardRequest_SdkV2) { -} - -func (newState *GetPublishedDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedDashboardRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1458,12 +1464,6 @@ type GetScheduleRequest_SdkV2 struct { ScheduleId types.String `tfsdk:"-"` } -func (newState *GetScheduleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetScheduleRequest_SdkV2) { -} - -func (newState *GetScheduleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetScheduleRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetScheduleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1507,12 +1507,6 @@ type GetSubscriptionRequest_SdkV2 struct { SubscriptionId types.String `tfsdk:"-"` } -func (newState *GetSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSubscriptionRequest_SdkV2) { -} - -func (newState *GetSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSubscriptionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSubscriptionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1562,12 +1556,6 @@ type ListDashboardsRequest_SdkV2 struct { View types.String `tfsdk:"-"` } -func (newState *ListDashboardsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDashboardsRequest_SdkV2) { -} - -func (newState *ListDashboardsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDashboardsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDashboardsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1606,10 +1594,10 @@ func (o ListDashboardsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListDashboardsResponse_SdkV2 struct { - Dashboards types.List `tfsdk:"dashboards" tf:"optional"` + Dashboards types.List `tfsdk:"dashboards" tf:""` // A token, which can be sent as `page_token` to retrieve the next page. If // this field is omitted, there are no subsequent dashboards. - NextPageToken types.String `tfsdk:"next_page_token" tf:"computed"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListDashboardsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDashboardsResponse_SdkV2) { @@ -1618,6 +1606,13 @@ func (newState *ListDashboardsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *ListDashboardsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDashboardsResponse_SdkV2) { } +func (c ListDashboardsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Dashboard_SdkV2{}.ToSchema(cs, append(path, "dashboards")...) + cs.SetComputed(append(path, "next_page_token")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDashboardsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1692,12 +1687,6 @@ type ListSchedulesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListSchedulesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchedulesRequest_SdkV2) { -} - -func (newState *ListSchedulesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSchedulesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchedulesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1737,9 +1726,9 @@ type ListSchedulesResponse_SdkV2 struct { // A token that can be used as a `page_token` in subsequent requests to // retrieve the next page of results. If this field is omitted, there are no // subsequent schedules. - NextPageToken types.String `tfsdk:"next_page_token" tf:"computed"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Schedules types.List `tfsdk:"schedules" tf:"optional"` + Schedules types.List `tfsdk:"schedules" tf:""` } func (newState *ListSchedulesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchedulesResponse_SdkV2) { @@ -1748,6 +1737,13 @@ func (newState *ListSchedulesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListSchedulesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSchedulesResponse_SdkV2) { } +func (c ListSchedulesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "next_page_token")...) + Schedule_SdkV2{}.ToSchema(cs, append(path, "schedules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchedulesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1824,12 +1820,6 @@ type ListSubscriptionsRequest_SdkV2 struct { ScheduleId types.String `tfsdk:"-"` } -func (newState *ListSubscriptionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSubscriptionsRequest_SdkV2) { -} - -func (newState *ListSubscriptionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSubscriptionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSubscriptionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1871,9 +1861,9 @@ type ListSubscriptionsResponse_SdkV2 struct { // A token that can be used as a `page_token` in subsequent requests to // retrieve the next page of results. If this field is omitted, there are no // subsequent subscriptions. - NextPageToken types.String `tfsdk:"next_page_token" tf:"computed"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Subscriptions types.List `tfsdk:"subscriptions" tf:"optional"` + Subscriptions types.List `tfsdk:"subscriptions" tf:""` } func (newState *ListSubscriptionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSubscriptionsResponse_SdkV2) { @@ -1882,6 +1872,13 @@ func (newState *ListSubscriptionsResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ListSubscriptionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSubscriptionsResponse_SdkV2) { } +func (c ListSubscriptionsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "next_page_token")...) + Subscription_SdkV2{}.ToSchema(cs, append(path, "subscriptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSubscriptionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1946,9 +1943,9 @@ func (o *ListSubscriptionsResponse_SdkV2) SetSubscriptions(ctx context.Context, } type MessageError_SdkV2 struct { - Error types.String `tfsdk:"error" tf:"optional"` + Error types.String `tfsdk:"error" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *MessageError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MessageError_SdkV2) { @@ -1957,6 +1954,11 @@ func (newState *MessageError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *MessageError_SdkV2) SyncEffectiveFieldsDuringRead(existingState MessageError_SdkV2) { } +func (c MessageError_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MessageError. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1992,16 +1994,16 @@ func (o MessageError_SdkV2) Type(ctx context.Context) attr.Type { type MigrateDashboardRequest_SdkV2 struct { // Display name for the new Lakeview dashboard. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The workspace path of the folder to contain the migrated Lakeview // dashboard. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // UUID of the dashboard to be migrated. SourceDashboardId types.String `tfsdk:"source_dashboard_id" tf:""` // Flag to indicate if mustache parameter syntax ({{ param }}) should be // auto-updated to named syntax (:param) when converting datasets in the // dashboard. - UpdateParameterSyntax types.Bool `tfsdk:"update_parameter_syntax" tf:"optional"` + UpdateParameterSyntax types.Bool `tfsdk:"update_parameter_syntax" tf:""` } func (newState *MigrateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigrateDashboardRequest_SdkV2) { @@ -2010,6 +2012,12 @@ func (newState *MigrateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *MigrateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState MigrateDashboardRequest_SdkV2) { } +func (c MigrateDashboardRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "source_dashboard_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MigrateDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2053,10 +2061,10 @@ type PublishRequest_SdkV2 struct { // Flag to indicate if the publisher's credentials should be embedded in the // published dashboard. These embedded credentials will be used to execute // the published dashboard's queries. - EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:"optional"` + EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:""` // The ID of the warehouse that can be used to override the warehouse which // was set in the draft. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *PublishRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishRequest_SdkV2) { @@ -2065,6 +2073,12 @@ func (newState *PublishRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *PublishRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublishRequest_SdkV2) { } +func (c PublishRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2102,13 +2116,13 @@ func (o PublishRequest_SdkV2) Type(ctx context.Context) attr.Type { type PublishedDashboard_SdkV2 struct { // The display name of the published dashboard. - DisplayName types.String `tfsdk:"display_name" tf:"computed"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Indicates whether credentials are embedded in the published dashboard. - EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:"optional"` + EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:""` // The timestamp of when the published dashboard was last revised. - RevisionCreateTime types.String `tfsdk:"revision_create_time" tf:"computed"` + RevisionCreateTime types.String `tfsdk:"revision_create_time" tf:""` // The warehouse ID used to run the published dashboard. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *PublishedDashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishedDashboard_SdkV2) { @@ -2117,6 +2131,13 @@ func (newState *PublishedDashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *PublishedDashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublishedDashboard_SdkV2) { } +func (c PublishedDashboard_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "display_name")...) + cs.SetComputed(append(path, "revision_create_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishedDashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2155,23 +2176,23 @@ func (o PublishedDashboard_SdkV2) Type(ctx context.Context) attr.Type { } type QueryAttachment_SdkV2 struct { - CachedQuerySchema types.List `tfsdk:"cached_query_schema" tf:"optional,object"` + CachedQuerySchema types.List `tfsdk:"cached_query_schema" tf:"object"` // Description of the query - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // If the query was created on an instruction (trusted asset) we link to the // id - InstructionId types.String `tfsdk:"instruction_id" tf:"optional"` + InstructionId types.String `tfsdk:"instruction_id" tf:""` // Always store the title next to the id in case the original instruction // title changes or the instruction is deleted. - InstructionTitle types.String `tfsdk:"instruction_title" tf:"optional"` + InstructionTitle types.String `tfsdk:"instruction_title" tf:""` // Time when the user updated the query last - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // AI generated SQL query - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` // Name of the query - Title types.String `tfsdk:"title" tf:"optional"` + Title types.String `tfsdk:"title" tf:""` } func (newState *QueryAttachment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryAttachment_SdkV2) { @@ -2180,6 +2201,12 @@ func (newState *QueryAttachment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *QueryAttachment_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryAttachment_SdkV2) { } +func (c QueryAttachment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QuerySchema_SdkV2{}.ToSchema(cs, append(path, "cached_query_schema")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryAttachment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2256,11 +2283,11 @@ func (o *QueryAttachment_SdkV2) SetCachedQuerySchema(ctx context.Context, v Quer } type QuerySchema_SdkV2 struct { - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` // Used to determine if the stored query schema is compatible with the // latest run. The service should always clear the schema when the query is // re-executed. - StatementId types.String `tfsdk:"statement_id" tf:"optional"` + StatementId types.String `tfsdk:"statement_id" tf:""` } func (newState *QuerySchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QuerySchema_SdkV2) { @@ -2269,6 +2296,12 @@ func (newState *QuerySchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *QuerySchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState QuerySchema_SdkV2) { } +func (c QuerySchema_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QuerySchemaColumn_SdkV2{}.ToSchema(cs, append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QuerySchema. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2348,6 +2381,14 @@ func (newState *QuerySchemaColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *QuerySchemaColumn_SdkV2) SyncEffectiveFieldsDuringRead(existingState QuerySchemaColumn_SdkV2) { } +func (c QuerySchemaColumn_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "data_type")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "type_text")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QuerySchemaColumn. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2385,13 +2426,13 @@ func (o QuerySchemaColumn_SdkV2) Type(ctx context.Context) attr.Type { type Result_SdkV2 struct { // If result is truncated - IsTruncated types.Bool `tfsdk:"is_truncated" tf:"optional"` + IsTruncated types.Bool `tfsdk:"is_truncated" tf:""` // Row count of the result - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` // Statement Execution API statement id. Use [Get status, manifest, and // result first chunk](:method:statementexecution/getstatement) to get the // full result data. - StatementId types.String `tfsdk:"statement_id" tf:"optional"` + StatementId types.String `tfsdk:"statement_id" tf:""` } func (newState *Result_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Result_SdkV2) { @@ -2400,6 +2441,11 @@ func (newState *Result_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Resul func (newState *Result_SdkV2) SyncEffectiveFieldsDuringRead(existingState Result_SdkV2) { } +func (c Result_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Result. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2437,26 +2483,26 @@ func (o Result_SdkV2) Type(ctx context.Context) attr.Type { type Schedule_SdkV2 struct { // A timestamp indicating when the schedule was created. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // The cron expression describing the frequency of the periodic refresh for // this schedule. CronSchedule types.List `tfsdk:"cron_schedule" tf:"object"` // UUID identifying the dashboard to which the schedule belongs. - DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The display name for schedule. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The etag for the schedule. Must be left empty on create, must be provided // on updates to ensure that the schedule has not been modified since the // last read, and can be optionally provided on delete. - Etag types.String `tfsdk:"etag" tf:"computed"` + Etag types.String `tfsdk:"etag" tf:""` // The status indicates whether this schedule is paused or not. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` // UUID identifying the schedule. - ScheduleId types.String `tfsdk:"schedule_id" tf:"computed"` + ScheduleId types.String `tfsdk:"schedule_id" tf:""` // A timestamp indicating when the schedule was last updated. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // The warehouse id to run the dashboard with for the schedule. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *Schedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Schedule_SdkV2) { @@ -2465,6 +2511,18 @@ func (newState *Schedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sch func (newState *Schedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState Schedule_SdkV2) { } +func (c Schedule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + cs.SetRequired(append(path, "cron_schedule")...) + CronSchedule_SdkV2{}.ToSchema(cs, append(path, "cron_schedule")...) + cs.SetComputed(append(path, "dashboard_id")...) + cs.SetComputed(append(path, "etag")...) + cs.SetComputed(append(path, "schedule_id")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Schedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2545,10 +2603,10 @@ func (o *Schedule_SdkV2) SetCronSchedule(ctx context.Context, v CronSchedule_Sdk type Subscriber_SdkV2 struct { // The destination to receive the subscription email. This parameter is // mutually exclusive with `user_subscriber`. - DestinationSubscriber types.List `tfsdk:"destination_subscriber" tf:"optional,object"` + DestinationSubscriber types.List `tfsdk:"destination_subscriber" tf:"object"` // The user to receive the subscription email. This parameter is mutually // exclusive with `destination_subscriber`. - UserSubscriber types.List `tfsdk:"user_subscriber" tf:"optional,object"` + UserSubscriber types.List `tfsdk:"user_subscriber" tf:"object"` } func (newState *Subscriber_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Subscriber_SdkV2) { @@ -2557,6 +2615,13 @@ func (newState *Subscriber_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *Subscriber_SdkV2) SyncEffectiveFieldsDuringRead(existingState Subscriber_SdkV2) { } +func (c Subscriber_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SubscriptionSubscriberDestination_SdkV2{}.ToSchema(cs, append(path, "destination_subscriber")...) + SubscriptionSubscriberUser_SdkV2{}.ToSchema(cs, append(path, "user_subscriber")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Subscriber. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2651,25 +2716,25 @@ func (o *Subscriber_SdkV2) SetUserSubscriber(ctx context.Context, v Subscription type Subscription_SdkV2 struct { // A timestamp indicating when the subscription was created. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // UserId of the user who adds subscribers (users or notification // destinations) to the dashboard's schedule. - CreatedByUserId types.Int64 `tfsdk:"created_by_user_id" tf:"computed"` + CreatedByUserId types.Int64 `tfsdk:"created_by_user_id" tf:""` // UUID identifying the dashboard to which the subscription belongs. - DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The etag for the subscription. Must be left empty on create, can be // optionally provided on delete to ensure that the subscription has not // been deleted since the last read. - Etag types.String `tfsdk:"etag" tf:"computed"` + Etag types.String `tfsdk:"etag" tf:""` // UUID identifying the schedule to which the subscription belongs. - ScheduleId types.String `tfsdk:"schedule_id" tf:"computed"` + ScheduleId types.String `tfsdk:"schedule_id" tf:""` // Subscriber details for users and destinations to be added as subscribers // to the schedule. Subscriber types.List `tfsdk:"subscriber" tf:"object"` // UUID identifying the subscription. - SubscriptionId types.String `tfsdk:"subscription_id" tf:"computed"` + SubscriptionId types.String `tfsdk:"subscription_id" tf:""` // A timestamp indicating when the subscription was last updated. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *Subscription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Subscription_SdkV2) { @@ -2678,6 +2743,20 @@ func (newState *Subscription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *Subscription_SdkV2) SyncEffectiveFieldsDuringRead(existingState Subscription_SdkV2) { } +func (c Subscription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + cs.SetComputed(append(path, "created_by_user_id")...) + cs.SetComputed(append(path, "dashboard_id")...) + cs.SetComputed(append(path, "etag")...) + cs.SetComputed(append(path, "schedule_id")...) + cs.SetRequired(append(path, "subscriber")...) + Subscriber_SdkV2{}.ToSchema(cs, append(path, "subscriber")...) + cs.SetComputed(append(path, "subscription_id")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Subscription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2756,7 +2835,7 @@ func (o *Subscription_SdkV2) SetSubscriber(ctx context.Context, v Subscriber_Sdk type SubscriptionSubscriberDestination_SdkV2 struct { // The canonical identifier of the destination to receive email // notification. - DestinationId types.String `tfsdk:"destination_id" tf:"computed"` + DestinationId types.String `tfsdk:"destination_id" tf:""` } func (newState *SubscriptionSubscriberDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubscriptionSubscriberDestination_SdkV2) { @@ -2765,6 +2844,12 @@ func (newState *SubscriptionSubscriberDestination_SdkV2) SyncEffectiveFieldsDuri func (newState *SubscriptionSubscriberDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubscriptionSubscriberDestination_SdkV2) { } +func (c SubscriptionSubscriberDestination_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "destination_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubscriptionSubscriberDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2798,7 +2883,7 @@ func (o SubscriptionSubscriberDestination_SdkV2) Type(ctx context.Context) attr. type SubscriptionSubscriberUser_SdkV2 struct { // UserId of the subscriber. - UserId types.Int64 `tfsdk:"user_id" tf:"computed"` + UserId types.Int64 `tfsdk:"user_id" tf:""` } func (newState *SubscriptionSubscriberUser_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubscriptionSubscriberUser_SdkV2) { @@ -2807,6 +2892,12 @@ func (newState *SubscriptionSubscriberUser_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *SubscriptionSubscriberUser_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubscriptionSubscriberUser_SdkV2) { } +func (c SubscriptionSubscriberUser_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "user_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubscriptionSubscriberUser. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2840,9 +2931,9 @@ func (o SubscriptionSubscriberUser_SdkV2) Type(ctx context.Context) attr.Type { type TextAttachment_SdkV2 struct { // AI generated message - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *TextAttachment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TextAttachment_SdkV2) { @@ -2851,6 +2942,11 @@ func (newState *TextAttachment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *TextAttachment_SdkV2) SyncEffectiveFieldsDuringRead(existingState TextAttachment_SdkV2) { } +func (c TextAttachment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TextAttachment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2890,12 +2986,6 @@ type TrashDashboardRequest_SdkV2 struct { DashboardId types.String `tfsdk:"-"` } -func (newState *TrashDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashDashboardRequest_SdkV2) { -} - -func (newState *TrashDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrashDashboardRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2936,6 +3026,11 @@ func (newState *TrashDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *TrashDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrashDashboardResponse_SdkV2) { } +func (c TrashDashboardResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2969,12 +3064,6 @@ type UnpublishDashboardRequest_SdkV2 struct { DashboardId types.String `tfsdk:"-"` } -func (newState *UnpublishDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnpublishDashboardRequest_SdkV2) { -} - -func (newState *UnpublishDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnpublishDashboardRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpublishDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3015,6 +3104,11 @@ func (newState *UnpublishDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *UnpublishDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnpublishDashboardResponse_SdkV2) { } +func (c UnpublishDashboardResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpublishDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3044,17 +3138,11 @@ func (o UnpublishDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { // Update dashboard type UpdateDashboardRequest_SdkV2 struct { - Dashboard types.List `tfsdk:"dashboard" tf:"optional,object"` + Dashboard types.List `tfsdk:"dashboard" tf:"object"` // UUID identifying the dashboard. DashboardId types.String `tfsdk:"-"` } -func (newState *UpdateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDashboardRequest_SdkV2) { -} - -func (newState *UpdateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDashboardRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3123,17 +3211,11 @@ type UpdateScheduleRequest_SdkV2 struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.List `tfsdk:"schedule" tf:"object"` // UUID identifying the schedule. ScheduleId types.String `tfsdk:"-"` } -func (newState *UpdateScheduleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateScheduleRequest_SdkV2) { -} - -func (newState *UpdateScheduleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateScheduleRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateScheduleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/dashboards_tf/model.go b/internal/service/dashboards_tf/model.go index 03eaaae88..57fafeae8 100755 --- a/internal/service/dashboards_tf/model.go +++ b/internal/service/dashboards_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/sql_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -24,13 +25,7 @@ import ( // Create dashboard type CreateDashboardRequest struct { - Dashboard types.Object `tfsdk:"dashboard" tf:"optional,object"` -} - -func (newState *CreateDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDashboardRequest) { -} - -func (newState *CreateDashboardRequest) SyncEffectiveFieldsDuringRead(existingState CreateDashboardRequest) { + Dashboard types.Object `tfsdk:"dashboard" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDashboardRequest. @@ -99,13 +94,7 @@ type CreateScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` -} - -func (newState *CreateScheduleRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScheduleRequest) { -} - -func (newState *CreateScheduleRequest) SyncEffectiveFieldsDuringRead(existingState CreateScheduleRequest) { + Schedule types.Object `tfsdk:"schedule" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateScheduleRequest. @@ -178,13 +167,7 @@ type CreateSubscriptionRequest struct { // UUID identifying the schedule to which the subscription belongs. ScheduleId types.String `tfsdk:"-"` - Subscription types.Object `tfsdk:"subscription" tf:"optional,object"` -} - -func (newState *CreateSubscriptionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateSubscriptionRequest) { -} - -func (newState *CreateSubscriptionRequest) SyncEffectiveFieldsDuringRead(existingState CreateSubscriptionRequest) { + Subscription types.Object `tfsdk:"subscription" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateSubscriptionRequest. @@ -271,6 +254,13 @@ func (newState *CronSchedule) SyncEffectiveFieldsDuringCreateOrUpdate(plan CronS func (newState *CronSchedule) SyncEffectiveFieldsDuringRead(existingState CronSchedule) { } +func (c CronSchedule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "quartz_cron_expression")...) + cs.SetRequired(append(path, "timezone_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CronSchedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -306,25 +296,25 @@ func (o CronSchedule) Type(ctx context.Context) attr.Type { type Dashboard struct { // The timestamp of when the dashboard was created. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // UUID identifying the dashboard. - DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The display name of the dashboard. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The etag for the dashboard. Can be optionally provided on updates to // ensure that the dashboard has not been modified since the last read. This // field is excluded in List Dashboards responses. - Etag types.String `tfsdk:"etag" tf:"computed"` + Etag types.String `tfsdk:"etag" tf:""` // The state of the dashboard resource. Used for tracking trashed status. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"computed"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // The workspace path of the folder containing the dashboard. Includes // leading slash and no trailing slash. This field is excluded in List // Dashboards responses. - ParentPath types.String `tfsdk:"parent_path" tf:"computed"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // The workspace path of the dashboard asset, including the file name. // Exported dashboards always have the file extension `.lvdash.json`. This // field is excluded in List Dashboards responses. - Path types.String `tfsdk:"path" tf:"computed"` + Path types.String `tfsdk:"path" tf:""` // The contents of the dashboard in serialized string form. This field is // excluded in List Dashboards responses. Use the [get dashboard API] to // retrieve an example response, which includes the `serialized_dashboard` @@ -332,12 +322,12 @@ type Dashboard struct { // represents the dashboard's layout and components. // // [get dashboard API]: https://docs.databricks.com/api/workspace/lakeview/get - SerializedDashboard types.String `tfsdk:"serialized_dashboard" tf:"optional"` + SerializedDashboard types.String `tfsdk:"serialized_dashboard" tf:""` // The timestamp of when the dashboard was last updated by the user. This // field is excluded in List Dashboards responses. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // The warehouse ID used to run the dashboard. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *Dashboard) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dashboard) { @@ -346,6 +336,18 @@ func (newState *Dashboard) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dashboar func (newState *Dashboard) SyncEffectiveFieldsDuringRead(existingState Dashboard) { } +func (c Dashboard) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + cs.SetComputed(append(path, "dashboard_id")...) + cs.SetComputed(append(path, "etag")...) + cs.SetComputed(append(path, "lifecycle_state")...) + cs.SetComputed(append(path, "parent_path")...) + cs.SetComputed(append(path, "path")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Dashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -406,12 +408,6 @@ type DeleteScheduleRequest struct { ScheduleId types.String `tfsdk:"-"` } -func (newState *DeleteScheduleRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScheduleRequest) { -} - -func (newState *DeleteScheduleRequest) SyncEffectiveFieldsDuringRead(existingState DeleteScheduleRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScheduleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -450,12 +446,6 @@ func (o DeleteScheduleRequest) Type(ctx context.Context) attr.Type { type DeleteScheduleResponse struct { } -func (newState *DeleteScheduleResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScheduleResponse) { -} - -func (newState *DeleteScheduleResponse) SyncEffectiveFieldsDuringRead(existingState DeleteScheduleResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScheduleResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -496,12 +486,6 @@ type DeleteSubscriptionRequest struct { SubscriptionId types.String `tfsdk:"-"` } -func (newState *DeleteSubscriptionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSubscriptionRequest) { -} - -func (newState *DeleteSubscriptionRequest) SyncEffectiveFieldsDuringRead(existingState DeleteSubscriptionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSubscriptionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -542,12 +526,6 @@ func (o DeleteSubscriptionRequest) Type(ctx context.Context) attr.Type { type DeleteSubscriptionResponse struct { } -func (newState *DeleteSubscriptionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSubscriptionResponse) { -} - -func (newState *DeleteSubscriptionResponse) SyncEffectiveFieldsDuringRead(existingState DeleteSubscriptionResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSubscriptionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -577,9 +555,9 @@ func (o DeleteSubscriptionResponse) Type(ctx context.Context) attr.Type { // Genie AI Response type GenieAttachment struct { - Query types.Object `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"object"` - Text types.Object `tfsdk:"text" tf:"optional,object"` + Text types.Object `tfsdk:"text" tf:"object"` } func (newState *GenieAttachment) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieAttachment) { @@ -588,6 +566,13 @@ func (newState *GenieAttachment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ge func (newState *GenieAttachment) SyncEffectiveFieldsDuringRead(existingState GenieAttachment) { } +func (c GenieAttachment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryAttachment{}.ToSchema(cs, append(path, "query")...) + TextAttachment{}.ToSchema(cs, append(path, "text")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieAttachment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -682,11 +667,11 @@ func (o *GenieAttachment) SetText(ctx context.Context, v TextAttachment) { type GenieConversation struct { // Timestamp when the message was created - CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:"optional"` + CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:""` // Conversation ID Id types.String `tfsdk:"id" tf:""` // Timestamp when the message was last updated - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Genie space ID SpaceId types.String `tfsdk:"space_id" tf:""` // Conversation title @@ -701,6 +686,15 @@ func (newState *GenieConversation) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *GenieConversation) SyncEffectiveFieldsDuringRead(existingState GenieConversation) { } +func (c GenieConversation) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "space_id")...) + cs.SetRequired(append(path, "title")...) + cs.SetRequired(append(path, "user_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieConversation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -757,6 +751,14 @@ func (newState *GenieCreateConversationMessageRequest) SyncEffectiveFieldsDuring func (newState *GenieCreateConversationMessageRequest) SyncEffectiveFieldsDuringRead(existingState GenieCreateConversationMessageRequest) { } +func (c GenieCreateConversationMessageRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "content")...) + cs.SetRequired(append(path, "conversation_id")...) + cs.SetRequired(append(path, "space_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieCreateConversationMessageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -802,12 +804,6 @@ type GenieExecuteMessageQueryRequest struct { SpaceId types.String `tfsdk:"-"` } -func (newState *GenieExecuteMessageQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieExecuteMessageQueryRequest) { -} - -func (newState *GenieExecuteMessageQueryRequest) SyncEffectiveFieldsDuringRead(existingState GenieExecuteMessageQueryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieExecuteMessageQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -855,12 +851,6 @@ type GenieGetConversationMessageRequest struct { SpaceId types.String `tfsdk:"-"` } -func (newState *GenieGetConversationMessageRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetConversationMessageRequest) { -} - -func (newState *GenieGetConversationMessageRequest) SyncEffectiveFieldsDuringRead(existingState GenieGetConversationMessageRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetConversationMessageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -906,12 +896,6 @@ type GenieGetMessageQueryResultRequest struct { SpaceId types.String `tfsdk:"-"` } -func (newState *GenieGetMessageQueryResultRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetMessageQueryResultRequest) { -} - -func (newState *GenieGetMessageQueryResultRequest) SyncEffectiveFieldsDuringRead(existingState GenieGetMessageQueryResultRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetMessageQueryResultRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -950,7 +934,7 @@ func (o GenieGetMessageQueryResultRequest) Type(ctx context.Context) attr.Type { type GenieGetMessageQueryResultResponse struct { // SQL Statement Execution response. See [Get status, manifest, and result // first chunk](:method:statementexecution/getstatement) for more details. - StatementResponse types.Object `tfsdk:"statement_response" tf:"optional,object"` + StatementResponse types.Object `tfsdk:"statement_response" tf:"object"` } func (newState *GenieGetMessageQueryResultResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetMessageQueryResultResponse) { @@ -959,6 +943,12 @@ func (newState *GenieGetMessageQueryResultResponse) SyncEffectiveFieldsDuringCre func (newState *GenieGetMessageQueryResultResponse) SyncEffectiveFieldsDuringRead(existingState GenieGetMessageQueryResultResponse) { } +func (c GenieGetMessageQueryResultResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + sql_tf.StatementResponse{}.ToSchema(cs, append(path, "statement_response")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetMessageQueryResultResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1022,21 +1012,21 @@ func (o *GenieGetMessageQueryResultResponse) SetStatementResponse(ctx context.Co type GenieMessage struct { // AI produced response to the message - Attachments types.List `tfsdk:"attachments" tf:"optional"` + Attachments types.List `tfsdk:"attachments" tf:""` // User message content Content types.String `tfsdk:"content" tf:""` // Conversation ID ConversationId types.String `tfsdk:"conversation_id" tf:""` // Timestamp when the message was created - CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:"optional"` + CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:""` // Error message if AI failed to respond to the message - Error types.Object `tfsdk:"error" tf:"optional,object"` + Error types.Object `tfsdk:"error" tf:"object"` // Message ID Id types.String `tfsdk:"id" tf:""` // Timestamp when the message was last updated - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // The result of SQL query if the message has a query attachment - QueryResult types.Object `tfsdk:"query_result" tf:"optional,object"` + QueryResult types.Object `tfsdk:"query_result" tf:"object"` // Genie space ID SpaceId types.String `tfsdk:"space_id" tf:""` // MesssageStatus. The possible values are: * `FETCHING_METADATA`: Fetching @@ -1055,9 +1045,9 @@ type GenieMessage struct { // * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL // result is not available anymore. The user needs to execute the query // again. * `CANCELLED`: Message has been cancelled. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // ID of the user who created the message - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` } func (newState *GenieMessage) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieMessage) { @@ -1066,6 +1056,18 @@ func (newState *GenieMessage) SyncEffectiveFieldsDuringCreateOrUpdate(plan Genie func (newState *GenieMessage) SyncEffectiveFieldsDuringRead(existingState GenieMessage) { } +func (c GenieMessage) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GenieAttachment{}.ToSchema(cs, append(path, "attachments")...) + cs.SetRequired(append(path, "content")...) + cs.SetRequired(append(path, "conversation_id")...) + MessageError{}.ToSchema(cs, append(path, "error")...) + cs.SetRequired(append(path, "id")...) + Result{}.ToSchema(cs, append(path, "query_result")...) + cs.SetRequired(append(path, "space_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1219,6 +1221,13 @@ func (newState *GenieStartConversationMessageRequest) SyncEffectiveFieldsDuringC func (newState *GenieStartConversationMessageRequest) SyncEffectiveFieldsDuringRead(existingState GenieStartConversationMessageRequest) { } +func (c GenieStartConversationMessageRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "content")...) + cs.SetRequired(append(path, "space_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieStartConversationMessageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1253,11 +1262,11 @@ func (o GenieStartConversationMessageRequest) Type(ctx context.Context) attr.Typ } type GenieStartConversationResponse struct { - Conversation types.Object `tfsdk:"conversation" tf:"optional,object"` + Conversation types.Object `tfsdk:"conversation" tf:"object"` // Conversation ID ConversationId types.String `tfsdk:"conversation_id" tf:""` - Message types.Object `tfsdk:"message" tf:"optional,object"` + Message types.Object `tfsdk:"message" tf:"object"` // Message ID MessageId types.String `tfsdk:"message_id" tf:""` } @@ -1268,6 +1277,15 @@ func (newState *GenieStartConversationResponse) SyncEffectiveFieldsDuringCreateO func (newState *GenieStartConversationResponse) SyncEffectiveFieldsDuringRead(existingState GenieStartConversationResponse) { } +func (c GenieStartConversationResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GenieConversation{}.ToSchema(cs, append(path, "conversation")...) + cs.SetRequired(append(path, "conversation_id")...) + GenieMessage{}.ToSchema(cs, append(path, "message")...) + cs.SetRequired(append(path, "message_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieStartConversationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1370,12 +1388,6 @@ type GetDashboardRequest struct { DashboardId types.String `tfsdk:"-"` } -func (newState *GetDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDashboardRequest) { -} - -func (newState *GetDashboardRequest) SyncEffectiveFieldsDuringRead(existingState GetDashboardRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1413,12 +1425,6 @@ type GetPublishedDashboardRequest struct { DashboardId types.String `tfsdk:"-"` } -func (newState *GetPublishedDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedDashboardRequest) { -} - -func (newState *GetPublishedDashboardRequest) SyncEffectiveFieldsDuringRead(existingState GetPublishedDashboardRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1458,12 +1464,6 @@ type GetScheduleRequest struct { ScheduleId types.String `tfsdk:"-"` } -func (newState *GetScheduleRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetScheduleRequest) { -} - -func (newState *GetScheduleRequest) SyncEffectiveFieldsDuringRead(existingState GetScheduleRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetScheduleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1507,12 +1507,6 @@ type GetSubscriptionRequest struct { SubscriptionId types.String `tfsdk:"-"` } -func (newState *GetSubscriptionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSubscriptionRequest) { -} - -func (newState *GetSubscriptionRequest) SyncEffectiveFieldsDuringRead(existingState GetSubscriptionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSubscriptionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1562,12 +1556,6 @@ type ListDashboardsRequest struct { View types.String `tfsdk:"-"` } -func (newState *ListDashboardsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDashboardsRequest) { -} - -func (newState *ListDashboardsRequest) SyncEffectiveFieldsDuringRead(existingState ListDashboardsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDashboardsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1606,10 +1594,10 @@ func (o ListDashboardsRequest) Type(ctx context.Context) attr.Type { } type ListDashboardsResponse struct { - Dashboards types.List `tfsdk:"dashboards" tf:"optional"` + Dashboards types.List `tfsdk:"dashboards" tf:""` // A token, which can be sent as `page_token` to retrieve the next page. If // this field is omitted, there are no subsequent dashboards. - NextPageToken types.String `tfsdk:"next_page_token" tf:"computed"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListDashboardsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDashboardsResponse) { @@ -1618,6 +1606,13 @@ func (newState *ListDashboardsResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ListDashboardsResponse) SyncEffectiveFieldsDuringRead(existingState ListDashboardsResponse) { } +func (c ListDashboardsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Dashboard{}.ToSchema(cs, append(path, "dashboards")...) + cs.SetComputed(append(path, "next_page_token")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDashboardsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1692,12 +1687,6 @@ type ListSchedulesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListSchedulesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchedulesRequest) { -} - -func (newState *ListSchedulesRequest) SyncEffectiveFieldsDuringRead(existingState ListSchedulesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchedulesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1737,9 +1726,9 @@ type ListSchedulesResponse struct { // A token that can be used as a `page_token` in subsequent requests to // retrieve the next page of results. If this field is omitted, there are no // subsequent schedules. - NextPageToken types.String `tfsdk:"next_page_token" tf:"computed"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Schedules types.List `tfsdk:"schedules" tf:"optional"` + Schedules types.List `tfsdk:"schedules" tf:""` } func (newState *ListSchedulesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchedulesResponse) { @@ -1748,6 +1737,13 @@ func (newState *ListSchedulesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListSchedulesResponse) SyncEffectiveFieldsDuringRead(existingState ListSchedulesResponse) { } +func (c ListSchedulesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "next_page_token")...) + Schedule{}.ToSchema(cs, append(path, "schedules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchedulesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1824,12 +1820,6 @@ type ListSubscriptionsRequest struct { ScheduleId types.String `tfsdk:"-"` } -func (newState *ListSubscriptionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSubscriptionsRequest) { -} - -func (newState *ListSubscriptionsRequest) SyncEffectiveFieldsDuringRead(existingState ListSubscriptionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSubscriptionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1871,9 +1861,9 @@ type ListSubscriptionsResponse struct { // A token that can be used as a `page_token` in subsequent requests to // retrieve the next page of results. If this field is omitted, there are no // subsequent subscriptions. - NextPageToken types.String `tfsdk:"next_page_token" tf:"computed"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Subscriptions types.List `tfsdk:"subscriptions" tf:"optional"` + Subscriptions types.List `tfsdk:"subscriptions" tf:""` } func (newState *ListSubscriptionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSubscriptionsResponse) { @@ -1882,6 +1872,13 @@ func (newState *ListSubscriptionsResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ListSubscriptionsResponse) SyncEffectiveFieldsDuringRead(existingState ListSubscriptionsResponse) { } +func (c ListSubscriptionsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "next_page_token")...) + Subscription{}.ToSchema(cs, append(path, "subscriptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSubscriptionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1946,9 +1943,9 @@ func (o *ListSubscriptionsResponse) SetSubscriptions(ctx context.Context, v []Su } type MessageError struct { - Error types.String `tfsdk:"error" tf:"optional"` + Error types.String `tfsdk:"error" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *MessageError) SyncEffectiveFieldsDuringCreateOrUpdate(plan MessageError) { @@ -1957,6 +1954,11 @@ func (newState *MessageError) SyncEffectiveFieldsDuringCreateOrUpdate(plan Messa func (newState *MessageError) SyncEffectiveFieldsDuringRead(existingState MessageError) { } +func (c MessageError) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MessageError. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1992,16 +1994,16 @@ func (o MessageError) Type(ctx context.Context) attr.Type { type MigrateDashboardRequest struct { // Display name for the new Lakeview dashboard. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The workspace path of the folder to contain the migrated Lakeview // dashboard. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // UUID of the dashboard to be migrated. SourceDashboardId types.String `tfsdk:"source_dashboard_id" tf:""` // Flag to indicate if mustache parameter syntax ({{ param }}) should be // auto-updated to named syntax (:param) when converting datasets in the // dashboard. - UpdateParameterSyntax types.Bool `tfsdk:"update_parameter_syntax" tf:"optional"` + UpdateParameterSyntax types.Bool `tfsdk:"update_parameter_syntax" tf:""` } func (newState *MigrateDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigrateDashboardRequest) { @@ -2010,6 +2012,12 @@ func (newState *MigrateDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *MigrateDashboardRequest) SyncEffectiveFieldsDuringRead(existingState MigrateDashboardRequest) { } +func (c MigrateDashboardRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "source_dashboard_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MigrateDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2053,10 +2061,10 @@ type PublishRequest struct { // Flag to indicate if the publisher's credentials should be embedded in the // published dashboard. These embedded credentials will be used to execute // the published dashboard's queries. - EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:"optional"` + EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:""` // The ID of the warehouse that can be used to override the warehouse which // was set in the draft. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *PublishRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishRequest) { @@ -2065,6 +2073,12 @@ func (newState *PublishRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pub func (newState *PublishRequest) SyncEffectiveFieldsDuringRead(existingState PublishRequest) { } +func (c PublishRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2102,13 +2116,13 @@ func (o PublishRequest) Type(ctx context.Context) attr.Type { type PublishedDashboard struct { // The display name of the published dashboard. - DisplayName types.String `tfsdk:"display_name" tf:"computed"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Indicates whether credentials are embedded in the published dashboard. - EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:"optional"` + EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:""` // The timestamp of when the published dashboard was last revised. - RevisionCreateTime types.String `tfsdk:"revision_create_time" tf:"computed"` + RevisionCreateTime types.String `tfsdk:"revision_create_time" tf:""` // The warehouse ID used to run the published dashboard. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *PublishedDashboard) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishedDashboard) { @@ -2117,6 +2131,13 @@ func (newState *PublishedDashboard) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PublishedDashboard) SyncEffectiveFieldsDuringRead(existingState PublishedDashboard) { } +func (c PublishedDashboard) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "display_name")...) + cs.SetComputed(append(path, "revision_create_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishedDashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2155,23 +2176,23 @@ func (o PublishedDashboard) Type(ctx context.Context) attr.Type { } type QueryAttachment struct { - CachedQuerySchema types.Object `tfsdk:"cached_query_schema" tf:"optional,object"` + CachedQuerySchema types.Object `tfsdk:"cached_query_schema" tf:"object"` // Description of the query - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // If the query was created on an instruction (trusted asset) we link to the // id - InstructionId types.String `tfsdk:"instruction_id" tf:"optional"` + InstructionId types.String `tfsdk:"instruction_id" tf:""` // Always store the title next to the id in case the original instruction // title changes or the instruction is deleted. - InstructionTitle types.String `tfsdk:"instruction_title" tf:"optional"` + InstructionTitle types.String `tfsdk:"instruction_title" tf:""` // Time when the user updated the query last - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // AI generated SQL query - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` // Name of the query - Title types.String `tfsdk:"title" tf:"optional"` + Title types.String `tfsdk:"title" tf:""` } func (newState *QueryAttachment) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryAttachment) { @@ -2180,6 +2201,12 @@ func (newState *QueryAttachment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Qu func (newState *QueryAttachment) SyncEffectiveFieldsDuringRead(existingState QueryAttachment) { } +func (c QueryAttachment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QuerySchema{}.ToSchema(cs, append(path, "cached_query_schema")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryAttachment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2256,11 +2283,11 @@ func (o *QueryAttachment) SetCachedQuerySchema(ctx context.Context, v QuerySchem } type QuerySchema struct { - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` // Used to determine if the stored query schema is compatible with the // latest run. The service should always clear the schema when the query is // re-executed. - StatementId types.String `tfsdk:"statement_id" tf:"optional"` + StatementId types.String `tfsdk:"statement_id" tf:""` } func (newState *QuerySchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan QuerySchema) { @@ -2269,6 +2296,12 @@ func (newState *QuerySchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryS func (newState *QuerySchema) SyncEffectiveFieldsDuringRead(existingState QuerySchema) { } +func (c QuerySchema) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QuerySchemaColumn{}.ToSchema(cs, append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QuerySchema. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2348,6 +2381,14 @@ func (newState *QuerySchemaColumn) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *QuerySchemaColumn) SyncEffectiveFieldsDuringRead(existingState QuerySchemaColumn) { } +func (c QuerySchemaColumn) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "data_type")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "type_text")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QuerySchemaColumn. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2385,13 +2426,13 @@ func (o QuerySchemaColumn) Type(ctx context.Context) attr.Type { type Result struct { // If result is truncated - IsTruncated types.Bool `tfsdk:"is_truncated" tf:"optional"` + IsTruncated types.Bool `tfsdk:"is_truncated" tf:""` // Row count of the result - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` // Statement Execution API statement id. Use [Get status, manifest, and // result first chunk](:method:statementexecution/getstatement) to get the // full result data. - StatementId types.String `tfsdk:"statement_id" tf:"optional"` + StatementId types.String `tfsdk:"statement_id" tf:""` } func (newState *Result) SyncEffectiveFieldsDuringCreateOrUpdate(plan Result) { @@ -2400,6 +2441,11 @@ func (newState *Result) SyncEffectiveFieldsDuringCreateOrUpdate(plan Result) { func (newState *Result) SyncEffectiveFieldsDuringRead(existingState Result) { } +func (c Result) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Result. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2437,26 +2483,26 @@ func (o Result) Type(ctx context.Context) attr.Type { type Schedule struct { // A timestamp indicating when the schedule was created. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // The cron expression describing the frequency of the periodic refresh for // this schedule. CronSchedule types.Object `tfsdk:"cron_schedule" tf:"object"` // UUID identifying the dashboard to which the schedule belongs. - DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The display name for schedule. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The etag for the schedule. Must be left empty on create, must be provided // on updates to ensure that the schedule has not been modified since the // last read, and can be optionally provided on delete. - Etag types.String `tfsdk:"etag" tf:"computed"` + Etag types.String `tfsdk:"etag" tf:""` // The status indicates whether this schedule is paused or not. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` // UUID identifying the schedule. - ScheduleId types.String `tfsdk:"schedule_id" tf:"computed"` + ScheduleId types.String `tfsdk:"schedule_id" tf:""` // A timestamp indicating when the schedule was last updated. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // The warehouse id to run the dashboard with for the schedule. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *Schedule) SyncEffectiveFieldsDuringCreateOrUpdate(plan Schedule) { @@ -2465,6 +2511,18 @@ func (newState *Schedule) SyncEffectiveFieldsDuringCreateOrUpdate(plan Schedule) func (newState *Schedule) SyncEffectiveFieldsDuringRead(existingState Schedule) { } +func (c Schedule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + cs.SetRequired(append(path, "cron_schedule")...) + CronSchedule{}.ToSchema(cs, append(path, "cron_schedule")...) + cs.SetComputed(append(path, "dashboard_id")...) + cs.SetComputed(append(path, "etag")...) + cs.SetComputed(append(path, "schedule_id")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Schedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2545,10 +2603,10 @@ func (o *Schedule) SetCronSchedule(ctx context.Context, v CronSchedule) { type Subscriber struct { // The destination to receive the subscription email. This parameter is // mutually exclusive with `user_subscriber`. - DestinationSubscriber types.Object `tfsdk:"destination_subscriber" tf:"optional,object"` + DestinationSubscriber types.Object `tfsdk:"destination_subscriber" tf:"object"` // The user to receive the subscription email. This parameter is mutually // exclusive with `destination_subscriber`. - UserSubscriber types.Object `tfsdk:"user_subscriber" tf:"optional,object"` + UserSubscriber types.Object `tfsdk:"user_subscriber" tf:"object"` } func (newState *Subscriber) SyncEffectiveFieldsDuringCreateOrUpdate(plan Subscriber) { @@ -2557,6 +2615,13 @@ func (newState *Subscriber) SyncEffectiveFieldsDuringCreateOrUpdate(plan Subscri func (newState *Subscriber) SyncEffectiveFieldsDuringRead(existingState Subscriber) { } +func (c Subscriber) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SubscriptionSubscriberDestination{}.ToSchema(cs, append(path, "destination_subscriber")...) + SubscriptionSubscriberUser{}.ToSchema(cs, append(path, "user_subscriber")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Subscriber. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2651,25 +2716,25 @@ func (o *Subscriber) SetUserSubscriber(ctx context.Context, v SubscriptionSubscr type Subscription struct { // A timestamp indicating when the subscription was created. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // UserId of the user who adds subscribers (users or notification // destinations) to the dashboard's schedule. - CreatedByUserId types.Int64 `tfsdk:"created_by_user_id" tf:"computed"` + CreatedByUserId types.Int64 `tfsdk:"created_by_user_id" tf:""` // UUID identifying the dashboard to which the subscription belongs. - DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` + DashboardId types.String `tfsdk:"dashboard_id" tf:""` // The etag for the subscription. Must be left empty on create, can be // optionally provided on delete to ensure that the subscription has not // been deleted since the last read. - Etag types.String `tfsdk:"etag" tf:"computed"` + Etag types.String `tfsdk:"etag" tf:""` // UUID identifying the schedule to which the subscription belongs. - ScheduleId types.String `tfsdk:"schedule_id" tf:"computed"` + ScheduleId types.String `tfsdk:"schedule_id" tf:""` // Subscriber details for users and destinations to be added as subscribers // to the schedule. Subscriber types.Object `tfsdk:"subscriber" tf:"object"` // UUID identifying the subscription. - SubscriptionId types.String `tfsdk:"subscription_id" tf:"computed"` + SubscriptionId types.String `tfsdk:"subscription_id" tf:""` // A timestamp indicating when the subscription was last updated. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *Subscription) SyncEffectiveFieldsDuringCreateOrUpdate(plan Subscription) { @@ -2678,6 +2743,20 @@ func (newState *Subscription) SyncEffectiveFieldsDuringCreateOrUpdate(plan Subsc func (newState *Subscription) SyncEffectiveFieldsDuringRead(existingState Subscription) { } +func (c Subscription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + cs.SetComputed(append(path, "created_by_user_id")...) + cs.SetComputed(append(path, "dashboard_id")...) + cs.SetComputed(append(path, "etag")...) + cs.SetComputed(append(path, "schedule_id")...) + cs.SetRequired(append(path, "subscriber")...) + Subscriber{}.ToSchema(cs, append(path, "subscriber")...) + cs.SetComputed(append(path, "subscription_id")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Subscription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2756,7 +2835,7 @@ func (o *Subscription) SetSubscriber(ctx context.Context, v Subscriber) { type SubscriptionSubscriberDestination struct { // The canonical identifier of the destination to receive email // notification. - DestinationId types.String `tfsdk:"destination_id" tf:"computed"` + DestinationId types.String `tfsdk:"destination_id" tf:""` } func (newState *SubscriptionSubscriberDestination) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubscriptionSubscriberDestination) { @@ -2765,6 +2844,12 @@ func (newState *SubscriptionSubscriberDestination) SyncEffectiveFieldsDuringCrea func (newState *SubscriptionSubscriberDestination) SyncEffectiveFieldsDuringRead(existingState SubscriptionSubscriberDestination) { } +func (c SubscriptionSubscriberDestination) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "destination_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubscriptionSubscriberDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2798,7 +2883,7 @@ func (o SubscriptionSubscriberDestination) Type(ctx context.Context) attr.Type { type SubscriptionSubscriberUser struct { // UserId of the subscriber. - UserId types.Int64 `tfsdk:"user_id" tf:"computed"` + UserId types.Int64 `tfsdk:"user_id" tf:""` } func (newState *SubscriptionSubscriberUser) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubscriptionSubscriberUser) { @@ -2807,6 +2892,12 @@ func (newState *SubscriptionSubscriberUser) SyncEffectiveFieldsDuringCreateOrUpd func (newState *SubscriptionSubscriberUser) SyncEffectiveFieldsDuringRead(existingState SubscriptionSubscriberUser) { } +func (c SubscriptionSubscriberUser) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "user_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubscriptionSubscriberUser. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2840,9 +2931,9 @@ func (o SubscriptionSubscriberUser) Type(ctx context.Context) attr.Type { type TextAttachment struct { // AI generated message - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *TextAttachment) SyncEffectiveFieldsDuringCreateOrUpdate(plan TextAttachment) { @@ -2851,6 +2942,11 @@ func (newState *TextAttachment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Tex func (newState *TextAttachment) SyncEffectiveFieldsDuringRead(existingState TextAttachment) { } +func (c TextAttachment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TextAttachment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2890,12 +2986,6 @@ type TrashDashboardRequest struct { DashboardId types.String `tfsdk:"-"` } -func (newState *TrashDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashDashboardRequest) { -} - -func (newState *TrashDashboardRequest) SyncEffectiveFieldsDuringRead(existingState TrashDashboardRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2936,6 +3026,11 @@ func (newState *TrashDashboardResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *TrashDashboardResponse) SyncEffectiveFieldsDuringRead(existingState TrashDashboardResponse) { } +func (c TrashDashboardResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2969,12 +3064,6 @@ type UnpublishDashboardRequest struct { DashboardId types.String `tfsdk:"-"` } -func (newState *UnpublishDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnpublishDashboardRequest) { -} - -func (newState *UnpublishDashboardRequest) SyncEffectiveFieldsDuringRead(existingState UnpublishDashboardRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpublishDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3015,6 +3104,11 @@ func (newState *UnpublishDashboardResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UnpublishDashboardResponse) SyncEffectiveFieldsDuringRead(existingState UnpublishDashboardResponse) { } +func (c UnpublishDashboardResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpublishDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3044,17 +3138,11 @@ func (o UnpublishDashboardResponse) Type(ctx context.Context) attr.Type { // Update dashboard type UpdateDashboardRequest struct { - Dashboard types.Object `tfsdk:"dashboard" tf:"optional,object"` + Dashboard types.Object `tfsdk:"dashboard" tf:"object"` // UUID identifying the dashboard. DashboardId types.String `tfsdk:"-"` } -func (newState *UpdateDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDashboardRequest) { -} - -func (newState *UpdateDashboardRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDashboardRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3123,17 +3211,11 @@ type UpdateScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"object"` // UUID identifying the schedule. ScheduleId types.String `tfsdk:"-"` } -func (newState *UpdateScheduleRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateScheduleRequest) { -} - -func (newState *UpdateScheduleRequest) SyncEffectiveFieldsDuringRead(existingState UpdateScheduleRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateScheduleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/files_tf/legacy_model.go b/internal/service/files_tf/legacy_model.go index 5bd55f77d..c38641281 100755 --- a/internal/service/files_tf/legacy_model.go +++ b/internal/service/files_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -35,6 +36,13 @@ func (newState *AddBlock_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Add func (newState *AddBlock_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddBlock_SdkV2) { } +func (c AddBlock_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "data")...) + cs.SetRequired(append(path, "handle")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddBlock. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -77,6 +85,11 @@ func (newState *AddBlockResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *AddBlockResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddBlockResponse_SdkV2) { } +func (c AddBlockResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddBlockResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -115,6 +128,12 @@ func (newState *Close_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Close_ func (newState *Close_SdkV2) SyncEffectiveFieldsDuringRead(existingState Close_SdkV2) { } +func (c Close_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "handle")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Close. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -155,6 +174,11 @@ func (newState *CloseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CloseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloseResponse_SdkV2) { } +func (c CloseResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -184,7 +208,7 @@ func (o CloseResponse_SdkV2) Type(ctx context.Context) attr.Type { type Create_SdkV2 struct { // The flag that specifies whether to overwrite existing file/files. - Overwrite types.Bool `tfsdk:"overwrite" tf:"optional"` + Overwrite types.Bool `tfsdk:"overwrite" tf:""` // The path of the new file. The path should be the absolute DBFS path. Path types.String `tfsdk:"path" tf:""` } @@ -195,6 +219,12 @@ func (newState *Create_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Creat func (newState *Create_SdkV2) SyncEffectiveFieldsDuringRead(existingState Create_SdkV2) { } +func (c Create_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Create. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -234,12 +264,6 @@ type CreateDirectoryRequest_SdkV2 struct { DirectoryPath types.String `tfsdk:"-"` } -func (newState *CreateDirectoryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDirectoryRequest_SdkV2) { -} - -func (newState *CreateDirectoryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateDirectoryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDirectoryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -274,12 +298,6 @@ func (o CreateDirectoryRequest_SdkV2) Type(ctx context.Context) attr.Type { type CreateDirectoryResponse_SdkV2 struct { } -func (newState *CreateDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDirectoryResponse_SdkV2) { -} - -func (newState *CreateDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateDirectoryResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDirectoryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -310,7 +328,7 @@ func (o CreateDirectoryResponse_SdkV2) Type(ctx context.Context) attr.Type { type CreateResponse_SdkV2 struct { // Handle which should subsequently be passed into the AddBlock and Close // calls when writing to a file through a stream. - Handle types.Int64 `tfsdk:"handle" tf:"optional"` + Handle types.Int64 `tfsdk:"handle" tf:""` } func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse_SdkV2) { @@ -319,6 +337,11 @@ func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateResponse_SdkV2) { } +func (c CreateResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -356,7 +379,7 @@ type Delete_SdkV2 struct { Path types.String `tfsdk:"path" tf:""` // Whether or not to recursively delete the directory's contents. Deleting // empty directories can be done without providing the recursive flag. - Recursive types.Bool `tfsdk:"recursive" tf:"optional"` + Recursive types.Bool `tfsdk:"recursive" tf:""` } func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete_SdkV2) { @@ -365,6 +388,12 @@ func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delet func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringRead(existingState Delete_SdkV2) { } +func (c Delete_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Delete. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -404,12 +433,6 @@ type DeleteDirectoryRequest_SdkV2 struct { DirectoryPath types.String `tfsdk:"-"` } -func (newState *DeleteDirectoryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDirectoryRequest_SdkV2) { -} - -func (newState *DeleteDirectoryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDirectoryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDirectoryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -444,12 +467,6 @@ func (o DeleteDirectoryRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteDirectoryResponse_SdkV2 struct { } -func (newState *DeleteDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDirectoryResponse_SdkV2) { -} - -func (newState *DeleteDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDirectoryResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDirectoryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -483,12 +500,6 @@ type DeleteFileRequest_SdkV2 struct { FilePath types.String `tfsdk:"-"` } -func (newState *DeleteFileRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFileRequest_SdkV2) { -} - -func (newState *DeleteFileRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteFileRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFileRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -529,6 +540,11 @@ func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { } +func (c DeleteResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -558,16 +574,16 @@ func (o DeleteResponse_SdkV2) Type(ctx context.Context) attr.Type { type DirectoryEntry_SdkV2 struct { // The length of the file in bytes. This field is omitted for directories. - FileSize types.Int64 `tfsdk:"file_size" tf:"optional"` + FileSize types.Int64 `tfsdk:"file_size" tf:""` // True if the path is a directory. - IsDirectory types.Bool `tfsdk:"is_directory" tf:"optional"` + IsDirectory types.Bool `tfsdk:"is_directory" tf:""` // Last modification time of given file in milliseconds since unix epoch. - LastModified types.Int64 `tfsdk:"last_modified" tf:"optional"` + LastModified types.Int64 `tfsdk:"last_modified" tf:""` // The name of the file or directory. This is the last component of the // path. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The absolute path of the file or directory. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *DirectoryEntry_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DirectoryEntry_SdkV2) { @@ -576,6 +592,11 @@ func (newState *DirectoryEntry_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DirectoryEntry_SdkV2) SyncEffectiveFieldsDuringRead(existingState DirectoryEntry_SdkV2) { } +func (c DirectoryEntry_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DirectoryEntry. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -621,12 +642,6 @@ type DownloadRequest_SdkV2 struct { FilePath types.String `tfsdk:"-"` } -func (newState *DownloadRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadRequest_SdkV2) { -} - -func (newState *DownloadRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DownloadRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -668,12 +683,6 @@ type DownloadResponse_SdkV2 struct { LastModified types.String `tfsdk:"-"` } -func (newState *DownloadResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadResponse_SdkV2) { -} - -func (newState *DownloadResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DownloadResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -713,13 +722,13 @@ func (o DownloadResponse_SdkV2) Type(ctx context.Context) attr.Type { type FileInfo_SdkV2 struct { // The length of the file in bytes. This field is omitted for directories. - FileSize types.Int64 `tfsdk:"file_size" tf:"optional"` + FileSize types.Int64 `tfsdk:"file_size" tf:""` // True if the path is a directory. - IsDir types.Bool `tfsdk:"is_dir" tf:"optional"` + IsDir types.Bool `tfsdk:"is_dir" tf:""` // Last modification time of given file in milliseconds since epoch. - ModificationTime types.Int64 `tfsdk:"modification_time" tf:"optional"` + ModificationTime types.Int64 `tfsdk:"modification_time" tf:""` // The absolute path of the file or directory. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo_SdkV2) { @@ -728,6 +737,11 @@ func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Fil func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileInfo_SdkV2) { } +func (c FileInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -771,12 +785,6 @@ type GetDirectoryMetadataRequest_SdkV2 struct { DirectoryPath types.String `tfsdk:"-"` } -func (newState *GetDirectoryMetadataRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDirectoryMetadataRequest_SdkV2) { -} - -func (newState *GetDirectoryMetadataRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDirectoryMetadataRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDirectoryMetadataRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -811,12 +819,6 @@ func (o GetDirectoryMetadataRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetDirectoryMetadataResponse_SdkV2 struct { } -func (newState *GetDirectoryMetadataResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDirectoryMetadataResponse_SdkV2) { -} - -func (newState *GetDirectoryMetadataResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDirectoryMetadataResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDirectoryMetadataResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -850,12 +852,6 @@ type GetMetadataRequest_SdkV2 struct { FilePath types.String `tfsdk:"-"` } -func (newState *GetMetadataRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetadataRequest_SdkV2) { -} - -func (newState *GetMetadataRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetadataRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetadataRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -895,12 +891,6 @@ type GetMetadataResponse_SdkV2 struct { LastModified types.String `tfsdk:"-"` } -func (newState *GetMetadataResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetadataResponse_SdkV2) { -} - -func (newState *GetMetadataResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetadataResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetadataResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -943,12 +933,6 @@ type GetStatusRequest_SdkV2 struct { Path types.String `tfsdk:"-"` } -func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatusRequest_SdkV2) { -} - -func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatusRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -987,12 +971,6 @@ type ListDbfsRequest_SdkV2 struct { Path types.String `tfsdk:"-"` } -func (newState *ListDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDbfsRequest_SdkV2) { -} - -func (newState *ListDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDbfsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1050,12 +1028,6 @@ type ListDirectoryContentsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListDirectoryContentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDirectoryContentsRequest_SdkV2) { -} - -func (newState *ListDirectoryContentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDirectoryContentsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDirectoryContentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1093,9 +1065,9 @@ func (o ListDirectoryContentsRequest_SdkV2) Type(ctx context.Context) attr.Type type ListDirectoryResponse_SdkV2 struct { // Array of DirectoryEntry. - Contents types.List `tfsdk:"contents" tf:"optional"` + Contents types.List `tfsdk:"contents" tf:""` // A token, which can be sent as `page_token` to retrieve the next page. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDirectoryResponse_SdkV2) { @@ -1104,6 +1076,12 @@ func (newState *ListDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDirectoryResponse_SdkV2) { } +func (c ListDirectoryResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DirectoryEntry_SdkV2{}.ToSchema(cs, append(path, "contents")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDirectoryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1170,7 +1148,7 @@ func (o *ListDirectoryResponse_SdkV2) SetContents(ctx context.Context, v []Direc type ListStatusResponse_SdkV2 struct { // A list of FileInfo's that describe contents of directory or file. See // example above. - Files types.List `tfsdk:"files" tf:"optional"` + Files types.List `tfsdk:"files" tf:""` } func (newState *ListStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListStatusResponse_SdkV2) { @@ -1179,6 +1157,12 @@ func (newState *ListStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListStatusResponse_SdkV2) { } +func (c ListStatusResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo_SdkV2{}.ToSchema(cs, append(path, "files")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1251,6 +1235,12 @@ func (newState *MkDirs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MkDir func (newState *MkDirs_SdkV2) SyncEffectiveFieldsDuringRead(existingState MkDirs_SdkV2) { } +func (c MkDirs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MkDirs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1291,6 +1281,11 @@ func (newState *MkDirsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *MkDirsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MkDirsResponse_SdkV2) { } +func (c MkDirsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MkDirsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1333,6 +1328,13 @@ func (newState *Move_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Move_Sd func (newState *Move_SdkV2) SyncEffectiveFieldsDuringRead(existingState Move_SdkV2) { } +func (c Move_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination_path")...) + cs.SetRequired(append(path, "source_path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Move. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1375,6 +1377,11 @@ func (newState *MoveResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *MoveResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MoveResponse_SdkV2) { } +func (c MoveResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MoveResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1404,9 +1411,9 @@ func (o MoveResponse_SdkV2) Type(ctx context.Context) attr.Type { type Put_SdkV2 struct { // This parameter might be absent, and instead a posted file will be used. - Contents types.String `tfsdk:"contents" tf:"optional"` + Contents types.String `tfsdk:"contents" tf:""` // The flag that specifies whether to overwrite existing file/files. - Overwrite types.Bool `tfsdk:"overwrite" tf:"optional"` + Overwrite types.Bool `tfsdk:"overwrite" tf:""` // The path of the new file. The path should be the absolute DBFS path. Path types.String `tfsdk:"path" tf:""` } @@ -1417,6 +1424,12 @@ func (newState *Put_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Put_SdkV func (newState *Put_SdkV2) SyncEffectiveFieldsDuringRead(existingState Put_SdkV2) { } +func (c Put_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Put. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1461,6 +1474,11 @@ func (newState *PutResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PutResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutResponse_SdkV2) { } +func (c PutResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1499,12 +1517,6 @@ type ReadDbfsRequest_SdkV2 struct { Path types.String `tfsdk:"-"` } -func (newState *ReadDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadDbfsRequest_SdkV2) { -} - -func (newState *ReadDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReadDbfsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReadDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1544,9 +1556,9 @@ type ReadResponse_SdkV2 struct { // The number of bytes read (could be less than ``length`` if we hit end of // file). This refers to number of bytes read in unencoded version (response // data is base64-encoded). - BytesRead types.Int64 `tfsdk:"bytes_read" tf:"optional"` + BytesRead types.Int64 `tfsdk:"bytes_read" tf:""` // The base64-encoded contents of the file read. - Data types.String `tfsdk:"data" tf:"optional"` + Data types.String `tfsdk:"data" tf:""` } func (newState *ReadResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadResponse_SdkV2) { @@ -1555,6 +1567,11 @@ func (newState *ReadResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ReadResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReadResponse_SdkV2) { } +func (c ReadResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReadResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1597,12 +1614,6 @@ type UploadRequest_SdkV2 struct { Overwrite types.Bool `tfsdk:"-"` } -func (newState *UploadRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UploadRequest_SdkV2) { -} - -func (newState *UploadRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UploadRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UploadRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1641,12 +1652,6 @@ func (o UploadRequest_SdkV2) Type(ctx context.Context) attr.Type { type UploadResponse_SdkV2 struct { } -func (newState *UploadResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UploadResponse_SdkV2) { -} - -func (newState *UploadResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UploadResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UploadResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/files_tf/model.go b/internal/service/files_tf/model.go index c596edcbf..478bb6f6b 100755 --- a/internal/service/files_tf/model.go +++ b/internal/service/files_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -35,6 +36,13 @@ func (newState *AddBlock) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddBlock) func (newState *AddBlock) SyncEffectiveFieldsDuringRead(existingState AddBlock) { } +func (c AddBlock) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "data")...) + cs.SetRequired(append(path, "handle")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddBlock. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -77,6 +85,11 @@ func (newState *AddBlockResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan A func (newState *AddBlockResponse) SyncEffectiveFieldsDuringRead(existingState AddBlockResponse) { } +func (c AddBlockResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddBlockResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -115,6 +128,12 @@ func (newState *Close) SyncEffectiveFieldsDuringCreateOrUpdate(plan Close) { func (newState *Close) SyncEffectiveFieldsDuringRead(existingState Close) { } +func (c Close) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "handle")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Close. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -155,6 +174,11 @@ func (newState *CloseResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Clos func (newState *CloseResponse) SyncEffectiveFieldsDuringRead(existingState CloseResponse) { } +func (c CloseResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -184,7 +208,7 @@ func (o CloseResponse) Type(ctx context.Context) attr.Type { type Create struct { // The flag that specifies whether to overwrite existing file/files. - Overwrite types.Bool `tfsdk:"overwrite" tf:"optional"` + Overwrite types.Bool `tfsdk:"overwrite" tf:""` // The path of the new file. The path should be the absolute DBFS path. Path types.String `tfsdk:"path" tf:""` } @@ -195,6 +219,12 @@ func (newState *Create) SyncEffectiveFieldsDuringCreateOrUpdate(plan Create) { func (newState *Create) SyncEffectiveFieldsDuringRead(existingState Create) { } +func (c Create) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Create. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -234,12 +264,6 @@ type CreateDirectoryRequest struct { DirectoryPath types.String `tfsdk:"-"` } -func (newState *CreateDirectoryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDirectoryRequest) { -} - -func (newState *CreateDirectoryRequest) SyncEffectiveFieldsDuringRead(existingState CreateDirectoryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDirectoryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -274,12 +298,6 @@ func (o CreateDirectoryRequest) Type(ctx context.Context) attr.Type { type CreateDirectoryResponse struct { } -func (newState *CreateDirectoryResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDirectoryResponse) { -} - -func (newState *CreateDirectoryResponse) SyncEffectiveFieldsDuringRead(existingState CreateDirectoryResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDirectoryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -310,7 +328,7 @@ func (o CreateDirectoryResponse) Type(ctx context.Context) attr.Type { type CreateResponse struct { // Handle which should subsequently be passed into the AddBlock and Close // calls when writing to a file through a stream. - Handle types.Int64 `tfsdk:"handle" tf:"optional"` + Handle types.Int64 `tfsdk:"handle" tf:""` } func (newState *CreateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse) { @@ -319,6 +337,11 @@ func (newState *CreateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cre func (newState *CreateResponse) SyncEffectiveFieldsDuringRead(existingState CreateResponse) { } +func (c CreateResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -356,7 +379,7 @@ type Delete struct { Path types.String `tfsdk:"path" tf:""` // Whether or not to recursively delete the directory's contents. Deleting // empty directories can be done without providing the recursive flag. - Recursive types.Bool `tfsdk:"recursive" tf:"optional"` + Recursive types.Bool `tfsdk:"recursive" tf:""` } func (newState *Delete) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete) { @@ -365,6 +388,12 @@ func (newState *Delete) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete) { func (newState *Delete) SyncEffectiveFieldsDuringRead(existingState Delete) { } +func (c Delete) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Delete. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -404,12 +433,6 @@ type DeleteDirectoryRequest struct { DirectoryPath types.String `tfsdk:"-"` } -func (newState *DeleteDirectoryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDirectoryRequest) { -} - -func (newState *DeleteDirectoryRequest) SyncEffectiveFieldsDuringRead(existingState DeleteDirectoryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDirectoryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -444,12 +467,6 @@ func (o DeleteDirectoryRequest) Type(ctx context.Context) attr.Type { type DeleteDirectoryResponse struct { } -func (newState *DeleteDirectoryResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDirectoryResponse) { -} - -func (newState *DeleteDirectoryResponse) SyncEffectiveFieldsDuringRead(existingState DeleteDirectoryResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDirectoryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -483,12 +500,6 @@ type DeleteFileRequest struct { FilePath types.String `tfsdk:"-"` } -func (newState *DeleteFileRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFileRequest) { -} - -func (newState *DeleteFileRequest) SyncEffectiveFieldsDuringRead(existingState DeleteFileRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFileRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -529,6 +540,11 @@ func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Del func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { } +func (c DeleteResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -558,16 +574,16 @@ func (o DeleteResponse) Type(ctx context.Context) attr.Type { type DirectoryEntry struct { // The length of the file in bytes. This field is omitted for directories. - FileSize types.Int64 `tfsdk:"file_size" tf:"optional"` + FileSize types.Int64 `tfsdk:"file_size" tf:""` // True if the path is a directory. - IsDirectory types.Bool `tfsdk:"is_directory" tf:"optional"` + IsDirectory types.Bool `tfsdk:"is_directory" tf:""` // Last modification time of given file in milliseconds since unix epoch. - LastModified types.Int64 `tfsdk:"last_modified" tf:"optional"` + LastModified types.Int64 `tfsdk:"last_modified" tf:""` // The name of the file or directory. This is the last component of the // path. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The absolute path of the file or directory. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *DirectoryEntry) SyncEffectiveFieldsDuringCreateOrUpdate(plan DirectoryEntry) { @@ -576,6 +592,11 @@ func (newState *DirectoryEntry) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dir func (newState *DirectoryEntry) SyncEffectiveFieldsDuringRead(existingState DirectoryEntry) { } +func (c DirectoryEntry) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DirectoryEntry. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -621,12 +642,6 @@ type DownloadRequest struct { FilePath types.String `tfsdk:"-"` } -func (newState *DownloadRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadRequest) { -} - -func (newState *DownloadRequest) SyncEffectiveFieldsDuringRead(existingState DownloadRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -668,12 +683,6 @@ type DownloadResponse struct { LastModified types.String `tfsdk:"-"` } -func (newState *DownloadResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadResponse) { -} - -func (newState *DownloadResponse) SyncEffectiveFieldsDuringRead(existingState DownloadResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -713,13 +722,13 @@ func (o DownloadResponse) Type(ctx context.Context) attr.Type { type FileInfo struct { // The length of the file in bytes. This field is omitted for directories. - FileSize types.Int64 `tfsdk:"file_size" tf:"optional"` + FileSize types.Int64 `tfsdk:"file_size" tf:""` // True if the path is a directory. - IsDir types.Bool `tfsdk:"is_dir" tf:"optional"` + IsDir types.Bool `tfsdk:"is_dir" tf:""` // Last modification time of given file in milliseconds since epoch. - ModificationTime types.Int64 `tfsdk:"modification_time" tf:"optional"` + ModificationTime types.Int64 `tfsdk:"modification_time" tf:""` // The absolute path of the file or directory. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *FileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo) { @@ -728,6 +737,11 @@ func (newState *FileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo) func (newState *FileInfo) SyncEffectiveFieldsDuringRead(existingState FileInfo) { } +func (c FileInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -771,12 +785,6 @@ type GetDirectoryMetadataRequest struct { DirectoryPath types.String `tfsdk:"-"` } -func (newState *GetDirectoryMetadataRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDirectoryMetadataRequest) { -} - -func (newState *GetDirectoryMetadataRequest) SyncEffectiveFieldsDuringRead(existingState GetDirectoryMetadataRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDirectoryMetadataRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -811,12 +819,6 @@ func (o GetDirectoryMetadataRequest) Type(ctx context.Context) attr.Type { type GetDirectoryMetadataResponse struct { } -func (newState *GetDirectoryMetadataResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDirectoryMetadataResponse) { -} - -func (newState *GetDirectoryMetadataResponse) SyncEffectiveFieldsDuringRead(existingState GetDirectoryMetadataResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDirectoryMetadataResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -850,12 +852,6 @@ type GetMetadataRequest struct { FilePath types.String `tfsdk:"-"` } -func (newState *GetMetadataRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetadataRequest) { -} - -func (newState *GetMetadataRequest) SyncEffectiveFieldsDuringRead(existingState GetMetadataRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetadataRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -895,12 +891,6 @@ type GetMetadataResponse struct { LastModified types.String `tfsdk:"-"` } -func (newState *GetMetadataResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetadataResponse) { -} - -func (newState *GetMetadataResponse) SyncEffectiveFieldsDuringRead(existingState GetMetadataResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetadataResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -943,12 +933,6 @@ type GetStatusRequest struct { Path types.String `tfsdk:"-"` } -func (newState *GetStatusRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatusRequest) { -} - -func (newState *GetStatusRequest) SyncEffectiveFieldsDuringRead(existingState GetStatusRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -987,12 +971,6 @@ type ListDbfsRequest struct { Path types.String `tfsdk:"-"` } -func (newState *ListDbfsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDbfsRequest) { -} - -func (newState *ListDbfsRequest) SyncEffectiveFieldsDuringRead(existingState ListDbfsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1050,12 +1028,6 @@ type ListDirectoryContentsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListDirectoryContentsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDirectoryContentsRequest) { -} - -func (newState *ListDirectoryContentsRequest) SyncEffectiveFieldsDuringRead(existingState ListDirectoryContentsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDirectoryContentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1093,9 +1065,9 @@ func (o ListDirectoryContentsRequest) Type(ctx context.Context) attr.Type { type ListDirectoryResponse struct { // Array of DirectoryEntry. - Contents types.List `tfsdk:"contents" tf:"optional"` + Contents types.List `tfsdk:"contents" tf:""` // A token, which can be sent as `page_token` to retrieve the next page. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListDirectoryResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDirectoryResponse) { @@ -1104,6 +1076,12 @@ func (newState *ListDirectoryResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListDirectoryResponse) SyncEffectiveFieldsDuringRead(existingState ListDirectoryResponse) { } +func (c ListDirectoryResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DirectoryEntry{}.ToSchema(cs, append(path, "contents")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDirectoryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1170,7 +1148,7 @@ func (o *ListDirectoryResponse) SetContents(ctx context.Context, v []DirectoryEn type ListStatusResponse struct { // A list of FileInfo's that describe contents of directory or file. See // example above. - Files types.List `tfsdk:"files" tf:"optional"` + Files types.List `tfsdk:"files" tf:""` } func (newState *ListStatusResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListStatusResponse) { @@ -1179,6 +1157,12 @@ func (newState *ListStatusResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListStatusResponse) SyncEffectiveFieldsDuringRead(existingState ListStatusResponse) { } +func (c ListStatusResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo{}.ToSchema(cs, append(path, "files")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1251,6 +1235,12 @@ func (newState *MkDirs) SyncEffectiveFieldsDuringCreateOrUpdate(plan MkDirs) { func (newState *MkDirs) SyncEffectiveFieldsDuringRead(existingState MkDirs) { } +func (c MkDirs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MkDirs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1291,6 +1281,11 @@ func (newState *MkDirsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan MkD func (newState *MkDirsResponse) SyncEffectiveFieldsDuringRead(existingState MkDirsResponse) { } +func (c MkDirsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MkDirsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1333,6 +1328,13 @@ func (newState *Move) SyncEffectiveFieldsDuringCreateOrUpdate(plan Move) { func (newState *Move) SyncEffectiveFieldsDuringRead(existingState Move) { } +func (c Move) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "destination_path")...) + cs.SetRequired(append(path, "source_path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Move. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1375,6 +1377,11 @@ func (newState *MoveResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan MoveR func (newState *MoveResponse) SyncEffectiveFieldsDuringRead(existingState MoveResponse) { } +func (c MoveResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MoveResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1404,9 +1411,9 @@ func (o MoveResponse) Type(ctx context.Context) attr.Type { type Put struct { // This parameter might be absent, and instead a posted file will be used. - Contents types.String `tfsdk:"contents" tf:"optional"` + Contents types.String `tfsdk:"contents" tf:""` // The flag that specifies whether to overwrite existing file/files. - Overwrite types.Bool `tfsdk:"overwrite" tf:"optional"` + Overwrite types.Bool `tfsdk:"overwrite" tf:""` // The path of the new file. The path should be the absolute DBFS path. Path types.String `tfsdk:"path" tf:""` } @@ -1417,6 +1424,12 @@ func (newState *Put) SyncEffectiveFieldsDuringCreateOrUpdate(plan Put) { func (newState *Put) SyncEffectiveFieldsDuringRead(existingState Put) { } +func (c Put) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Put. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1461,6 +1474,11 @@ func (newState *PutResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutRes func (newState *PutResponse) SyncEffectiveFieldsDuringRead(existingState PutResponse) { } +func (c PutResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1499,12 +1517,6 @@ type ReadDbfsRequest struct { Path types.String `tfsdk:"-"` } -func (newState *ReadDbfsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadDbfsRequest) { -} - -func (newState *ReadDbfsRequest) SyncEffectiveFieldsDuringRead(existingState ReadDbfsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReadDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1544,9 +1556,9 @@ type ReadResponse struct { // The number of bytes read (could be less than ``length`` if we hit end of // file). This refers to number of bytes read in unencoded version (response // data is base64-encoded). - BytesRead types.Int64 `tfsdk:"bytes_read" tf:"optional"` + BytesRead types.Int64 `tfsdk:"bytes_read" tf:""` // The base64-encoded contents of the file read. - Data types.String `tfsdk:"data" tf:"optional"` + Data types.String `tfsdk:"data" tf:""` } func (newState *ReadResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadResponse) { @@ -1555,6 +1567,11 @@ func (newState *ReadResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadR func (newState *ReadResponse) SyncEffectiveFieldsDuringRead(existingState ReadResponse) { } +func (c ReadResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReadResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1597,12 +1614,6 @@ type UploadRequest struct { Overwrite types.Bool `tfsdk:"-"` } -func (newState *UploadRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UploadRequest) { -} - -func (newState *UploadRequest) SyncEffectiveFieldsDuringRead(existingState UploadRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UploadRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1641,12 +1652,6 @@ func (o UploadRequest) Type(ctx context.Context) attr.Type { type UploadResponse struct { } -func (newState *UploadResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UploadResponse) { -} - -func (newState *UploadResponse) SyncEffectiveFieldsDuringRead(existingState UploadResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UploadResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/iam_tf/legacy_model.go b/internal/service/iam_tf/legacy_model.go index 27b2d0a18..03447732c 100755 --- a/internal/service/iam_tf/legacy_model.go +++ b/internal/service/iam_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -23,13 +24,13 @@ import ( type AccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccessControlRequest_SdkV2) { @@ -38,6 +39,11 @@ func (newState *AccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *AccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccessControlRequest_SdkV2) { } +func (c AccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -77,15 +83,15 @@ func (o AccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { type AccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccessControlResponse_SdkV2) { @@ -94,6 +100,12 @@ func (newState *AccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *AccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccessControlResponse_SdkV2) { } +func (c AccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Permission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -164,15 +176,15 @@ func (o *AccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v [ } type ComplexValue_SdkV2 struct { - Display types.String `tfsdk:"display" tf:"optional"` + Display types.String `tfsdk:"display" tf:""` - Primary types.Bool `tfsdk:"primary" tf:"optional"` + Primary types.Bool `tfsdk:"primary" tf:""` - Ref types.String `tfsdk:"$ref" tf:"optional"` + Ref types.String `tfsdk:"$ref" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *ComplexValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplexValue_SdkV2) { @@ -181,6 +193,11 @@ func (newState *ComplexValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ComplexValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComplexValue_SdkV2) { } +func (c ComplexValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplexValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -226,12 +243,6 @@ type DeleteAccountGroupRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteAccountGroupRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountGroupRequest_SdkV2) { -} - -func (newState *DeleteAccountGroupRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountGroupRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountGroupRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -269,12 +280,6 @@ type DeleteAccountServicePrincipalRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteAccountServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountServicePrincipalRequest_SdkV2) { -} - -func (newState *DeleteAccountServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountServicePrincipalRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountServicePrincipalRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -312,12 +317,6 @@ type DeleteAccountUserRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteAccountUserRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountUserRequest_SdkV2) { -} - -func (newState *DeleteAccountUserRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountUserRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountUserRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -355,12 +354,6 @@ type DeleteGroupRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteGroupRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteGroupRequest_SdkV2) { -} - -func (newState *DeleteGroupRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteGroupRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteGroupRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -395,12 +388,6 @@ func (o DeleteGroupRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -434,12 +421,6 @@ type DeleteServicePrincipalRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServicePrincipalRequest_SdkV2) { -} - -func (newState *DeleteServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteServicePrincipalRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServicePrincipalRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -477,12 +458,6 @@ type DeleteUserRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteUserRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteUserRequest_SdkV2) { -} - -func (newState *DeleteUserRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteUserRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteUserRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -522,12 +497,6 @@ type DeleteWorkspaceAssignmentRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *DeleteWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWorkspaceAssignmentRequest_SdkV2) { -} - -func (newState *DeleteWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWorkspaceAssignmentRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWorkspaceAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -570,6 +539,11 @@ func (newState *DeleteWorkspacePermissionAssignmentResponse_SdkV2) SyncEffective func (newState *DeleteWorkspacePermissionAssignmentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWorkspacePermissionAssignmentResponse_SdkV2) { } +func (c DeleteWorkspacePermissionAssignmentResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWorkspacePermissionAssignmentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -603,12 +577,6 @@ type GetAccountGroupRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetAccountGroupRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountGroupRequest_SdkV2) { -} - -func (newState *GetAccountGroupRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountGroupRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountGroupRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -646,12 +614,6 @@ type GetAccountServicePrincipalRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetAccountServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountServicePrincipalRequest_SdkV2) { -} - -func (newState *GetAccountServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountServicePrincipalRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountServicePrincipalRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -710,12 +672,6 @@ type GetAccountUserRequest_SdkV2 struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *GetAccountUserRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountUserRequest_SdkV2) { -} - -func (newState *GetAccountUserRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountUserRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountUserRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -767,12 +723,6 @@ type GetAssignableRolesForResourceRequest_SdkV2 struct { Resource types.String `tfsdk:"-"` } -func (newState *GetAssignableRolesForResourceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAssignableRolesForResourceRequest_SdkV2) { -} - -func (newState *GetAssignableRolesForResourceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAssignableRolesForResourceRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAssignableRolesForResourceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -805,7 +755,7 @@ func (o GetAssignableRolesForResourceRequest_SdkV2) Type(ctx context.Context) at } type GetAssignableRolesForResourceResponse_SdkV2 struct { - Roles types.List `tfsdk:"roles" tf:"optional"` + Roles types.List `tfsdk:"roles" tf:""` } func (newState *GetAssignableRolesForResourceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAssignableRolesForResourceResponse_SdkV2) { @@ -814,6 +764,12 @@ func (newState *GetAssignableRolesForResourceResponse_SdkV2) SyncEffectiveFields func (newState *GetAssignableRolesForResourceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAssignableRolesForResourceResponse_SdkV2) { } +func (c GetAssignableRolesForResourceResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Role_SdkV2{}.ToSchema(cs, append(path, "roles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAssignableRolesForResourceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -881,12 +837,6 @@ type GetGroupRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetGroupRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetGroupRequest_SdkV2) { -} - -func (newState *GetGroupRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetGroupRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetGroupRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -920,7 +870,7 @@ func (o GetGroupRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetPasswordPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetPasswordPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPasswordPermissionLevelsResponse_SdkV2) { @@ -929,6 +879,12 @@ func (newState *GetPasswordPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDu func (newState *GetPasswordPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPasswordPermissionLevelsResponse_SdkV2) { } +func (c GetPasswordPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PasswordPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPasswordPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -998,12 +954,6 @@ type GetPermissionLevelsRequest_SdkV2 struct { RequestObjectType types.String `tfsdk:"-"` } -func (newState *GetPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1039,7 +989,7 @@ func (o GetPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPermissionLevelsResponse_SdkV2) { @@ -1048,6 +998,12 @@ func (newState *GetPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *GetPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPermissionLevelsResponse_SdkV2) { } +func (c GetPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1121,12 +1077,6 @@ type GetPermissionRequest_SdkV2 struct { RequestObjectType types.String `tfsdk:"-"` } -func (newState *GetPermissionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPermissionRequest_SdkV2) { -} - -func (newState *GetPermissionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPermissionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPermissionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1175,12 +1125,6 @@ type GetRuleSetRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRuleSetRequest_SdkV2) { -} - -func (newState *GetRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRuleSetRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRuleSetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1220,12 +1164,6 @@ type GetServicePrincipalRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServicePrincipalRequest_SdkV2) { -} - -func (newState *GetServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServicePrincipalRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServicePrincipalRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1284,12 +1222,6 @@ type GetUserRequest_SdkV2 struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *GetUserRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUserRequest_SdkV2) { -} - -func (newState *GetUserRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetUserRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetUserRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1341,12 +1273,6 @@ type GetWorkspaceAssignmentRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *GetWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceAssignmentRequest_SdkV2) { -} - -func (newState *GetWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceAssignmentRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1380,7 +1306,7 @@ func (o GetWorkspaceAssignmentRequest_SdkV2) Type(ctx context.Context) attr.Type type GrantRule_SdkV2 struct { // Principals this grant rule applies to. - Principals types.List `tfsdk:"principals" tf:"optional"` + Principals types.List `tfsdk:"principals" tf:""` // Role that is assigned to the list of principals. Role types.String `tfsdk:"role" tf:""` } @@ -1391,6 +1317,12 @@ func (newState *GrantRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Gr func (newState *GrantRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState GrantRule_SdkV2) { } +func (c GrantRule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "role")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GrantRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1456,26 +1388,26 @@ func (o *GrantRule_SdkV2) SetPrincipals(ctx context.Context, v []types.String) { type Group_SdkV2 struct { // String that represents a human-readable group name - DisplayName types.String `tfsdk:"displayName" tf:"optional"` + DisplayName types.String `tfsdk:"displayName" tf:""` // Entitlements assigned to the group. See [assigning entitlements] for a // full list of supported values. // // [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements - Entitlements types.List `tfsdk:"entitlements" tf:"optional"` + Entitlements types.List `tfsdk:"entitlements" tf:""` - ExternalId types.String `tfsdk:"externalId" tf:"optional"` + ExternalId types.String `tfsdk:"externalId" tf:""` - Groups types.List `tfsdk:"groups" tf:"optional"` + Groups types.List `tfsdk:"groups" tf:""` // Databricks group ID - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Members types.List `tfsdk:"members" tf:"optional"` + Members types.List `tfsdk:"members" tf:""` // Container for the group identifier. Workspace local versus account. - Meta types.List `tfsdk:"meta" tf:"optional,object"` + Meta types.List `tfsdk:"meta" tf:"object"` // Corresponds to AWS instance profile/arn role. - Roles types.List `tfsdk:"roles" tf:"optional"` + Roles types.List `tfsdk:"roles" tf:""` // The schema of the group. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *Group_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Group_SdkV2) { @@ -1484,6 +1416,16 @@ func (newState *Group_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Group_ func (newState *Group_SdkV2) SyncEffectiveFieldsDuringRead(existingState Group_SdkV2) { } +func (c Group_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "entitlements")...) + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "groups")...) + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "members")...) + ResourceMeta_SdkV2{}.ToSchema(cs, append(path, "meta")...) + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "roles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Group. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1730,12 +1672,6 @@ type ListAccountGroupsRequest_SdkV2 struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListAccountGroupsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountGroupsRequest_SdkV2) { -} - -func (newState *ListAccountGroupsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountGroupsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountGroupsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1803,12 +1739,6 @@ type ListAccountServicePrincipalsRequest_SdkV2 struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListAccountServicePrincipalsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountServicePrincipalsRequest_SdkV2) { -} - -func (newState *ListAccountServicePrincipalsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountServicePrincipalsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountServicePrincipalsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1877,12 +1807,6 @@ type ListAccountUsersRequest_SdkV2 struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListAccountUsersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountUsersRequest_SdkV2) { -} - -func (newState *ListAccountUsersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountUsersRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountUsersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1950,12 +1874,6 @@ type ListGroupsRequest_SdkV2 struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListGroupsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListGroupsRequest_SdkV2) { -} - -func (newState *ListGroupsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListGroupsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGroupsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2001,16 +1919,16 @@ func (o ListGroupsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListGroupsResponse_SdkV2 struct { // Total results returned in the response. - ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:"optional"` + ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:""` // User objects returned in the response. - Resources types.List `tfsdk:"Resources" tf:"optional"` + Resources types.List `tfsdk:"Resources" tf:""` // The schema of the service principal. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` // Starting index of all the results that matched the request filters. First // item is number 1. - StartIndex types.Int64 `tfsdk:"startIndex" tf:"optional"` + StartIndex types.Int64 `tfsdk:"startIndex" tf:""` // Total results that match the request filters. - TotalResults types.Int64 `tfsdk:"totalResults" tf:"optional"` + TotalResults types.Int64 `tfsdk:"totalResults" tf:""` } func (newState *ListGroupsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListGroupsResponse_SdkV2) { @@ -2019,6 +1937,12 @@ func (newState *ListGroupsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListGroupsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListGroupsResponse_SdkV2) { } +func (c ListGroupsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Group_SdkV2{}.ToSchema(cs, append(path, "Resources")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGroupsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2119,16 +2043,16 @@ func (o *ListGroupsResponse_SdkV2) SetSchemas(ctx context.Context, v []types.Str type ListServicePrincipalResponse_SdkV2 struct { // Total results returned in the response. - ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:"optional"` + ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:""` // User objects returned in the response. - Resources types.List `tfsdk:"Resources" tf:"optional"` + Resources types.List `tfsdk:"Resources" tf:""` // The schema of the List response. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` // Starting index of all the results that matched the request filters. First // item is number 1. - StartIndex types.Int64 `tfsdk:"startIndex" tf:"optional"` + StartIndex types.Int64 `tfsdk:"startIndex" tf:""` // Total results that match the request filters. - TotalResults types.Int64 `tfsdk:"totalResults" tf:"optional"` + TotalResults types.Int64 `tfsdk:"totalResults" tf:""` } func (newState *ListServicePrincipalResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalResponse_SdkV2) { @@ -2137,6 +2061,12 @@ func (newState *ListServicePrincipalResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *ListServicePrincipalResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalResponse_SdkV2) { } +func (c ListServicePrincipalResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServicePrincipal_SdkV2{}.ToSchema(cs, append(path, "Resources")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2259,12 +2189,6 @@ type ListServicePrincipalsRequest_SdkV2 struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListServicePrincipalsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalsRequest_SdkV2) { -} - -func (newState *ListServicePrincipalsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2333,12 +2257,6 @@ type ListUsersRequest_SdkV2 struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListUsersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUsersRequest_SdkV2) { -} - -func (newState *ListUsersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListUsersRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUsersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2384,16 +2302,16 @@ func (o ListUsersRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListUsersResponse_SdkV2 struct { // Total results returned in the response. - ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:"optional"` + ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:""` // User objects returned in the response. - Resources types.List `tfsdk:"Resources" tf:"optional"` + Resources types.List `tfsdk:"Resources" tf:""` // The schema of the List response. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` // Starting index of all the results that matched the request filters. First // item is number 1. - StartIndex types.Int64 `tfsdk:"startIndex" tf:"optional"` + StartIndex types.Int64 `tfsdk:"startIndex" tf:""` // Total results that match the request filters. - TotalResults types.Int64 `tfsdk:"totalResults" tf:"optional"` + TotalResults types.Int64 `tfsdk:"totalResults" tf:""` } func (newState *ListUsersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUsersResponse_SdkV2) { @@ -2402,6 +2320,12 @@ func (newState *ListUsersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ListUsersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListUsersResponse_SdkV2) { } +func (c ListUsersResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + User_SdkV2{}.ToSchema(cs, append(path, "Resources")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUsersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2506,12 +2430,6 @@ type ListWorkspaceAssignmentRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *ListWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWorkspaceAssignmentRequest_SdkV2) { -} - -func (newState *ListWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWorkspaceAssignmentRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWorkspaceAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2547,7 +2465,7 @@ type MigratePermissionsRequest_SdkV2 struct { // The name of the workspace group that permissions will be migrated from. FromWorkspaceGroupName types.String `tfsdk:"from_workspace_group_name" tf:""` // The maximum number of permissions that will be migrated. - Size types.Int64 `tfsdk:"size" tf:"optional"` + Size types.Int64 `tfsdk:"size" tf:""` // The name of the account group that permissions will be migrated to. ToAccountGroupName types.String `tfsdk:"to_account_group_name" tf:""` // WorkspaceId of the associated workspace where the permission migration @@ -2561,6 +2479,14 @@ func (newState *MigratePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *MigratePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState MigratePermissionsRequest_SdkV2) { } +func (c MigratePermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "from_workspace_group_name")...) + cs.SetRequired(append(path, "to_account_group_name")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MigratePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2600,7 +2526,7 @@ func (o MigratePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { type MigratePermissionsResponse_SdkV2 struct { // Number of permissions migrated. - PermissionsMigrated types.Int64 `tfsdk:"permissions_migrated" tf:"optional"` + PermissionsMigrated types.Int64 `tfsdk:"permissions_migrated" tf:""` } func (newState *MigratePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigratePermissionsResponse_SdkV2) { @@ -2609,6 +2535,11 @@ func (newState *MigratePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *MigratePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MigratePermissionsResponse_SdkV2) { } +func (c MigratePermissionsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MigratePermissionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2642,9 +2573,9 @@ func (o MigratePermissionsResponse_SdkV2) Type(ctx context.Context) attr.Type { type Name_SdkV2 struct { // Family name of the Databricks user. - FamilyName types.String `tfsdk:"familyName" tf:"optional"` + FamilyName types.String `tfsdk:"familyName" tf:""` // Given name of the Databricks user. - GivenName types.String `tfsdk:"givenName" tf:"optional"` + GivenName types.String `tfsdk:"givenName" tf:""` } func (newState *Name_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Name_SdkV2) { @@ -2653,6 +2584,11 @@ func (newState *Name_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Name_Sd func (newState *Name_SdkV2) SyncEffectiveFieldsDuringRead(existingState Name_SdkV2) { } +func (c Name_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Name. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2687,11 +2623,11 @@ func (o Name_SdkV2) Type(ctx context.Context) attr.Type { } type ObjectPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ObjectPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ObjectPermissions_SdkV2) { @@ -2700,6 +2636,12 @@ func (newState *ObjectPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ObjectPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ObjectPermissions_SdkV2) { } +func (c ObjectPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ObjectPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2769,10 +2711,10 @@ type PartialUpdate_SdkV2 struct { // Unique ID for a user in the Databricks workspace. Id types.String `tfsdk:"-"` - Operations types.List `tfsdk:"Operations" tf:"optional"` + Operations types.List `tfsdk:"Operations" tf:""` // The schema of the patch request. Must be // ["urn:ietf:params:scim:api:messages:2.0:PatchOp"]. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *PartialUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartialUpdate_SdkV2) { @@ -2781,6 +2723,13 @@ func (newState *PartialUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *PartialUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState PartialUpdate_SdkV2) { } +func (c PartialUpdate_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + Patch_SdkV2{}.ToSchema(cs, append(path, "Operations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PartialUpdate. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2877,13 +2826,13 @@ func (o *PartialUpdate_SdkV2) SetSchemas(ctx context.Context, v []types.String) type PasswordAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PasswordAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordAccessControlRequest_SdkV2) { @@ -2892,6 +2841,11 @@ func (newState *PasswordAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCre func (newState *PasswordAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordAccessControlRequest_SdkV2) { } +func (c PasswordAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2931,15 +2885,15 @@ func (o PasswordAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type type PasswordAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PasswordAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordAccessControlResponse_SdkV2) { @@ -2948,6 +2902,12 @@ func (newState *PasswordAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCr func (newState *PasswordAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordAccessControlResponse_SdkV2) { } +func (c PasswordAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PasswordPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3018,11 +2978,11 @@ func (o *PasswordAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Cont } type PasswordPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PasswordPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermission_SdkV2) { @@ -3031,6 +2991,11 @@ func (newState *PasswordPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *PasswordPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordPermission_SdkV2) { } +func (c PasswordPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3097,11 +3062,11 @@ func (o *PasswordPermission_SdkV2) SetInheritedFromObject(ctx context.Context, v } type PasswordPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *PasswordPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissions_SdkV2) { @@ -3110,6 +3075,12 @@ func (newState *PasswordPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *PasswordPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordPermissions_SdkV2) { } +func (c PasswordPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PasswordAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3176,9 +3147,9 @@ func (o *PasswordPermissions_SdkV2) SetAccessControlList(ctx context.Context, v } type PasswordPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PasswordPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissionsDescription_SdkV2) { @@ -3187,6 +3158,11 @@ func (newState *PasswordPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringC func (newState *PasswordPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordPermissionsDescription_SdkV2) { } +func (c PasswordPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3221,7 +3197,7 @@ func (o PasswordPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Typ } type PasswordPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` } func (newState *PasswordPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissionsRequest_SdkV2) { @@ -3230,6 +3206,12 @@ func (newState *PasswordPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *PasswordPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordPermissionsRequest_SdkV2) { } +func (c PasswordPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PasswordAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3293,11 +3275,11 @@ func (o *PasswordPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Cont type Patch_SdkV2 struct { // Type of patch operation. - Op types.String `tfsdk:"op" tf:"optional"` + Op types.String `tfsdk:"op" tf:""` // Selection of patch operation - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Value to modify - Value types.Object `tfsdk:"value" tf:"optional"` + Value types.Object `tfsdk:"value" tf:""` } func (newState *Patch_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Patch_SdkV2) { @@ -3306,6 +3288,11 @@ func (newState *Patch_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Patch_ func (newState *Patch_SdkV2) SyncEffectiveFieldsDuringRead(existingState Patch_SdkV2) { } +func (c Patch_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Patch. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3344,12 +3331,6 @@ func (o Patch_SdkV2) Type(ctx context.Context) attr.Type { type PatchResponse_SdkV2 struct { } -func (newState *PatchResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchResponse_SdkV2) { -} - -func (newState *PatchResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PatchResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3378,11 +3359,11 @@ func (o PatchResponse_SdkV2) Type(ctx context.Context) attr.Type { } type Permission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *Permission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Permission_SdkV2) { @@ -3391,6 +3372,11 @@ func (newState *Permission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan P func (newState *Permission_SdkV2) SyncEffectiveFieldsDuringRead(existingState Permission_SdkV2) { } +func (c Permission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Permission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3460,11 +3446,11 @@ func (o *Permission_SdkV2) SetInheritedFromObject(ctx context.Context, v []types // contains some info for user consumption. type PermissionAssignment_SdkV2 struct { // Error response associated with a workspace permission assignment, if any. - Error types.String `tfsdk:"error" tf:"optional"` + Error types.String `tfsdk:"error" tf:""` // The permissions level of the principal. - Permissions types.List `tfsdk:"permissions" tf:"optional"` + Permissions types.List `tfsdk:"permissions" tf:""` // Information about the principal assigned to the workspace. - Principal types.List `tfsdk:"principal" tf:"optional,object"` + Principal types.List `tfsdk:"principal" tf:"object"` } func (newState *PermissionAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionAssignment_SdkV2) { @@ -3473,6 +3459,12 @@ func (newState *PermissionAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *PermissionAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionAssignment_SdkV2) { } +func (c PermissionAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PrincipalOutput_SdkV2{}.ToSchema(cs, append(path, "principal")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3569,7 +3561,7 @@ func (o *PermissionAssignment_SdkV2) SetPrincipal(ctx context.Context, v Princip type PermissionAssignments_SdkV2 struct { // Array of permissions assignments defined for a workspace. - PermissionAssignments types.List `tfsdk:"permission_assignments" tf:"optional"` + PermissionAssignments types.List `tfsdk:"permission_assignments" tf:""` } func (newState *PermissionAssignments_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionAssignments_SdkV2) { @@ -3578,6 +3570,12 @@ func (newState *PermissionAssignments_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *PermissionAssignments_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionAssignments_SdkV2) { } +func (c PermissionAssignments_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PermissionAssignment_SdkV2{}.ToSchema(cs, append(path, "permission_assignments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionAssignments. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3641,9 +3639,9 @@ func (o *PermissionAssignments_SdkV2) SetPermissionAssignments(ctx context.Conte type PermissionOutput_SdkV2 struct { // The results of a permissions query. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PermissionOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionOutput_SdkV2) { @@ -3652,6 +3650,11 @@ func (newState *PermissionOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *PermissionOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionOutput_SdkV2) { } +func (c PermissionOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3686,9 +3689,9 @@ func (o PermissionOutput_SdkV2) Type(ctx context.Context) attr.Type { } type PermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsDescription_SdkV2) { @@ -3697,6 +3700,11 @@ func (newState *PermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *PermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionsDescription_SdkV2) { } +func (c PermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3731,7 +3739,7 @@ func (o PermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { } type PermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The id of the request object. RequestObjectId types.String `tfsdk:"-"` // The type of the request object. Can be one of the following: alerts, @@ -3748,6 +3756,14 @@ func (newState *PermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *PermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionsRequest_SdkV2) { } +func (c PermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "request_object_id")...) + cs.SetRequired(append(path, "request_object_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3816,16 +3832,16 @@ func (o *PermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v [ // Information about the principal assigned to the workspace. type PrincipalOutput_SdkV2 struct { // The display name of the principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The group name of the group. Present only if the principal is a group. - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // The unique, opaque id of the principal. - PrincipalId types.Int64 `tfsdk:"principal_id" tf:"optional"` + PrincipalId types.Int64 `tfsdk:"principal_id" tf:""` // The name of the service principal. Present only if the principal is a // service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // The username of the user. Present only if the principal is a user. - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PrincipalOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrincipalOutput_SdkV2) { @@ -3834,6 +3850,11 @@ func (newState *PrincipalOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PrincipalOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrincipalOutput_SdkV2) { } +func (c PrincipalOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrincipalOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3876,7 +3897,7 @@ func (o PrincipalOutput_SdkV2) Type(ctx context.Context) attr.Type { type ResourceMeta_SdkV2 struct { // Identifier for group type. Can be local workspace group // (`WorkspaceGroup`) or account group (`Group`). - ResourceType types.String `tfsdk:"resourceType" tf:"optional"` + ResourceType types.String `tfsdk:"resourceType" tf:""` } func (newState *ResourceMeta_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResourceMeta_SdkV2) { @@ -3885,6 +3906,11 @@ func (newState *ResourceMeta_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ResourceMeta_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResourceMeta_SdkV2) { } +func (c ResourceMeta_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResourceMeta. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3927,6 +3953,12 @@ func (newState *Role_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Role_Sd func (newState *Role_SdkV2) SyncEffectiveFieldsDuringRead(existingState Role_SdkV2) { } +func (c Role_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Role. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3960,11 +3992,11 @@ func (o Role_SdkV2) Type(ctx context.Context) attr.Type { type RuleSetResponse_SdkV2 struct { // Identifies the version of the rule set returned. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` - GrantRules types.List `tfsdk:"grant_rules" tf:"optional"` + GrantRules types.List `tfsdk:"grant_rules" tf:""` // Name of the rule set. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *RuleSetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RuleSetResponse_SdkV2) { @@ -3973,6 +4005,12 @@ func (newState *RuleSetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *RuleSetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RuleSetResponse_SdkV2) { } +func (c RuleSetResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GrantRule_SdkV2{}.ToSchema(cs, append(path, "grant_rules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RuleSetResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4044,7 +4082,7 @@ type RuleSetUpdateRequest_SdkV2 struct { // service. Etag types.String `tfsdk:"etag" tf:""` - GrantRules types.List `tfsdk:"grant_rules" tf:"optional"` + GrantRules types.List `tfsdk:"grant_rules" tf:""` // Name of the rule set. Name types.String `tfsdk:"name" tf:""` } @@ -4055,6 +4093,14 @@ func (newState *RuleSetUpdateRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *RuleSetUpdateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RuleSetUpdateRequest_SdkV2) { } +func (c RuleSetUpdateRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + GrantRule_SdkV2{}.ToSchema(cs, append(path, "grant_rules")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RuleSetUpdateRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4122,26 +4168,26 @@ func (o *RuleSetUpdateRequest_SdkV2) SetGrantRules(ctx context.Context, v []Gran type ServicePrincipal_SdkV2 struct { // If this user is active - Active types.Bool `tfsdk:"active" tf:"optional"` + Active types.Bool `tfsdk:"active" tf:""` // UUID relating to the service principal - ApplicationId types.String `tfsdk:"applicationId" tf:"optional"` + ApplicationId types.String `tfsdk:"applicationId" tf:""` // String that represents a concatenation of given and family names. - DisplayName types.String `tfsdk:"displayName" tf:"optional"` + DisplayName types.String `tfsdk:"displayName" tf:""` // Entitlements assigned to the service principal. See [assigning // entitlements] for a full list of supported values. // // [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements - Entitlements types.List `tfsdk:"entitlements" tf:"optional"` + Entitlements types.List `tfsdk:"entitlements" tf:""` - ExternalId types.String `tfsdk:"externalId" tf:"optional"` + ExternalId types.String `tfsdk:"externalId" tf:""` - Groups types.List `tfsdk:"groups" tf:"optional"` + Groups types.List `tfsdk:"groups" tf:""` // Databricks service principal ID. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Corresponds to AWS instance profile/arn role. - Roles types.List `tfsdk:"roles" tf:"optional"` + Roles types.List `tfsdk:"roles" tf:""` // The schema of the List response. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *ServicePrincipal_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServicePrincipal_SdkV2) { @@ -4150,6 +4196,14 @@ func (newState *ServicePrincipal_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ServicePrincipal_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServicePrincipal_SdkV2) { } +func (c ServicePrincipal_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "entitlements")...) + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "groups")...) + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "roles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServicePrincipal. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4317,12 +4371,6 @@ func (o *ServicePrincipal_SdkV2) SetSchemas(ctx context.Context, v []types.Strin type UpdateResponse_SdkV2 struct { } -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { -} - -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4363,6 +4411,14 @@ func (newState *UpdateRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UpdateRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRuleSetRequest_SdkV2) { } +func (c UpdateRuleSetRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "rule_set")...) + RuleSetUpdateRequest_SdkV2{}.ToSchema(cs, append(path, "rule_set")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRuleSetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4433,7 +4489,7 @@ type UpdateWorkspaceAssignments_SdkV2 struct { // that excluding this field, or providing unsupported values, will have the // same effect as providing an empty list, which will result in the deletion // of all permissions for the principal. - Permissions types.List `tfsdk:"permissions" tf:"optional"` + Permissions types.List `tfsdk:"permissions" tf:""` // The ID of the user, service principal, or group. PrincipalId types.Int64 `tfsdk:"-"` // The workspace ID. @@ -4446,6 +4502,13 @@ func (newState *UpdateWorkspaceAssignments_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *UpdateWorkspaceAssignments_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceAssignments_SdkV2) { } +func (c UpdateWorkspaceAssignments_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "principal_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWorkspaceAssignments. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4513,36 +4576,36 @@ func (o *UpdateWorkspaceAssignments_SdkV2) SetPermissions(ctx context.Context, v type User_SdkV2 struct { // If this user is active - Active types.Bool `tfsdk:"active" tf:"optional"` + Active types.Bool `tfsdk:"active" tf:""` // String that represents a concatenation of given and family names. For // example `John Smith`. This field cannot be updated through the Workspace // SCIM APIs when [identity federation is enabled]. Use Account SCIM APIs to // update `displayName`. // // [identity federation is enabled]: https://docs.databricks.com/administration-guide/users-groups/best-practices.html#enable-identity-federation - DisplayName types.String `tfsdk:"displayName" tf:"optional"` + DisplayName types.String `tfsdk:"displayName" tf:""` // All the emails associated with the Databricks user. - Emails types.List `tfsdk:"emails" tf:"optional"` + Emails types.List `tfsdk:"emails" tf:""` // Entitlements assigned to the user. See [assigning entitlements] for a // full list of supported values. // // [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements - Entitlements types.List `tfsdk:"entitlements" tf:"optional"` + Entitlements types.List `tfsdk:"entitlements" tf:""` // External ID is not currently supported. It is reserved for future use. - ExternalId types.String `tfsdk:"externalId" tf:"optional"` + ExternalId types.String `tfsdk:"externalId" tf:""` - Groups types.List `tfsdk:"groups" tf:"optional"` + Groups types.List `tfsdk:"groups" tf:""` // Databricks user ID. This is automatically set by Databricks. Any value // provided by the client will be ignored. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Name types.List `tfsdk:"name" tf:"optional,object"` + Name types.List `tfsdk:"name" tf:"object"` // Corresponds to AWS instance profile/arn role. - Roles types.List `tfsdk:"roles" tf:"optional"` + Roles types.List `tfsdk:"roles" tf:""` // The schema of the user. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` // Email address of the Databricks user. - UserName types.String `tfsdk:"userName" tf:"optional"` + UserName types.String `tfsdk:"userName" tf:""` } func (newState *User_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan User_SdkV2) { @@ -4551,6 +4614,16 @@ func (newState *User_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan User_Sd func (newState *User_SdkV2) SyncEffectiveFieldsDuringRead(existingState User_SdkV2) { } +func (c User_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "emails")...) + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "entitlements")...) + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "groups")...) + Name_SdkV2{}.ToSchema(cs, append(path, "name")...) + ComplexValue_SdkV2{}.ToSchema(cs, append(path, "roles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in User. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4779,7 +4852,7 @@ func (o *User_SdkV2) SetSchemas(ctx context.Context, v []types.String) { type WorkspacePermissions_SdkV2 struct { // Array of permissions defined for a workspace. - Permissions types.List `tfsdk:"permissions" tf:"optional"` + Permissions types.List `tfsdk:"permissions" tf:""` } func (newState *WorkspacePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspacePermissions_SdkV2) { @@ -4788,6 +4861,12 @@ func (newState *WorkspacePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *WorkspacePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspacePermissions_SdkV2) { } +func (c WorkspacePermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PermissionOutput_SdkV2{}.ToSchema(cs, append(path, "permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspacePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/iam_tf/model.go b/internal/service/iam_tf/model.go index e70ded669..e9a1fb46a 100755 --- a/internal/service/iam_tf/model.go +++ b/internal/service/iam_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -23,13 +24,13 @@ import ( type AccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccessControlRequest) { @@ -38,6 +39,11 @@ func (newState *AccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *AccessControlRequest) SyncEffectiveFieldsDuringRead(existingState AccessControlRequest) { } +func (c AccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -77,15 +83,15 @@ func (o AccessControlRequest) Type(ctx context.Context) attr.Type { type AccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccessControlResponse) { @@ -94,6 +100,12 @@ func (newState *AccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *AccessControlResponse) SyncEffectiveFieldsDuringRead(existingState AccessControlResponse) { } +func (c AccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Permission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -164,15 +176,15 @@ func (o *AccessControlResponse) SetAllPermissions(ctx context.Context, v []Permi } type ComplexValue struct { - Display types.String `tfsdk:"display" tf:"optional"` + Display types.String `tfsdk:"display" tf:""` - Primary types.Bool `tfsdk:"primary" tf:"optional"` + Primary types.Bool `tfsdk:"primary" tf:""` - Ref types.String `tfsdk:"$ref" tf:"optional"` + Ref types.String `tfsdk:"$ref" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *ComplexValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplexValue) { @@ -181,6 +193,11 @@ func (newState *ComplexValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan Compl func (newState *ComplexValue) SyncEffectiveFieldsDuringRead(existingState ComplexValue) { } +func (c ComplexValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplexValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -226,12 +243,6 @@ type DeleteAccountGroupRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteAccountGroupRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountGroupRequest) { -} - -func (newState *DeleteAccountGroupRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAccountGroupRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountGroupRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -269,12 +280,6 @@ type DeleteAccountServicePrincipalRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteAccountServicePrincipalRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountServicePrincipalRequest) { -} - -func (newState *DeleteAccountServicePrincipalRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAccountServicePrincipalRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountServicePrincipalRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -312,12 +317,6 @@ type DeleteAccountUserRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteAccountUserRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountUserRequest) { -} - -func (newState *DeleteAccountUserRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAccountUserRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountUserRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -355,12 +354,6 @@ type DeleteGroupRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteGroupRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteGroupRequest) { -} - -func (newState *DeleteGroupRequest) SyncEffectiveFieldsDuringRead(existingState DeleteGroupRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteGroupRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -395,12 +388,6 @@ func (o DeleteGroupRequest) Type(ctx context.Context) attr.Type { type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -434,12 +421,6 @@ type DeleteServicePrincipalRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteServicePrincipalRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServicePrincipalRequest) { -} - -func (newState *DeleteServicePrincipalRequest) SyncEffectiveFieldsDuringRead(existingState DeleteServicePrincipalRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServicePrincipalRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -477,12 +458,6 @@ type DeleteUserRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteUserRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteUserRequest) { -} - -func (newState *DeleteUserRequest) SyncEffectiveFieldsDuringRead(existingState DeleteUserRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteUserRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -522,12 +497,6 @@ type DeleteWorkspaceAssignmentRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *DeleteWorkspaceAssignmentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWorkspaceAssignmentRequest) { -} - -func (newState *DeleteWorkspaceAssignmentRequest) SyncEffectiveFieldsDuringRead(existingState DeleteWorkspaceAssignmentRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWorkspaceAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -570,6 +539,11 @@ func (newState *DeleteWorkspacePermissionAssignmentResponse) SyncEffectiveFields func (newState *DeleteWorkspacePermissionAssignmentResponse) SyncEffectiveFieldsDuringRead(existingState DeleteWorkspacePermissionAssignmentResponse) { } +func (c DeleteWorkspacePermissionAssignmentResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWorkspacePermissionAssignmentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -603,12 +577,6 @@ type GetAccountGroupRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetAccountGroupRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountGroupRequest) { -} - -func (newState *GetAccountGroupRequest) SyncEffectiveFieldsDuringRead(existingState GetAccountGroupRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountGroupRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -646,12 +614,6 @@ type GetAccountServicePrincipalRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetAccountServicePrincipalRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountServicePrincipalRequest) { -} - -func (newState *GetAccountServicePrincipalRequest) SyncEffectiveFieldsDuringRead(existingState GetAccountServicePrincipalRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountServicePrincipalRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -710,12 +672,6 @@ type GetAccountUserRequest struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *GetAccountUserRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountUserRequest) { -} - -func (newState *GetAccountUserRequest) SyncEffectiveFieldsDuringRead(existingState GetAccountUserRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountUserRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -767,12 +723,6 @@ type GetAssignableRolesForResourceRequest struct { Resource types.String `tfsdk:"-"` } -func (newState *GetAssignableRolesForResourceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAssignableRolesForResourceRequest) { -} - -func (newState *GetAssignableRolesForResourceRequest) SyncEffectiveFieldsDuringRead(existingState GetAssignableRolesForResourceRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAssignableRolesForResourceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -805,7 +755,7 @@ func (o GetAssignableRolesForResourceRequest) Type(ctx context.Context) attr.Typ } type GetAssignableRolesForResourceResponse struct { - Roles types.List `tfsdk:"roles" tf:"optional"` + Roles types.List `tfsdk:"roles" tf:""` } func (newState *GetAssignableRolesForResourceResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAssignableRolesForResourceResponse) { @@ -814,6 +764,12 @@ func (newState *GetAssignableRolesForResourceResponse) SyncEffectiveFieldsDuring func (newState *GetAssignableRolesForResourceResponse) SyncEffectiveFieldsDuringRead(existingState GetAssignableRolesForResourceResponse) { } +func (c GetAssignableRolesForResourceResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Role{}.ToSchema(cs, append(path, "roles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAssignableRolesForResourceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -881,12 +837,6 @@ type GetGroupRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetGroupRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetGroupRequest) { -} - -func (newState *GetGroupRequest) SyncEffectiveFieldsDuringRead(existingState GetGroupRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetGroupRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -920,7 +870,7 @@ func (o GetGroupRequest) Type(ctx context.Context) attr.Type { type GetPasswordPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetPasswordPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPasswordPermissionLevelsResponse) { @@ -929,6 +879,12 @@ func (newState *GetPasswordPermissionLevelsResponse) SyncEffectiveFieldsDuringCr func (newState *GetPasswordPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetPasswordPermissionLevelsResponse) { } +func (c GetPasswordPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PasswordPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPasswordPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -998,12 +954,6 @@ type GetPermissionLevelsRequest struct { RequestObjectType types.String `tfsdk:"-"` } -func (newState *GetPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPermissionLevelsRequest) { -} - -func (newState *GetPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1039,7 +989,7 @@ func (o GetPermissionLevelsRequest) Type(ctx context.Context) attr.Type { type GetPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPermissionLevelsResponse) { @@ -1048,6 +998,12 @@ func (newState *GetPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUp func (newState *GetPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetPermissionLevelsResponse) { } +func (c GetPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1121,12 +1077,6 @@ type GetPermissionRequest struct { RequestObjectType types.String `tfsdk:"-"` } -func (newState *GetPermissionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPermissionRequest) { -} - -func (newState *GetPermissionRequest) SyncEffectiveFieldsDuringRead(existingState GetPermissionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPermissionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1175,12 +1125,6 @@ type GetRuleSetRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetRuleSetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRuleSetRequest) { -} - -func (newState *GetRuleSetRequest) SyncEffectiveFieldsDuringRead(existingState GetRuleSetRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRuleSetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1220,12 +1164,6 @@ type GetServicePrincipalRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetServicePrincipalRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServicePrincipalRequest) { -} - -func (newState *GetServicePrincipalRequest) SyncEffectiveFieldsDuringRead(existingState GetServicePrincipalRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServicePrincipalRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1284,12 +1222,6 @@ type GetUserRequest struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *GetUserRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUserRequest) { -} - -func (newState *GetUserRequest) SyncEffectiveFieldsDuringRead(existingState GetUserRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetUserRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1341,12 +1273,6 @@ type GetWorkspaceAssignmentRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *GetWorkspaceAssignmentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceAssignmentRequest) { -} - -func (newState *GetWorkspaceAssignmentRequest) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceAssignmentRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1380,7 +1306,7 @@ func (o GetWorkspaceAssignmentRequest) Type(ctx context.Context) attr.Type { type GrantRule struct { // Principals this grant rule applies to. - Principals types.List `tfsdk:"principals" tf:"optional"` + Principals types.List `tfsdk:"principals" tf:""` // Role that is assigned to the list of principals. Role types.String `tfsdk:"role" tf:""` } @@ -1391,6 +1317,12 @@ func (newState *GrantRule) SyncEffectiveFieldsDuringCreateOrUpdate(plan GrantRul func (newState *GrantRule) SyncEffectiveFieldsDuringRead(existingState GrantRule) { } +func (c GrantRule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "role")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GrantRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1456,26 +1388,26 @@ func (o *GrantRule) SetPrincipals(ctx context.Context, v []types.String) { type Group struct { // String that represents a human-readable group name - DisplayName types.String `tfsdk:"displayName" tf:"optional"` + DisplayName types.String `tfsdk:"displayName" tf:""` // Entitlements assigned to the group. See [assigning entitlements] for a // full list of supported values. // // [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements - Entitlements types.List `tfsdk:"entitlements" tf:"optional"` + Entitlements types.List `tfsdk:"entitlements" tf:""` - ExternalId types.String `tfsdk:"externalId" tf:"optional"` + ExternalId types.String `tfsdk:"externalId" tf:""` - Groups types.List `tfsdk:"groups" tf:"optional"` + Groups types.List `tfsdk:"groups" tf:""` // Databricks group ID - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Members types.List `tfsdk:"members" tf:"optional"` + Members types.List `tfsdk:"members" tf:""` // Container for the group identifier. Workspace local versus account. - Meta types.Object `tfsdk:"meta" tf:"optional,object"` + Meta types.Object `tfsdk:"meta" tf:"object"` // Corresponds to AWS instance profile/arn role. - Roles types.List `tfsdk:"roles" tf:"optional"` + Roles types.List `tfsdk:"roles" tf:""` // The schema of the group. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *Group) SyncEffectiveFieldsDuringCreateOrUpdate(plan Group) { @@ -1484,6 +1416,16 @@ func (newState *Group) SyncEffectiveFieldsDuringCreateOrUpdate(plan Group) { func (newState *Group) SyncEffectiveFieldsDuringRead(existingState Group) { } +func (c Group) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ComplexValue{}.ToSchema(cs, append(path, "entitlements")...) + ComplexValue{}.ToSchema(cs, append(path, "groups")...) + ComplexValue{}.ToSchema(cs, append(path, "members")...) + ResourceMeta{}.ToSchema(cs, append(path, "meta")...) + ComplexValue{}.ToSchema(cs, append(path, "roles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Group. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1730,12 +1672,6 @@ type ListAccountGroupsRequest struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListAccountGroupsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountGroupsRequest) { -} - -func (newState *ListAccountGroupsRequest) SyncEffectiveFieldsDuringRead(existingState ListAccountGroupsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountGroupsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1803,12 +1739,6 @@ type ListAccountServicePrincipalsRequest struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListAccountServicePrincipalsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountServicePrincipalsRequest) { -} - -func (newState *ListAccountServicePrincipalsRequest) SyncEffectiveFieldsDuringRead(existingState ListAccountServicePrincipalsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountServicePrincipalsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1877,12 +1807,6 @@ type ListAccountUsersRequest struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListAccountUsersRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountUsersRequest) { -} - -func (newState *ListAccountUsersRequest) SyncEffectiveFieldsDuringRead(existingState ListAccountUsersRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountUsersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1950,12 +1874,6 @@ type ListGroupsRequest struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListGroupsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListGroupsRequest) { -} - -func (newState *ListGroupsRequest) SyncEffectiveFieldsDuringRead(existingState ListGroupsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGroupsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2001,16 +1919,16 @@ func (o ListGroupsRequest) Type(ctx context.Context) attr.Type { type ListGroupsResponse struct { // Total results returned in the response. - ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:"optional"` + ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:""` // User objects returned in the response. - Resources types.List `tfsdk:"Resources" tf:"optional"` + Resources types.List `tfsdk:"Resources" tf:""` // The schema of the service principal. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` // Starting index of all the results that matched the request filters. First // item is number 1. - StartIndex types.Int64 `tfsdk:"startIndex" tf:"optional"` + StartIndex types.Int64 `tfsdk:"startIndex" tf:""` // Total results that match the request filters. - TotalResults types.Int64 `tfsdk:"totalResults" tf:"optional"` + TotalResults types.Int64 `tfsdk:"totalResults" tf:""` } func (newState *ListGroupsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListGroupsResponse) { @@ -2019,6 +1937,12 @@ func (newState *ListGroupsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListGroupsResponse) SyncEffectiveFieldsDuringRead(existingState ListGroupsResponse) { } +func (c ListGroupsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Group{}.ToSchema(cs, append(path, "Resources")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGroupsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2119,16 +2043,16 @@ func (o *ListGroupsResponse) SetSchemas(ctx context.Context, v []types.String) { type ListServicePrincipalResponse struct { // Total results returned in the response. - ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:"optional"` + ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:""` // User objects returned in the response. - Resources types.List `tfsdk:"Resources" tf:"optional"` + Resources types.List `tfsdk:"Resources" tf:""` // The schema of the List response. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` // Starting index of all the results that matched the request filters. First // item is number 1. - StartIndex types.Int64 `tfsdk:"startIndex" tf:"optional"` + StartIndex types.Int64 `tfsdk:"startIndex" tf:""` // Total results that match the request filters. - TotalResults types.Int64 `tfsdk:"totalResults" tf:"optional"` + TotalResults types.Int64 `tfsdk:"totalResults" tf:""` } func (newState *ListServicePrincipalResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalResponse) { @@ -2137,6 +2061,12 @@ func (newState *ListServicePrincipalResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *ListServicePrincipalResponse) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalResponse) { } +func (c ListServicePrincipalResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServicePrincipal{}.ToSchema(cs, append(path, "Resources")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2259,12 +2189,6 @@ type ListServicePrincipalsRequest struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListServicePrincipalsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalsRequest) { -} - -func (newState *ListServicePrincipalsRequest) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2333,12 +2257,6 @@ type ListUsersRequest struct { StartIndex types.Int64 `tfsdk:"-"` } -func (newState *ListUsersRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUsersRequest) { -} - -func (newState *ListUsersRequest) SyncEffectiveFieldsDuringRead(existingState ListUsersRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUsersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2384,16 +2302,16 @@ func (o ListUsersRequest) Type(ctx context.Context) attr.Type { type ListUsersResponse struct { // Total results returned in the response. - ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:"optional"` + ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:""` // User objects returned in the response. - Resources types.List `tfsdk:"Resources" tf:"optional"` + Resources types.List `tfsdk:"Resources" tf:""` // The schema of the List response. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` // Starting index of all the results that matched the request filters. First // item is number 1. - StartIndex types.Int64 `tfsdk:"startIndex" tf:"optional"` + StartIndex types.Int64 `tfsdk:"startIndex" tf:""` // Total results that match the request filters. - TotalResults types.Int64 `tfsdk:"totalResults" tf:"optional"` + TotalResults types.Int64 `tfsdk:"totalResults" tf:""` } func (newState *ListUsersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUsersResponse) { @@ -2402,6 +2320,12 @@ func (newState *ListUsersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListUsersResponse) SyncEffectiveFieldsDuringRead(existingState ListUsersResponse) { } +func (c ListUsersResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + User{}.ToSchema(cs, append(path, "Resources")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUsersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2506,12 +2430,6 @@ type ListWorkspaceAssignmentRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *ListWorkspaceAssignmentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWorkspaceAssignmentRequest) { -} - -func (newState *ListWorkspaceAssignmentRequest) SyncEffectiveFieldsDuringRead(existingState ListWorkspaceAssignmentRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWorkspaceAssignmentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2547,7 +2465,7 @@ type MigratePermissionsRequest struct { // The name of the workspace group that permissions will be migrated from. FromWorkspaceGroupName types.String `tfsdk:"from_workspace_group_name" tf:""` // The maximum number of permissions that will be migrated. - Size types.Int64 `tfsdk:"size" tf:"optional"` + Size types.Int64 `tfsdk:"size" tf:""` // The name of the account group that permissions will be migrated to. ToAccountGroupName types.String `tfsdk:"to_account_group_name" tf:""` // WorkspaceId of the associated workspace where the permission migration @@ -2561,6 +2479,14 @@ func (newState *MigratePermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *MigratePermissionsRequest) SyncEffectiveFieldsDuringRead(existingState MigratePermissionsRequest) { } +func (c MigratePermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "from_workspace_group_name")...) + cs.SetRequired(append(path, "to_account_group_name")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MigratePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2600,7 +2526,7 @@ func (o MigratePermissionsRequest) Type(ctx context.Context) attr.Type { type MigratePermissionsResponse struct { // Number of permissions migrated. - PermissionsMigrated types.Int64 `tfsdk:"permissions_migrated" tf:"optional"` + PermissionsMigrated types.Int64 `tfsdk:"permissions_migrated" tf:""` } func (newState *MigratePermissionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigratePermissionsResponse) { @@ -2609,6 +2535,11 @@ func (newState *MigratePermissionsResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *MigratePermissionsResponse) SyncEffectiveFieldsDuringRead(existingState MigratePermissionsResponse) { } +func (c MigratePermissionsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MigratePermissionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2642,9 +2573,9 @@ func (o MigratePermissionsResponse) Type(ctx context.Context) attr.Type { type Name struct { // Family name of the Databricks user. - FamilyName types.String `tfsdk:"familyName" tf:"optional"` + FamilyName types.String `tfsdk:"familyName" tf:""` // Given name of the Databricks user. - GivenName types.String `tfsdk:"givenName" tf:"optional"` + GivenName types.String `tfsdk:"givenName" tf:""` } func (newState *Name) SyncEffectiveFieldsDuringCreateOrUpdate(plan Name) { @@ -2653,6 +2584,11 @@ func (newState *Name) SyncEffectiveFieldsDuringCreateOrUpdate(plan Name) { func (newState *Name) SyncEffectiveFieldsDuringRead(existingState Name) { } +func (c Name) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Name. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2687,11 +2623,11 @@ func (o Name) Type(ctx context.Context) attr.Type { } type ObjectPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ObjectPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan ObjectPermissions) { @@ -2700,6 +2636,12 @@ func (newState *ObjectPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ObjectPermissions) SyncEffectiveFieldsDuringRead(existingState ObjectPermissions) { } +func (c ObjectPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ObjectPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2769,10 +2711,10 @@ type PartialUpdate struct { // Unique ID for a user in the Databricks workspace. Id types.String `tfsdk:"-"` - Operations types.List `tfsdk:"Operations" tf:"optional"` + Operations types.List `tfsdk:"Operations" tf:""` // The schema of the patch request. Must be // ["urn:ietf:params:scim:api:messages:2.0:PatchOp"]. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *PartialUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartialUpdate) { @@ -2781,6 +2723,13 @@ func (newState *PartialUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(plan Part func (newState *PartialUpdate) SyncEffectiveFieldsDuringRead(existingState PartialUpdate) { } +func (c PartialUpdate) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + Patch{}.ToSchema(cs, append(path, "Operations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PartialUpdate. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2877,13 +2826,13 @@ func (o *PartialUpdate) SetSchemas(ctx context.Context, v []types.String) { type PasswordAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PasswordAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordAccessControlRequest) { @@ -2892,6 +2841,11 @@ func (newState *PasswordAccessControlRequest) SyncEffectiveFieldsDuringCreateOrU func (newState *PasswordAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState PasswordAccessControlRequest) { } +func (c PasswordAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2931,15 +2885,15 @@ func (o PasswordAccessControlRequest) Type(ctx context.Context) attr.Type { type PasswordAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PasswordAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordAccessControlResponse) { @@ -2948,6 +2902,12 @@ func (newState *PasswordAccessControlResponse) SyncEffectiveFieldsDuringCreateOr func (newState *PasswordAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState PasswordAccessControlResponse) { } +func (c PasswordAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PasswordPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3018,11 +2978,11 @@ func (o *PasswordAccessControlResponse) SetAllPermissions(ctx context.Context, v } type PasswordPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PasswordPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermission) { @@ -3031,6 +2991,11 @@ func (newState *PasswordPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PasswordPermission) SyncEffectiveFieldsDuringRead(existingState PasswordPermission) { } +func (c PasswordPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3097,11 +3062,11 @@ func (o *PasswordPermission) SetInheritedFromObject(ctx context.Context, v []typ } type PasswordPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *PasswordPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissions) { @@ -3110,6 +3075,12 @@ func (newState *PasswordPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *PasswordPermissions) SyncEffectiveFieldsDuringRead(existingState PasswordPermissions) { } +func (c PasswordPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PasswordAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3176,9 +3147,9 @@ func (o *PasswordPermissions) SetAccessControlList(ctx context.Context, v []Pass } type PasswordPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PasswordPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissionsDescription) { @@ -3187,6 +3158,11 @@ func (newState *PasswordPermissionsDescription) SyncEffectiveFieldsDuringCreateO func (newState *PasswordPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState PasswordPermissionsDescription) { } +func (c PasswordPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3221,7 +3197,7 @@ func (o PasswordPermissionsDescription) Type(ctx context.Context) attr.Type { } type PasswordPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` } func (newState *PasswordPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissionsRequest) { @@ -3230,6 +3206,12 @@ func (newState *PasswordPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpd func (newState *PasswordPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState PasswordPermissionsRequest) { } +func (c PasswordPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PasswordAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3293,11 +3275,11 @@ func (o *PasswordPermissionsRequest) SetAccessControlList(ctx context.Context, v type Patch struct { // Type of patch operation. - Op types.String `tfsdk:"op" tf:"optional"` + Op types.String `tfsdk:"op" tf:""` // Selection of patch operation - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Value to modify - Value types.Object `tfsdk:"value" tf:"optional"` + Value types.Object `tfsdk:"value" tf:""` } func (newState *Patch) SyncEffectiveFieldsDuringCreateOrUpdate(plan Patch) { @@ -3306,6 +3288,11 @@ func (newState *Patch) SyncEffectiveFieldsDuringCreateOrUpdate(plan Patch) { func (newState *Patch) SyncEffectiveFieldsDuringRead(existingState Patch) { } +func (c Patch) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Patch. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3344,12 +3331,6 @@ func (o Patch) Type(ctx context.Context) attr.Type { type PatchResponse struct { } -func (newState *PatchResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchResponse) { -} - -func (newState *PatchResponse) SyncEffectiveFieldsDuringRead(existingState PatchResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3378,11 +3359,11 @@ func (o PatchResponse) Type(ctx context.Context) attr.Type { } type Permission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *Permission) SyncEffectiveFieldsDuringCreateOrUpdate(plan Permission) { @@ -3391,6 +3372,11 @@ func (newState *Permission) SyncEffectiveFieldsDuringCreateOrUpdate(plan Permiss func (newState *Permission) SyncEffectiveFieldsDuringRead(existingState Permission) { } +func (c Permission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Permission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3460,11 +3446,11 @@ func (o *Permission) SetInheritedFromObject(ctx context.Context, v []types.Strin // contains some info for user consumption. type PermissionAssignment struct { // Error response associated with a workspace permission assignment, if any. - Error types.String `tfsdk:"error" tf:"optional"` + Error types.String `tfsdk:"error" tf:""` // The permissions level of the principal. - Permissions types.List `tfsdk:"permissions" tf:"optional"` + Permissions types.List `tfsdk:"permissions" tf:""` // Information about the principal assigned to the workspace. - Principal types.Object `tfsdk:"principal" tf:"optional,object"` + Principal types.Object `tfsdk:"principal" tf:"object"` } func (newState *PermissionAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionAssignment) { @@ -3473,6 +3459,12 @@ func (newState *PermissionAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *PermissionAssignment) SyncEffectiveFieldsDuringRead(existingState PermissionAssignment) { } +func (c PermissionAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PrincipalOutput{}.ToSchema(cs, append(path, "principal")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3569,7 +3561,7 @@ func (o *PermissionAssignment) SetPrincipal(ctx context.Context, v PrincipalOutp type PermissionAssignments struct { // Array of permissions assignments defined for a workspace. - PermissionAssignments types.List `tfsdk:"permission_assignments" tf:"optional"` + PermissionAssignments types.List `tfsdk:"permission_assignments" tf:""` } func (newState *PermissionAssignments) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionAssignments) { @@ -3578,6 +3570,12 @@ func (newState *PermissionAssignments) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PermissionAssignments) SyncEffectiveFieldsDuringRead(existingState PermissionAssignments) { } +func (c PermissionAssignments) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PermissionAssignment{}.ToSchema(cs, append(path, "permission_assignments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionAssignments. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3641,9 +3639,9 @@ func (o *PermissionAssignments) SetPermissionAssignments(ctx context.Context, v type PermissionOutput struct { // The results of a permissions query. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PermissionOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionOutput) { @@ -3652,6 +3650,11 @@ func (newState *PermissionOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan P func (newState *PermissionOutput) SyncEffectiveFieldsDuringRead(existingState PermissionOutput) { } +func (c PermissionOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3686,9 +3689,9 @@ func (o PermissionOutput) Type(ctx context.Context) attr.Type { } type PermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsDescription) { @@ -3697,6 +3700,11 @@ func (newState *PermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *PermissionsDescription) SyncEffectiveFieldsDuringRead(existingState PermissionsDescription) { } +func (c PermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3731,7 +3739,7 @@ func (o PermissionsDescription) Type(ctx context.Context) attr.Type { } type PermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The id of the request object. RequestObjectId types.String `tfsdk:"-"` // The type of the request object. Can be one of the following: alerts, @@ -3748,6 +3756,14 @@ func (newState *PermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PermissionsRequest) SyncEffectiveFieldsDuringRead(existingState PermissionsRequest) { } +func (c PermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "request_object_id")...) + cs.SetRequired(append(path, "request_object_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3816,16 +3832,16 @@ func (o *PermissionsRequest) SetAccessControlList(ctx context.Context, v []Acces // Information about the principal assigned to the workspace. type PrincipalOutput struct { // The display name of the principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The group name of the group. Present only if the principal is a group. - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // The unique, opaque id of the principal. - PrincipalId types.Int64 `tfsdk:"principal_id" tf:"optional"` + PrincipalId types.Int64 `tfsdk:"principal_id" tf:""` // The name of the service principal. Present only if the principal is a // service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // The username of the user. Present only if the principal is a user. - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PrincipalOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrincipalOutput) { @@ -3834,6 +3850,11 @@ func (newState *PrincipalOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pr func (newState *PrincipalOutput) SyncEffectiveFieldsDuringRead(existingState PrincipalOutput) { } +func (c PrincipalOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrincipalOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3876,7 +3897,7 @@ func (o PrincipalOutput) Type(ctx context.Context) attr.Type { type ResourceMeta struct { // Identifier for group type. Can be local workspace group // (`WorkspaceGroup`) or account group (`Group`). - ResourceType types.String `tfsdk:"resourceType" tf:"optional"` + ResourceType types.String `tfsdk:"resourceType" tf:""` } func (newState *ResourceMeta) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResourceMeta) { @@ -3885,6 +3906,11 @@ func (newState *ResourceMeta) SyncEffectiveFieldsDuringCreateOrUpdate(plan Resou func (newState *ResourceMeta) SyncEffectiveFieldsDuringRead(existingState ResourceMeta) { } +func (c ResourceMeta) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResourceMeta. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3927,6 +3953,12 @@ func (newState *Role) SyncEffectiveFieldsDuringCreateOrUpdate(plan Role) { func (newState *Role) SyncEffectiveFieldsDuringRead(existingState Role) { } +func (c Role) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Role. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3960,11 +3992,11 @@ func (o Role) Type(ctx context.Context) attr.Type { type RuleSetResponse struct { // Identifies the version of the rule set returned. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` - GrantRules types.List `tfsdk:"grant_rules" tf:"optional"` + GrantRules types.List `tfsdk:"grant_rules" tf:""` // Name of the rule set. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *RuleSetResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RuleSetResponse) { @@ -3973,6 +4005,12 @@ func (newState *RuleSetResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ru func (newState *RuleSetResponse) SyncEffectiveFieldsDuringRead(existingState RuleSetResponse) { } +func (c RuleSetResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GrantRule{}.ToSchema(cs, append(path, "grant_rules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RuleSetResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4044,7 +4082,7 @@ type RuleSetUpdateRequest struct { // service. Etag types.String `tfsdk:"etag" tf:""` - GrantRules types.List `tfsdk:"grant_rules" tf:"optional"` + GrantRules types.List `tfsdk:"grant_rules" tf:""` // Name of the rule set. Name types.String `tfsdk:"name" tf:""` } @@ -4055,6 +4093,14 @@ func (newState *RuleSetUpdateRequest) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *RuleSetUpdateRequest) SyncEffectiveFieldsDuringRead(existingState RuleSetUpdateRequest) { } +func (c RuleSetUpdateRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + GrantRule{}.ToSchema(cs, append(path, "grant_rules")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RuleSetUpdateRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4122,26 +4168,26 @@ func (o *RuleSetUpdateRequest) SetGrantRules(ctx context.Context, v []GrantRule) type ServicePrincipal struct { // If this user is active - Active types.Bool `tfsdk:"active" tf:"optional"` + Active types.Bool `tfsdk:"active" tf:""` // UUID relating to the service principal - ApplicationId types.String `tfsdk:"applicationId" tf:"optional"` + ApplicationId types.String `tfsdk:"applicationId" tf:""` // String that represents a concatenation of given and family names. - DisplayName types.String `tfsdk:"displayName" tf:"optional"` + DisplayName types.String `tfsdk:"displayName" tf:""` // Entitlements assigned to the service principal. See [assigning // entitlements] for a full list of supported values. // // [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements - Entitlements types.List `tfsdk:"entitlements" tf:"optional"` + Entitlements types.List `tfsdk:"entitlements" tf:""` - ExternalId types.String `tfsdk:"externalId" tf:"optional"` + ExternalId types.String `tfsdk:"externalId" tf:""` - Groups types.List `tfsdk:"groups" tf:"optional"` + Groups types.List `tfsdk:"groups" tf:""` // Databricks service principal ID. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Corresponds to AWS instance profile/arn role. - Roles types.List `tfsdk:"roles" tf:"optional"` + Roles types.List `tfsdk:"roles" tf:""` // The schema of the List response. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` } func (newState *ServicePrincipal) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServicePrincipal) { @@ -4150,6 +4196,14 @@ func (newState *ServicePrincipal) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *ServicePrincipal) SyncEffectiveFieldsDuringRead(existingState ServicePrincipal) { } +func (c ServicePrincipal) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ComplexValue{}.ToSchema(cs, append(path, "entitlements")...) + ComplexValue{}.ToSchema(cs, append(path, "groups")...) + ComplexValue{}.ToSchema(cs, append(path, "roles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServicePrincipal. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4317,12 +4371,6 @@ func (o *ServicePrincipal) SetSchemas(ctx context.Context, v []types.String) { type UpdateResponse struct { } -func (newState *UpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse) { -} - -func (newState *UpdateResponse) SyncEffectiveFieldsDuringRead(existingState UpdateResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4363,6 +4411,14 @@ func (newState *UpdateRuleSetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *UpdateRuleSetRequest) SyncEffectiveFieldsDuringRead(existingState UpdateRuleSetRequest) { } +func (c UpdateRuleSetRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "rule_set")...) + RuleSetUpdateRequest{}.ToSchema(cs, append(path, "rule_set")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRuleSetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4433,7 +4489,7 @@ type UpdateWorkspaceAssignments struct { // that excluding this field, or providing unsupported values, will have the // same effect as providing an empty list, which will result in the deletion // of all permissions for the principal. - Permissions types.List `tfsdk:"permissions" tf:"optional"` + Permissions types.List `tfsdk:"permissions" tf:""` // The ID of the user, service principal, or group. PrincipalId types.Int64 `tfsdk:"-"` // The workspace ID. @@ -4446,6 +4502,13 @@ func (newState *UpdateWorkspaceAssignments) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UpdateWorkspaceAssignments) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceAssignments) { } +func (c UpdateWorkspaceAssignments) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "principal_id")...) + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWorkspaceAssignments. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4513,36 +4576,36 @@ func (o *UpdateWorkspaceAssignments) SetPermissions(ctx context.Context, v []typ type User struct { // If this user is active - Active types.Bool `tfsdk:"active" tf:"optional"` + Active types.Bool `tfsdk:"active" tf:""` // String that represents a concatenation of given and family names. For // example `John Smith`. This field cannot be updated through the Workspace // SCIM APIs when [identity federation is enabled]. Use Account SCIM APIs to // update `displayName`. // // [identity federation is enabled]: https://docs.databricks.com/administration-guide/users-groups/best-practices.html#enable-identity-federation - DisplayName types.String `tfsdk:"displayName" tf:"optional"` + DisplayName types.String `tfsdk:"displayName" tf:""` // All the emails associated with the Databricks user. - Emails types.List `tfsdk:"emails" tf:"optional"` + Emails types.List `tfsdk:"emails" tf:""` // Entitlements assigned to the user. See [assigning entitlements] for a // full list of supported values. // // [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements - Entitlements types.List `tfsdk:"entitlements" tf:"optional"` + Entitlements types.List `tfsdk:"entitlements" tf:""` // External ID is not currently supported. It is reserved for future use. - ExternalId types.String `tfsdk:"externalId" tf:"optional"` + ExternalId types.String `tfsdk:"externalId" tf:""` - Groups types.List `tfsdk:"groups" tf:"optional"` + Groups types.List `tfsdk:"groups" tf:""` // Databricks user ID. This is automatically set by Databricks. Any value // provided by the client will be ignored. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Name types.Object `tfsdk:"name" tf:"optional,object"` + Name types.Object `tfsdk:"name" tf:"object"` // Corresponds to AWS instance profile/arn role. - Roles types.List `tfsdk:"roles" tf:"optional"` + Roles types.List `tfsdk:"roles" tf:""` // The schema of the user. - Schemas types.List `tfsdk:"schemas" tf:"optional"` + Schemas types.List `tfsdk:"schemas" tf:""` // Email address of the Databricks user. - UserName types.String `tfsdk:"userName" tf:"optional"` + UserName types.String `tfsdk:"userName" tf:""` } func (newState *User) SyncEffectiveFieldsDuringCreateOrUpdate(plan User) { @@ -4551,6 +4614,16 @@ func (newState *User) SyncEffectiveFieldsDuringCreateOrUpdate(plan User) { func (newState *User) SyncEffectiveFieldsDuringRead(existingState User) { } +func (c User) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ComplexValue{}.ToSchema(cs, append(path, "emails")...) + ComplexValue{}.ToSchema(cs, append(path, "entitlements")...) + ComplexValue{}.ToSchema(cs, append(path, "groups")...) + Name{}.ToSchema(cs, append(path, "name")...) + ComplexValue{}.ToSchema(cs, append(path, "roles")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in User. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4779,7 +4852,7 @@ func (o *User) SetSchemas(ctx context.Context, v []types.String) { type WorkspacePermissions struct { // Array of permissions defined for a workspace. - Permissions types.List `tfsdk:"permissions" tf:"optional"` + Permissions types.List `tfsdk:"permissions" tf:""` } func (newState *WorkspacePermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspacePermissions) { @@ -4788,6 +4861,12 @@ func (newState *WorkspacePermissions) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *WorkspacePermissions) SyncEffectiveFieldsDuringRead(existingState WorkspacePermissions) { } +func (c WorkspacePermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PermissionOutput{}.ToSchema(cs, append(path, "permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspacePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/jobs_tf/legacy_model.go b/internal/service/jobs_tf/legacy_model.go index 83f1687cd..b0aeed30a 100755 --- a/internal/service/jobs_tf/legacy_model.go +++ b/internal/service/jobs_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/compute_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -25,22 +26,27 @@ import ( type BaseJob_SdkV2 struct { // The time at which this job was created in epoch milliseconds // (milliseconds since 1/1/1970 UTC). - CreatedTime types.Int64 `tfsdk:"created_time" tf:"optional"` + CreatedTime types.Int64 `tfsdk:"created_time" tf:""` // The creator user name. This field won’t be included in the response if // the user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // The id of the budget policy used by this job for cost attribution // purposes. This may be set through (in order of precedence): 1. Budget // admins through the account or workspace console 2. Jobs UI in the job // details page and Jobs API using `budget_policy_id` 3. Inferred default // based on accessible budget policies of the run_as identity on job // creation or modification. - EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:"computed"` + EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:""` + // Indicates if the job has more sub-resources (`tasks`, `job_clusters`) + // that are not shown. They can be accessed via :method:jobs/get endpoint. + // It is only relevant for API 2.2 :method:jobs/list requests with + // `expand_tasks=true`. + HasMore types.Bool `tfsdk:"has_more" tf:""` // The canonical identifier for this job. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` // Settings for this job and all of its runs. These settings can be updated // using the `resetJob` method. - Settings types.List `tfsdk:"settings" tf:"optional,object"` + Settings types.List `tfsdk:"settings" tf:"object"` } func (newState *BaseJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseJob_SdkV2) { @@ -49,6 +55,13 @@ func (newState *BaseJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Base func (newState *BaseJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState BaseJob_SdkV2) { } +func (c BaseJob_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "effective_budget_policy_id")...) + JobSettings_SdkV2{}.ToSchema(cs, append(path, "settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BaseJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -72,6 +85,7 @@ func (o BaseJob_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue "created_time": o.CreatedTime, "creator_user_name": o.CreatorUserName, "effective_budget_policy_id": o.EffectiveBudgetPolicyId, + "has_more": o.HasMore, "job_id": o.JobId, "settings": o.Settings, }) @@ -84,6 +98,7 @@ func (o BaseJob_SdkV2) Type(ctx context.Context) attr.Type { "created_time": types.Int64Type, "creator_user_name": types.StringType, "effective_budget_policy_id": types.StringType, + "has_more": types.BoolType, "job_id": types.Int64Type, "settings": basetypes.ListType{ ElemType: JobSettings_SdkV2{}.Type(ctx), @@ -126,28 +141,28 @@ type BaseRun_SdkV2 struct { // original attempt’s ID and an incrementing `attempt_number`. Runs are // retried only until they succeed, and the maximum `attempt_number` is the // same as the `max_retries` value for the job. - AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:""` // The time in milliseconds it took to terminate the cluster and clean up // any associated artifacts. The duration of a task run is the sum of the // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The // `cleanup_duration` field is set to 0 for multitask job runs. The total // duration of a multitask job run is the value of the `run_duration` field. - CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:"optional"` + CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:""` // The cluster used for this run. If the run is specified to use a new // cluster, this field is set once the Jobs service has requested a cluster // for the run. - ClusterInstance types.List `tfsdk:"cluster_instance" tf:"optional,object"` + ClusterInstance types.List `tfsdk:"cluster_instance" tf:"object"` // A snapshot of the job’s cluster specification when this run was // created. - ClusterSpec types.List `tfsdk:"cluster_spec" tf:"optional,object"` + ClusterSpec types.List `tfsdk:"cluster_spec" tf:"object"` // The creator user name. This field won’t be included in the response if // the user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Description of the run - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The time at which this run ended in epoch milliseconds (milliseconds // since 1/1/1970 UTC). This field is set to 0 if the job is still running. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The time in milliseconds it took to execute the commands in the JAR or // notebook until they completed, failed, timed out, were cancelled, or // encountered an unexpected error. The duration of a task run is the sum of @@ -155,7 +170,7 @@ type BaseRun_SdkV2 struct { // The `execution_duration` field is set to 0 for multitask job runs. The // total duration of a multitask job run is the value of the `run_duration` // field. - ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:"optional"` + ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -166,53 +181,60 @@ type BaseRun_SdkV2 struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.List `tfsdk:"git_source" tf:"object"` + // Indicates if the run has more sub-resources (`tasks`, `job_clusters`) + // that are not shown. They can be accessed via :method:jobs/getrun + // endpoint. It is only relevant for API 2.2 :method:jobs/listruns requests + // with `expand_tasks=true`. + HasMore types.Bool `tfsdk:"has_more" tf:""` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. - // You must declare dependent libraries in task settings. - JobClusters types.List `tfsdk:"job_clusters" tf:"optional"` + // You must declare dependent libraries in task settings. If more than 100 + // job clusters are available, you can paginate through them using + // :method:jobs/getrun. + JobClusters types.List `tfsdk:"job_clusters" tf:""` // The canonical identifier of the job that contains this run. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` // Job-level parameters used in the run - JobParameters types.List `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.List `tfsdk:"job_parameters" tf:""` // ID of the job run that this run belongs to. For legacy and single-task // job runs the field is populated with the job run ID. For task runs, the // field is populated with the ID of the job run that the task run belongs // to. - JobRunId types.Int64 `tfsdk:"job_run_id" tf:"optional"` + JobRunId types.Int64 `tfsdk:"job_run_id" tf:""` // A unique identifier for this job run. This is set to the same value as // `run_id`. - NumberInJob types.Int64 `tfsdk:"number_in_job" tf:"optional"` + NumberInJob types.Int64 `tfsdk:"number_in_job" tf:""` // If this run is a retry of a prior run attempt, this field contains the // run_id of the original attempt; otherwise, it is the same as the run_id. - OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:"optional"` + OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:""` // The parameters used for this run. - OverridingParameters types.List `tfsdk:"overriding_parameters" tf:"optional,object"` + OverridingParameters types.List `tfsdk:"overriding_parameters" tf:"object"` // The time in milliseconds that the run has spent in the queue. - QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` + QueueDuration types.Int64 `tfsdk:"queue_duration" tf:""` // The repair history of the run. - RepairHistory types.List `tfsdk:"repair_history" tf:"optional"` + RepairHistory types.List `tfsdk:"repair_history" tf:""` // The time in milliseconds it took the job run and all of its repairs to // finish. - RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + RunDuration types.Int64 `tfsdk:"run_duration" tf:""` // The canonical identifier of the run. This ID is unique across all runs of // all jobs. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` // An optional name for the run. The maximum length is 4096 bytes in UTF-8 // encoding. - RunName types.String `tfsdk:"run_name" tf:"optional"` + RunName types.String `tfsdk:"run_name" tf:""` // The URL to the detail page of the run. - RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` + RunPageUrl types.String `tfsdk:"run_page_url" tf:""` // The type of a run. * `JOB_RUN`: Normal job run. A run created with // :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow run. A run created with // [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with // :method:jobs/submit. // // [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow - RunType types.String `tfsdk:"run_type" tf:"optional"` + RunType types.String `tfsdk:"run_type" tf:""` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.List `tfsdk:"schedule" tf:"object"` // The time in milliseconds it took to set up the cluster. For runs that run // on new clusters this is the cluster creation time, for runs that run on // existing clusters this time should be very short. The duration of a task @@ -220,19 +242,22 @@ type BaseRun_SdkV2 struct { // `cleanup_duration`. The `setup_duration` field is set to 0 for multitask // job runs. The total duration of a multitask job run is the value of the // `run_duration` field. - SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` + SetupDuration types.Int64 `tfsdk:"setup_duration" tf:""` // The time at which this run was started in epoch milliseconds // (milliseconds since 1/1/1970 UTC). This may not be the time when the job // task starts executing, for example, if the job is scheduled to run on a // new cluster, this is the time the cluster creation call is issued. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Deprecated. Please use the `status` field instead. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.List `tfsdk:"state" tf:"object"` // The current status of the run - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.List `tfsdk:"status" tf:"object"` // The list of tasks performed by the run. Each task has its own `run_id` - // which you can use to call `JobsGetOutput` to retrieve the run resutls. - Tasks types.List `tfsdk:"tasks" tf:"optional"` + // which you can use to call `JobsGetOutput` to retrieve the run resutls. If + // more than 100 tasks are available, you can paginate through them using + // :method:jobs/getrun. Use the `next_page_token` field at the object root + // to determine if more results are available. + Tasks types.List `tfsdk:"tasks" tf:""` // The type of trigger that fired this run. // // * `PERIODIC`: Schedules that periodically trigger runs, such as a cron @@ -245,9 +270,9 @@ type BaseRun_SdkV2 struct { // arrival. * `TABLE`: Indicates a run that is triggered by a table update. // * `CONTINUOUS_RESTART`: Indicates a run created by user to manually // restart a continuous job run. - Trigger types.String `tfsdk:"trigger" tf:"optional"` + Trigger types.String `tfsdk:"trigger" tf:""` // Additional details about what triggered the run - TriggerInfo types.List `tfsdk:"trigger_info" tf:"optional,object"` + TriggerInfo types.List `tfsdk:"trigger_info" tf:"object"` } func (newState *BaseRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseRun_SdkV2) { @@ -256,6 +281,23 @@ func (newState *BaseRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Base func (newState *BaseRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState BaseRun_SdkV2) { } +func (c BaseRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterInstance_SdkV2{}.ToSchema(cs, append(path, "cluster_instance")...) + ClusterSpec_SdkV2{}.ToSchema(cs, append(path, "cluster_spec")...) + GitSource_SdkV2{}.ToSchema(cs, append(path, "git_source")...) + JobCluster_SdkV2{}.ToSchema(cs, append(path, "job_clusters")...) + JobParameter_SdkV2{}.ToSchema(cs, append(path, "job_parameters")...) + RunParameters_SdkV2{}.ToSchema(cs, append(path, "overriding_parameters")...) + RepairHistoryItem_SdkV2{}.ToSchema(cs, append(path, "repair_history")...) + CronSchedule_SdkV2{}.ToSchema(cs, append(path, "schedule")...) + RunState_SdkV2{}.ToSchema(cs, append(path, "state")...) + RunStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + RunTask_SdkV2{}.ToSchema(cs, append(path, "tasks")...) + TriggerInfo_SdkV2{}.ToSchema(cs, append(path, "trigger_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BaseRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -296,6 +338,7 @@ func (o BaseRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue "end_time": o.EndTime, "execution_duration": o.ExecutionDuration, "git_source": o.GitSource, + "has_more": o.HasMore, "job_clusters": o.JobClusters, "job_id": o.JobId, "job_parameters": o.JobParameters, @@ -340,6 +383,7 @@ func (o BaseRun_SdkV2) Type(ctx context.Context) attr.Type { "git_source": basetypes.ListType{ ElemType: GitSource_SdkV2{}.Type(ctx), }, + "has_more": types.BoolType, "job_clusters": basetypes.ListType{ ElemType: JobCluster_SdkV2{}.Type(ctx), }, @@ -699,9 +743,9 @@ func (o *BaseRun_SdkV2) SetTriggerInfo(ctx context.Context, v TriggerInfo_SdkV2) type CancelAllRuns_SdkV2 struct { // Optional boolean parameter to cancel all queued runs. If no job_id is // provided, all queued runs in the workspace are canceled. - AllQueuedRuns types.Bool `tfsdk:"all_queued_runs" tf:"optional"` + AllQueuedRuns types.Bool `tfsdk:"all_queued_runs" tf:""` // The canonical identifier of the job to cancel all runs of. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` } func (newState *CancelAllRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelAllRuns_SdkV2) { @@ -710,6 +754,11 @@ func (newState *CancelAllRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CancelAllRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelAllRuns_SdkV2) { } +func (c CancelAllRuns_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelAllRuns. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -746,12 +795,6 @@ func (o CancelAllRuns_SdkV2) Type(ctx context.Context) attr.Type { type CancelAllRunsResponse_SdkV2 struct { } -func (newState *CancelAllRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelAllRunsResponse_SdkV2) { -} - -func (newState *CancelAllRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelAllRunsResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelAllRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -790,6 +833,12 @@ func (newState *CancelRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ca func (newState *CancelRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelRun_SdkV2) { } +func (c CancelRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -824,12 +873,6 @@ func (o CancelRun_SdkV2) Type(ctx context.Context) attr.Type { type CancelRunResponse_SdkV2 struct { } -func (newState *CancelRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRunResponse_SdkV2) { -} - -func (newState *CancelRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelRunResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -861,10 +904,10 @@ func (o CancelRunResponse_SdkV2) Type(ctx context.Context) attr.Type { type CleanRoomTaskRunState_SdkV2 struct { // A value indicating the run's current lifecycle state. This field is // always available in the response. - LifeCycleState types.String `tfsdk:"life_cycle_state" tf:"optional"` + LifeCycleState types.String `tfsdk:"life_cycle_state" tf:""` // A value indicating the run's result. This field is only available for // terminal lifecycle states. - ResultState types.String `tfsdk:"result_state" tf:"optional"` + ResultState types.String `tfsdk:"result_state" tf:""` } func (newState *CleanRoomTaskRunState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomTaskRunState_SdkV2) { @@ -873,6 +916,11 @@ func (newState *CleanRoomTaskRunState_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CleanRoomTaskRunState_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomTaskRunState_SdkV2) { } +func (c CleanRoomTaskRunState_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomTaskRunState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -912,9 +960,9 @@ type CleanRoomsNotebookTask_SdkV2 struct { // Checksum to validate the freshness of the notebook resource (i.e. the // notebook being run is the latest version). It can be fetched by calling // the :method:cleanroomassets/get API. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Base parameters to be used for the clean room notebook job. - NotebookBaseParameters types.Map `tfsdk:"notebook_base_parameters" tf:"optional"` + NotebookBaseParameters types.Map `tfsdk:"notebook_base_parameters" tf:""` // Name of the notebook being run. NotebookName types.String `tfsdk:"notebook_name" tf:""` } @@ -925,6 +973,13 @@ func (newState *CleanRoomsNotebookTask_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CleanRoomsNotebookTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomsNotebookTask_SdkV2) { } +func (c CleanRoomsNotebookTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "clean_room_name")...) + cs.SetRequired(append(path, "notebook_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomsNotebookTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1001,7 +1056,7 @@ type ClusterInstance_SdkV2 struct { // // The response won’t include this field if the identifier is not // available yet. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The canonical identifier for the Spark context used by a run. This field // is filled in once the run begins execution. This value can be used to // view the Spark UI by browsing to @@ -1010,7 +1065,7 @@ type ClusterInstance_SdkV2 struct { // // The response won’t include this field if the identifier is not // available yet. - SparkContextId types.String `tfsdk:"spark_context_id" tf:"optional"` + SparkContextId types.String `tfsdk:"spark_context_id" tf:""` } func (newState *ClusterInstance_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterInstance_SdkV2) { @@ -1019,6 +1074,11 @@ func (newState *ClusterInstance_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ClusterInstance_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterInstance_SdkV2) { } +func (c ClusterInstance_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterInstance. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1057,16 +1117,16 @@ type ClusterSpec_SdkV2 struct { // all runs. When running jobs or tasks on an existing cluster, you may need // to manually restart the cluster if it stops responding. We suggest // running jobs and tasks on new clusters for greater reliability - ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:""` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. - JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:""` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. - Libraries types.List `tfsdk:"library" tf:"optional"` + Libraries types.List `tfsdk:"library" tf:""` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.List `tfsdk:"new_cluster" tf:"object"` } func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSpec_SdkV2) { @@ -1075,6 +1135,12 @@ func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterSpec_SdkV2) { } +func (c ClusterSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + compute_tf.ClusterSpec_SdkV2{}.ToSchema(cs, append(path, "new_cluster")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1197,6 +1263,14 @@ func (newState *ConditionTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ConditionTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState ConditionTask_SdkV2) { } +func (c ConditionTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "left")...) + cs.SetRequired(append(path, "op")...) + cs.SetRequired(append(path, "right")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ConditionTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1235,7 +1309,7 @@ func (o ConditionTask_SdkV2) Type(ctx context.Context) attr.Type { type Continuous_SdkV2 struct { // Indicate whether the continuous execution of the job is paused or not. // Defaults to UNPAUSED. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` } func (newState *Continuous_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Continuous_SdkV2) { @@ -1244,6 +1318,11 @@ func (newState *Continuous_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *Continuous_SdkV2) SyncEffectiveFieldsDuringRead(existingState Continuous_SdkV2) { } +func (c Continuous_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Continuous. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1277,40 +1356,40 @@ func (o Continuous_SdkV2) Type(ctx context.Context) attr.Type { type CreateJob_SdkV2 struct { // List of permissions to set on the job. - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The id of the user specified budget policy to use for this job. If not // specified, a default budget policy may be applied when creating or // modifying the job. See `effective_budget_policy_id` for the budget policy // used by this workload. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // An optional continuous property for this job. The continuous property // will ensure that there is always one run executing. Only one of // `schedule` and `continuous` can be used. - Continuous types.List `tfsdk:"continuous" tf:"optional,object"` + Continuous types.List `tfsdk:"continuous" tf:"object"` // Deployment information for jobs managed by external sources. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.List `tfsdk:"deployment" tf:"object"` // An optional description for the job. The maximum length is 27700 // characters in UTF-8 encoding. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Edit mode of the job. // // * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * // `EDITABLE`: The job is in an editable state and can be modified. - EditMode types.String `tfsdk:"edit_mode" tf:"optional"` + EditMode types.String `tfsdk:"edit_mode" tf:""` // An optional set of email addresses that is notified when runs of this job // begin or complete as well as when this job is deleted. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.List `tfsdk:"email_notifications" tf:"object"` // A list of task execution environment specifications that can be // referenced by serverless tasks of this job. An environment is required to // be present for serverless tasks. For serverless notebook tasks, the // environment is accessible in the notebook environment panel. For other // serverless tasks, the task environment is required to be specified using // environment_key in the task settings. - Environments types.List `tfsdk:"environment" tf:"optional"` + Environments types.List `tfsdk:"environment" tf:""` // Used to tell what is the format of the job. This field is ignored in // Create/Update/Reset calls. When using the Jobs API 2.1 this value is // always set to `"MULTI_TASK"`. - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -1321,13 +1400,15 @@ type CreateJob_SdkV2 struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.List `tfsdk:"git_source" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.List `tfsdk:"health" tf:"object"` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. - // You must declare dependent libraries in task settings. - JobClusters types.List `tfsdk:"job_cluster" tf:"optional"` + // You must declare dependent libraries in task settings. If more than 100 + // job clusters are available, you can paginate through them using + // :method:jobs/get. + JobClusters types.List `tfsdk:"job_cluster" tf:""` // An optional maximum allowed number of concurrent runs of the job. Set // this value if you want to be able to execute multiple runs of the same // job concurrently. This is useful for example if you trigger your job on a @@ -1339,45 +1420,48 @@ type CreateJob_SdkV2 struct { // runs. However, from then on, new runs are skipped unless there are fewer // than 3 active runs. This value cannot exceed 1000. Setting this value to // `0` causes all new runs to be skipped. - MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:"optional"` + MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:""` // An optional name for the job. The maximum length is 4096 bytes in UTF-8 // encoding. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // job. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.List `tfsdk:"notification_settings" tf:"object"` // Job-level parameter definitions - Parameters types.List `tfsdk:"parameter" tf:"optional"` + Parameters types.List `tfsdk:"parameter" tf:""` // The queue settings of the job. - Queue types.List `tfsdk:"queue" tf:"optional,object"` + Queue types.List `tfsdk:"queue" tf:"object"` // Write-only setting. Specifies the user or service principal that the job // runs as. If not specified, the job runs as the user who created the job. // // Either `user_name` or `service_principal_name` should be specified. If // not, an error is thrown. - RunAs types.List `tfsdk:"run_as" tf:"optional,object"` + RunAs types.List `tfsdk:"run_as" tf:"object"` // An optional periodic schedule for this job. The default behavior is that // the job only runs when triggered by clicking “Run Now” in the Jobs UI // or sending an API request to `runNow`. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.List `tfsdk:"schedule" tf:"object"` // A map of tags associated with the job. These are forwarded to the cluster // as cluster tags for jobs clusters, and are subject to the same // limitations as cluster tags. A maximum of 25 tags can be added to the // job. - Tags types.Map `tfsdk:"tags" tf:"optional"` - // A list of task specifications to be executed by this job. - Tasks types.List `tfsdk:"task" tf:"optional"` + Tags types.Map `tfsdk:"tags" tf:""` + // A list of task specifications to be executed by this job. If more than + // 100 tasks are available, you can paginate through them using + // :method:jobs/get. Use the `next_page_token` field at the object root to + // determine if more results are available. + Tasks types.List `tfsdk:"task" tf:""` // An optional timeout applied to each run of this job. A value of `0` means // no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A configuration to trigger a run when certain conditions are met. The // default behavior is that the job runs only when triggered by clicking // “Run Now” in the Jobs UI or sending an API request to `runNow`. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.List `tfsdk:"trigger" tf:"object"` // A collection of system notification IDs to notify when runs of this job // begin or complete. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"object"` } func (newState *CreateJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateJob_SdkV2) { @@ -1386,6 +1470,27 @@ func (newState *CreateJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cr func (newState *CreateJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateJob_SdkV2) { } +func (c CreateJob_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + Continuous_SdkV2{}.ToSchema(cs, append(path, "continuous")...) + JobDeployment_SdkV2{}.ToSchema(cs, append(path, "deployment")...) + JobEmailNotifications_SdkV2{}.ToSchema(cs, append(path, "email_notifications")...) + JobEnvironment_SdkV2{}.ToSchema(cs, append(path, "environment")...) + GitSource_SdkV2{}.ToSchema(cs, append(path, "git_source")...) + JobsHealthRules_SdkV2{}.ToSchema(cs, append(path, "health")...) + JobCluster_SdkV2{}.ToSchema(cs, append(path, "job_cluster")...) + JobNotificationSettings_SdkV2{}.ToSchema(cs, append(path, "notification_settings")...) + JobParameterDefinition_SdkV2{}.ToSchema(cs, append(path, "parameter")...) + QueueSettings_SdkV2{}.ToSchema(cs, append(path, "queue")...) + JobRunAs_SdkV2{}.ToSchema(cs, append(path, "run_as")...) + CronSchedule_SdkV2{}.ToSchema(cs, append(path, "schedule")...) + Task_SdkV2{}.ToSchema(cs, append(path, "task")...) + TriggerSettings_SdkV2{}.ToSchema(cs, append(path, "trigger")...) + WebhookNotifications_SdkV2{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1960,7 +2065,7 @@ func (o *CreateJob_SdkV2) SetWebhookNotifications(ctx context.Context, v Webhook // Job was created successfully type CreateResponse_SdkV2 struct { // The canonical identifier for the newly created job. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` } func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse_SdkV2) { @@ -1969,6 +2074,11 @@ func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateResponse_SdkV2) { } +func (c CreateResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2002,7 +2112,7 @@ func (o CreateResponse_SdkV2) Type(ctx context.Context) attr.Type { type CronSchedule_SdkV2 struct { // Indicate whether this schedule is paused or not. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` // A Cron expression using Quartz syntax that describes the schedule for a // job. See [Cron Trigger] for details. This field is required. // @@ -2021,6 +2131,13 @@ func (newState *CronSchedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CronSchedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState CronSchedule_SdkV2) { } +func (c CronSchedule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "quartz_cron_expression")...) + cs.SetRequired(append(path, "timezone_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CronSchedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2059,11 +2176,11 @@ func (o CronSchedule_SdkV2) Type(ctx context.Context) attr.Type { type DbtOutput_SdkV2 struct { // An optional map of headers to send when retrieving the artifact from the // `artifacts_link`. - ArtifactsHeaders types.Map `tfsdk:"artifacts_headers" tf:"optional"` + ArtifactsHeaders types.Map `tfsdk:"artifacts_headers" tf:""` // A pre-signed URL to download the (compressed) dbt artifacts. This link is // valid for a limited time (30 minutes). This information is only available // after the run has finished. - ArtifactsLink types.String `tfsdk:"artifacts_link" tf:"optional"` + ArtifactsLink types.String `tfsdk:"artifacts_link" tf:""` } func (newState *DbtOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbtOutput_SdkV2) { @@ -2072,6 +2189,11 @@ func (newState *DbtOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Db func (newState *DbtOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DbtOutput_SdkV2) { } +func (c DbtOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DbtOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2140,7 +2262,7 @@ type DbtTask_SdkV2 struct { // 3-level namespace of Unity Catalog (catalog / schema / relation). The // catalog value can only be specified if a warehouse_id is specified. // Requires dbt-databricks >= 1.1.1. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // A list of dbt commands to execute. All commands must start with `dbt`. // This parameter must not be empty. A maximum of up to 10 commands can be // provided. @@ -2148,14 +2270,14 @@ type DbtTask_SdkV2 struct { // Optional (relative) path to the profiles directory. Can only be specified // if no warehouse_id is specified. If no warehouse_id is specified and this // folder is unset, the root directory is used. - ProfilesDirectory types.String `tfsdk:"profiles_directory" tf:"optional"` + ProfilesDirectory types.String `tfsdk:"profiles_directory" tf:""` // Path to the project directory. Optional for Git sourced tasks, in which // case if no value is provided, the root of the Git repository is used. - ProjectDirectory types.String `tfsdk:"project_directory" tf:"optional"` + ProjectDirectory types.String `tfsdk:"project_directory" tf:""` // Optional schema to write to. This parameter is only used when a // warehouse_id is also provided. If not provided, the `default` schema is // used. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // Optional location type of the project directory. When set to `WORKSPACE`, // the project will be retrieved from the local Databricks workspace. When // set to `GIT`, the project will be retrieved from a Git repository defined @@ -2164,12 +2286,12 @@ type DbtTask_SdkV2 struct { // // * `WORKSPACE`: Project is located in Databricks workspace. * `GIT`: // Project is located in cloud Git provider. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // ID of the SQL warehouse to connect to. If provided, we automatically // generate and provide the profile and connection details to dbt. It can be // overridden on a per-command basis by using the `--profiles-dir` command // line argument. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *DbtTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbtTask_SdkV2) { @@ -2178,6 +2300,12 @@ func (newState *DbtTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbtT func (newState *DbtTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState DbtTask_SdkV2) { } +func (c DbtTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "commands")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DbtTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2262,6 +2390,12 @@ func (newState *DeleteJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan De func (newState *DeleteJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteJob_SdkV2) { } +func (c DeleteJob_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2296,12 +2430,6 @@ func (o DeleteJob_SdkV2) Type(ctx context.Context) attr.Type { type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2340,6 +2468,12 @@ func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan De func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRun_SdkV2) { } +func (c DeleteRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2374,12 +2508,6 @@ func (o DeleteRun_SdkV2) Type(ctx context.Context) attr.Type { type DeleteRunResponse_SdkV2 struct { } -func (newState *DeleteRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRunResponse_SdkV2) { -} - -func (newState *DeleteRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRunResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2412,17 +2540,17 @@ func (o DeleteRunResponse_SdkV2) Type(ctx context.Context) attr.Type { type EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2 struct { // The field where this change would be made, prepended with the job cluster // key. - Field types.String `tfsdk:"field" tf:"optional"` + Field types.String `tfsdk:"field" tf:""` // The new value of this field after enforcing policy compliance (either a // number, a boolean, or a string) converted to a string. This is intended // to be read by a human. The typed new value of this field can be retrieved // by reading the settings field in the API response. - NewValue types.String `tfsdk:"new_value" tf:"optional"` + NewValue types.String `tfsdk:"new_value" tf:""` // The previous value of this field before enforcing policy compliance // (either a number, a boolean, or a string) converted to a string. This is // intended to be read by a human. The type of the field can be retrieved by // reading the settings field in the API response. - PreviousValue types.String `tfsdk:"previous_value" tf:"optional"` + PreviousValue types.String `tfsdk:"previous_value" tf:""` } func (newState *EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) { @@ -2431,6 +2559,11 @@ func (newState *EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_Sd func (newState *EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) { } +func (c EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforcePolicyComplianceForJobResponseJobClusterSettingsChange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2471,7 +2604,7 @@ type EnforcePolicyComplianceRequest_SdkV2 struct { JobId types.Int64 `tfsdk:"job_id" tf:""` // If set, previews changes made to the job to comply with its policy, but // does not update the job. - ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` + ValidateOnly types.Bool `tfsdk:"validate_only" tf:""` } func (newState *EnforcePolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceRequest_SdkV2) { @@ -2480,6 +2613,12 @@ func (newState *EnforcePolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringC func (newState *EnforcePolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceRequest_SdkV2) { } +func (c EnforcePolicyComplianceRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforcePolicyComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2516,18 +2655,18 @@ func (o EnforcePolicyComplianceRequest_SdkV2) Type(ctx context.Context) attr.Typ type EnforcePolicyComplianceResponse_SdkV2 struct { // Whether any changes have been made to the job cluster settings for the // job to become compliant with its policies. - HasChanges types.Bool `tfsdk:"has_changes" tf:"optional"` + HasChanges types.Bool `tfsdk:"has_changes" tf:""` // A list of job cluster changes that have been made to the job’s cluster // settings in order for all job clusters to become compliant with their // policies. - JobClusterChanges types.List `tfsdk:"job_cluster_changes" tf:"optional"` + JobClusterChanges types.List `tfsdk:"job_cluster_changes" tf:""` // Updated job settings after policy enforcement. Policy enforcement only // applies to job clusters that are created when running the job (which are // specified in new_cluster) and does not apply to existing all-purpose // clusters. Updated job settings are derived by applying policy default // values to the existing job clusters in order to satisfy policy // requirements. - Settings types.List `tfsdk:"settings" tf:"optional,object"` + Settings types.List `tfsdk:"settings" tf:"object"` } func (newState *EnforcePolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceResponse_SdkV2) { @@ -2536,6 +2675,13 @@ func (newState *EnforcePolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuring func (newState *EnforcePolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceResponse_SdkV2) { } +func (c EnforcePolicyComplianceResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2{}.ToSchema(cs, append(path, "job_cluster_changes")...) + JobSettings_SdkV2{}.ToSchema(cs, append(path, "settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforcePolicyComplianceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2637,7 +2783,7 @@ type ExportRunOutput_SdkV2 struct { // script]. // // [Python script]: https://docs.databricks.com/en/_static/examples/extract.py - Views types.List `tfsdk:"views" tf:"optional"` + Views types.List `tfsdk:"views" tf:""` } func (newState *ExportRunOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportRunOutput_SdkV2) { @@ -2646,6 +2792,12 @@ func (newState *ExportRunOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ExportRunOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportRunOutput_SdkV2) { } +func (c ExportRunOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ViewItem_SdkV2{}.ToSchema(cs, append(path, "views")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportRunOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2715,12 +2867,6 @@ type ExportRunRequest_SdkV2 struct { ViewsToExport types.String `tfsdk:"-"` } -func (newState *ExportRunRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportRunRequest_SdkV2) { -} - -func (newState *ExportRunRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportRunRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportRunRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2758,7 +2904,7 @@ type FileArrivalTriggerConfiguration_SdkV2 struct { // If set, the trigger starts a run only after the specified amount of time // passed since the last time the trigger fired. The minimum allowed value // is 60 seconds - MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:"optional"` + MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:""` // URL to be monitored for file arrivals. The path must point to the root or // a subpath of the external location. Url types.String `tfsdk:"url" tf:""` @@ -2766,7 +2912,7 @@ type FileArrivalTriggerConfiguration_SdkV2 struct { // for the specified amount of time. This makes it possible to wait for a // batch of incoming files to arrive before triggering a run. The minimum // allowed value is 60 seconds. - WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:"optional"` + WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:""` } func (newState *FileArrivalTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileArrivalTriggerConfiguration_SdkV2) { @@ -2775,6 +2921,12 @@ func (newState *FileArrivalTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuring func (newState *FileArrivalTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileArrivalTriggerConfiguration_SdkV2) { } +func (c FileArrivalTriggerConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileArrivalTriggerConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2812,9 +2964,9 @@ func (o FileArrivalTriggerConfiguration_SdkV2) Type(ctx context.Context) attr.Ty type ForEachStats_SdkV2 struct { // Sample of 3 most common error messages occurred during the iteration. - ErrorMessageStats types.List `tfsdk:"error_message_stats" tf:"optional"` + ErrorMessageStats types.List `tfsdk:"error_message_stats" tf:""` // Describes stats of the iteration. Only latest retries are considered. - TaskRunStats types.List `tfsdk:"task_run_stats" tf:"optional,object"` + TaskRunStats types.List `tfsdk:"task_run_stats" tf:"object"` } func (newState *ForEachStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachStats_SdkV2) { @@ -2823,6 +2975,13 @@ func (newState *ForEachStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ForEachStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForEachStats_SdkV2) { } +func (c ForEachStats_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ForEachTaskErrorMessageStats_SdkV2{}.ToSchema(cs, append(path, "error_message_stats")...) + ForEachTaskTaskRunStats_SdkV2{}.ToSchema(cs, append(path, "task_run_stats")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2919,7 +3078,7 @@ type ForEachTask_SdkV2 struct { // An optional maximum allowed number of concurrent runs of the task. Set // this value if you want to be able to execute multiple runs of the task // concurrently. - Concurrency types.Int64 `tfsdk:"concurrency" tf:"optional"` + Concurrency types.Int64 `tfsdk:"concurrency" tf:""` // Array for task to iterate on. This can be a JSON string or a reference to // an array parameter. Inputs types.String `tfsdk:"inputs" tf:""` @@ -2933,6 +3092,14 @@ func (newState *ForEachTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ForEachTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForEachTask_SdkV2) { } +func (c ForEachTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "inputs")...) + cs.SetRequired(append(path, "task")...) + Task_SdkV2{}.ToSchema(cs, append(path, "task")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3001,11 +3168,11 @@ func (o *ForEachTask_SdkV2) SetTask(ctx context.Context, v Task_SdkV2) { type ForEachTaskErrorMessageStats_SdkV2 struct { // Describes the count of such error message encountered during the // iterations. - Count types.Int64 `tfsdk:"count" tf:"optional"` + Count types.Int64 `tfsdk:"count" tf:""` // Describes the error message occured during the iterations. - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` // Describes the termination reason for the error message. - TerminationCategory types.String `tfsdk:"termination_category" tf:"optional"` + TerminationCategory types.String `tfsdk:"termination_category" tf:""` } func (newState *ForEachTaskErrorMessageStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachTaskErrorMessageStats_SdkV2) { @@ -3014,6 +3181,11 @@ func (newState *ForEachTaskErrorMessageStats_SdkV2) SyncEffectiveFieldsDuringCre func (newState *ForEachTaskErrorMessageStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForEachTaskErrorMessageStats_SdkV2) { } +func (c ForEachTaskErrorMessageStats_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachTaskErrorMessageStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3052,17 +3224,17 @@ func (o ForEachTaskErrorMessageStats_SdkV2) Type(ctx context.Context) attr.Type type ForEachTaskTaskRunStats_SdkV2 struct { // Describes the iteration runs having an active lifecycle state or an // active run sub state. - ActiveIterations types.Int64 `tfsdk:"active_iterations" tf:"optional"` + ActiveIterations types.Int64 `tfsdk:"active_iterations" tf:""` // Describes the number of failed and succeeded iteration runs. - CompletedIterations types.Int64 `tfsdk:"completed_iterations" tf:"optional"` + CompletedIterations types.Int64 `tfsdk:"completed_iterations" tf:""` // Describes the number of failed iteration runs. - FailedIterations types.Int64 `tfsdk:"failed_iterations" tf:"optional"` + FailedIterations types.Int64 `tfsdk:"failed_iterations" tf:""` // Describes the number of iteration runs that have been scheduled. - ScheduledIterations types.Int64 `tfsdk:"scheduled_iterations" tf:"optional"` + ScheduledIterations types.Int64 `tfsdk:"scheduled_iterations" tf:""` // Describes the number of succeeded iteration runs. - SucceededIterations types.Int64 `tfsdk:"succeeded_iterations" tf:"optional"` + SucceededIterations types.Int64 `tfsdk:"succeeded_iterations" tf:""` // Describes the length of the list of items to iterate over. - TotalIterations types.Int64 `tfsdk:"total_iterations" tf:"optional"` + TotalIterations types.Int64 `tfsdk:"total_iterations" tf:""` } func (newState *ForEachTaskTaskRunStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachTaskTaskRunStats_SdkV2) { @@ -3071,6 +3243,11 @@ func (newState *ForEachTaskTaskRunStats_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ForEachTaskTaskRunStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForEachTaskTaskRunStats_SdkV2) { } +func (c ForEachTaskTaskRunStats_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachTaskTaskRunStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3118,12 +3295,6 @@ type GetJobPermissionLevelsRequest_SdkV2 struct { JobId types.String `tfsdk:"-"` } -func (newState *GetJobPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetJobPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetJobPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3157,7 +3328,7 @@ func (o GetJobPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type type GetJobPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetJobPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobPermissionLevelsResponse_SdkV2) { @@ -3166,6 +3337,12 @@ func (newState *GetJobPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringC func (newState *GetJobPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetJobPermissionLevelsResponse_SdkV2) { } +func (c GetJobPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3233,12 +3410,6 @@ type GetJobPermissionsRequest_SdkV2 struct { JobId types.String `tfsdk:"-"` } -func (newState *GetJobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobPermissionsRequest_SdkV2) { -} - -func (newState *GetJobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetJobPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3275,12 +3446,9 @@ type GetJobRequest_SdkV2 struct { // The canonical identifier of the job to retrieve information about. This // field is required. JobId types.Int64 `tfsdk:"-"` -} - -func (newState *GetJobRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobRequest_SdkV2) { -} - -func (newState *GetJobRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetJobRequest_SdkV2) { + // Use `next_page_token` returned from the previous GetJob to request the + // next page of the job's sub-resources. + PageToken types.String `tfsdk:"-"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobRequest. @@ -3301,7 +3469,8 @@ func (o GetJobRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.Object return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "job_id": o.JobId, + "job_id": o.JobId, + "page_token": o.PageToken, }) } @@ -3309,7 +3478,8 @@ func (o GetJobRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.Object func (o GetJobRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "job_id": types.Int64Type, + "job_id": types.Int64Type, + "page_token": types.StringType, }, } } @@ -3320,12 +3490,6 @@ type GetPolicyComplianceRequest_SdkV2 struct { JobId types.Int64 `tfsdk:"-"` } -func (newState *GetPolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPolicyComplianceRequest_SdkV2) { -} - -func (newState *GetPolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPolicyComplianceRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPolicyComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3362,13 +3526,13 @@ type GetPolicyComplianceResponse_SdkV2 struct { // of compliance if a policy they are using was updated after the job was // last edited and some of its job clusters no longer comply with their // updated policies. - IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + IsCompliant types.Bool `tfsdk:"is_compliant" tf:""` // An object containing key-value mappings representing the first 200 policy // validation errors. The keys indicate the path where the policy validation // error is occurring. An identifier for the job cluster is prepended to the // path. The values indicate an error message describing the policy // validation error. - Violations types.Map `tfsdk:"violations" tf:"optional"` + Violations types.Map `tfsdk:"violations" tf:""` } func (newState *GetPolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPolicyComplianceResponse_SdkV2) { @@ -3377,6 +3541,11 @@ func (newState *GetPolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *GetPolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPolicyComplianceResponse_SdkV2) { } +func (c GetPolicyComplianceResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPolicyComplianceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3446,12 +3615,6 @@ type GetRunOutputRequest_SdkV2 struct { RunId types.Int64 `tfsdk:"-"` } -func (newState *GetRunOutputRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunOutputRequest_SdkV2) { -} - -func (newState *GetRunOutputRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRunOutputRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunOutputRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3489,20 +3652,14 @@ type GetRunRequest_SdkV2 struct { IncludeHistory types.Bool `tfsdk:"-"` // Whether to include resolved parameter values in the response. IncludeResolvedValues types.Bool `tfsdk:"-"` - // To list the next page of job tasks, set this field to the value of the - // `next_page_token` returned in the GetJob response. + // Use `next_page_token` returned from the previous GetRun to request the + // next page of the run's sub-resources. PageToken types.String `tfsdk:"-"` // The canonical identifier of the run for which to retrieve the metadata. // This field is required. RunId types.Int64 `tfsdk:"-"` } -func (newState *GetRunRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunRequest_SdkV2) { -} - -func (newState *GetRunRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRunRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3546,7 +3703,7 @@ type GitSnapshot_SdkV2 struct { // Commit that was used to execute the run. If git_branch was specified, // this points to the HEAD of the branch at the time of the run; if git_tag // was specified, this points to the commit the tag points to. - UsedCommit types.String `tfsdk:"used_commit" tf:"optional"` + UsedCommit types.String `tfsdk:"used_commit" tf:""` } func (newState *GitSnapshot_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GitSnapshot_SdkV2) { @@ -3555,6 +3712,11 @@ func (newState *GitSnapshot_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *GitSnapshot_SdkV2) SyncEffectiveFieldsDuringRead(existingState GitSnapshot_SdkV2) { } +func (c GitSnapshot_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GitSnapshot. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3599,24 +3761,24 @@ func (o GitSnapshot_SdkV2) Type(ctx context.Context) attr.Type { type GitSource_SdkV2 struct { // Name of the branch to be checked out and used by this job. This field // cannot be specified in conjunction with git_tag or git_commit. - GitBranch types.String `tfsdk:"branch" tf:"optional"` + GitBranch types.String `tfsdk:"branch" tf:""` // Commit to be checked out and used by this job. This field cannot be // specified in conjunction with git_branch or git_tag. - GitCommit types.String `tfsdk:"commit" tf:"optional"` + GitCommit types.String `tfsdk:"commit" tf:""` // Unique identifier of the service used to host the Git repository. The // value is case insensitive. GitProvider types.String `tfsdk:"git_provider" tf:""` // Read-only state of the remote repository at the time the job was run. // This field is only included on job runs. - GitSnapshot types.List `tfsdk:"git_snapshot" tf:"optional,object"` + GitSnapshot types.List `tfsdk:"git_snapshot" tf:"object"` // Name of the tag to be checked out and used by this job. This field cannot // be specified in conjunction with git_branch or git_commit. - GitTag types.String `tfsdk:"tag" tf:"optional"` + GitTag types.String `tfsdk:"tag" tf:""` // URL of the repository to be cloned by this job. GitUrl types.String `tfsdk:"url" tf:""` // The source of the job specification in the remote repository when the job // is source controlled. - JobSource types.List `tfsdk:"job_source" tf:"optional,object"` + JobSource types.List `tfsdk:"job_source" tf:"object"` } func (newState *GitSource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GitSource_SdkV2) { @@ -3625,6 +3787,15 @@ func (newState *GitSource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Gi func (newState *GitSource_SdkV2) SyncEffectiveFieldsDuringRead(existingState GitSource_SdkV2) { } +func (c GitSource_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "git_provider")...) + GitSnapshot_SdkV2{}.ToSchema(cs, append(path, "git_snapshot")...) + cs.SetRequired(append(path, "url")...) + JobSource_SdkV2{}.ToSchema(cs, append(path, "job_source")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GitSource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3731,19 +3902,26 @@ func (o *GitSource_SdkV2) SetJobSource(ctx context.Context, v JobSource_SdkV2) { type Job_SdkV2 struct { // The time at which this job was created in epoch milliseconds // (milliseconds since 1/1/1970 UTC). - CreatedTime types.Int64 `tfsdk:"created_time" tf:"optional"` + CreatedTime types.Int64 `tfsdk:"created_time" tf:""` // The creator user name. This field won’t be included in the response if // the user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // The id of the budget policy used by this job for cost attribution // purposes. This may be set through (in order of precedence): 1. Budget // admins through the account or workspace console 2. Jobs UI in the job // details page and Jobs API using `budget_policy_id` 3. Inferred default // based on accessible budget policies of the run_as identity on job // creation or modification. - EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:"computed"` + EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:""` + // Indicates if the job has more sub-resources (`tasks`, `job_clusters`) + // that are not shown. They can be accessed via :method:jobs/get endpoint. + // It is only relevant for API 2.2 :method:jobs/list requests with + // `expand_tasks=true`. + HasMore types.Bool `tfsdk:"has_more" tf:""` // The canonical identifier for this job. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` + // A token that can be used to list the next page of sub-resources. + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // The email of an active workspace user or the application ID of a service // principal that the job runs as. This value can be changed by setting the // `run_as` field when creating or updating a job. @@ -3751,10 +3929,10 @@ type Job_SdkV2 struct { // By default, `run_as_user_name` is based on the current job settings and // is set to the creator of the job if job access control is disabled or to // the user with the `is_owner` permission if job access control is enabled. - RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` + RunAsUserName types.String `tfsdk:"run_as_user_name" tf:""` // Settings for this job and all of its runs. These settings can be updated // using the `resetJob` method. - Settings types.List `tfsdk:"settings" tf:"optional,object"` + Settings types.List `tfsdk:"settings" tf:"object"` } func (newState *Job_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job_SdkV2) { @@ -3763,6 +3941,13 @@ func (newState *Job_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job_SdkV func (newState *Job_SdkV2) SyncEffectiveFieldsDuringRead(existingState Job_SdkV2) { } +func (c Job_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "effective_budget_policy_id")...) + JobSettings_SdkV2{}.ToSchema(cs, append(path, "settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Job. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3786,7 +3971,9 @@ func (o Job_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { "created_time": o.CreatedTime, "creator_user_name": o.CreatorUserName, "effective_budget_policy_id": o.EffectiveBudgetPolicyId, + "has_more": o.HasMore, "job_id": o.JobId, + "next_page_token": o.NextPageToken, "run_as_user_name": o.RunAsUserName, "settings": o.Settings, }) @@ -3799,7 +3986,9 @@ func (o Job_SdkV2) Type(ctx context.Context) attr.Type { "created_time": types.Int64Type, "creator_user_name": types.StringType, "effective_budget_policy_id": types.StringType, + "has_more": types.BoolType, "job_id": types.Int64Type, + "next_page_token": types.StringType, "run_as_user_name": types.StringType, "settings": basetypes.ListType{ ElemType: JobSettings_SdkV2{}.Type(ctx), @@ -3836,13 +4025,13 @@ func (o *Job_SdkV2) SetSettings(ctx context.Context, v JobSettings_SdkV2) { type JobAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *JobAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobAccessControlRequest_SdkV2) { @@ -3851,6 +4040,11 @@ func (newState *JobAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *JobAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobAccessControlRequest_SdkV2) { } +func (c JobAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3890,15 +4084,15 @@ func (o JobAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { type JobAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *JobAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobAccessControlResponse_SdkV2) { @@ -3907,6 +4101,12 @@ func (newState *JobAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *JobAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobAccessControlResponse_SdkV2) { } +func (c JobAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3991,6 +4191,14 @@ func (newState *JobCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan J func (newState *JobCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobCluster_SdkV2) { } +func (c JobCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_cluster_key")...) + cs.SetRequired(append(path, "new_cluster")...) + compute_tf.ClusterSpec_SdkV2{}.ToSchema(cs, append(path, "new_cluster")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4056,7 +4264,7 @@ func (o *JobCluster_SdkV2) SetNewCluster(ctx context.Context, v compute_tf.Clust type JobCompliance_SdkV2 struct { // Whether this job is in compliance with the latest version of its policy. - IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + IsCompliant types.Bool `tfsdk:"is_compliant" tf:""` // Canonical unique identifier for a job. JobId types.Int64 `tfsdk:"job_id" tf:""` // An object containing key-value mappings representing the first 200 policy @@ -4064,7 +4272,7 @@ type JobCompliance_SdkV2 struct { // error is occurring. An identifier for the job cluster is prepended to the // path. The values indicate an error message describing the policy // validation error. - Violations types.Map `tfsdk:"violations" tf:"optional"` + Violations types.Map `tfsdk:"violations" tf:""` } func (newState *JobCompliance_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobCompliance_SdkV2) { @@ -4073,6 +4281,12 @@ func (newState *JobCompliance_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *JobCompliance_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobCompliance_SdkV2) { } +func (c JobCompliance_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobCompliance. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4144,7 +4358,7 @@ type JobDeployment_SdkV2 struct { // * `BUNDLE`: The job is managed by Databricks Asset Bundle. Kind types.String `tfsdk:"kind" tf:""` // Path of the file that contains deployment metadata. - MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:"optional"` + MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:""` } func (newState *JobDeployment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobDeployment_SdkV2) { @@ -4153,6 +4367,12 @@ func (newState *JobDeployment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *JobDeployment_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobDeployment_SdkV2) { } +func (c JobDeployment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "kind")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobDeployment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4190,22 +4410,22 @@ type JobEmailNotifications_SdkV2 struct { // If true, do not send email to recipients specified in `on_failure` if the // run is skipped. This field is `deprecated`. Please use the // `notification_settings.no_alert_for_skipped_runs` field. - NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:""` // A list of email addresses to be notified when the duration of a run // exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in // the `health` field. If no rule for the `RUN_DURATION_SECONDS` metric is // specified in the `health` field for the job, notifications are not sent. - OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:"optional"` + OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:""` // A list of email addresses to be notified when a run unsuccessfully // completes. A run is considered to have completed unsuccessfully if it // ends with an `INTERNAL_ERROR` `life_cycle_state` or a `FAILED`, or // `TIMED_OUT` result_state. If this is not specified on job creation, // reset, or update the list is empty, and notifications are not sent. - OnFailure types.List `tfsdk:"on_failure" tf:"optional"` + OnFailure types.List `tfsdk:"on_failure" tf:""` // A list of email addresses to be notified when a run begins. If not // specified on job creation, reset, or update, the list is empty, and // notifications are not sent. - OnStart types.List `tfsdk:"on_start" tf:"optional"` + OnStart types.List `tfsdk:"on_start" tf:""` // A list of email addresses to notify when any streaming backlog thresholds // are exceeded for any stream. Streaming backlog thresholds can be set in // the `health` field using the following metrics: @@ -4213,13 +4433,13 @@ type JobEmailNotifications_SdkV2 struct { // `STREAMING_BACKLOG_SECONDS`, or `STREAMING_BACKLOG_FILES`. Alerting is // based on the 10-minute average of these metrics. If the issue persists, // notifications are resent every 30 minutes. - OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:"optional"` + OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:""` // A list of email addresses to be notified when a run successfully // completes. A run is considered to have completed successfully if it ends // with a `TERMINATED` `life_cycle_state` and a `SUCCESS` result_state. If // not specified on job creation, reset, or update, the list is empty, and // notifications are not sent. - OnSuccess types.List `tfsdk:"on_success" tf:"optional"` + OnSuccess types.List `tfsdk:"on_success" tf:""` } func (newState *JobEmailNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobEmailNotifications_SdkV2) { @@ -4228,6 +4448,11 @@ func (newState *JobEmailNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *JobEmailNotifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobEmailNotifications_SdkV2) { } +func (c JobEmailNotifications_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobEmailNotifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4421,7 +4646,7 @@ type JobEnvironment_SdkV2 struct { // The environment entity used to preserve serverless environment side panel // and jobs' environment for non-notebook task. In this minimal environment // spec, only pip dependencies are supported. - Spec types.List `tfsdk:"spec" tf:"optional,object"` + Spec types.List `tfsdk:"spec" tf:"object"` } func (newState *JobEnvironment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobEnvironment_SdkV2) { @@ -4430,6 +4655,13 @@ func (newState *JobEnvironment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *JobEnvironment_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobEnvironment_SdkV2) { } +func (c JobEnvironment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "environment_key")...) + compute_tf.Environment_SdkV2{}.ToSchema(cs, append(path, "spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobEnvironment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4496,10 +4728,10 @@ func (o *JobEnvironment_SdkV2) SetSpec(ctx context.Context, v compute_tf.Environ type JobNotificationSettings_SdkV2 struct { // If true, do not send notifications to recipients specified in // `on_failure` if the run is canceled. - NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:"optional"` + NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:""` // If true, do not send notifications to recipients specified in // `on_failure` if the run is skipped. - NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:""` } func (newState *JobNotificationSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobNotificationSettings_SdkV2) { @@ -4508,6 +4740,11 @@ func (newState *JobNotificationSettings_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *JobNotificationSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobNotificationSettings_SdkV2) { } +func (c JobNotificationSettings_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobNotificationSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4543,11 +4780,11 @@ func (o JobNotificationSettings_SdkV2) Type(ctx context.Context) attr.Type { type JobParameter_SdkV2 struct { // The optional default value of the parameter - Default types.String `tfsdk:"default" tf:"optional"` + Default types.String `tfsdk:"default" tf:""` // The name of the parameter - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The value used in the run - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *JobParameter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobParameter_SdkV2) { @@ -4556,6 +4793,11 @@ func (newState *JobParameter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *JobParameter_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobParameter_SdkV2) { } +func (c JobParameter_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobParameter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4605,6 +4847,13 @@ func (newState *JobParameterDefinition_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *JobParameterDefinition_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobParameterDefinition_SdkV2) { } +func (c JobParameterDefinition_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "default")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobParameterDefinition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4639,11 +4888,11 @@ func (o JobParameterDefinition_SdkV2) Type(ctx context.Context) attr.Type { } type JobPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *JobPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermission_SdkV2) { @@ -4652,6 +4901,11 @@ func (newState *JobPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *JobPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobPermission_SdkV2) { } +func (c JobPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4718,11 +4972,11 @@ func (o *JobPermission_SdkV2) SetInheritedFromObject(ctx context.Context, v []ty } type JobPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *JobPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermissions_SdkV2) { @@ -4731,6 +4985,12 @@ func (newState *JobPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *JobPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobPermissions_SdkV2) { } +func (c JobPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4797,9 +5057,9 @@ func (o *JobPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []Job } type JobPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *JobPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermissionsDescription_SdkV2) { @@ -4808,6 +5068,11 @@ func (newState *JobPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *JobPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobPermissionsDescription_SdkV2) { } +func (c JobPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4842,7 +5107,7 @@ func (o JobPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { } type JobPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The job for which to get or manage permissions. JobId types.String `tfsdk:"-"` } @@ -4853,6 +5118,13 @@ func (newState *JobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *JobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobPermissionsRequest_SdkV2) { } +func (c JobPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4924,10 +5196,10 @@ func (o *JobPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, type JobRunAs_SdkV2 struct { // Application ID of an active service principal. Setting this field // requires the `servicePrincipal/user` role. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // The email of an active workspace user. Non-admin users can only set this // field to their own email. - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *JobRunAs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobRunAs_SdkV2) { @@ -4936,6 +5208,11 @@ func (newState *JobRunAs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job func (newState *JobRunAs_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobRunAs_SdkV2) { } +func (c JobRunAs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobRunAs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4974,35 +5251,35 @@ type JobSettings_SdkV2 struct { // specified, a default budget policy may be applied when creating or // modifying the job. See `effective_budget_policy_id` for the budget policy // used by this workload. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // An optional continuous property for this job. The continuous property // will ensure that there is always one run executing. Only one of // `schedule` and `continuous` can be used. - Continuous types.List `tfsdk:"continuous" tf:"optional,object"` + Continuous types.List `tfsdk:"continuous" tf:"object"` // Deployment information for jobs managed by external sources. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.List `tfsdk:"deployment" tf:"object"` // An optional description for the job. The maximum length is 27700 // characters in UTF-8 encoding. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Edit mode of the job. // // * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * // `EDITABLE`: The job is in an editable state and can be modified. - EditMode types.String `tfsdk:"edit_mode" tf:"optional"` + EditMode types.String `tfsdk:"edit_mode" tf:""` // An optional set of email addresses that is notified when runs of this job // begin or complete as well as when this job is deleted. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.List `tfsdk:"email_notifications" tf:"object"` // A list of task execution environment specifications that can be // referenced by serverless tasks of this job. An environment is required to // be present for serverless tasks. For serverless notebook tasks, the // environment is accessible in the notebook environment panel. For other // serverless tasks, the task environment is required to be specified using // environment_key in the task settings. - Environments types.List `tfsdk:"environment" tf:"optional"` + Environments types.List `tfsdk:"environment" tf:""` // Used to tell what is the format of the job. This field is ignored in // Create/Update/Reset calls. When using the Jobs API 2.1 this value is // always set to `"MULTI_TASK"`. - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -5013,13 +5290,15 @@ type JobSettings_SdkV2 struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.List `tfsdk:"git_source" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.List `tfsdk:"health" tf:"object"` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. - // You must declare dependent libraries in task settings. - JobClusters types.List `tfsdk:"job_cluster" tf:"optional"` + // You must declare dependent libraries in task settings. If more than 100 + // job clusters are available, you can paginate through them using + // :method:jobs/get. + JobClusters types.List `tfsdk:"job_cluster" tf:""` // An optional maximum allowed number of concurrent runs of the job. Set // this value if you want to be able to execute multiple runs of the same // job concurrently. This is useful for example if you trigger your job on a @@ -5031,45 +5310,48 @@ type JobSettings_SdkV2 struct { // runs. However, from then on, new runs are skipped unless there are fewer // than 3 active runs. This value cannot exceed 1000. Setting this value to // `0` causes all new runs to be skipped. - MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:"optional"` + MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:""` // An optional name for the job. The maximum length is 4096 bytes in UTF-8 // encoding. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // job. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.List `tfsdk:"notification_settings" tf:"object"` // Job-level parameter definitions - Parameters types.List `tfsdk:"parameter" tf:"optional"` + Parameters types.List `tfsdk:"parameter" tf:""` // The queue settings of the job. - Queue types.List `tfsdk:"queue" tf:"optional,object"` + Queue types.List `tfsdk:"queue" tf:"object"` // Write-only setting. Specifies the user or service principal that the job // runs as. If not specified, the job runs as the user who created the job. // // Either `user_name` or `service_principal_name` should be specified. If // not, an error is thrown. - RunAs types.List `tfsdk:"run_as" tf:"optional,object"` + RunAs types.List `tfsdk:"run_as" tf:"object"` // An optional periodic schedule for this job. The default behavior is that // the job only runs when triggered by clicking “Run Now” in the Jobs UI // or sending an API request to `runNow`. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.List `tfsdk:"schedule" tf:"object"` // A map of tags associated with the job. These are forwarded to the cluster // as cluster tags for jobs clusters, and are subject to the same // limitations as cluster tags. A maximum of 25 tags can be added to the // job. - Tags types.Map `tfsdk:"tags" tf:"optional"` - // A list of task specifications to be executed by this job. - Tasks types.List `tfsdk:"task" tf:"optional"` + Tags types.Map `tfsdk:"tags" tf:""` + // A list of task specifications to be executed by this job. If more than + // 100 tasks are available, you can paginate through them using + // :method:jobs/get. Use the `next_page_token` field at the object root to + // determine if more results are available. + Tasks types.List `tfsdk:"task" tf:""` // An optional timeout applied to each run of this job. A value of `0` means // no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A configuration to trigger a run when certain conditions are met. The // default behavior is that the job runs only when triggered by clicking // “Run Now” in the Jobs UI or sending an API request to `runNow`. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.List `tfsdk:"trigger" tf:"object"` // A collection of system notification IDs to notify when runs of this job // begin or complete. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"object"` } func (newState *JobSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSettings_SdkV2) { @@ -5078,6 +5360,26 @@ func (newState *JobSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *JobSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobSettings_SdkV2) { } +func (c JobSettings_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Continuous_SdkV2{}.ToSchema(cs, append(path, "continuous")...) + JobDeployment_SdkV2{}.ToSchema(cs, append(path, "deployment")...) + JobEmailNotifications_SdkV2{}.ToSchema(cs, append(path, "email_notifications")...) + JobEnvironment_SdkV2{}.ToSchema(cs, append(path, "environment")...) + GitSource_SdkV2{}.ToSchema(cs, append(path, "git_source")...) + JobsHealthRules_SdkV2{}.ToSchema(cs, append(path, "health")...) + JobCluster_SdkV2{}.ToSchema(cs, append(path, "job_cluster")...) + JobNotificationSettings_SdkV2{}.ToSchema(cs, append(path, "notification_settings")...) + JobParameterDefinition_SdkV2{}.ToSchema(cs, append(path, "parameter")...) + QueueSettings_SdkV2{}.ToSchema(cs, append(path, "queue")...) + JobRunAs_SdkV2{}.ToSchema(cs, append(path, "run_as")...) + CronSchedule_SdkV2{}.ToSchema(cs, append(path, "schedule")...) + Task_SdkV2{}.ToSchema(cs, append(path, "task")...) + TriggerSettings_SdkV2{}.ToSchema(cs, append(path, "trigger")...) + WebhookNotifications_SdkV2{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5630,7 +5932,7 @@ type JobSource_SdkV2 struct { // disconnected from the remote job specification and is allowed for live // edit. Import the remote job specification again from UI to make the job // fully synced. - DirtyState types.String `tfsdk:"dirty_state" tf:"optional"` + DirtyState types.String `tfsdk:"dirty_state" tf:""` // Name of the branch which the job is imported from. ImportFromGitBranch types.String `tfsdk:"import_from_git_branch" tf:""` // Path of the job YAML file that contains the job specification. @@ -5643,6 +5945,13 @@ func (newState *JobSource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Jo func (newState *JobSource_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobSource_SdkV2) { } +func (c JobSource_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "import_from_git_branch")...) + cs.SetRequired(append(path, "job_config_path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5706,6 +6015,14 @@ func (newState *JobsHealthRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *JobsHealthRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobsHealthRule_SdkV2) { } +func (c JobsHealthRule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "metric")...) + cs.SetRequired(append(path, "op")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobsHealthRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5743,7 +6060,7 @@ func (o JobsHealthRule_SdkV2) Type(ctx context.Context) attr.Type { // An optional set of health rules that can be defined for this job. type JobsHealthRules_SdkV2 struct { - Rules types.List `tfsdk:"rules" tf:"optional"` + Rules types.List `tfsdk:"rules" tf:""` } func (newState *JobsHealthRules_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobsHealthRules_SdkV2) { @@ -5752,6 +6069,12 @@ func (newState *JobsHealthRules_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *JobsHealthRules_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobsHealthRules_SdkV2) { } +func (c JobsHealthRules_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobsHealthRule_SdkV2{}.ToSchema(cs, append(path, "rules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobsHealthRules. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5815,15 +6138,15 @@ func (o *JobsHealthRules_SdkV2) SetRules(ctx context.Context, v []JobsHealthRule type ListJobComplianceForPolicyResponse_SdkV2 struct { // A list of jobs and their policy compliance statuses. - Jobs types.List `tfsdk:"jobs" tf:"optional"` + Jobs types.List `tfsdk:"jobs" tf:""` // This field represents the pagination token to retrieve the next page of // results. If this field is not in the response, it means no further // results for the request. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // This field represents the pagination token to retrieve the previous page // of results. If this field is not in the response, it means no further // results for the request. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListJobComplianceForPolicyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobComplianceForPolicyResponse_SdkV2) { @@ -5832,6 +6155,12 @@ func (newState *ListJobComplianceForPolicyResponse_SdkV2) SyncEffectiveFieldsDur func (newState *ListJobComplianceForPolicyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListJobComplianceForPolicyResponse_SdkV2) { } +func (c ListJobComplianceForPolicyResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobCompliance_SdkV2{}.ToSchema(cs, append(path, "jobs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobComplianceForPolicyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5910,12 +6239,6 @@ type ListJobComplianceRequest_SdkV2 struct { PolicyId types.String `tfsdk:"-"` } -func (newState *ListJobComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobComplianceRequest_SdkV2) { -} - -func (newState *ListJobComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListJobComplianceRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5953,7 +6276,9 @@ func (o ListJobComplianceRequest_SdkV2) Type(ctx context.Context) attr.Type { // List jobs type ListJobsRequest_SdkV2 struct { - // Whether to include task and cluster details in the response. + // Whether to include task and cluster details in the response. Note that in + // API 2.2, only the first 100 elements will be shown. Use :method:jobs/get + // to paginate through all tasks and clusters. ExpandTasks types.Bool `tfsdk:"-"` // The number of jobs to return. This value must be greater than 0 and less // or equal to 100. The default value is 20. @@ -5969,12 +6294,6 @@ type ListJobsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListJobsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobsRequest_SdkV2) { -} - -func (newState *ListJobsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListJobsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6018,15 +6337,15 @@ func (o ListJobsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListJobsResponse_SdkV2 struct { // If true, additional jobs matching the provided filter are available for // listing. - HasMore types.Bool `tfsdk:"has_more" tf:"optional"` + HasMore types.Bool `tfsdk:"has_more" tf:""` // The list of jobs. Only included in the response if there are jobs to // list. - Jobs types.List `tfsdk:"jobs" tf:"optional"` + Jobs types.List `tfsdk:"jobs" tf:""` // A token that can be used to list the next page of jobs (if applicable). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // A token that can be used to list the previous page of jobs (if // applicable). - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListJobsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobsResponse_SdkV2) { @@ -6035,6 +6354,12 @@ func (newState *ListJobsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ListJobsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListJobsResponse_SdkV2) { } +func (c ListJobsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BaseJob_SdkV2{}.ToSchema(cs, append(path, "jobs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6113,7 +6438,9 @@ type ListRunsRequest_SdkV2 struct { // results; otherwise, lists both active and completed runs. This field // cannot be `true` when active_only is `true`. CompletedOnly types.Bool `tfsdk:"-"` - // Whether to include task and cluster details in the response. + // Whether to include task and cluster details in the response. Note that in + // API 2.2, only the first 100 elements will be shown. Use + // :method:jobs/getrun to paginate through all tasks and clusters. ExpandTasks types.Bool `tfsdk:"-"` // The job for which to list runs. If omitted, the Jobs service lists runs // from all jobs. @@ -6142,12 +6469,6 @@ type ListRunsRequest_SdkV2 struct { StartTimeTo types.Int64 `tfsdk:"-"` } -func (newState *ListRunsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRunsRequest_SdkV2) { -} - -func (newState *ListRunsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRunsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRunsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6201,15 +6522,15 @@ func (o ListRunsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListRunsResponse_SdkV2 struct { // If true, additional runs matching the provided filter are available for // listing. - HasMore types.Bool `tfsdk:"has_more" tf:"optional"` + HasMore types.Bool `tfsdk:"has_more" tf:""` // A token that can be used to list the next page of runs (if applicable). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // A token that can be used to list the previous page of runs (if // applicable). - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` // A list of runs, from most recently started to least. Only included in the // response if there are runs to list. - Runs types.List `tfsdk:"runs" tf:"optional"` + Runs types.List `tfsdk:"runs" tf:""` } func (newState *ListRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRunsResponse_SdkV2) { @@ -6218,6 +6539,12 @@ func (newState *ListRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ListRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRunsResponse_SdkV2) { } +func (c ListRunsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BaseRun_SdkV2{}.ToSchema(cs, append(path, "runs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6292,9 +6619,9 @@ type NotebookOutput_SdkV2 struct { // a larger result, your job can store the results in a cloud storage // service. This field is absent if `dbutils.notebook.exit()` was never // called. - Result types.String `tfsdk:"result" tf:"optional"` + Result types.String `tfsdk:"result" tf:""` // Whether or not the result was truncated. - Truncated types.Bool `tfsdk:"truncated" tf:"optional"` + Truncated types.Bool `tfsdk:"truncated" tf:""` } func (newState *NotebookOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotebookOutput_SdkV2) { @@ -6303,6 +6630,11 @@ func (newState *NotebookOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *NotebookOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState NotebookOutput_SdkV2) { } +func (c NotebookOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NotebookOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6354,7 +6686,7 @@ type NotebookTask_SdkV2 struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-widgets - BaseParameters types.Map `tfsdk:"base_parameters" tf:"optional"` + BaseParameters types.Map `tfsdk:"base_parameters" tf:""` // The path of the notebook to be run in the Databricks workspace or remote // repository. For notebooks stored in the Databricks workspace, the path // must be absolute and begin with a slash. For notebooks stored in a remote @@ -6367,14 +6699,14 @@ type NotebookTask_SdkV2 struct { // `git_source` is defined and `WORKSPACE` otherwise. * `WORKSPACE`: // Notebook is located in Databricks workspace. * `GIT`: Notebook is located // in cloud Git provider. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // Optional `warehouse_id` to run the notebook on a SQL warehouse. Classic // SQL warehouses are NOT supported, please use serverless or pro SQL // warehouses. // // Note that SQL warehouses only support SQL cells; if the notebook contains // non-SQL cells, the run will fail. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *NotebookTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotebookTask_SdkV2) { @@ -6383,6 +6715,12 @@ func (newState *NotebookTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *NotebookTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState NotebookTask_SdkV2) { } +func (c NotebookTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "notebook_path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NotebookTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6463,6 +6801,13 @@ func (newState *PeriodicTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringCre func (newState *PeriodicTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState PeriodicTriggerConfiguration_SdkV2) { } +func (c PeriodicTriggerConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "interval")...) + cs.SetRequired(append(path, "unit")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PeriodicTriggerConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6498,7 +6843,7 @@ func (o PeriodicTriggerConfiguration_SdkV2) Type(ctx context.Context) attr.Type type PipelineParams_SdkV2 struct { // If true, triggers a full refresh on the delta live table. - FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + FullRefresh types.Bool `tfsdk:"full_refresh" tf:""` } func (newState *PipelineParams_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineParams_SdkV2) { @@ -6507,6 +6852,11 @@ func (newState *PipelineParams_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *PipelineParams_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineParams_SdkV2) { } +func (c PipelineParams_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineParams. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6540,7 +6890,7 @@ func (o PipelineParams_SdkV2) Type(ctx context.Context) attr.Type { type PipelineTask_SdkV2 struct { // If true, triggers a full refresh on the delta live table. - FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + FullRefresh types.Bool `tfsdk:"full_refresh" tf:""` // The full name of the pipeline task to execute. PipelineId types.String `tfsdk:"pipeline_id" tf:""` } @@ -6551,6 +6901,12 @@ func (newState *PipelineTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PipelineTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineTask_SdkV2) { } +func (c PipelineTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "pipeline_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6592,12 +6948,12 @@ type PythonWheelTask_SdkV2 struct { // Command-line parameters passed to Python wheel task in the form of // `["--name=task", "--data=dbfs:/path/to/data.json"]`. Leave it empty if // `parameters` is not null. - NamedParameters types.Map `tfsdk:"named_parameters" tf:"optional"` + NamedParameters types.Map `tfsdk:"named_parameters" tf:""` // Name of the package to execute PackageName types.String `tfsdk:"package_name" tf:""` // Command-line parameters passed to Python wheel task. Leave it empty if // `named_parameters` is not null. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *PythonWheelTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PythonWheelTask_SdkV2) { @@ -6606,6 +6962,13 @@ func (newState *PythonWheelTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PythonWheelTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState PythonWheelTask_SdkV2) { } +func (c PythonWheelTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "entry_point")...) + cs.SetRequired(append(path, "package_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PythonWheelTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6709,10 +7072,10 @@ type QueueDetails_SdkV2 struct { // per-job limit of concurrent job runs. * // `ACTIVE_RUN_JOB_TASKS_LIMIT_REACHED`: The run was queued due to reaching // the workspace limit of active run job tasks. - Code types.String `tfsdk:"code" tf:"optional"` + Code types.String `tfsdk:"code" tf:""` // A descriptive message with the queuing details. This field is // unstructured, and its exact format is subject to change. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *QueueDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueueDetails_SdkV2) { @@ -6721,6 +7084,11 @@ func (newState *QueueDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *QueueDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueueDetails_SdkV2) { } +func (c QueueDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueueDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6765,6 +7133,12 @@ func (newState *QueueSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *QueueSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueueSettings_SdkV2) { } +func (c QueueSettings_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "enabled")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueueSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6798,22 +7172,22 @@ func (o QueueSettings_SdkV2) Type(ctx context.Context) attr.Type { type RepairHistoryItem_SdkV2 struct { // The end time of the (repaired) run. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The ID of the repair. Only returned for the items that represent a repair // in `repair_history`. - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` // The start time of the (repaired) run. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Deprecated. Please use the `status` field instead. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.List `tfsdk:"state" tf:"object"` // The current status of the run - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.List `tfsdk:"status" tf:"object"` // The run IDs of the task runs that ran as part of this repair history // item. - TaskRunIds types.List `tfsdk:"task_run_ids" tf:"optional"` + TaskRunIds types.List `tfsdk:"task_run_ids" tf:""` // The repair history item type. Indicates whether a run is the original run // or a repair run. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *RepairHistoryItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairHistoryItem_SdkV2) { @@ -6822,6 +7196,13 @@ func (newState *RepairHistoryItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *RepairHistoryItem_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepairHistoryItem_SdkV2) { } +func (c RepairHistoryItem_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RunState_SdkV2{}.ToSchema(cs, append(path, "state")...) + RunStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepairHistoryItem. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6957,7 +7338,7 @@ type RepairRun_SdkV2 struct { // An array of commands to execute for jobs with the dbt task, for example // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt // run"]` - DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + DbtCommands types.List `tfsdk:"dbt_commands" tf:""` // A list of parameters for jobs with Spark JAR tasks, for example // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the // main function of the main class specified in the Spark JAR task. If not @@ -6970,14 +7351,14 @@ type RepairRun_SdkV2 struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - JarParams types.List `tfsdk:"jar_params" tf:"optional"` + JarParams types.List `tfsdk:"jar_params" tf:""` // Job-level parameters used in the run. for example `"param": // "overriding_val"` - JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.Map `tfsdk:"job_parameters" tf:""` // The ID of the latest repair. This parameter is not required when // repairing a run for the first time, but must be provided on subsequent // requests to repair the same run. - LatestRepairId types.Int64 `tfsdk:"latest_repair_id" tf:"optional"` + LatestRepairId types.Int64 `tfsdk:"latest_repair_id" tf:""` // A map from keys to values for jobs with notebook task, for example // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed // to the notebook and is accessible through the [dbutils.widgets.get] @@ -6997,11 +7378,11 @@ type RepairRun_SdkV2 struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html - NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + NotebookParams types.Map `tfsdk:"notebook_params" tf:""` // Controls whether the pipeline should perform a full refresh - PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.List `tfsdk:"pipeline_params" tf:"object"` - PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:""` // A list of parameters for jobs with Python tasks, for example // `"python_params": ["john doe", "35"]`. The parameters are passed to // Python file as command-line parameters. If specified upon `run-now`, it @@ -7019,16 +7400,16 @@ type RepairRun_SdkV2 struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - PythonParams types.List `tfsdk:"python_params" tf:"optional"` + PythonParams types.List `tfsdk:"python_params" tf:""` // If true, repair all failed tasks. Only one of `rerun_tasks` or // `rerun_all_failed_tasks` can be used. - RerunAllFailedTasks types.Bool `tfsdk:"rerun_all_failed_tasks" tf:"optional"` + RerunAllFailedTasks types.Bool `tfsdk:"rerun_all_failed_tasks" tf:""` // If true, repair all tasks that depend on the tasks in `rerun_tasks`, even // if they were previously successful. Can be also used in combination with // `rerun_all_failed_tasks`. - RerunDependentTasks types.Bool `tfsdk:"rerun_dependent_tasks" tf:"optional"` + RerunDependentTasks types.Bool `tfsdk:"rerun_dependent_tasks" tf:""` // The task keys of the task runs to repair. - RerunTasks types.List `tfsdk:"rerun_tasks" tf:"optional"` + RerunTasks types.List `tfsdk:"rerun_tasks" tf:""` // The job run ID of the run to repair. The run must not be in progress. RunId types.Int64 `tfsdk:"run_id" tf:""` // A list of parameters for jobs with spark submit task, for example @@ -7049,11 +7430,11 @@ type RepairRun_SdkV2 struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:""` // A map from keys to values for jobs with SQL task, for example // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task // does not support custom parameters. - SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` + SqlParams types.Map `tfsdk:"sql_params" tf:""` } func (newState *RepairRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairRun_SdkV2) { @@ -7062,6 +7443,13 @@ func (newState *RepairRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Re func (newState *RepairRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepairRun_SdkV2) { } +func (c RepairRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineParams_SdkV2{}.ToSchema(cs, append(path, "pipeline_params")...) + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepairRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7414,7 +7802,7 @@ func (o *RepairRun_SdkV2) SetSqlParams(ctx context.Context, v map[string]types.S type RepairRunResponse_SdkV2 struct { // The ID of the repair. Must be provided in subsequent repairs using the // `latest_repair_id` field to ensure sequential repairs. - RepairId types.Int64 `tfsdk:"repair_id" tf:"optional"` + RepairId types.Int64 `tfsdk:"repair_id" tf:""` } func (newState *RepairRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairRunResponse_SdkV2) { @@ -7423,6 +7811,11 @@ func (newState *RepairRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *RepairRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepairRunResponse_SdkV2) { } +func (c RepairRunResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepairRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7471,6 +7864,14 @@ func (newState *ResetJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Res func (newState *ResetJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResetJob_SdkV2) { } +func (c ResetJob_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + cs.SetRequired(append(path, "new_settings")...) + JobSettings_SdkV2{}.ToSchema(cs, append(path, "new_settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResetJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7537,12 +7938,6 @@ func (o *ResetJob_SdkV2) SetNewSettings(ctx context.Context, v JobSettings_SdkV2 type ResetResponse_SdkV2 struct { } -func (newState *ResetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResetResponse_SdkV2) { -} - -func (newState *ResetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResetResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResetResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7571,9 +7966,9 @@ func (o ResetResponse_SdkV2) Type(ctx context.Context) attr.Type { } type ResolvedConditionTaskValues_SdkV2 struct { - Left types.String `tfsdk:"left" tf:"optional"` + Left types.String `tfsdk:"left" tf:""` - Right types.String `tfsdk:"right" tf:"optional"` + Right types.String `tfsdk:"right" tf:""` } func (newState *ResolvedConditionTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedConditionTaskValues_SdkV2) { @@ -7582,6 +7977,11 @@ func (newState *ResolvedConditionTaskValues_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *ResolvedConditionTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedConditionTaskValues_SdkV2) { } +func (c ResolvedConditionTaskValues_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedConditionTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7616,7 +8016,7 @@ func (o ResolvedConditionTaskValues_SdkV2) Type(ctx context.Context) attr.Type { } type ResolvedDbtTaskValues_SdkV2 struct { - Commands types.List `tfsdk:"commands" tf:"optional"` + Commands types.List `tfsdk:"commands" tf:""` } func (newState *ResolvedDbtTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedDbtTaskValues_SdkV2) { @@ -7625,6 +8025,11 @@ func (newState *ResolvedDbtTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ResolvedDbtTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedDbtTaskValues_SdkV2) { } +func (c ResolvedDbtTaskValues_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedDbtTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7687,7 +8092,7 @@ func (o *ResolvedDbtTaskValues_SdkV2) SetCommands(ctx context.Context, v []types } type ResolvedNotebookTaskValues_SdkV2 struct { - BaseParameters types.Map `tfsdk:"base_parameters" tf:"optional"` + BaseParameters types.Map `tfsdk:"base_parameters" tf:""` } func (newState *ResolvedNotebookTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedNotebookTaskValues_SdkV2) { @@ -7696,6 +8101,11 @@ func (newState *ResolvedNotebookTaskValues_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ResolvedNotebookTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedNotebookTaskValues_SdkV2) { } +func (c ResolvedNotebookTaskValues_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedNotebookTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7758,7 +8168,7 @@ func (o *ResolvedNotebookTaskValues_SdkV2) SetBaseParameters(ctx context.Context } type ResolvedParamPairValues_SdkV2 struct { - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` } func (newState *ResolvedParamPairValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedParamPairValues_SdkV2) { @@ -7767,6 +8177,11 @@ func (newState *ResolvedParamPairValues_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ResolvedParamPairValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedParamPairValues_SdkV2) { } +func (c ResolvedParamPairValues_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedParamPairValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7829,9 +8244,9 @@ func (o *ResolvedParamPairValues_SdkV2) SetParameters(ctx context.Context, v map } type ResolvedPythonWheelTaskValues_SdkV2 struct { - NamedParameters types.Map `tfsdk:"named_parameters" tf:"optional"` + NamedParameters types.Map `tfsdk:"named_parameters" tf:""` - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *ResolvedPythonWheelTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedPythonWheelTaskValues_SdkV2) { @@ -7840,6 +8255,11 @@ func (newState *ResolvedPythonWheelTaskValues_SdkV2) SyncEffectiveFieldsDuringCr func (newState *ResolvedPythonWheelTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedPythonWheelTaskValues_SdkV2) { } +func (c ResolvedPythonWheelTaskValues_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedPythonWheelTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7933,9 +8353,9 @@ func (o *ResolvedPythonWheelTaskValues_SdkV2) SetParameters(ctx context.Context, } type ResolvedRunJobTaskValues_SdkV2 struct { - JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.Map `tfsdk:"job_parameters" tf:""` - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` } func (newState *ResolvedRunJobTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedRunJobTaskValues_SdkV2) { @@ -7944,6 +8364,11 @@ func (newState *ResolvedRunJobTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *ResolvedRunJobTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedRunJobTaskValues_SdkV2) { } +func (c ResolvedRunJobTaskValues_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedRunJobTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8037,7 +8462,7 @@ func (o *ResolvedRunJobTaskValues_SdkV2) SetParameters(ctx context.Context, v ma } type ResolvedStringParamsValues_SdkV2 struct { - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *ResolvedStringParamsValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedStringParamsValues_SdkV2) { @@ -8046,6 +8471,11 @@ func (newState *ResolvedStringParamsValues_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ResolvedStringParamsValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedStringParamsValues_SdkV2) { } +func (c ResolvedStringParamsValues_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedStringParamsValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8108,25 +8538,25 @@ func (o *ResolvedStringParamsValues_SdkV2) SetParameters(ctx context.Context, v } type ResolvedValues_SdkV2 struct { - ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.List `tfsdk:"condition_task" tf:"object"` - DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.List `tfsdk:"dbt_task" tf:"object"` - NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.List `tfsdk:"notebook_task" tf:"object"` - PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"object"` - RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.List `tfsdk:"run_job_task" tf:"object"` - SimulationTask types.List `tfsdk:"simulation_task" tf:"optional,object"` + SimulationTask types.List `tfsdk:"simulation_task" tf:"object"` - SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"object"` - SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"object"` - SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"object"` - SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.List `tfsdk:"sql_task" tf:"object"` } func (newState *ResolvedValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedValues_SdkV2) { @@ -8135,6 +8565,21 @@ func (newState *ResolvedValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ResolvedValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedValues_SdkV2) { } +func (c ResolvedValues_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ResolvedConditionTaskValues_SdkV2{}.ToSchema(cs, append(path, "condition_task")...) + ResolvedDbtTaskValues_SdkV2{}.ToSchema(cs, append(path, "dbt_task")...) + ResolvedNotebookTaskValues_SdkV2{}.ToSchema(cs, append(path, "notebook_task")...) + ResolvedPythonWheelTaskValues_SdkV2{}.ToSchema(cs, append(path, "python_wheel_task")...) + ResolvedRunJobTaskValues_SdkV2{}.ToSchema(cs, append(path, "run_job_task")...) + ResolvedParamPairValues_SdkV2{}.ToSchema(cs, append(path, "simulation_task")...) + ResolvedStringParamsValues_SdkV2{}.ToSchema(cs, append(path, "spark_jar_task")...) + ResolvedStringParamsValues_SdkV2{}.ToSchema(cs, append(path, "spark_python_task")...) + ResolvedStringParamsValues_SdkV2{}.ToSchema(cs, append(path, "spark_submit_task")...) + ResolvedParamPairValues_SdkV2{}.ToSchema(cs, append(path, "sql_task")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8484,28 +8929,28 @@ type Run_SdkV2 struct { // original attempt’s ID and an incrementing `attempt_number`. Runs are // retried only until they succeed, and the maximum `attempt_number` is the // same as the `max_retries` value for the job. - AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:""` // The time in milliseconds it took to terminate the cluster and clean up // any associated artifacts. The duration of a task run is the sum of the // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The // `cleanup_duration` field is set to 0 for multitask job runs. The total // duration of a multitask job run is the value of the `run_duration` field. - CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:"optional"` + CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:""` // The cluster used for this run. If the run is specified to use a new // cluster, this field is set once the Jobs service has requested a cluster // for the run. - ClusterInstance types.List `tfsdk:"cluster_instance" tf:"optional,object"` + ClusterInstance types.List `tfsdk:"cluster_instance" tf:"object"` // A snapshot of the job’s cluster specification when this run was // created. - ClusterSpec types.List `tfsdk:"cluster_spec" tf:"optional,object"` + ClusterSpec types.List `tfsdk:"cluster_spec" tf:"object"` // The creator user name. This field won’t be included in the response if // the user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Description of the run - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The time at which this run ended in epoch milliseconds (milliseconds // since 1/1/1970 UTC). This field is set to 0 if the job is still running. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The time in milliseconds it took to execute the commands in the JAR or // notebook until they completed, failed, timed out, were cancelled, or // encountered an unexpected error. The duration of a task run is the sum of @@ -8513,7 +8958,7 @@ type Run_SdkV2 struct { // The `execution_duration` field is set to 0 for multitask job runs. The // total duration of a multitask job run is the value of the `run_duration` // field. - ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:"optional"` + ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -8524,58 +8969,65 @@ type Run_SdkV2 struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.List `tfsdk:"git_source" tf:"object"` + // Indicates if the run has more sub-resources (`tasks`, `job_clusters`) + // that are not shown. They can be accessed via :method:jobs/getrun + // endpoint. It is only relevant for API 2.2 :method:jobs/listruns requests + // with `expand_tasks=true`. + HasMore types.Bool `tfsdk:"has_more" tf:""` // Only populated by for-each iterations. The parent for-each task is // located in tasks array. - Iterations types.List `tfsdk:"iterations" tf:"optional"` + Iterations types.List `tfsdk:"iterations" tf:""` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. - // You must declare dependent libraries in task settings. - JobClusters types.List `tfsdk:"job_clusters" tf:"optional"` + // You must declare dependent libraries in task settings. If more than 100 + // job clusters are available, you can paginate through them using + // :method:jobs/getrun. + JobClusters types.List `tfsdk:"job_clusters" tf:""` // The canonical identifier of the job that contains this run. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` // Job-level parameters used in the run - JobParameters types.List `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.List `tfsdk:"job_parameters" tf:""` // ID of the job run that this run belongs to. For legacy and single-task // job runs the field is populated with the job run ID. For task runs, the // field is populated with the ID of the job run that the task run belongs // to. - JobRunId types.Int64 `tfsdk:"job_run_id" tf:"optional"` + JobRunId types.Int64 `tfsdk:"job_run_id" tf:""` // A token that can be used to list the next page of sub-resources. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // A unique identifier for this job run. This is set to the same value as // `run_id`. - NumberInJob types.Int64 `tfsdk:"number_in_job" tf:"optional"` + NumberInJob types.Int64 `tfsdk:"number_in_job" tf:""` // If this run is a retry of a prior run attempt, this field contains the // run_id of the original attempt; otherwise, it is the same as the run_id. - OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:"optional"` + OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:""` // The parameters used for this run. - OverridingParameters types.List `tfsdk:"overriding_parameters" tf:"optional,object"` + OverridingParameters types.List `tfsdk:"overriding_parameters" tf:"object"` // The time in milliseconds that the run has spent in the queue. - QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` + QueueDuration types.Int64 `tfsdk:"queue_duration" tf:""` // The repair history of the run. - RepairHistory types.List `tfsdk:"repair_history" tf:"optional"` + RepairHistory types.List `tfsdk:"repair_history" tf:""` // The time in milliseconds it took the job run and all of its repairs to // finish. - RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + RunDuration types.Int64 `tfsdk:"run_duration" tf:""` // The canonical identifier of the run. This ID is unique across all runs of // all jobs. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` // An optional name for the run. The maximum length is 4096 bytes in UTF-8 // encoding. - RunName types.String `tfsdk:"run_name" tf:"optional"` + RunName types.String `tfsdk:"run_name" tf:""` // The URL to the detail page of the run. - RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` + RunPageUrl types.String `tfsdk:"run_page_url" tf:""` // The type of a run. * `JOB_RUN`: Normal job run. A run created with // :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow run. A run created with // [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with // :method:jobs/submit. // // [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow - RunType types.String `tfsdk:"run_type" tf:"optional"` + RunType types.String `tfsdk:"run_type" tf:""` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.List `tfsdk:"schedule" tf:"object"` // The time in milliseconds it took to set up the cluster. For runs that run // on new clusters this is the cluster creation time, for runs that run on // existing clusters this time should be very short. The duration of a task @@ -8583,19 +9035,22 @@ type Run_SdkV2 struct { // `cleanup_duration`. The `setup_duration` field is set to 0 for multitask // job runs. The total duration of a multitask job run is the value of the // `run_duration` field. - SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` + SetupDuration types.Int64 `tfsdk:"setup_duration" tf:""` // The time at which this run was started in epoch milliseconds // (milliseconds since 1/1/1970 UTC). This may not be the time when the job // task starts executing, for example, if the job is scheduled to run on a // new cluster, this is the time the cluster creation call is issued. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Deprecated. Please use the `status` field instead. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.List `tfsdk:"state" tf:"object"` // The current status of the run - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.List `tfsdk:"status" tf:"object"` // The list of tasks performed by the run. Each task has its own `run_id` - // which you can use to call `JobsGetOutput` to retrieve the run resutls. - Tasks types.List `tfsdk:"tasks" tf:"optional"` + // which you can use to call `JobsGetOutput` to retrieve the run resutls. If + // more than 100 tasks are available, you can paginate through them using + // :method:jobs/getrun. Use the `next_page_token` field at the object root + // to determine if more results are available. + Tasks types.List `tfsdk:"tasks" tf:""` // The type of trigger that fired this run. // // * `PERIODIC`: Schedules that periodically trigger runs, such as a cron @@ -8608,9 +9063,9 @@ type Run_SdkV2 struct { // arrival. * `TABLE`: Indicates a run that is triggered by a table update. // * `CONTINUOUS_RESTART`: Indicates a run created by user to manually // restart a continuous job run. - Trigger types.String `tfsdk:"trigger" tf:"optional"` + Trigger types.String `tfsdk:"trigger" tf:""` // Additional details about what triggered the run - TriggerInfo types.List `tfsdk:"trigger_info" tf:"optional,object"` + TriggerInfo types.List `tfsdk:"trigger_info" tf:"object"` } func (newState *Run_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run_SdkV2) { @@ -8619,6 +9074,24 @@ func (newState *Run_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run_SdkV func (newState *Run_SdkV2) SyncEffectiveFieldsDuringRead(existingState Run_SdkV2) { } +func (c Run_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterInstance_SdkV2{}.ToSchema(cs, append(path, "cluster_instance")...) + ClusterSpec_SdkV2{}.ToSchema(cs, append(path, "cluster_spec")...) + GitSource_SdkV2{}.ToSchema(cs, append(path, "git_source")...) + RunTask_SdkV2{}.ToSchema(cs, append(path, "iterations")...) + JobCluster_SdkV2{}.ToSchema(cs, append(path, "job_clusters")...) + JobParameter_SdkV2{}.ToSchema(cs, append(path, "job_parameters")...) + RunParameters_SdkV2{}.ToSchema(cs, append(path, "overriding_parameters")...) + RepairHistoryItem_SdkV2{}.ToSchema(cs, append(path, "repair_history")...) + CronSchedule_SdkV2{}.ToSchema(cs, append(path, "schedule")...) + RunState_SdkV2{}.ToSchema(cs, append(path, "state")...) + RunStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + RunTask_SdkV2{}.ToSchema(cs, append(path, "tasks")...) + TriggerInfo_SdkV2{}.ToSchema(cs, append(path, "trigger_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Run. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8660,6 +9133,7 @@ func (o Run_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { "end_time": o.EndTime, "execution_duration": o.ExecutionDuration, "git_source": o.GitSource, + "has_more": o.HasMore, "iterations": o.Iterations, "job_clusters": o.JobClusters, "job_id": o.JobId, @@ -8706,6 +9180,7 @@ func (o Run_SdkV2) Type(ctx context.Context) attr.Type { "git_source": basetypes.ListType{ ElemType: GitSource_SdkV2{}.Type(ctx), }, + "has_more": types.BoolType, "iterations": basetypes.ListType{ ElemType: RunTask_SdkV2{}.Type(ctx), }, @@ -9109,7 +9584,7 @@ type RunConditionTask_SdkV2 struct { Op types.String `tfsdk:"op" tf:""` // The condition expression evaluation result. Filled in if the task was // successfully completed. Can be `"true"` or `"false"` - Outcome types.String `tfsdk:"outcome" tf:"optional"` + Outcome types.String `tfsdk:"outcome" tf:""` // The right operand of the condition task. Can be either a string value or // a job state or parameter reference. Right types.String `tfsdk:"right" tf:""` @@ -9121,6 +9596,14 @@ func (newState *RunConditionTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *RunConditionTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunConditionTask_SdkV2) { } +func (c RunConditionTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "left")...) + cs.SetRequired(append(path, "op")...) + cs.SetRequired(append(path, "right")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunConditionTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9162,13 +9645,13 @@ type RunForEachTask_SdkV2 struct { // An optional maximum allowed number of concurrent runs of the task. Set // this value if you want to be able to execute multiple runs of the task // concurrently. - Concurrency types.Int64 `tfsdk:"concurrency" tf:"optional"` + Concurrency types.Int64 `tfsdk:"concurrency" tf:""` // Array for task to iterate on. This can be a JSON string or a reference to // an array parameter. Inputs types.String `tfsdk:"inputs" tf:""` // Read only field. Populated for GetRun and ListRuns RPC calls and stores // the execution stats of an For each task - Stats types.List `tfsdk:"stats" tf:"optional,object"` + Stats types.List `tfsdk:"stats" tf:"object"` // Configuration for the task that will be run for each element in the array Task types.List `tfsdk:"task" tf:"object"` } @@ -9179,6 +9662,15 @@ func (newState *RunForEachTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *RunForEachTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunForEachTask_SdkV2) { } +func (c RunForEachTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "inputs")...) + ForEachStats_SdkV2{}.ToSchema(cs, append(path, "stats")...) + cs.SetRequired(append(path, "task")...) + Task_SdkV2{}.ToSchema(cs, append(path, "task")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunForEachTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9277,7 +9769,7 @@ func (o *RunForEachTask_SdkV2) SetTask(ctx context.Context, v Task_SdkV2) { type RunJobOutput_SdkV2 struct { // The run id of the triggered job run - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` } func (newState *RunJobOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunJobOutput_SdkV2) { @@ -9286,6 +9778,11 @@ func (newState *RunJobOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RunJobOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunJobOutput_SdkV2) { } +func (c RunJobOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunJobOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9321,7 +9818,7 @@ type RunJobTask_SdkV2 struct { // An array of commands to execute for jobs with the dbt task, for example // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt // run"]` - DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + DbtCommands types.List `tfsdk:"dbt_commands" tf:""` // A list of parameters for jobs with Spark JAR tasks, for example // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the // main function of the main class specified in the Spark JAR task. If not @@ -9334,11 +9831,11 @@ type RunJobTask_SdkV2 struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - JarParams types.List `tfsdk:"jar_params" tf:"optional"` + JarParams types.List `tfsdk:"jar_params" tf:""` // ID of the job to trigger. JobId types.Int64 `tfsdk:"job_id" tf:""` // Job-level parameters used to trigger the job. - JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.Map `tfsdk:"job_parameters" tf:""` // A map from keys to values for jobs with notebook task, for example // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed // to the notebook and is accessible through the [dbutils.widgets.get] @@ -9358,11 +9855,11 @@ type RunJobTask_SdkV2 struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html - NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + NotebookParams types.Map `tfsdk:"notebook_params" tf:""` // Controls whether the pipeline should perform a full refresh - PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.List `tfsdk:"pipeline_params" tf:"object"` - PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:""` // A list of parameters for jobs with Python tasks, for example // `"python_params": ["john doe", "35"]`. The parameters are passed to // Python file as command-line parameters. If specified upon `run-now`, it @@ -9380,7 +9877,7 @@ type RunJobTask_SdkV2 struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - PythonParams types.List `tfsdk:"python_params" tf:"optional"` + PythonParams types.List `tfsdk:"python_params" tf:""` // A list of parameters for jobs with spark submit task, for example // `"spark_submit_params": ["--class", // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to @@ -9399,11 +9896,11 @@ type RunJobTask_SdkV2 struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:""` // A map from keys to values for jobs with SQL task, for example // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task // does not support custom parameters. - SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` + SqlParams types.Map `tfsdk:"sql_params" tf:""` } func (newState *RunJobTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunJobTask_SdkV2) { @@ -9412,6 +9909,13 @@ func (newState *RunJobTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan R func (newState *RunJobTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunJobTask_SdkV2) { } +func (c RunJobTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + PipelineParams_SdkV2{}.ToSchema(cs, append(path, "pipeline_params")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunJobTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9727,7 +10231,7 @@ type RunNow_SdkV2 struct { // An array of commands to execute for jobs with the dbt task, for example // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt // run"]` - DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + DbtCommands types.List `tfsdk:"dbt_commands" tf:""` // An optional token to guarantee the idempotency of job run requests. If a // run with the provided token already exists, the request does not create a // new run but returns the ID of the existing run instead. If a run with the @@ -9742,7 +10246,7 @@ type RunNow_SdkV2 struct { // For more information, see [How to ensure idempotency for jobs]. // // [How to ensure idempotency for jobs]: https://kb.databricks.com/jobs/jobs-idempotency.html - IdempotencyToken types.String `tfsdk:"idempotency_token" tf:"optional"` + IdempotencyToken types.String `tfsdk:"idempotency_token" tf:""` // A list of parameters for jobs with Spark JAR tasks, for example // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the // main function of the main class specified in the Spark JAR task. If not @@ -9755,12 +10259,12 @@ type RunNow_SdkV2 struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - JarParams types.List `tfsdk:"jar_params" tf:"optional"` + JarParams types.List `tfsdk:"jar_params" tf:""` // The ID of the job to be executed JobId types.Int64 `tfsdk:"job_id" tf:""` // Job-level parameters used in the run. for example `"param": // "overriding_val"` - JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.Map `tfsdk:"job_parameters" tf:""` // A map from keys to values for jobs with notebook task, for example // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed // to the notebook and is accessible through the [dbutils.widgets.get] @@ -9780,14 +10284,14 @@ type RunNow_SdkV2 struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html - NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + NotebookParams types.Map `tfsdk:"notebook_params" tf:""` // A list of task keys to run inside of the job. If this field is not // provided, all tasks in the job will be run. - Only types.List `tfsdk:"only" tf:"optional"` + Only types.List `tfsdk:"only" tf:""` // Controls whether the pipeline should perform a full refresh - PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.List `tfsdk:"pipeline_params" tf:"object"` - PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:""` // A list of parameters for jobs with Python tasks, for example // `"python_params": ["john doe", "35"]`. The parameters are passed to // Python file as command-line parameters. If specified upon `run-now`, it @@ -9805,9 +10309,9 @@ type RunNow_SdkV2 struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - PythonParams types.List `tfsdk:"python_params" tf:"optional"` + PythonParams types.List `tfsdk:"python_params" tf:""` // The queue settings of the run. - Queue types.List `tfsdk:"queue" tf:"optional,object"` + Queue types.List `tfsdk:"queue" tf:"object"` // A list of parameters for jobs with spark submit task, for example // `"spark_submit_params": ["--class", // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to @@ -9826,11 +10330,11 @@ type RunNow_SdkV2 struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:""` // A map from keys to values for jobs with SQL task, for example // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task // does not support custom parameters. - SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` + SqlParams types.Map `tfsdk:"sql_params" tf:""` } func (newState *RunNow_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNow_SdkV2) { @@ -9839,6 +10343,14 @@ func (newState *RunNow_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNo func (newState *RunNow_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunNow_SdkV2) { } +func (c RunNow_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + PipelineParams_SdkV2{}.ToSchema(cs, append(path, "pipeline_params")...) + QueueSettings_SdkV2{}.ToSchema(cs, append(path, "queue")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunNow. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10218,9 +10730,9 @@ func (o *RunNow_SdkV2) SetSqlParams(ctx context.Context, v map[string]types.Stri type RunNowResponse_SdkV2 struct { // A unique identifier for this job run. This is set to the same value as // `run_id`. - NumberInJob types.Int64 `tfsdk:"number_in_job" tf:"optional"` + NumberInJob types.Int64 `tfsdk:"number_in_job" tf:""` // The globally unique ID of the newly triggered run. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` } func (newState *RunNowResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNowResponse_SdkV2) { @@ -10229,6 +10741,11 @@ func (newState *RunNowResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *RunNowResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunNowResponse_SdkV2) { } +func (c RunNowResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunNowResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10265,16 +10782,16 @@ func (o RunNowResponse_SdkV2) Type(ctx context.Context) attr.Type { // Run output was retrieved successfully. type RunOutput_SdkV2 struct { // The output of a dbt task, if available. - DbtOutput types.List `tfsdk:"dbt_output" tf:"optional,object"` + DbtOutput types.List `tfsdk:"dbt_output" tf:"object"` // An error message indicating why a task failed or why output is not // available. The message is unstructured, and its exact format is subject // to change. - Error types.String `tfsdk:"error" tf:"optional"` + Error types.String `tfsdk:"error" tf:""` // If there was an error executing the run, this field contains any // available stack traces. - ErrorTrace types.String `tfsdk:"error_trace" tf:"optional"` + ErrorTrace types.String `tfsdk:"error_trace" tf:""` - Info types.String `tfsdk:"info" tf:"optional"` + Info types.String `tfsdk:"info" tf:""` // The output from tasks that write to standard streams (stdout/stderr) such // as spark_jar_task, spark_python_task, python_wheel_task. // @@ -10282,11 +10799,11 @@ type RunOutput_SdkV2 struct { // spark_submit_task. // // Databricks restricts this API to return the last 5 MB of these logs. - Logs types.String `tfsdk:"logs" tf:"optional"` + Logs types.String `tfsdk:"logs" tf:""` // Whether the logs are truncated. - LogsTruncated types.Bool `tfsdk:"logs_truncated" tf:"optional"` + LogsTruncated types.Bool `tfsdk:"logs_truncated" tf:""` // All details of the run except for its output. - Metadata types.List `tfsdk:"metadata" tf:"optional,object"` + Metadata types.List `tfsdk:"metadata" tf:"object"` // The output of a notebook task, if available. A notebook task that // terminates (either successfully or with a failure) without calling // `dbutils.notebook.exit()` is considered to have an empty output. This @@ -10295,11 +10812,11 @@ type RunOutput_SdkV2 struct { // the [ClusterLogConf] field to configure log storage for the job cluster. // // [ClusterLogConf]: https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterlogconf - NotebookOutput types.List `tfsdk:"notebook_output" tf:"optional,object"` + NotebookOutput types.List `tfsdk:"notebook_output" tf:"object"` // The output of a run job task, if available - RunJobOutput types.List `tfsdk:"run_job_output" tf:"optional,object"` + RunJobOutput types.List `tfsdk:"run_job_output" tf:"object"` // The output of a SQL task, if available. - SqlOutput types.List `tfsdk:"sql_output" tf:"optional,object"` + SqlOutput types.List `tfsdk:"sql_output" tf:"object"` } func (newState *RunOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunOutput_SdkV2) { @@ -10308,6 +10825,16 @@ func (newState *RunOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ru func (newState *RunOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunOutput_SdkV2) { } +func (c RunOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DbtOutput_SdkV2{}.ToSchema(cs, append(path, "dbt_output")...) + Run_SdkV2{}.ToSchema(cs, append(path, "metadata")...) + NotebookOutput_SdkV2{}.ToSchema(cs, append(path, "notebook_output")...) + RunJobOutput_SdkV2{}.ToSchema(cs, append(path, "run_job_output")...) + SqlOutput_SdkV2{}.ToSchema(cs, append(path, "sql_output")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10507,7 +11034,7 @@ type RunParameters_SdkV2 struct { // An array of commands to execute for jobs with the dbt task, for example // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt // run"]` - DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + DbtCommands types.List `tfsdk:"dbt_commands" tf:""` // A list of parameters for jobs with Spark JAR tasks, for example // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the // main function of the main class specified in the Spark JAR task. If not @@ -10520,7 +11047,7 @@ type RunParameters_SdkV2 struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - JarParams types.List `tfsdk:"jar_params" tf:"optional"` + JarParams types.List `tfsdk:"jar_params" tf:""` // A map from keys to values for jobs with notebook task, for example // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed // to the notebook and is accessible through the [dbutils.widgets.get] @@ -10540,11 +11067,11 @@ type RunParameters_SdkV2 struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html - NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + NotebookParams types.Map `tfsdk:"notebook_params" tf:""` // Controls whether the pipeline should perform a full refresh - PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.List `tfsdk:"pipeline_params" tf:"object"` - PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:""` // A list of parameters for jobs with Python tasks, for example // `"python_params": ["john doe", "35"]`. The parameters are passed to // Python file as command-line parameters. If specified upon `run-now`, it @@ -10562,7 +11089,7 @@ type RunParameters_SdkV2 struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - PythonParams types.List `tfsdk:"python_params" tf:"optional"` + PythonParams types.List `tfsdk:"python_params" tf:""` // A list of parameters for jobs with spark submit task, for example // `"spark_submit_params": ["--class", // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to @@ -10581,11 +11108,11 @@ type RunParameters_SdkV2 struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:""` // A map from keys to values for jobs with SQL task, for example // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task // does not support custom parameters. - SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` + SqlParams types.Map `tfsdk:"sql_params" tf:""` } func (newState *RunParameters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunParameters_SdkV2) { @@ -10594,6 +11121,12 @@ func (newState *RunParameters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *RunParameters_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunParameters_SdkV2) { } +func (c RunParameters_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineParams_SdkV2{}.ToSchema(cs, append(path, "pipeline_params")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunParameters. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10876,18 +11409,18 @@ func (o *RunParameters_SdkV2) SetSqlParams(ctx context.Context, v map[string]typ type RunState_SdkV2 struct { // A value indicating the run's current lifecycle state. This field is // always available in the response. - LifeCycleState types.String `tfsdk:"life_cycle_state" tf:"optional"` + LifeCycleState types.String `tfsdk:"life_cycle_state" tf:""` // The reason indicating why the run was queued. - QueueReason types.String `tfsdk:"queue_reason" tf:"optional"` + QueueReason types.String `tfsdk:"queue_reason" tf:""` // A value indicating the run's result. This field is only available for // terminal lifecycle states. - ResultState types.String `tfsdk:"result_state" tf:"optional"` + ResultState types.String `tfsdk:"result_state" tf:""` // A descriptive message for the current state. This field is unstructured, // and its exact format is subject to change. - StateMessage types.String `tfsdk:"state_message" tf:"optional"` + StateMessage types.String `tfsdk:"state_message" tf:""` // A value indicating whether a run was canceled manually by a user or by // the scheduler because the run timed out. - UserCancelledOrTimedout types.Bool `tfsdk:"user_cancelled_or_timedout" tf:"optional"` + UserCancelledOrTimedout types.Bool `tfsdk:"user_cancelled_or_timedout" tf:""` } func (newState *RunState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunState_SdkV2) { @@ -10896,6 +11429,11 @@ func (newState *RunState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run func (newState *RunState_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunState_SdkV2) { } +func (c RunState_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10938,12 +11476,12 @@ func (o RunState_SdkV2) Type(ctx context.Context) attr.Type { // The current status of the run type RunStatus_SdkV2 struct { // If the run was queued, details about the reason for queuing the run. - QueueDetails types.List `tfsdk:"queue_details" tf:"optional,object"` + QueueDetails types.List `tfsdk:"queue_details" tf:"object"` // The current state of the run. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // If the run is in a TERMINATING or TERMINATED state, details about the // reason for terminating the run. - TerminationDetails types.List `tfsdk:"termination_details" tf:"optional,object"` + TerminationDetails types.List `tfsdk:"termination_details" tf:"object"` } func (newState *RunStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunStatus_SdkV2) { @@ -10952,6 +11490,13 @@ func (newState *RunStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ru func (newState *RunStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunStatus_SdkV2) { } +func (c RunStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueueDetails_SdkV2{}.ToSchema(cs, append(path, "queue_details")...) + TerminationDetails_SdkV2{}.ToSchema(cs, append(path, "termination_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11055,48 +11600,48 @@ type RunTask_SdkV2 struct { // original attempt’s ID and an incrementing `attempt_number`. Runs are // retried only until they succeed, and the maximum `attempt_number` is the // same as the `max_retries` value for the job. - AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:""` // The task runs a [clean rooms] notebook when the // `clean_rooms_notebook_task` field is present. // // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html - CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` + CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"object"` // The time in milliseconds it took to terminate the cluster and clean up // any associated artifacts. The duration of a task run is the sum of the // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The // `cleanup_duration` field is set to 0 for multitask job runs. The total // duration of a multitask job run is the value of the `run_duration` field. - CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:"optional"` + CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:""` // The cluster used for this run. If the run is specified to use a new // cluster, this field is set once the Jobs service has requested a cluster // for the run. - ClusterInstance types.List `tfsdk:"cluster_instance" tf:"optional,object"` + ClusterInstance types.List `tfsdk:"cluster_instance" tf:"object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries // or notifications. - ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.List `tfsdk:"condition_task" tf:"object"` // The task runs one or more dbt commands when the `dbt_task` field is // present. The dbt task requires both Databricks SQL and the ability to use // a serverless or a pro SQL warehouse. - DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.List `tfsdk:"dbt_task" tf:"object"` // An optional array of objects specifying the dependency graph of the task. // All tasks specified in this field must complete successfully before // executing this task. The key is `task_key`, and the value is the name // assigned to the dependent task. - DependsOn types.List `tfsdk:"depends_on" tf:"optional"` + DependsOn types.List `tfsdk:"depends_on" tf:""` // An optional description for this task. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // An optional set of email addresses notified when the task run begins or // completes. The default behavior is to not send any emails. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.List `tfsdk:"email_notifications" tf:"object"` // The time at which this run ended in epoch milliseconds (milliseconds // since 1/1/1970 UTC). This field is set to 0 if the job is still running. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The key that references an environment spec in a job. This field is // required for Python script, Python wheel and dbt tasks when using // serverless compute. - EnvironmentKey types.String `tfsdk:"environment_key" tf:"optional"` + EnvironmentKey types.String `tfsdk:"environment_key" tf:""` // The time in milliseconds it took to execute the commands in the JAR or // notebook until they completed, failed, timed out, were cancelled, or // encountered an unexpected error. The duration of a task run is the sum of @@ -11104,15 +11649,15 @@ type RunTask_SdkV2 struct { // The `execution_duration` field is set to 0 for multitask job runs. The // total duration of a multitask job run is the value of the `run_duration` // field. - ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:"optional"` + ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:""` // If existing_cluster_id, the ID of an existing cluster that is used for // all runs. When running jobs or tasks on an existing cluster, you may need // to manually restart the cluster if it stops responding. We suggest // running jobs and tasks on new clusters for greater reliability - ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:""` // The task executes a nested task for every input provided when the // `for_each_task` field is present. - ForEachTask types.List `tfsdk:"for_each_task" tf:"optional,object"` + ForEachTask types.List `tfsdk:"for_each_task" tf:"object"` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. If `git_source` is set, @@ -11121,46 +11666,46 @@ type RunTask_SdkV2 struct { // `WORKSPACE` on the task. Note: dbt and SQL File tasks support only // version-controlled sources. If dbt or SQL File tasks are used, // `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.List `tfsdk:"git_source" tf:"object"` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. - JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:""` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. - Libraries types.List `tfsdk:"library" tf:"optional"` + Libraries types.List `tfsdk:"library" tf:""` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.List `tfsdk:"new_cluster" tf:"object"` // The task runs a notebook when the `notebook_task` field is present. - NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.List `tfsdk:"notebook_task" tf:"object"` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // task run. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.List `tfsdk:"notification_settings" tf:"object"` // The task triggers a pipeline update when the `pipeline_task` field is // present. Only pipelines configured to use triggered more are supported. - PipelineTask types.List `tfsdk:"pipeline_task" tf:"optional,object"` + PipelineTask types.List `tfsdk:"pipeline_task" tf:"object"` // The task runs a Python wheel when the `python_wheel_task` field is // present. - PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"object"` // The time in milliseconds that the run has spent in the queue. - QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` + QueueDuration types.Int64 `tfsdk:"queue_duration" tf:""` // Parameter values including resolved references - ResolvedValues types.List `tfsdk:"resolved_values" tf:"optional,object"` + ResolvedValues types.List `tfsdk:"resolved_values" tf:"object"` // The time in milliseconds it took the job run and all of its repairs to // finish. - RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + RunDuration types.Int64 `tfsdk:"run_duration" tf:""` // The ID of the task run. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` // An optional value indicating the condition that determines whether the // task should be run once its dependencies have been completed. When // omitted, defaults to `ALL_SUCCESS`. See :method:jobs/create for a list of // possible values. - RunIf types.String `tfsdk:"run_if" tf:"optional"` + RunIf types.String `tfsdk:"run_if" tf:""` // The task triggers another job when the `run_job_task` field is present. - RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.List `tfsdk:"run_job_task" tf:"object"` - RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` + RunPageUrl types.String `tfsdk:"run_page_url" tf:""` // The time in milliseconds it took to set up the cluster. For runs that run // on new clusters this is the cluster creation time, for runs that run on // existing clusters this time should be very short. The duration of a task @@ -11168,12 +11713,12 @@ type RunTask_SdkV2 struct { // `cleanup_duration`. The `setup_duration` field is set to 0 for multitask // job runs. The total duration of a multitask job run is the value of the // `run_duration` field. - SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` + SetupDuration types.Int64 `tfsdk:"setup_duration" tf:""` // The task runs a JAR when the `spark_jar_task` field is present. - SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"object"` // The task runs a Python file when the `spark_python_task` field is // present. - SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"object"` // (Legacy) The task runs the spark-submit script when the // `spark_submit_task` field is present. This task can run only on new // clusters and is not compatible with serverless compute. @@ -11192,19 +11737,19 @@ type RunTask_SdkV2 struct { // // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 // paths. - SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"object"` // The task runs a SQL query or file, or it refreshes a SQL alert or a // legacy SQL dashboard when the `sql_task` field is present. - SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.List `tfsdk:"sql_task" tf:"object"` // The time at which this run was started in epoch milliseconds // (milliseconds since 1/1/1970 UTC). This may not be the time when the job // task starts executing, for example, if the job is scheduled to run on a // new cluster, this is the time the cluster creation call is issued. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Deprecated. Please use the `status` field instead. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.List `tfsdk:"state" tf:"object"` // The current status of the run - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.List `tfsdk:"status" tf:"object"` // A unique name for the task. This field is used to refer to this task from // other tasks. This field is required and must be unique within its parent // job. On Update or Reset, this field is used to reference the tasks to be @@ -11212,11 +11757,11 @@ type RunTask_SdkV2 struct { TaskKey types.String `tfsdk:"task_key" tf:""` // An optional timeout applied to each run of this job task. A value of `0` // means no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A collection of system notification IDs to notify when the run begins or // completes. The default behavior is to not send any system notifications. // Task webhooks respect the task notification settings. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"object"` } func (newState *RunTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTask_SdkV2) { @@ -11225,6 +11770,34 @@ func (newState *RunTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunT func (newState *RunTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunTask_SdkV2) { } +func (c RunTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomsNotebookTask_SdkV2{}.ToSchema(cs, append(path, "clean_rooms_notebook_task")...) + ClusterInstance_SdkV2{}.ToSchema(cs, append(path, "cluster_instance")...) + RunConditionTask_SdkV2{}.ToSchema(cs, append(path, "condition_task")...) + DbtTask_SdkV2{}.ToSchema(cs, append(path, "dbt_task")...) + TaskDependency_SdkV2{}.ToSchema(cs, append(path, "depends_on")...) + JobEmailNotifications_SdkV2{}.ToSchema(cs, append(path, "email_notifications")...) + RunForEachTask_SdkV2{}.ToSchema(cs, append(path, "for_each_task")...) + GitSource_SdkV2{}.ToSchema(cs, append(path, "git_source")...) + compute_tf.ClusterSpec_SdkV2{}.ToSchema(cs, append(path, "new_cluster")...) + NotebookTask_SdkV2{}.ToSchema(cs, append(path, "notebook_task")...) + TaskNotificationSettings_SdkV2{}.ToSchema(cs, append(path, "notification_settings")...) + PipelineTask_SdkV2{}.ToSchema(cs, append(path, "pipeline_task")...) + PythonWheelTask_SdkV2{}.ToSchema(cs, append(path, "python_wheel_task")...) + ResolvedValues_SdkV2{}.ToSchema(cs, append(path, "resolved_values")...) + RunJobTask_SdkV2{}.ToSchema(cs, append(path, "run_job_task")...) + SparkJarTask_SdkV2{}.ToSchema(cs, append(path, "spark_jar_task")...) + SparkPythonTask_SdkV2{}.ToSchema(cs, append(path, "spark_python_task")...) + SparkSubmitTask_SdkV2{}.ToSchema(cs, append(path, "spark_submit_task")...) + SqlTask_SdkV2{}.ToSchema(cs, append(path, "sql_task")...) + RunState_SdkV2{}.ToSchema(cs, append(path, "state")...) + RunStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + cs.SetRequired(append(path, "task_key")...) + WebhookNotifications_SdkV2{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12005,20 +12578,20 @@ func (o *RunTask_SdkV2) SetWebhookNotifications(ctx context.Context, v WebhookNo type SparkJarTask_SdkV2 struct { // Deprecated since 04/2016. Provide a `jar` through the `libraries` field // instead. For an example, see :method:jobs/create. - JarUri types.String `tfsdk:"jar_uri" tf:"optional"` + JarUri types.String `tfsdk:"jar_uri" tf:""` // The full name of the class containing the main method to be executed. // This class must be contained in a JAR provided as a library. // // The code must use `SparkContext.getOrCreate` to obtain a Spark context; // otherwise, runs of the job fail. - MainClassName types.String `tfsdk:"main_class_name" tf:"optional"` + MainClassName types.String `tfsdk:"main_class_name" tf:""` // Parameters passed to the main method. // // Use [Task parameter variables] to set parameters containing information // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *SparkJarTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkJarTask_SdkV2) { @@ -12027,6 +12600,11 @@ func (newState *SparkJarTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SparkJarTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkJarTask_SdkV2) { } +func (c SparkJarTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkJarTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12099,7 +12677,7 @@ type SparkPythonTask_SdkV2 struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // The Python file to be executed. Cloud file URIs (such as dbfs:/, s3:/, // adls:/, gcs:/) and workspace paths are supported. For python files stored // in the Databricks workspace, the path must be absolute and begin with @@ -12115,7 +12693,7 @@ type SparkPythonTask_SdkV2 struct { // * `WORKSPACE`: The Python file is located in a Databricks workspace or at // a cloud filesystem URI. * `GIT`: The Python file is located in a remote // Git repository. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` } func (newState *SparkPythonTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkPythonTask_SdkV2) { @@ -12124,6 +12702,12 @@ func (newState *SparkPythonTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *SparkPythonTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkPythonTask_SdkV2) { } +func (c SparkPythonTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "python_file")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkPythonTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12196,7 +12780,7 @@ type SparkSubmitTask_SdkV2 struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *SparkSubmitTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkSubmitTask_SdkV2) { @@ -12205,6 +12789,11 @@ func (newState *SparkSubmitTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *SparkSubmitTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkSubmitTask_SdkV2) { } +func (c SparkSubmitTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkSubmitTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12272,16 +12861,16 @@ type SqlAlertOutput_SdkV2 struct { // * UNKNOWN: alert yet to be evaluated * OK: alert evaluated and did not // fulfill trigger conditions * TRIGGERED: alert evaluated and fulfilled // trigger conditions - AlertState types.String `tfsdk:"alert_state" tf:"optional"` + AlertState types.String `tfsdk:"alert_state" tf:""` // The link to find the output results. - OutputLink types.String `tfsdk:"output_link" tf:"optional"` + OutputLink types.String `tfsdk:"output_link" tf:""` // The text of the SQL query. Can Run permission of the SQL query associated // with the SQL alert is required to view this field. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Information about SQL statements executed in the run. - SqlStatements types.List `tfsdk:"sql_statements" tf:"optional"` + SqlStatements types.List `tfsdk:"sql_statements" tf:""` // The canonical identifier of the SQL warehouse. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *SqlAlertOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlAlertOutput_SdkV2) { @@ -12290,6 +12879,12 @@ func (newState *SqlAlertOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SqlAlertOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlAlertOutput_SdkV2) { } +func (c SqlAlertOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlStatementOutput_SdkV2{}.ToSchema(cs, append(path, "sql_statements")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlAlertOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12361,9 +12956,9 @@ func (o *SqlAlertOutput_SdkV2) SetSqlStatements(ctx context.Context, v []SqlStat type SqlDashboardOutput_SdkV2 struct { // The canonical identifier of the SQL warehouse. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` // Widgets executed in the run. Only SQL query based widgets are listed. - Widgets types.List `tfsdk:"widgets" tf:"optional"` + Widgets types.List `tfsdk:"widgets" tf:""` } func (newState *SqlDashboardOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlDashboardOutput_SdkV2) { @@ -12372,6 +12967,12 @@ func (newState *SqlDashboardOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *SqlDashboardOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlDashboardOutput_SdkV2) { } +func (c SqlDashboardOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlDashboardWidgetOutput_SdkV2{}.ToSchema(cs, append(path, "widgets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlDashboardOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12437,19 +13038,19 @@ func (o *SqlDashboardOutput_SdkV2) SetWidgets(ctx context.Context, v []SqlDashbo type SqlDashboardWidgetOutput_SdkV2 struct { // Time (in epoch milliseconds) when execution of the SQL widget ends. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The information about the error when execution fails. - Error types.List `tfsdk:"error" tf:"optional,object"` + Error types.List `tfsdk:"error" tf:"object"` // The link to find the output results. - OutputLink types.String `tfsdk:"output_link" tf:"optional"` + OutputLink types.String `tfsdk:"output_link" tf:""` // Time (in epoch milliseconds) when execution of the SQL widget starts. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // The execution status of the SQL widget. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The canonical identifier of the SQL widget. - WidgetId types.String `tfsdk:"widget_id" tf:"optional"` + WidgetId types.String `tfsdk:"widget_id" tf:""` // The title of the SQL widget. - WidgetTitle types.String `tfsdk:"widget_title" tf:"optional"` + WidgetTitle types.String `tfsdk:"widget_title" tf:""` } func (newState *SqlDashboardWidgetOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlDashboardWidgetOutput_SdkV2) { @@ -12458,6 +13059,12 @@ func (newState *SqlDashboardWidgetOutput_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *SqlDashboardWidgetOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlDashboardWidgetOutput_SdkV2) { } +func (c SqlDashboardWidgetOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlOutputError_SdkV2{}.ToSchema(cs, append(path, "error")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlDashboardWidgetOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12533,11 +13140,11 @@ func (o *SqlDashboardWidgetOutput_SdkV2) SetError(ctx context.Context, v SqlOutp type SqlOutput_SdkV2 struct { // The output of a SQL alert task, if available. - AlertOutput types.List `tfsdk:"alert_output" tf:"optional,object"` + AlertOutput types.List `tfsdk:"alert_output" tf:"object"` // The output of a SQL dashboard task, if available. - DashboardOutput types.List `tfsdk:"dashboard_output" tf:"optional,object"` + DashboardOutput types.List `tfsdk:"dashboard_output" tf:"object"` // The output of a SQL query task, if available. - QueryOutput types.List `tfsdk:"query_output" tf:"optional,object"` + QueryOutput types.List `tfsdk:"query_output" tf:"object"` } func (newState *SqlOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlOutput_SdkV2) { @@ -12546,6 +13153,14 @@ func (newState *SqlOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sq func (newState *SqlOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlOutput_SdkV2) { } +func (c SqlOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlAlertOutput_SdkV2{}.ToSchema(cs, append(path, "alert_output")...) + SqlDashboardOutput_SdkV2{}.ToSchema(cs, append(path, "dashboard_output")...) + SqlQueryOutput_SdkV2{}.ToSchema(cs, append(path, "query_output")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12671,7 +13286,7 @@ func (o *SqlOutput_SdkV2) SetQueryOutput(ctx context.Context, v SqlQueryOutput_S type SqlOutputError_SdkV2 struct { // The error message when execution fails. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *SqlOutputError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlOutputError_SdkV2) { @@ -12680,6 +13295,11 @@ func (newState *SqlOutputError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SqlOutputError_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlOutputError_SdkV2) { } +func (c SqlOutputError_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlOutputError. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12712,16 +13332,16 @@ func (o SqlOutputError_SdkV2) Type(ctx context.Context) attr.Type { } type SqlQueryOutput_SdkV2 struct { - EndpointId types.String `tfsdk:"endpoint_id" tf:"optional"` + EndpointId types.String `tfsdk:"endpoint_id" tf:""` // The link to find the output results. - OutputLink types.String `tfsdk:"output_link" tf:"optional"` + OutputLink types.String `tfsdk:"output_link" tf:""` // The text of the SQL query. Can Run permission of the SQL query is // required to view this field. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Information about SQL statements executed in the run. - SqlStatements types.List `tfsdk:"sql_statements" tf:"optional"` + SqlStatements types.List `tfsdk:"sql_statements" tf:""` // The canonical identifier of the SQL warehouse. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *SqlQueryOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlQueryOutput_SdkV2) { @@ -12730,6 +13350,12 @@ func (newState *SqlQueryOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SqlQueryOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlQueryOutput_SdkV2) { } +func (c SqlQueryOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlStatementOutput_SdkV2{}.ToSchema(cs, append(path, "sql_statements")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlQueryOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12801,7 +13427,7 @@ func (o *SqlQueryOutput_SdkV2) SetSqlStatements(ctx context.Context, v []SqlStat type SqlStatementOutput_SdkV2 struct { // A key that can be used to look up query details. - LookupKey types.String `tfsdk:"lookup_key" tf:"optional"` + LookupKey types.String `tfsdk:"lookup_key" tf:""` } func (newState *SqlStatementOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlStatementOutput_SdkV2) { @@ -12810,6 +13436,11 @@ func (newState *SqlStatementOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *SqlStatementOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlStatementOutput_SdkV2) { } +func (c SqlStatementOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlStatementOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12843,17 +13474,17 @@ func (o SqlStatementOutput_SdkV2) Type(ctx context.Context) attr.Type { type SqlTask_SdkV2 struct { // If alert, indicates that this job must refresh a SQL alert. - Alert types.List `tfsdk:"alert" tf:"optional,object"` + Alert types.List `tfsdk:"alert" tf:"object"` // If dashboard, indicates that this job must refresh a SQL dashboard. - Dashboard types.List `tfsdk:"dashboard" tf:"optional,object"` + Dashboard types.List `tfsdk:"dashboard" tf:"object"` // If file, indicates that this job runs a SQL file in a remote Git // repository. - File types.List `tfsdk:"file" tf:"optional,object"` + File types.List `tfsdk:"file" tf:"object"` // Parameters to be used for each run of this job. The SQL alert task does // not support custom parameters. - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` // If query, indicates that this job must execute a SQL query. - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.List `tfsdk:"query" tf:"object"` // The canonical identifier of the SQL warehouse. Recommended to use with // serverless or pro SQL warehouses. Classic SQL warehouses are only // supported for SQL alert, dashboard and query tasks and are limited to @@ -12867,6 +13498,16 @@ func (newState *SqlTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlT func (newState *SqlTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTask_SdkV2) { } +func (c SqlTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlTaskAlert_SdkV2{}.ToSchema(cs, append(path, "alert")...) + SqlTaskDashboard_SdkV2{}.ToSchema(cs, append(path, "dashboard")...) + SqlTaskFile_SdkV2{}.ToSchema(cs, append(path, "file")...) + SqlTaskQuery_SdkV2{}.ToSchema(cs, append(path, "query")...) + cs.SetRequired(append(path, "warehouse_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13058,9 +13699,9 @@ type SqlTaskAlert_SdkV2 struct { // The canonical identifier of the SQL alert. AlertId types.String `tfsdk:"alert_id" tf:""` // If true, the alert notifications are not sent to subscribers. - PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:"optional"` + PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:""` // If specified, alert notifications are sent to subscribers. - Subscriptions types.List `tfsdk:"subscriptions" tf:"optional"` + Subscriptions types.List `tfsdk:"subscriptions" tf:""` } func (newState *SqlTaskAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskAlert_SdkV2) { @@ -13069,6 +13710,13 @@ func (newState *SqlTaskAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SqlTaskAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskAlert_SdkV2) { } +func (c SqlTaskAlert_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "alert_id")...) + SqlTaskSubscription_SdkV2{}.ToSchema(cs, append(path, "subscriptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13136,14 +13784,14 @@ func (o *SqlTaskAlert_SdkV2) SetSubscriptions(ctx context.Context, v []SqlTaskSu type SqlTaskDashboard_SdkV2 struct { // Subject of the email sent to subscribers of this task. - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The canonical identifier of the SQL dashboard. DashboardId types.String `tfsdk:"dashboard_id" tf:""` // If true, the dashboard snapshot is not taken, and emails are not sent to // subscribers. - PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:"optional"` + PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:""` // If specified, dashboard snapshots are sent to subscriptions. - Subscriptions types.List `tfsdk:"subscriptions" tf:"optional"` + Subscriptions types.List `tfsdk:"subscriptions" tf:""` } func (newState *SqlTaskDashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskDashboard_SdkV2) { @@ -13152,6 +13800,13 @@ func (newState *SqlTaskDashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *SqlTaskDashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskDashboard_SdkV2) { } +func (c SqlTaskDashboard_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + SqlTaskSubscription_SdkV2{}.ToSchema(cs, append(path, "subscriptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskDashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13231,7 +13886,7 @@ type SqlTaskFile_SdkV2 struct { // // * `WORKSPACE`: SQL file is located in Databricks workspace. * `GIT`: SQL // file is located in cloud Git provider. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` } func (newState *SqlTaskFile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskFile_SdkV2) { @@ -13240,6 +13895,12 @@ func (newState *SqlTaskFile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SqlTaskFile_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskFile_SdkV2) { } +func (c SqlTaskFile_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskFile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13284,6 +13945,12 @@ func (newState *SqlTaskQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SqlTaskQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskQuery_SdkV2) { } +func (c SqlTaskQuery_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "query_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13320,11 +13987,11 @@ type SqlTaskSubscription_SdkV2 struct { // notification. This parameter is mutually exclusive with user_name. You // cannot set both destination_id and user_name for subscription // notifications. - DestinationId types.String `tfsdk:"destination_id" tf:"optional"` + DestinationId types.String `tfsdk:"destination_id" tf:""` // The user name to receive the subscription email. This parameter is // mutually exclusive with destination_id. You cannot set both // destination_id and user_name for subscription notifications. - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *SqlTaskSubscription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskSubscription_SdkV2) { @@ -13333,6 +14000,11 @@ func (newState *SqlTaskSubscription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *SqlTaskSubscription_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskSubscription_SdkV2) { } +func (c SqlTaskSubscription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskSubscription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13368,16 +14040,16 @@ func (o SqlTaskSubscription_SdkV2) Type(ctx context.Context) attr.Type { type SubmitRun_SdkV2 struct { // List of permissions to set on the job. - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The user specified id of the budget policy to use for this one-time run. // If not specified, the run will be not be attributed to any budget policy. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // An optional set of email addresses notified when the run begins or // completes. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.List `tfsdk:"email_notifications" tf:"object"` // A list of task execution environment specifications that can be // referenced by tasks of this run. - Environments types.List `tfsdk:"environments" tf:"optional"` + Environments types.List `tfsdk:"environments" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -13388,9 +14060,9 @@ type SubmitRun_SdkV2 struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.List `tfsdk:"git_source" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.List `tfsdk:"health" tf:"object"` // An optional token that can be used to guarantee the idempotency of job // run requests. If a run with the provided token already exists, the // request does not create a new run but returns the ID of the existing run @@ -13406,26 +14078,26 @@ type SubmitRun_SdkV2 struct { // For more information, see [How to ensure idempotency for jobs]. // // [How to ensure idempotency for jobs]: https://kb.databricks.com/jobs/jobs-idempotency.html - IdempotencyToken types.String `tfsdk:"idempotency_token" tf:"optional"` + IdempotencyToken types.String `tfsdk:"idempotency_token" tf:""` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // run. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.List `tfsdk:"notification_settings" tf:"object"` // The queue settings of the one-time run. - Queue types.List `tfsdk:"queue" tf:"optional,object"` + Queue types.List `tfsdk:"queue" tf:"object"` // Specifies the user or service principal that the job runs as. If not // specified, the job runs as the user who submits the request. - RunAs types.List `tfsdk:"run_as" tf:"optional,object"` + RunAs types.List `tfsdk:"run_as" tf:"object"` // An optional name for the run. The default value is `Untitled`. - RunName types.String `tfsdk:"run_name" tf:"optional"` + RunName types.String `tfsdk:"run_name" tf:""` - Tasks types.List `tfsdk:"tasks" tf:"optional"` + Tasks types.List `tfsdk:"tasks" tf:""` // An optional timeout applied to each run of this job. A value of `0` means // no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A collection of system notification IDs to notify when the run begins or // completes. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"object"` } func (newState *SubmitRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRun_SdkV2) { @@ -13434,6 +14106,21 @@ func (newState *SubmitRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Su func (newState *SubmitRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubmitRun_SdkV2) { } +func (c SubmitRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + JobEmailNotifications_SdkV2{}.ToSchema(cs, append(path, "email_notifications")...) + JobEnvironment_SdkV2{}.ToSchema(cs, append(path, "environments")...) + GitSource_SdkV2{}.ToSchema(cs, append(path, "git_source")...) + JobsHealthRules_SdkV2{}.ToSchema(cs, append(path, "health")...) + JobNotificationSettings_SdkV2{}.ToSchema(cs, append(path, "notification_settings")...) + QueueSettings_SdkV2{}.ToSchema(cs, append(path, "queue")...) + JobRunAs_SdkV2{}.ToSchema(cs, append(path, "run_as")...) + SubmitTask_SdkV2{}.ToSchema(cs, append(path, "tasks")...) + WebhookNotifications_SdkV2{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubmitRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13785,7 +14472,7 @@ func (o *SubmitRun_SdkV2) SetWebhookNotifications(ctx context.Context, v Webhook // Run was created and started successfully. type SubmitRunResponse_SdkV2 struct { // The canonical identifier for the newly submitted run. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` } func (newState *SubmitRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRunResponse_SdkV2) { @@ -13794,6 +14481,11 @@ func (newState *SubmitRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *SubmitRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubmitRunResponse_SdkV2) { } +func (c SubmitRunResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubmitRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13830,70 +14522,70 @@ type SubmitTask_SdkV2 struct { // `clean_rooms_notebook_task` field is present. // // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html - CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` + CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries // or notifications. - ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.List `tfsdk:"condition_task" tf:"object"` // The task runs one or more dbt commands when the `dbt_task` field is // present. The dbt task requires both Databricks SQL and the ability to use // a serverless or a pro SQL warehouse. - DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.List `tfsdk:"dbt_task" tf:"object"` // An optional array of objects specifying the dependency graph of the task. // All tasks specified in this field must complete successfully before // executing this task. The key is `task_key`, and the value is the name // assigned to the dependent task. - DependsOn types.List `tfsdk:"depends_on" tf:"optional"` + DependsOn types.List `tfsdk:"depends_on" tf:""` // An optional description for this task. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // An optional set of email addresses notified when the task run begins or // completes. The default behavior is to not send any emails. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.List `tfsdk:"email_notifications" tf:"object"` // The key that references an environment spec in a job. This field is // required for Python script, Python wheel and dbt tasks when using // serverless compute. - EnvironmentKey types.String `tfsdk:"environment_key" tf:"optional"` + EnvironmentKey types.String `tfsdk:"environment_key" tf:""` // If existing_cluster_id, the ID of an existing cluster that is used for // all runs. When running jobs or tasks on an existing cluster, you may need // to manually restart the cluster if it stops responding. We suggest // running jobs and tasks on new clusters for greater reliability - ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:""` // The task executes a nested task for every input provided when the // `for_each_task` field is present. - ForEachTask types.List `tfsdk:"for_each_task" tf:"optional,object"` + ForEachTask types.List `tfsdk:"for_each_task" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.List `tfsdk:"health" tf:"object"` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. - Libraries types.List `tfsdk:"library" tf:"optional"` + Libraries types.List `tfsdk:"library" tf:""` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.List `tfsdk:"new_cluster" tf:"object"` // The task runs a notebook when the `notebook_task` field is present. - NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.List `tfsdk:"notebook_task" tf:"object"` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // task run. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.List `tfsdk:"notification_settings" tf:"object"` // The task triggers a pipeline update when the `pipeline_task` field is // present. Only pipelines configured to use triggered more are supported. - PipelineTask types.List `tfsdk:"pipeline_task" tf:"optional,object"` + PipelineTask types.List `tfsdk:"pipeline_task" tf:"object"` // The task runs a Python wheel when the `python_wheel_task` field is // present. - PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"object"` // An optional value indicating the condition that determines whether the // task should be run once its dependencies have been completed. When // omitted, defaults to `ALL_SUCCESS`. See :method:jobs/create for a list of // possible values. - RunIf types.String `tfsdk:"run_if" tf:"optional"` + RunIf types.String `tfsdk:"run_if" tf:""` // The task triggers another job when the `run_job_task` field is present. - RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.List `tfsdk:"run_job_task" tf:"object"` // The task runs a JAR when the `spark_jar_task` field is present. - SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"object"` // The task runs a Python file when the `spark_python_task` field is // present. - SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"object"` // (Legacy) The task runs the spark-submit script when the // `spark_submit_task` field is present. This task can run only on new // clusters and is not compatible with serverless compute. @@ -13912,10 +14604,10 @@ type SubmitTask_SdkV2 struct { // // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 // paths. - SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"object"` // The task runs a SQL query or file, or it refreshes a SQL alert or a // legacy SQL dashboard when the `sql_task` field is present. - SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.List `tfsdk:"sql_task" tf:"object"` // A unique name for the task. This field is used to refer to this task from // other tasks. This field is required and must be unique within its parent // job. On Update or Reset, this field is used to reference the tasks to be @@ -13923,11 +14615,11 @@ type SubmitTask_SdkV2 struct { TaskKey types.String `tfsdk:"task_key" tf:""` // An optional timeout applied to each run of this job task. A value of `0` // means no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A collection of system notification IDs to notify when the run begins or // completes. The default behavior is to not send any system notifications. // Task webhooks respect the task notification settings. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"object"` } func (newState *SubmitTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitTask_SdkV2) { @@ -13936,6 +14628,30 @@ func (newState *SubmitTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *SubmitTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubmitTask_SdkV2) { } +func (c SubmitTask_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomsNotebookTask_SdkV2{}.ToSchema(cs, append(path, "clean_rooms_notebook_task")...) + ConditionTask_SdkV2{}.ToSchema(cs, append(path, "condition_task")...) + DbtTask_SdkV2{}.ToSchema(cs, append(path, "dbt_task")...) + TaskDependency_SdkV2{}.ToSchema(cs, append(path, "depends_on")...) + JobEmailNotifications_SdkV2{}.ToSchema(cs, append(path, "email_notifications")...) + ForEachTask_SdkV2{}.ToSchema(cs, append(path, "for_each_task")...) + JobsHealthRules_SdkV2{}.ToSchema(cs, append(path, "health")...) + compute_tf.ClusterSpec_SdkV2{}.ToSchema(cs, append(path, "new_cluster")...) + NotebookTask_SdkV2{}.ToSchema(cs, append(path, "notebook_task")...) + TaskNotificationSettings_SdkV2{}.ToSchema(cs, append(path, "notification_settings")...) + PipelineTask_SdkV2{}.ToSchema(cs, append(path, "pipeline_task")...) + PythonWheelTask_SdkV2{}.ToSchema(cs, append(path, "python_wheel_task")...) + RunJobTask_SdkV2{}.ToSchema(cs, append(path, "run_job_task")...) + SparkJarTask_SdkV2{}.ToSchema(cs, append(path, "spark_jar_task")...) + SparkPythonTask_SdkV2{}.ToSchema(cs, append(path, "spark_python_task")...) + SparkSubmitTask_SdkV2{}.ToSchema(cs, append(path, "spark_submit_task")...) + SqlTask_SdkV2{}.ToSchema(cs, append(path, "sql_task")...) + cs.SetRequired(append(path, "task_key")...) + WebhookNotifications_SdkV2{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubmitTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14569,19 +15285,19 @@ func (o *SubmitTask_SdkV2) SetWebhookNotifications(ctx context.Context, v Webhoo type TableUpdateTriggerConfiguration_SdkV2 struct { // The table(s) condition based on which to trigger a job run. - Condition types.String `tfsdk:"condition" tf:"optional"` + Condition types.String `tfsdk:"condition" tf:""` // If set, the trigger starts a run only after the specified amount of time // has passed since the last time the trigger fired. The minimum allowed // value is 60 seconds. - MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:"optional"` + MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:""` // A list of Delta tables to monitor for changes. The table name must be in // the format `catalog_name.schema_name.table_name`. - TableNames types.List `tfsdk:"table_names" tf:"optional"` + TableNames types.List `tfsdk:"table_names" tf:""` // If set, the trigger starts a run only after no table updates have // occurred for the specified time and can be used to wait for a series of // table updates before triggering a run. The minimum allowed value is 60 // seconds. - WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:"optional"` + WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:""` } func (newState *TableUpdateTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableUpdateTriggerConfiguration_SdkV2) { @@ -14590,6 +15306,11 @@ func (newState *TableUpdateTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuring func (newState *TableUpdateTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableUpdateTriggerConfiguration_SdkV2) { } +func (c TableUpdateTriggerConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableUpdateTriggerConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14662,76 +15383,76 @@ type Task_SdkV2 struct { // `clean_rooms_notebook_task` field is present. // // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html - CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` + CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries // or notifications. - ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.List `tfsdk:"condition_task" tf:"object"` // The task runs one or more dbt commands when the `dbt_task` field is // present. The dbt task requires both Databricks SQL and the ability to use // a serverless or a pro SQL warehouse. - DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.List `tfsdk:"dbt_task" tf:"object"` // An optional array of objects specifying the dependency graph of the task. // All tasks specified in this field must complete before executing this // task. The task will run only if the `run_if` condition is true. The key // is `task_key`, and the value is the name assigned to the dependent task. - DependsOn types.List `tfsdk:"depends_on" tf:"optional"` + DependsOn types.List `tfsdk:"depends_on" tf:""` // An optional description for this task. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // An option to disable auto optimization in serverless - DisableAutoOptimization types.Bool `tfsdk:"disable_auto_optimization" tf:"optional"` + DisableAutoOptimization types.Bool `tfsdk:"disable_auto_optimization" tf:""` // An optional set of email addresses that is notified when runs of this // task begin or complete as well as when this task is deleted. The default // behavior is to not send any emails. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.List `tfsdk:"email_notifications" tf:"object"` // The key that references an environment spec in a job. This field is // required for Python script, Python wheel and dbt tasks when using // serverless compute. - EnvironmentKey types.String `tfsdk:"environment_key" tf:"optional"` + EnvironmentKey types.String `tfsdk:"environment_key" tf:""` // If existing_cluster_id, the ID of an existing cluster that is used for // all runs. When running jobs or tasks on an existing cluster, you may need // to manually restart the cluster if it stops responding. We suggest // running jobs and tasks on new clusters for greater reliability - ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:""` // The task executes a nested task for every input provided when the // `for_each_task` field is present. - ForEachTask types.List `tfsdk:"for_each_task" tf:"optional,object"` + ForEachTask types.List `tfsdk:"for_each_task" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.List `tfsdk:"health" tf:"object"` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. - JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:""` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. - Libraries types.List `tfsdk:"library" tf:"optional"` + Libraries types.List `tfsdk:"library" tf:""` // An optional maximum number of times to retry an unsuccessful run. A run // is considered to be unsuccessful if it completes with the `FAILED` // result_state or `INTERNAL_ERROR` `life_cycle_state`. The value `-1` means // to retry indefinitely and the value `0` means to never retry. - MaxRetries types.Int64 `tfsdk:"max_retries" tf:"optional"` + MaxRetries types.Int64 `tfsdk:"max_retries" tf:""` // An optional minimal interval in milliseconds between the start of the // failed run and the subsequent retry run. The default behavior is that // unsuccessful runs are immediately retried. - MinRetryIntervalMillis types.Int64 `tfsdk:"min_retry_interval_millis" tf:"optional"` + MinRetryIntervalMillis types.Int64 `tfsdk:"min_retry_interval_millis" tf:""` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.List `tfsdk:"new_cluster" tf:"object"` // The task runs a notebook when the `notebook_task` field is present. - NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.List `tfsdk:"notebook_task" tf:"object"` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // task. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.List `tfsdk:"notification_settings" tf:"object"` // The task triggers a pipeline update when the `pipeline_task` field is // present. Only pipelines configured to use triggered more are supported. - PipelineTask types.List `tfsdk:"pipeline_task" tf:"optional,object"` + PipelineTask types.List `tfsdk:"pipeline_task" tf:"object"` // The task runs a Python wheel when the `python_wheel_task` field is // present. - PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"object"` // An optional policy to specify whether to retry a job when it times out. // The default behavior is to not retry on timeout. - RetryOnTimeout types.Bool `tfsdk:"retry_on_timeout" tf:"optional"` + RetryOnTimeout types.Bool `tfsdk:"retry_on_timeout" tf:""` // An optional value specifying the condition determining whether the task // is run once its dependencies have been completed. // @@ -14741,14 +15462,14 @@ type Task_SdkV2 struct { // executed * `ALL_DONE`: All dependencies have been completed * // `AT_LEAST_ONE_FAILED`: At least one dependency failed * `ALL_FAILED`: ALl // dependencies have failed - RunIf types.String `tfsdk:"run_if" tf:"optional"` + RunIf types.String `tfsdk:"run_if" tf:""` // The task triggers another job when the `run_job_task` field is present. - RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.List `tfsdk:"run_job_task" tf:"object"` // The task runs a JAR when the `spark_jar_task` field is present. - SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"object"` // The task runs a Python file when the `spark_python_task` field is // present. - SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"object"` // (Legacy) The task runs the spark-submit script when the // `spark_submit_task` field is present. This task can run only on new // clusters and is not compatible with serverless compute. @@ -14767,10 +15488,10 @@ type Task_SdkV2 struct { // // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 // paths. - SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"object"` // The task runs a SQL query or file, or it refreshes a SQL alert or a // legacy SQL dashboard when the `sql_task` field is present. - SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.List `tfsdk:"sql_task" tf:"object"` // A unique name for the task. This field is used to refer to this task from // other tasks. This field is required and must be unique within its parent // job. On Update or Reset, this field is used to reference the tasks to be @@ -14778,11 +15499,11 @@ type Task_SdkV2 struct { TaskKey types.String `tfsdk:"task_key" tf:""` // An optional timeout applied to each run of this job task. A value of `0` // means no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A collection of system notification IDs to notify when runs of this task // begin or complete. The default behavior is to not send any system // notifications. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"object"` } func (newState *Task_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Task_SdkV2) { @@ -14791,6 +15512,30 @@ func (newState *Task_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Task_Sd func (newState *Task_SdkV2) SyncEffectiveFieldsDuringRead(existingState Task_SdkV2) { } +func (c Task_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomsNotebookTask_SdkV2{}.ToSchema(cs, append(path, "clean_rooms_notebook_task")...) + ConditionTask_SdkV2{}.ToSchema(cs, append(path, "condition_task")...) + DbtTask_SdkV2{}.ToSchema(cs, append(path, "dbt_task")...) + TaskDependency_SdkV2{}.ToSchema(cs, append(path, "depends_on")...) + TaskEmailNotifications_SdkV2{}.ToSchema(cs, append(path, "email_notifications")...) + ForEachTask_SdkV2{}.ToSchema(cs, append(path, "for_each_task")...) + JobsHealthRules_SdkV2{}.ToSchema(cs, append(path, "health")...) + compute_tf.ClusterSpec_SdkV2{}.ToSchema(cs, append(path, "new_cluster")...) + NotebookTask_SdkV2{}.ToSchema(cs, append(path, "notebook_task")...) + TaskNotificationSettings_SdkV2{}.ToSchema(cs, append(path, "notification_settings")...) + PipelineTask_SdkV2{}.ToSchema(cs, append(path, "pipeline_task")...) + PythonWheelTask_SdkV2{}.ToSchema(cs, append(path, "python_wheel_task")...) + RunJobTask_SdkV2{}.ToSchema(cs, append(path, "run_job_task")...) + SparkJarTask_SdkV2{}.ToSchema(cs, append(path, "spark_jar_task")...) + SparkPythonTask_SdkV2{}.ToSchema(cs, append(path, "spark_python_task")...) + SparkSubmitTask_SdkV2{}.ToSchema(cs, append(path, "spark_submit_task")...) + SqlTask_SdkV2{}.ToSchema(cs, append(path, "sql_task")...) + cs.SetRequired(append(path, "task_key")...) + WebhookNotifications_SdkV2{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Task. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15435,7 +16180,7 @@ func (o *Task_SdkV2) SetWebhookNotifications(ctx context.Context, v WebhookNotif type TaskDependency_SdkV2 struct { // Can only be specified on condition task dependencies. The outcome of the // dependent task that must be met for this task to run. - Outcome types.String `tfsdk:"outcome" tf:"optional"` + Outcome types.String `tfsdk:"outcome" tf:""` // The name of the task this task depends on. TaskKey types.String `tfsdk:"task_key" tf:""` } @@ -15446,6 +16191,12 @@ func (newState *TaskDependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *TaskDependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState TaskDependency_SdkV2) { } +func (c TaskDependency_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "task_key")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TaskDependency. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15483,22 +16234,22 @@ type TaskEmailNotifications_SdkV2 struct { // If true, do not send email to recipients specified in `on_failure` if the // run is skipped. This field is `deprecated`. Please use the // `notification_settings.no_alert_for_skipped_runs` field. - NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:""` // A list of email addresses to be notified when the duration of a run // exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in // the `health` field. If no rule for the `RUN_DURATION_SECONDS` metric is // specified in the `health` field for the job, notifications are not sent. - OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:"optional"` + OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:""` // A list of email addresses to be notified when a run unsuccessfully // completes. A run is considered to have completed unsuccessfully if it // ends with an `INTERNAL_ERROR` `life_cycle_state` or a `FAILED`, or // `TIMED_OUT` result_state. If this is not specified on job creation, // reset, or update the list is empty, and notifications are not sent. - OnFailure types.List `tfsdk:"on_failure" tf:"optional"` + OnFailure types.List `tfsdk:"on_failure" tf:""` // A list of email addresses to be notified when a run begins. If not // specified on job creation, reset, or update, the list is empty, and // notifications are not sent. - OnStart types.List `tfsdk:"on_start" tf:"optional"` + OnStart types.List `tfsdk:"on_start" tf:""` // A list of email addresses to notify when any streaming backlog thresholds // are exceeded for any stream. Streaming backlog thresholds can be set in // the `health` field using the following metrics: @@ -15506,13 +16257,13 @@ type TaskEmailNotifications_SdkV2 struct { // `STREAMING_BACKLOG_SECONDS`, or `STREAMING_BACKLOG_FILES`. Alerting is // based on the 10-minute average of these metrics. If the issue persists, // notifications are resent every 30 minutes. - OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:"optional"` + OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:""` // A list of email addresses to be notified when a run successfully // completes. A run is considered to have completed successfully if it ends // with a `TERMINATED` `life_cycle_state` and a `SUCCESS` result_state. If // not specified on job creation, reset, or update, the list is empty, and // notifications are not sent. - OnSuccess types.List `tfsdk:"on_success" tf:"optional"` + OnSuccess types.List `tfsdk:"on_success" tf:""` } func (newState *TaskEmailNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TaskEmailNotifications_SdkV2) { @@ -15521,6 +16272,11 @@ func (newState *TaskEmailNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *TaskEmailNotifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState TaskEmailNotifications_SdkV2) { } +func (c TaskEmailNotifications_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TaskEmailNotifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15712,13 +16468,13 @@ type TaskNotificationSettings_SdkV2 struct { // If true, do not send notifications to recipients specified in `on_start` // for the retried runs and do not send notifications to recipients // specified in `on_failure` until the last retry of the run. - AlertOnLastAttempt types.Bool `tfsdk:"alert_on_last_attempt" tf:"optional"` + AlertOnLastAttempt types.Bool `tfsdk:"alert_on_last_attempt" tf:""` // If true, do not send notifications to recipients specified in // `on_failure` if the run is canceled. - NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:"optional"` + NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:""` // If true, do not send notifications to recipients specified in // `on_failure` if the run is skipped. - NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:""` } func (newState *TaskNotificationSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TaskNotificationSettings_SdkV2) { @@ -15727,6 +16483,11 @@ func (newState *TaskNotificationSettings_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *TaskNotificationSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState TaskNotificationSettings_SdkV2) { } +func (c TaskNotificationSettings_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TaskNotificationSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15808,10 +16569,10 @@ type TerminationDetails_SdkV2 struct { // The run was skipped due to reaching the job level queue size limit. // // [Link]: https://kb.databricks.com/en_US/notebooks/too-many-execution-contexts-are-open-right-now - Code types.String `tfsdk:"code" tf:"optional"` + Code types.String `tfsdk:"code" tf:""` // A descriptive message with the termination details. This field is // unstructured and the format might change. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // * `SUCCESS`: The run terminated without any issues * `INTERNAL_ERROR`: An // error occurred in the Databricks platform. Please look at the [status // page] or contact support if the issue persists. * `CLIENT_ERROR`: The run @@ -15820,7 +16581,7 @@ type TerminationDetails_SdkV2 struct { // issue with your cloud provider. // // [status page]: https://status.databricks.com/ - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *TerminationDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TerminationDetails_SdkV2) { @@ -15829,6 +16590,11 @@ func (newState *TerminationDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *TerminationDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState TerminationDetails_SdkV2) { } +func (c TerminationDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TerminationDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15867,7 +16633,7 @@ func (o TerminationDetails_SdkV2) Type(ctx context.Context) attr.Type { // Additional details about what triggered the run type TriggerInfo_SdkV2 struct { // The run id of the Run Job task run - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` } func (newState *TriggerInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggerInfo_SdkV2) { @@ -15876,6 +16642,11 @@ func (newState *TriggerInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *TriggerInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState TriggerInfo_SdkV2) { } +func (c TriggerInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TriggerInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15909,15 +16680,15 @@ func (o TriggerInfo_SdkV2) Type(ctx context.Context) attr.Type { type TriggerSettings_SdkV2 struct { // File arrival trigger settings. - FileArrival types.List `tfsdk:"file_arrival" tf:"optional,object"` + FileArrival types.List `tfsdk:"file_arrival" tf:"object"` // Whether this trigger is paused or not. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` // Periodic trigger settings. - Periodic types.List `tfsdk:"periodic" tf:"optional,object"` + Periodic types.List `tfsdk:"periodic" tf:"object"` // Old table trigger settings name. Deprecated in favor of `table_update`. - Table types.List `tfsdk:"table" tf:"optional,object"` + Table types.List `tfsdk:"table" tf:"object"` - TableUpdate types.List `tfsdk:"table_update" tf:"optional,object"` + TableUpdate types.List `tfsdk:"table_update" tf:"object"` } func (newState *TriggerSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggerSettings_SdkV2) { @@ -15926,6 +16697,15 @@ func (newState *TriggerSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *TriggerSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState TriggerSettings_SdkV2) { } +func (c TriggerSettings_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileArrivalTriggerConfiguration_SdkV2{}.ToSchema(cs, append(path, "file_arrival")...) + PeriodicTriggerConfiguration_SdkV2{}.ToSchema(cs, append(path, "periodic")...) + TableUpdateTriggerConfiguration_SdkV2{}.ToSchema(cs, append(path, "table")...) + TableUpdateTriggerConfiguration_SdkV2{}.ToSchema(cs, append(path, "table_update")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TriggerSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16086,7 +16866,7 @@ type UpdateJob_SdkV2 struct { // Remove top-level fields in the job settings. Removing nested fields is // not supported, except for tasks and job clusters (`tasks/task_1`). This // field is optional. - FieldsToRemove types.List `tfsdk:"fields_to_remove" tf:"optional"` + FieldsToRemove types.List `tfsdk:"fields_to_remove" tf:""` // The canonical identifier of the job to update. This field is required. JobId types.Int64 `tfsdk:"job_id" tf:""` // The new settings for the job. @@ -16100,7 +16880,7 @@ type UpdateJob_SdkV2 struct { // // Changes to the field `JobSettings.timeout_seconds` are applied to active // runs. Changes to other fields are applied to future runs only. - NewSettings types.List `tfsdk:"new_settings" tf:"optional,object"` + NewSettings types.List `tfsdk:"new_settings" tf:"object"` } func (newState *UpdateJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateJob_SdkV2) { @@ -16109,6 +16889,13 @@ func (newState *UpdateJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Up func (newState *UpdateJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateJob_SdkV2) { } +func (c UpdateJob_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + JobSettings_SdkV2{}.ToSchema(cs, append(path, "new_settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16206,12 +16993,6 @@ func (o *UpdateJob_SdkV2) SetNewSettings(ctx context.Context, v JobSettings_SdkV type UpdateResponse_SdkV2 struct { } -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { -} - -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16241,13 +17022,13 @@ func (o UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { type ViewItem_SdkV2 struct { // Content of the view. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // Name of the view item. In the case of code view, it would be the // notebook’s name. In the case of dashboard view, it would be the // dashboard’s name. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Type of the view item. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *ViewItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ViewItem_SdkV2) { @@ -16256,6 +17037,11 @@ func (newState *ViewItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Vie func (newState *ViewItem_SdkV2) SyncEffectiveFieldsDuringRead(existingState ViewItem_SdkV2) { } +func (c ViewItem_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ViewItem. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16301,6 +17087,12 @@ func (newState *Webhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Webh func (newState *Webhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState Webhook_SdkV2) { } +func (c Webhook_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Webhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16337,13 +17129,13 @@ type WebhookNotifications_SdkV2 struct { // a run exceeds the threshold specified for the `RUN_DURATION_SECONDS` // metric in the `health` field. A maximum of 3 destinations can be // specified for the `on_duration_warning_threshold_exceeded` property. - OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:"optional"` + OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:""` // An optional list of system notification IDs to call when the run fails. A // maximum of 3 destinations can be specified for the `on_failure` property. - OnFailure types.List `tfsdk:"on_failure" tf:"optional"` + OnFailure types.List `tfsdk:"on_failure" tf:""` // An optional list of system notification IDs to call when the run starts. // A maximum of 3 destinations can be specified for the `on_start` property. - OnStart types.List `tfsdk:"on_start" tf:"optional"` + OnStart types.List `tfsdk:"on_start" tf:""` // An optional list of system notification IDs to call when any streaming // backlog thresholds are exceeded for any stream. Streaming backlog // thresholds can be set in the `health` field using the following metrics: @@ -16352,11 +17144,11 @@ type WebhookNotifications_SdkV2 struct { // based on the 10-minute average of these metrics. If the issue persists, // notifications are resent every 30 minutes. A maximum of 3 destinations // can be specified for the `on_streaming_backlog_exceeded` property. - OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:"optional"` + OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:""` // An optional list of system notification IDs to call when the run // completes successfully. A maximum of 3 destinations can be specified for // the `on_success` property. - OnSuccess types.List `tfsdk:"on_success" tf:"optional"` + OnSuccess types.List `tfsdk:"on_success" tf:""` } func (newState *WebhookNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WebhookNotifications_SdkV2) { @@ -16365,6 +17157,16 @@ func (newState *WebhookNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *WebhookNotifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState WebhookNotifications_SdkV2) { } +func (c WebhookNotifications_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Webhook_SdkV2{}.ToSchema(cs, append(path, "on_duration_warning_threshold_exceeded")...) + Webhook_SdkV2{}.ToSchema(cs, append(path, "on_failure")...) + Webhook_SdkV2{}.ToSchema(cs, append(path, "on_start")...) + Webhook_SdkV2{}.ToSchema(cs, append(path, "on_streaming_backlog_exceeded")...) + Webhook_SdkV2{}.ToSchema(cs, append(path, "on_success")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WebhookNotifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/jobs_tf/model.go b/internal/service/jobs_tf/model.go index 954b2faec..e979ab0da 100755 --- a/internal/service/jobs_tf/model.go +++ b/internal/service/jobs_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/compute_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -25,22 +26,27 @@ import ( type BaseJob struct { // The time at which this job was created in epoch milliseconds // (milliseconds since 1/1/1970 UTC). - CreatedTime types.Int64 `tfsdk:"created_time" tf:"optional"` + CreatedTime types.Int64 `tfsdk:"created_time" tf:""` // The creator user name. This field won’t be included in the response if // the user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // The id of the budget policy used by this job for cost attribution // purposes. This may be set through (in order of precedence): 1. Budget // admins through the account or workspace console 2. Jobs UI in the job // details page and Jobs API using `budget_policy_id` 3. Inferred default // based on accessible budget policies of the run_as identity on job // creation or modification. - EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:"computed"` + EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:""` + // Indicates if the job has more sub-resources (`tasks`, `job_clusters`) + // that are not shown. They can be accessed via :method:jobs/get endpoint. + // It is only relevant for API 2.2 :method:jobs/list requests with + // `expand_tasks=true`. + HasMore types.Bool `tfsdk:"has_more" tf:""` // The canonical identifier for this job. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` // Settings for this job and all of its runs. These settings can be updated // using the `resetJob` method. - Settings types.Object `tfsdk:"settings" tf:"optional,object"` + Settings types.Object `tfsdk:"settings" tf:"object"` } func (newState *BaseJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseJob) { @@ -49,6 +55,13 @@ func (newState *BaseJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseJob) { func (newState *BaseJob) SyncEffectiveFieldsDuringRead(existingState BaseJob) { } +func (c BaseJob) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "effective_budget_policy_id")...) + JobSettings{}.ToSchema(cs, append(path, "settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BaseJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -72,6 +85,7 @@ func (o BaseJob) ToObjectValue(ctx context.Context) basetypes.ObjectValue { "created_time": o.CreatedTime, "creator_user_name": o.CreatorUserName, "effective_budget_policy_id": o.EffectiveBudgetPolicyId, + "has_more": o.HasMore, "job_id": o.JobId, "settings": o.Settings, }) @@ -84,6 +98,7 @@ func (o BaseJob) Type(ctx context.Context) attr.Type { "created_time": types.Int64Type, "creator_user_name": types.StringType, "effective_budget_policy_id": types.StringType, + "has_more": types.BoolType, "job_id": types.Int64Type, "settings": JobSettings{}.Type(ctx), }, @@ -126,28 +141,28 @@ type BaseRun struct { // original attempt’s ID and an incrementing `attempt_number`. Runs are // retried only until they succeed, and the maximum `attempt_number` is the // same as the `max_retries` value for the job. - AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:""` // The time in milliseconds it took to terminate the cluster and clean up // any associated artifacts. The duration of a task run is the sum of the // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The // `cleanup_duration` field is set to 0 for multitask job runs. The total // duration of a multitask job run is the value of the `run_duration` field. - CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:"optional"` + CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:""` // The cluster used for this run. If the run is specified to use a new // cluster, this field is set once the Jobs service has requested a cluster // for the run. - ClusterInstance types.Object `tfsdk:"cluster_instance" tf:"optional,object"` + ClusterInstance types.Object `tfsdk:"cluster_instance" tf:"object"` // A snapshot of the job’s cluster specification when this run was // created. - ClusterSpec types.Object `tfsdk:"cluster_spec" tf:"optional,object"` + ClusterSpec types.Object `tfsdk:"cluster_spec" tf:"object"` // The creator user name. This field won’t be included in the response if // the user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Description of the run - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The time at which this run ended in epoch milliseconds (milliseconds // since 1/1/1970 UTC). This field is set to 0 if the job is still running. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The time in milliseconds it took to execute the commands in the JAR or // notebook until they completed, failed, timed out, were cancelled, or // encountered an unexpected error. The duration of a task run is the sum of @@ -155,7 +170,7 @@ type BaseRun struct { // The `execution_duration` field is set to 0 for multitask job runs. The // total duration of a multitask job run is the value of the `run_duration` // field. - ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:"optional"` + ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -166,53 +181,60 @@ type BaseRun struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"object"` + // Indicates if the run has more sub-resources (`tasks`, `job_clusters`) + // that are not shown. They can be accessed via :method:jobs/getrun + // endpoint. It is only relevant for API 2.2 :method:jobs/listruns requests + // with `expand_tasks=true`. + HasMore types.Bool `tfsdk:"has_more" tf:""` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. - // You must declare dependent libraries in task settings. - JobClusters types.List `tfsdk:"job_clusters" tf:"optional"` + // You must declare dependent libraries in task settings. If more than 100 + // job clusters are available, you can paginate through them using + // :method:jobs/getrun. + JobClusters types.List `tfsdk:"job_clusters" tf:""` // The canonical identifier of the job that contains this run. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` // Job-level parameters used in the run - JobParameters types.List `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.List `tfsdk:"job_parameters" tf:""` // ID of the job run that this run belongs to. For legacy and single-task // job runs the field is populated with the job run ID. For task runs, the // field is populated with the ID of the job run that the task run belongs // to. - JobRunId types.Int64 `tfsdk:"job_run_id" tf:"optional"` + JobRunId types.Int64 `tfsdk:"job_run_id" tf:""` // A unique identifier for this job run. This is set to the same value as // `run_id`. - NumberInJob types.Int64 `tfsdk:"number_in_job" tf:"optional"` + NumberInJob types.Int64 `tfsdk:"number_in_job" tf:""` // If this run is a retry of a prior run attempt, this field contains the // run_id of the original attempt; otherwise, it is the same as the run_id. - OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:"optional"` + OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:""` // The parameters used for this run. - OverridingParameters types.Object `tfsdk:"overriding_parameters" tf:"optional,object"` + OverridingParameters types.Object `tfsdk:"overriding_parameters" tf:"object"` // The time in milliseconds that the run has spent in the queue. - QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` + QueueDuration types.Int64 `tfsdk:"queue_duration" tf:""` // The repair history of the run. - RepairHistory types.List `tfsdk:"repair_history" tf:"optional"` + RepairHistory types.List `tfsdk:"repair_history" tf:""` // The time in milliseconds it took the job run and all of its repairs to // finish. - RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + RunDuration types.Int64 `tfsdk:"run_duration" tf:""` // The canonical identifier of the run. This ID is unique across all runs of // all jobs. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` // An optional name for the run. The maximum length is 4096 bytes in UTF-8 // encoding. - RunName types.String `tfsdk:"run_name" tf:"optional"` + RunName types.String `tfsdk:"run_name" tf:""` // The URL to the detail page of the run. - RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` + RunPageUrl types.String `tfsdk:"run_page_url" tf:""` // The type of a run. * `JOB_RUN`: Normal job run. A run created with // :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow run. A run created with // [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with // :method:jobs/submit. // // [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow - RunType types.String `tfsdk:"run_type" tf:"optional"` + RunType types.String `tfsdk:"run_type" tf:""` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. - Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"object"` // The time in milliseconds it took to set up the cluster. For runs that run // on new clusters this is the cluster creation time, for runs that run on // existing clusters this time should be very short. The duration of a task @@ -220,19 +242,22 @@ type BaseRun struct { // `cleanup_duration`. The `setup_duration` field is set to 0 for multitask // job runs. The total duration of a multitask job run is the value of the // `run_duration` field. - SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` + SetupDuration types.Int64 `tfsdk:"setup_duration" tf:""` // The time at which this run was started in epoch milliseconds // (milliseconds since 1/1/1970 UTC). This may not be the time when the job // task starts executing, for example, if the job is scheduled to run on a // new cluster, this is the time the cluster creation call is issued. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Deprecated. Please use the `status` field instead. - State types.Object `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"object"` // The current status of the run - Status types.Object `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"object"` // The list of tasks performed by the run. Each task has its own `run_id` - // which you can use to call `JobsGetOutput` to retrieve the run resutls. - Tasks types.List `tfsdk:"tasks" tf:"optional"` + // which you can use to call `JobsGetOutput` to retrieve the run resutls. If + // more than 100 tasks are available, you can paginate through them using + // :method:jobs/getrun. Use the `next_page_token` field at the object root + // to determine if more results are available. + Tasks types.List `tfsdk:"tasks" tf:""` // The type of trigger that fired this run. // // * `PERIODIC`: Schedules that periodically trigger runs, such as a cron @@ -245,9 +270,9 @@ type BaseRun struct { // arrival. * `TABLE`: Indicates a run that is triggered by a table update. // * `CONTINUOUS_RESTART`: Indicates a run created by user to manually // restart a continuous job run. - Trigger types.String `tfsdk:"trigger" tf:"optional"` + Trigger types.String `tfsdk:"trigger" tf:""` // Additional details about what triggered the run - TriggerInfo types.Object `tfsdk:"trigger_info" tf:"optional,object"` + TriggerInfo types.Object `tfsdk:"trigger_info" tf:"object"` } func (newState *BaseRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseRun) { @@ -256,6 +281,23 @@ func (newState *BaseRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseRun) { func (newState *BaseRun) SyncEffectiveFieldsDuringRead(existingState BaseRun) { } +func (c BaseRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterInstance{}.ToSchema(cs, append(path, "cluster_instance")...) + ClusterSpec{}.ToSchema(cs, append(path, "cluster_spec")...) + GitSource{}.ToSchema(cs, append(path, "git_source")...) + JobCluster{}.ToSchema(cs, append(path, "job_clusters")...) + JobParameter{}.ToSchema(cs, append(path, "job_parameters")...) + RunParameters{}.ToSchema(cs, append(path, "overriding_parameters")...) + RepairHistoryItem{}.ToSchema(cs, append(path, "repair_history")...) + CronSchedule{}.ToSchema(cs, append(path, "schedule")...) + RunState{}.ToSchema(cs, append(path, "state")...) + RunStatus{}.ToSchema(cs, append(path, "status")...) + RunTask{}.ToSchema(cs, append(path, "tasks")...) + TriggerInfo{}.ToSchema(cs, append(path, "trigger_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BaseRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -296,6 +338,7 @@ func (o BaseRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { "end_time": o.EndTime, "execution_duration": o.ExecutionDuration, "git_source": o.GitSource, + "has_more": o.HasMore, "job_clusters": o.JobClusters, "job_id": o.JobId, "job_parameters": o.JobParameters, @@ -334,6 +377,7 @@ func (o BaseRun) Type(ctx context.Context) attr.Type { "end_time": types.Int64Type, "execution_duration": types.Int64Type, "git_source": GitSource{}.Type(ctx), + "has_more": types.BoolType, "job_clusters": basetypes.ListType{ ElemType: JobCluster{}.Type(ctx), }, @@ -699,9 +743,9 @@ func (o *BaseRun) SetTriggerInfo(ctx context.Context, v TriggerInfo) { type CancelAllRuns struct { // Optional boolean parameter to cancel all queued runs. If no job_id is // provided, all queued runs in the workspace are canceled. - AllQueuedRuns types.Bool `tfsdk:"all_queued_runs" tf:"optional"` + AllQueuedRuns types.Bool `tfsdk:"all_queued_runs" tf:""` // The canonical identifier of the job to cancel all runs of. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` } func (newState *CancelAllRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelAllRuns) { @@ -710,6 +754,11 @@ func (newState *CancelAllRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan Canc func (newState *CancelAllRuns) SyncEffectiveFieldsDuringRead(existingState CancelAllRuns) { } +func (c CancelAllRuns) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelAllRuns. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -746,12 +795,6 @@ func (o CancelAllRuns) Type(ctx context.Context) attr.Type { type CancelAllRunsResponse struct { } -func (newState *CancelAllRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelAllRunsResponse) { -} - -func (newState *CancelAllRunsResponse) SyncEffectiveFieldsDuringRead(existingState CancelAllRunsResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelAllRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -790,6 +833,12 @@ func (newState *CancelRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRu func (newState *CancelRun) SyncEffectiveFieldsDuringRead(existingState CancelRun) { } +func (c CancelRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -824,12 +873,6 @@ func (o CancelRun) Type(ctx context.Context) attr.Type { type CancelRunResponse struct { } -func (newState *CancelRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRunResponse) { -} - -func (newState *CancelRunResponse) SyncEffectiveFieldsDuringRead(existingState CancelRunResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -861,10 +904,10 @@ func (o CancelRunResponse) Type(ctx context.Context) attr.Type { type CleanRoomTaskRunState struct { // A value indicating the run's current lifecycle state. This field is // always available in the response. - LifeCycleState types.String `tfsdk:"life_cycle_state" tf:"optional"` + LifeCycleState types.String `tfsdk:"life_cycle_state" tf:""` // A value indicating the run's result. This field is only available for // terminal lifecycle states. - ResultState types.String `tfsdk:"result_state" tf:"optional"` + ResultState types.String `tfsdk:"result_state" tf:""` } func (newState *CleanRoomTaskRunState) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomTaskRunState) { @@ -873,6 +916,11 @@ func (newState *CleanRoomTaskRunState) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CleanRoomTaskRunState) SyncEffectiveFieldsDuringRead(existingState CleanRoomTaskRunState) { } +func (c CleanRoomTaskRunState) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomTaskRunState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -912,9 +960,9 @@ type CleanRoomsNotebookTask struct { // Checksum to validate the freshness of the notebook resource (i.e. the // notebook being run is the latest version). It can be fetched by calling // the :method:cleanroomassets/get API. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Base parameters to be used for the clean room notebook job. - NotebookBaseParameters types.Map `tfsdk:"notebook_base_parameters" tf:"optional"` + NotebookBaseParameters types.Map `tfsdk:"notebook_base_parameters" tf:""` // Name of the notebook being run. NotebookName types.String `tfsdk:"notebook_name" tf:""` } @@ -925,6 +973,13 @@ func (newState *CleanRoomsNotebookTask) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CleanRoomsNotebookTask) SyncEffectiveFieldsDuringRead(existingState CleanRoomsNotebookTask) { } +func (c CleanRoomsNotebookTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "clean_room_name")...) + cs.SetRequired(append(path, "notebook_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomsNotebookTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1001,7 +1056,7 @@ type ClusterInstance struct { // // The response won’t include this field if the identifier is not // available yet. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The canonical identifier for the Spark context used by a run. This field // is filled in once the run begins execution. This value can be used to // view the Spark UI by browsing to @@ -1010,7 +1065,7 @@ type ClusterInstance struct { // // The response won’t include this field if the identifier is not // available yet. - SparkContextId types.String `tfsdk:"spark_context_id" tf:"optional"` + SparkContextId types.String `tfsdk:"spark_context_id" tf:""` } func (newState *ClusterInstance) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterInstance) { @@ -1019,6 +1074,11 @@ func (newState *ClusterInstance) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cl func (newState *ClusterInstance) SyncEffectiveFieldsDuringRead(existingState ClusterInstance) { } +func (c ClusterInstance) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterInstance. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1057,16 +1117,16 @@ type ClusterSpec struct { // all runs. When running jobs or tasks on an existing cluster, you may need // to manually restart the cluster if it stops responding. We suggest // running jobs and tasks on new clusters for greater reliability - ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:""` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. - JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:""` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. - Libraries types.List `tfsdk:"library" tf:"optional"` + Libraries types.List `tfsdk:"library" tf:""` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.Object `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.Object `tfsdk:"new_cluster" tf:"object"` } func (newState *ClusterSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSpec) { @@ -1075,6 +1135,12 @@ func (newState *ClusterSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cluste func (newState *ClusterSpec) SyncEffectiveFieldsDuringRead(existingState ClusterSpec) { } +func (c ClusterSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + compute_tf.ClusterSpec{}.ToSchema(cs, append(path, "new_cluster")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1197,6 +1263,14 @@ func (newState *ConditionTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cond func (newState *ConditionTask) SyncEffectiveFieldsDuringRead(existingState ConditionTask) { } +func (c ConditionTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "left")...) + cs.SetRequired(append(path, "op")...) + cs.SetRequired(append(path, "right")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ConditionTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1235,7 +1309,7 @@ func (o ConditionTask) Type(ctx context.Context) attr.Type { type Continuous struct { // Indicate whether the continuous execution of the job is paused or not. // Defaults to UNPAUSED. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` } func (newState *Continuous) SyncEffectiveFieldsDuringCreateOrUpdate(plan Continuous) { @@ -1244,6 +1318,11 @@ func (newState *Continuous) SyncEffectiveFieldsDuringCreateOrUpdate(plan Continu func (newState *Continuous) SyncEffectiveFieldsDuringRead(existingState Continuous) { } +func (c Continuous) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Continuous. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1277,40 +1356,40 @@ func (o Continuous) Type(ctx context.Context) attr.Type { type CreateJob struct { // List of permissions to set on the job. - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The id of the user specified budget policy to use for this job. If not // specified, a default budget policy may be applied when creating or // modifying the job. See `effective_budget_policy_id` for the budget policy // used by this workload. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // An optional continuous property for this job. The continuous property // will ensure that there is always one run executing. Only one of // `schedule` and `continuous` can be used. - Continuous types.Object `tfsdk:"continuous" tf:"optional,object"` + Continuous types.Object `tfsdk:"continuous" tf:"object"` // Deployment information for jobs managed by external sources. - Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"object"` // An optional description for the job. The maximum length is 27700 // characters in UTF-8 encoding. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Edit mode of the job. // // * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * // `EDITABLE`: The job is in an editable state and can be modified. - EditMode types.String `tfsdk:"edit_mode" tf:"optional"` + EditMode types.String `tfsdk:"edit_mode" tf:""` // An optional set of email addresses that is notified when runs of this job // begin or complete as well as when this job is deleted. - EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"object"` // A list of task execution environment specifications that can be // referenced by serverless tasks of this job. An environment is required to // be present for serverless tasks. For serverless notebook tasks, the // environment is accessible in the notebook environment panel. For other // serverless tasks, the task environment is required to be specified using // environment_key in the task settings. - Environments types.List `tfsdk:"environment" tf:"optional"` + Environments types.List `tfsdk:"environment" tf:""` // Used to tell what is the format of the job. This field is ignored in // Create/Update/Reset calls. When using the Jobs API 2.1 this value is // always set to `"MULTI_TASK"`. - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -1321,13 +1400,15 @@ type CreateJob struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.Object `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"object"` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. - // You must declare dependent libraries in task settings. - JobClusters types.List `tfsdk:"job_cluster" tf:"optional"` + // You must declare dependent libraries in task settings. If more than 100 + // job clusters are available, you can paginate through them using + // :method:jobs/get. + JobClusters types.List `tfsdk:"job_cluster" tf:""` // An optional maximum allowed number of concurrent runs of the job. Set // this value if you want to be able to execute multiple runs of the same // job concurrently. This is useful for example if you trigger your job on a @@ -1339,45 +1420,48 @@ type CreateJob struct { // runs. However, from then on, new runs are skipped unless there are fewer // than 3 active runs. This value cannot exceed 1000. Setting this value to // `0` causes all new runs to be skipped. - MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:"optional"` + MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:""` // An optional name for the job. The maximum length is 4096 bytes in UTF-8 // encoding. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // job. - NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"object"` // Job-level parameter definitions - Parameters types.List `tfsdk:"parameter" tf:"optional"` + Parameters types.List `tfsdk:"parameter" tf:""` // The queue settings of the job. - Queue types.Object `tfsdk:"queue" tf:"optional,object"` + Queue types.Object `tfsdk:"queue" tf:"object"` // Write-only setting. Specifies the user or service principal that the job // runs as. If not specified, the job runs as the user who created the job. // // Either `user_name` or `service_principal_name` should be specified. If // not, an error is thrown. - RunAs types.Object `tfsdk:"run_as" tf:"optional,object"` + RunAs types.Object `tfsdk:"run_as" tf:"object"` // An optional periodic schedule for this job. The default behavior is that // the job only runs when triggered by clicking “Run Now” in the Jobs UI // or sending an API request to `runNow`. - Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"object"` // A map of tags associated with the job. These are forwarded to the cluster // as cluster tags for jobs clusters, and are subject to the same // limitations as cluster tags. A maximum of 25 tags can be added to the // job. - Tags types.Map `tfsdk:"tags" tf:"optional"` - // A list of task specifications to be executed by this job. - Tasks types.List `tfsdk:"task" tf:"optional"` + Tags types.Map `tfsdk:"tags" tf:""` + // A list of task specifications to be executed by this job. If more than + // 100 tasks are available, you can paginate through them using + // :method:jobs/get. Use the `next_page_token` field at the object root to + // determine if more results are available. + Tasks types.List `tfsdk:"task" tf:""` // An optional timeout applied to each run of this job. A value of `0` means // no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A configuration to trigger a run when certain conditions are met. The // default behavior is that the job runs only when triggered by clicking // “Run Now” in the Jobs UI or sending an API request to `runNow`. - Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"object"` // A collection of system notification IDs to notify when runs of this job // begin or complete. - WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"object"` } func (newState *CreateJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateJob) { @@ -1386,6 +1470,27 @@ func (newState *CreateJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateJo func (newState *CreateJob) SyncEffectiveFieldsDuringRead(existingState CreateJob) { } +func (c CreateJob) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + Continuous{}.ToSchema(cs, append(path, "continuous")...) + JobDeployment{}.ToSchema(cs, append(path, "deployment")...) + JobEmailNotifications{}.ToSchema(cs, append(path, "email_notifications")...) + JobEnvironment{}.ToSchema(cs, append(path, "environment")...) + GitSource{}.ToSchema(cs, append(path, "git_source")...) + JobsHealthRules{}.ToSchema(cs, append(path, "health")...) + JobCluster{}.ToSchema(cs, append(path, "job_cluster")...) + JobNotificationSettings{}.ToSchema(cs, append(path, "notification_settings")...) + JobParameterDefinition{}.ToSchema(cs, append(path, "parameter")...) + QueueSettings{}.ToSchema(cs, append(path, "queue")...) + JobRunAs{}.ToSchema(cs, append(path, "run_as")...) + CronSchedule{}.ToSchema(cs, append(path, "schedule")...) + Task{}.ToSchema(cs, append(path, "task")...) + TriggerSettings{}.ToSchema(cs, append(path, "trigger")...) + WebhookNotifications{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1960,7 +2065,7 @@ func (o *CreateJob) SetWebhookNotifications(ctx context.Context, v WebhookNotifi // Job was created successfully type CreateResponse struct { // The canonical identifier for the newly created job. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` } func (newState *CreateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse) { @@ -1969,6 +2074,11 @@ func (newState *CreateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cre func (newState *CreateResponse) SyncEffectiveFieldsDuringRead(existingState CreateResponse) { } +func (c CreateResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2002,7 +2112,7 @@ func (o CreateResponse) Type(ctx context.Context) attr.Type { type CronSchedule struct { // Indicate whether this schedule is paused or not. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` // A Cron expression using Quartz syntax that describes the schedule for a // job. See [Cron Trigger] for details. This field is required. // @@ -2021,6 +2131,13 @@ func (newState *CronSchedule) SyncEffectiveFieldsDuringCreateOrUpdate(plan CronS func (newState *CronSchedule) SyncEffectiveFieldsDuringRead(existingState CronSchedule) { } +func (c CronSchedule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "quartz_cron_expression")...) + cs.SetRequired(append(path, "timezone_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CronSchedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2059,11 +2176,11 @@ func (o CronSchedule) Type(ctx context.Context) attr.Type { type DbtOutput struct { // An optional map of headers to send when retrieving the artifact from the // `artifacts_link`. - ArtifactsHeaders types.Map `tfsdk:"artifacts_headers" tf:"optional"` + ArtifactsHeaders types.Map `tfsdk:"artifacts_headers" tf:""` // A pre-signed URL to download the (compressed) dbt artifacts. This link is // valid for a limited time (30 minutes). This information is only available // after the run has finished. - ArtifactsLink types.String `tfsdk:"artifacts_link" tf:"optional"` + ArtifactsLink types.String `tfsdk:"artifacts_link" tf:""` } func (newState *DbtOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbtOutput) { @@ -2072,6 +2189,11 @@ func (newState *DbtOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbtOutpu func (newState *DbtOutput) SyncEffectiveFieldsDuringRead(existingState DbtOutput) { } +func (c DbtOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DbtOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2140,7 +2262,7 @@ type DbtTask struct { // 3-level namespace of Unity Catalog (catalog / schema / relation). The // catalog value can only be specified if a warehouse_id is specified. // Requires dbt-databricks >= 1.1.1. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // A list of dbt commands to execute. All commands must start with `dbt`. // This parameter must not be empty. A maximum of up to 10 commands can be // provided. @@ -2148,14 +2270,14 @@ type DbtTask struct { // Optional (relative) path to the profiles directory. Can only be specified // if no warehouse_id is specified. If no warehouse_id is specified and this // folder is unset, the root directory is used. - ProfilesDirectory types.String `tfsdk:"profiles_directory" tf:"optional"` + ProfilesDirectory types.String `tfsdk:"profiles_directory" tf:""` // Path to the project directory. Optional for Git sourced tasks, in which // case if no value is provided, the root of the Git repository is used. - ProjectDirectory types.String `tfsdk:"project_directory" tf:"optional"` + ProjectDirectory types.String `tfsdk:"project_directory" tf:""` // Optional schema to write to. This parameter is only used when a // warehouse_id is also provided. If not provided, the `default` schema is // used. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // Optional location type of the project directory. When set to `WORKSPACE`, // the project will be retrieved from the local Databricks workspace. When // set to `GIT`, the project will be retrieved from a Git repository defined @@ -2164,12 +2286,12 @@ type DbtTask struct { // // * `WORKSPACE`: Project is located in Databricks workspace. * `GIT`: // Project is located in cloud Git provider. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // ID of the SQL warehouse to connect to. If provided, we automatically // generate and provide the profile and connection details to dbt. It can be // overridden on a per-command basis by using the `--profiles-dir` command // line argument. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *DbtTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbtTask) { @@ -2178,6 +2300,12 @@ func (newState *DbtTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbtTask) { func (newState *DbtTask) SyncEffectiveFieldsDuringRead(existingState DbtTask) { } +func (c DbtTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "commands")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DbtTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2262,6 +2390,12 @@ func (newState *DeleteJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteJo func (newState *DeleteJob) SyncEffectiveFieldsDuringRead(existingState DeleteJob) { } +func (c DeleteJob) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2296,12 +2430,6 @@ func (o DeleteJob) Type(ctx context.Context) attr.Type { type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2340,6 +2468,12 @@ func (newState *DeleteRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRu func (newState *DeleteRun) SyncEffectiveFieldsDuringRead(existingState DeleteRun) { } +func (c DeleteRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2374,12 +2508,6 @@ func (o DeleteRun) Type(ctx context.Context) attr.Type { type DeleteRunResponse struct { } -func (newState *DeleteRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRunResponse) { -} - -func (newState *DeleteRunResponse) SyncEffectiveFieldsDuringRead(existingState DeleteRunResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2412,17 +2540,17 @@ func (o DeleteRunResponse) Type(ctx context.Context) attr.Type { type EnforcePolicyComplianceForJobResponseJobClusterSettingsChange struct { // The field where this change would be made, prepended with the job cluster // key. - Field types.String `tfsdk:"field" tf:"optional"` + Field types.String `tfsdk:"field" tf:""` // The new value of this field after enforcing policy compliance (either a // number, a boolean, or a string) converted to a string. This is intended // to be read by a human. The typed new value of this field can be retrieved // by reading the settings field in the API response. - NewValue types.String `tfsdk:"new_value" tf:"optional"` + NewValue types.String `tfsdk:"new_value" tf:""` // The previous value of this field before enforcing policy compliance // (either a number, a boolean, or a string) converted to a string. This is // intended to be read by a human. The type of the field can be retrieved by // reading the settings field in the API response. - PreviousValue types.String `tfsdk:"previous_value" tf:"optional"` + PreviousValue types.String `tfsdk:"previous_value" tf:""` } func (newState *EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) { @@ -2431,6 +2559,11 @@ func (newState *EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) S func (newState *EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) { } +func (c EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforcePolicyComplianceForJobResponseJobClusterSettingsChange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2471,7 +2604,7 @@ type EnforcePolicyComplianceRequest struct { JobId types.Int64 `tfsdk:"job_id" tf:""` // If set, previews changes made to the job to comply with its policy, but // does not update the job. - ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` + ValidateOnly types.Bool `tfsdk:"validate_only" tf:""` } func (newState *EnforcePolicyComplianceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceRequest) { @@ -2480,6 +2613,12 @@ func (newState *EnforcePolicyComplianceRequest) SyncEffectiveFieldsDuringCreateO func (newState *EnforcePolicyComplianceRequest) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceRequest) { } +func (c EnforcePolicyComplianceRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforcePolicyComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2516,18 +2655,18 @@ func (o EnforcePolicyComplianceRequest) Type(ctx context.Context) attr.Type { type EnforcePolicyComplianceResponse struct { // Whether any changes have been made to the job cluster settings for the // job to become compliant with its policies. - HasChanges types.Bool `tfsdk:"has_changes" tf:"optional"` + HasChanges types.Bool `tfsdk:"has_changes" tf:""` // A list of job cluster changes that have been made to the job’s cluster // settings in order for all job clusters to become compliant with their // policies. - JobClusterChanges types.List `tfsdk:"job_cluster_changes" tf:"optional"` + JobClusterChanges types.List `tfsdk:"job_cluster_changes" tf:""` // Updated job settings after policy enforcement. Policy enforcement only // applies to job clusters that are created when running the job (which are // specified in new_cluster) and does not apply to existing all-purpose // clusters. Updated job settings are derived by applying policy default // values to the existing job clusters in order to satisfy policy // requirements. - Settings types.Object `tfsdk:"settings" tf:"optional,object"` + Settings types.Object `tfsdk:"settings" tf:"object"` } func (newState *EnforcePolicyComplianceResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceResponse) { @@ -2536,6 +2675,13 @@ func (newState *EnforcePolicyComplianceResponse) SyncEffectiveFieldsDuringCreate func (newState *EnforcePolicyComplianceResponse) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceResponse) { } +func (c EnforcePolicyComplianceResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EnforcePolicyComplianceForJobResponseJobClusterSettingsChange{}.ToSchema(cs, append(path, "job_cluster_changes")...) + JobSettings{}.ToSchema(cs, append(path, "settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforcePolicyComplianceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2637,7 +2783,7 @@ type ExportRunOutput struct { // script]. // // [Python script]: https://docs.databricks.com/en/_static/examples/extract.py - Views types.List `tfsdk:"views" tf:"optional"` + Views types.List `tfsdk:"views" tf:""` } func (newState *ExportRunOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportRunOutput) { @@ -2646,6 +2792,12 @@ func (newState *ExportRunOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ex func (newState *ExportRunOutput) SyncEffectiveFieldsDuringRead(existingState ExportRunOutput) { } +func (c ExportRunOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ViewItem{}.ToSchema(cs, append(path, "views")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportRunOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2715,12 +2867,6 @@ type ExportRunRequest struct { ViewsToExport types.String `tfsdk:"-"` } -func (newState *ExportRunRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportRunRequest) { -} - -func (newState *ExportRunRequest) SyncEffectiveFieldsDuringRead(existingState ExportRunRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportRunRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2758,7 +2904,7 @@ type FileArrivalTriggerConfiguration struct { // If set, the trigger starts a run only after the specified amount of time // passed since the last time the trigger fired. The minimum allowed value // is 60 seconds - MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:"optional"` + MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:""` // URL to be monitored for file arrivals. The path must point to the root or // a subpath of the external location. Url types.String `tfsdk:"url" tf:""` @@ -2766,7 +2912,7 @@ type FileArrivalTriggerConfiguration struct { // for the specified amount of time. This makes it possible to wait for a // batch of incoming files to arrive before triggering a run. The minimum // allowed value is 60 seconds. - WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:"optional"` + WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:""` } func (newState *FileArrivalTriggerConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileArrivalTriggerConfiguration) { @@ -2775,6 +2921,12 @@ func (newState *FileArrivalTriggerConfiguration) SyncEffectiveFieldsDuringCreate func (newState *FileArrivalTriggerConfiguration) SyncEffectiveFieldsDuringRead(existingState FileArrivalTriggerConfiguration) { } +func (c FileArrivalTriggerConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileArrivalTriggerConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2812,9 +2964,9 @@ func (o FileArrivalTriggerConfiguration) Type(ctx context.Context) attr.Type { type ForEachStats struct { // Sample of 3 most common error messages occurred during the iteration. - ErrorMessageStats types.List `tfsdk:"error_message_stats" tf:"optional"` + ErrorMessageStats types.List `tfsdk:"error_message_stats" tf:""` // Describes stats of the iteration. Only latest retries are considered. - TaskRunStats types.Object `tfsdk:"task_run_stats" tf:"optional,object"` + TaskRunStats types.Object `tfsdk:"task_run_stats" tf:"object"` } func (newState *ForEachStats) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachStats) { @@ -2823,6 +2975,13 @@ func (newState *ForEachStats) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEa func (newState *ForEachStats) SyncEffectiveFieldsDuringRead(existingState ForEachStats) { } +func (c ForEachStats) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ForEachTaskErrorMessageStats{}.ToSchema(cs, append(path, "error_message_stats")...) + ForEachTaskTaskRunStats{}.ToSchema(cs, append(path, "task_run_stats")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2919,7 +3078,7 @@ type ForEachTask struct { // An optional maximum allowed number of concurrent runs of the task. Set // this value if you want to be able to execute multiple runs of the task // concurrently. - Concurrency types.Int64 `tfsdk:"concurrency" tf:"optional"` + Concurrency types.Int64 `tfsdk:"concurrency" tf:""` // Array for task to iterate on. This can be a JSON string or a reference to // an array parameter. Inputs types.String `tfsdk:"inputs" tf:""` @@ -2933,6 +3092,14 @@ func (newState *ForEachTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEac func (newState *ForEachTask) SyncEffectiveFieldsDuringRead(existingState ForEachTask) { } +func (c ForEachTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "inputs")...) + cs.SetRequired(append(path, "task")...) + Task{}.ToSchema(cs, append(path, "task")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3001,11 +3168,11 @@ func (o *ForEachTask) SetTask(ctx context.Context, v Task) { type ForEachTaskErrorMessageStats struct { // Describes the count of such error message encountered during the // iterations. - Count types.Int64 `tfsdk:"count" tf:"optional"` + Count types.Int64 `tfsdk:"count" tf:""` // Describes the error message occured during the iterations. - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` // Describes the termination reason for the error message. - TerminationCategory types.String `tfsdk:"termination_category" tf:"optional"` + TerminationCategory types.String `tfsdk:"termination_category" tf:""` } func (newState *ForEachTaskErrorMessageStats) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachTaskErrorMessageStats) { @@ -3014,6 +3181,11 @@ func (newState *ForEachTaskErrorMessageStats) SyncEffectiveFieldsDuringCreateOrU func (newState *ForEachTaskErrorMessageStats) SyncEffectiveFieldsDuringRead(existingState ForEachTaskErrorMessageStats) { } +func (c ForEachTaskErrorMessageStats) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachTaskErrorMessageStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3052,17 +3224,17 @@ func (o ForEachTaskErrorMessageStats) Type(ctx context.Context) attr.Type { type ForEachTaskTaskRunStats struct { // Describes the iteration runs having an active lifecycle state or an // active run sub state. - ActiveIterations types.Int64 `tfsdk:"active_iterations" tf:"optional"` + ActiveIterations types.Int64 `tfsdk:"active_iterations" tf:""` // Describes the number of failed and succeeded iteration runs. - CompletedIterations types.Int64 `tfsdk:"completed_iterations" tf:"optional"` + CompletedIterations types.Int64 `tfsdk:"completed_iterations" tf:""` // Describes the number of failed iteration runs. - FailedIterations types.Int64 `tfsdk:"failed_iterations" tf:"optional"` + FailedIterations types.Int64 `tfsdk:"failed_iterations" tf:""` // Describes the number of iteration runs that have been scheduled. - ScheduledIterations types.Int64 `tfsdk:"scheduled_iterations" tf:"optional"` + ScheduledIterations types.Int64 `tfsdk:"scheduled_iterations" tf:""` // Describes the number of succeeded iteration runs. - SucceededIterations types.Int64 `tfsdk:"succeeded_iterations" tf:"optional"` + SucceededIterations types.Int64 `tfsdk:"succeeded_iterations" tf:""` // Describes the length of the list of items to iterate over. - TotalIterations types.Int64 `tfsdk:"total_iterations" tf:"optional"` + TotalIterations types.Int64 `tfsdk:"total_iterations" tf:""` } func (newState *ForEachTaskTaskRunStats) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachTaskTaskRunStats) { @@ -3071,6 +3243,11 @@ func (newState *ForEachTaskTaskRunStats) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ForEachTaskTaskRunStats) SyncEffectiveFieldsDuringRead(existingState ForEachTaskTaskRunStats) { } +func (c ForEachTaskTaskRunStats) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachTaskTaskRunStats. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3118,12 +3295,6 @@ type GetJobPermissionLevelsRequest struct { JobId types.String `tfsdk:"-"` } -func (newState *GetJobPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobPermissionLevelsRequest) { -} - -func (newState *GetJobPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetJobPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3157,7 +3328,7 @@ func (o GetJobPermissionLevelsRequest) Type(ctx context.Context) attr.Type { type GetJobPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetJobPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobPermissionLevelsResponse) { @@ -3166,6 +3337,12 @@ func (newState *GetJobPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateO func (newState *GetJobPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetJobPermissionLevelsResponse) { } +func (c GetJobPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3233,12 +3410,6 @@ type GetJobPermissionsRequest struct { JobId types.String `tfsdk:"-"` } -func (newState *GetJobPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobPermissionsRequest) { -} - -func (newState *GetJobPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetJobPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3275,12 +3446,9 @@ type GetJobRequest struct { // The canonical identifier of the job to retrieve information about. This // field is required. JobId types.Int64 `tfsdk:"-"` -} - -func (newState *GetJobRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobRequest) { -} - -func (newState *GetJobRequest) SyncEffectiveFieldsDuringRead(existingState GetJobRequest) { + // Use `next_page_token` returned from the previous GetJob to request the + // next page of the job's sub-resources. + PageToken types.String `tfsdk:"-"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobRequest. @@ -3301,7 +3469,8 @@ func (o GetJobRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "job_id": o.JobId, + "job_id": o.JobId, + "page_token": o.PageToken, }) } @@ -3309,7 +3478,8 @@ func (o GetJobRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o GetJobRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "job_id": types.Int64Type, + "job_id": types.Int64Type, + "page_token": types.StringType, }, } } @@ -3320,12 +3490,6 @@ type GetPolicyComplianceRequest struct { JobId types.Int64 `tfsdk:"-"` } -func (newState *GetPolicyComplianceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPolicyComplianceRequest) { -} - -func (newState *GetPolicyComplianceRequest) SyncEffectiveFieldsDuringRead(existingState GetPolicyComplianceRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPolicyComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3362,13 +3526,13 @@ type GetPolicyComplianceResponse struct { // of compliance if a policy they are using was updated after the job was // last edited and some of its job clusters no longer comply with their // updated policies. - IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + IsCompliant types.Bool `tfsdk:"is_compliant" tf:""` // An object containing key-value mappings representing the first 200 policy // validation errors. The keys indicate the path where the policy validation // error is occurring. An identifier for the job cluster is prepended to the // path. The values indicate an error message describing the policy // validation error. - Violations types.Map `tfsdk:"violations" tf:"optional"` + Violations types.Map `tfsdk:"violations" tf:""` } func (newState *GetPolicyComplianceResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPolicyComplianceResponse) { @@ -3377,6 +3541,11 @@ func (newState *GetPolicyComplianceResponse) SyncEffectiveFieldsDuringCreateOrUp func (newState *GetPolicyComplianceResponse) SyncEffectiveFieldsDuringRead(existingState GetPolicyComplianceResponse) { } +func (c GetPolicyComplianceResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPolicyComplianceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3446,12 +3615,6 @@ type GetRunOutputRequest struct { RunId types.Int64 `tfsdk:"-"` } -func (newState *GetRunOutputRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunOutputRequest) { -} - -func (newState *GetRunOutputRequest) SyncEffectiveFieldsDuringRead(existingState GetRunOutputRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunOutputRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3489,20 +3652,14 @@ type GetRunRequest struct { IncludeHistory types.Bool `tfsdk:"-"` // Whether to include resolved parameter values in the response. IncludeResolvedValues types.Bool `tfsdk:"-"` - // To list the next page of job tasks, set this field to the value of the - // `next_page_token` returned in the GetJob response. + // Use `next_page_token` returned from the previous GetRun to request the + // next page of the run's sub-resources. PageToken types.String `tfsdk:"-"` // The canonical identifier of the run for which to retrieve the metadata. // This field is required. RunId types.Int64 `tfsdk:"-"` } -func (newState *GetRunRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunRequest) { -} - -func (newState *GetRunRequest) SyncEffectiveFieldsDuringRead(existingState GetRunRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3546,7 +3703,7 @@ type GitSnapshot struct { // Commit that was used to execute the run. If git_branch was specified, // this points to the HEAD of the branch at the time of the run; if git_tag // was specified, this points to the commit the tag points to. - UsedCommit types.String `tfsdk:"used_commit" tf:"optional"` + UsedCommit types.String `tfsdk:"used_commit" tf:""` } func (newState *GitSnapshot) SyncEffectiveFieldsDuringCreateOrUpdate(plan GitSnapshot) { @@ -3555,6 +3712,11 @@ func (newState *GitSnapshot) SyncEffectiveFieldsDuringCreateOrUpdate(plan GitSna func (newState *GitSnapshot) SyncEffectiveFieldsDuringRead(existingState GitSnapshot) { } +func (c GitSnapshot) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GitSnapshot. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3599,24 +3761,24 @@ func (o GitSnapshot) Type(ctx context.Context) attr.Type { type GitSource struct { // Name of the branch to be checked out and used by this job. This field // cannot be specified in conjunction with git_tag or git_commit. - GitBranch types.String `tfsdk:"branch" tf:"optional"` + GitBranch types.String `tfsdk:"branch" tf:""` // Commit to be checked out and used by this job. This field cannot be // specified in conjunction with git_branch or git_tag. - GitCommit types.String `tfsdk:"commit" tf:"optional"` + GitCommit types.String `tfsdk:"commit" tf:""` // Unique identifier of the service used to host the Git repository. The // value is case insensitive. GitProvider types.String `tfsdk:"git_provider" tf:""` // Read-only state of the remote repository at the time the job was run. // This field is only included on job runs. - GitSnapshot types.Object `tfsdk:"git_snapshot" tf:"optional,object"` + GitSnapshot types.Object `tfsdk:"git_snapshot" tf:"object"` // Name of the tag to be checked out and used by this job. This field cannot // be specified in conjunction with git_branch or git_commit. - GitTag types.String `tfsdk:"tag" tf:"optional"` + GitTag types.String `tfsdk:"tag" tf:""` // URL of the repository to be cloned by this job. GitUrl types.String `tfsdk:"url" tf:""` // The source of the job specification in the remote repository when the job // is source controlled. - JobSource types.Object `tfsdk:"job_source" tf:"optional,object"` + JobSource types.Object `tfsdk:"job_source" tf:"object"` } func (newState *GitSource) SyncEffectiveFieldsDuringCreateOrUpdate(plan GitSource) { @@ -3625,6 +3787,15 @@ func (newState *GitSource) SyncEffectiveFieldsDuringCreateOrUpdate(plan GitSourc func (newState *GitSource) SyncEffectiveFieldsDuringRead(existingState GitSource) { } +func (c GitSource) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "git_provider")...) + GitSnapshot{}.ToSchema(cs, append(path, "git_snapshot")...) + cs.SetRequired(append(path, "url")...) + JobSource{}.ToSchema(cs, append(path, "job_source")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GitSource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3731,19 +3902,26 @@ func (o *GitSource) SetJobSource(ctx context.Context, v JobSource) { type Job struct { // The time at which this job was created in epoch milliseconds // (milliseconds since 1/1/1970 UTC). - CreatedTime types.Int64 `tfsdk:"created_time" tf:"optional"` + CreatedTime types.Int64 `tfsdk:"created_time" tf:""` // The creator user name. This field won’t be included in the response if // the user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // The id of the budget policy used by this job for cost attribution // purposes. This may be set through (in order of precedence): 1. Budget // admins through the account or workspace console 2. Jobs UI in the job // details page and Jobs API using `budget_policy_id` 3. Inferred default // based on accessible budget policies of the run_as identity on job // creation or modification. - EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:"computed"` + EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:""` + // Indicates if the job has more sub-resources (`tasks`, `job_clusters`) + // that are not shown. They can be accessed via :method:jobs/get endpoint. + // It is only relevant for API 2.2 :method:jobs/list requests with + // `expand_tasks=true`. + HasMore types.Bool `tfsdk:"has_more" tf:""` // The canonical identifier for this job. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` + // A token that can be used to list the next page of sub-resources. + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // The email of an active workspace user or the application ID of a service // principal that the job runs as. This value can be changed by setting the // `run_as` field when creating or updating a job. @@ -3751,10 +3929,10 @@ type Job struct { // By default, `run_as_user_name` is based on the current job settings and // is set to the creator of the job if job access control is disabled or to // the user with the `is_owner` permission if job access control is enabled. - RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` + RunAsUserName types.String `tfsdk:"run_as_user_name" tf:""` // Settings for this job and all of its runs. These settings can be updated // using the `resetJob` method. - Settings types.Object `tfsdk:"settings" tf:"optional,object"` + Settings types.Object `tfsdk:"settings" tf:"object"` } func (newState *Job) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job) { @@ -3763,6 +3941,13 @@ func (newState *Job) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job) { func (newState *Job) SyncEffectiveFieldsDuringRead(existingState Job) { } +func (c Job) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "effective_budget_policy_id")...) + JobSettings{}.ToSchema(cs, append(path, "settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Job. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3786,7 +3971,9 @@ func (o Job) ToObjectValue(ctx context.Context) basetypes.ObjectValue { "created_time": o.CreatedTime, "creator_user_name": o.CreatorUserName, "effective_budget_policy_id": o.EffectiveBudgetPolicyId, + "has_more": o.HasMore, "job_id": o.JobId, + "next_page_token": o.NextPageToken, "run_as_user_name": o.RunAsUserName, "settings": o.Settings, }) @@ -3799,7 +3986,9 @@ func (o Job) Type(ctx context.Context) attr.Type { "created_time": types.Int64Type, "creator_user_name": types.StringType, "effective_budget_policy_id": types.StringType, + "has_more": types.BoolType, "job_id": types.Int64Type, + "next_page_token": types.StringType, "run_as_user_name": types.StringType, "settings": JobSettings{}.Type(ctx), }, @@ -3836,13 +4025,13 @@ func (o *Job) SetSettings(ctx context.Context, v JobSettings) { type JobAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *JobAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobAccessControlRequest) { @@ -3851,6 +4040,11 @@ func (newState *JobAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *JobAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState JobAccessControlRequest) { } +func (c JobAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3890,15 +4084,15 @@ func (o JobAccessControlRequest) Type(ctx context.Context) attr.Type { type JobAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *JobAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobAccessControlResponse) { @@ -3907,6 +4101,12 @@ func (newState *JobAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *JobAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState JobAccessControlResponse) { } +func (c JobAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3991,6 +4191,14 @@ func (newState *JobCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobClus func (newState *JobCluster) SyncEffectiveFieldsDuringRead(existingState JobCluster) { } +func (c JobCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_cluster_key")...) + cs.SetRequired(append(path, "new_cluster")...) + compute_tf.ClusterSpec{}.ToSchema(cs, append(path, "new_cluster")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4056,7 +4264,7 @@ func (o *JobCluster) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec type JobCompliance struct { // Whether this job is in compliance with the latest version of its policy. - IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + IsCompliant types.Bool `tfsdk:"is_compliant" tf:""` // Canonical unique identifier for a job. JobId types.Int64 `tfsdk:"job_id" tf:""` // An object containing key-value mappings representing the first 200 policy @@ -4064,7 +4272,7 @@ type JobCompliance struct { // error is occurring. An identifier for the job cluster is prepended to the // path. The values indicate an error message describing the policy // validation error. - Violations types.Map `tfsdk:"violations" tf:"optional"` + Violations types.Map `tfsdk:"violations" tf:""` } func (newState *JobCompliance) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobCompliance) { @@ -4073,6 +4281,12 @@ func (newState *JobCompliance) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobC func (newState *JobCompliance) SyncEffectiveFieldsDuringRead(existingState JobCompliance) { } +func (c JobCompliance) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobCompliance. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4144,7 +4358,7 @@ type JobDeployment struct { // * `BUNDLE`: The job is managed by Databricks Asset Bundle. Kind types.String `tfsdk:"kind" tf:""` // Path of the file that contains deployment metadata. - MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:"optional"` + MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:""` } func (newState *JobDeployment) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobDeployment) { @@ -4153,6 +4367,12 @@ func (newState *JobDeployment) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobD func (newState *JobDeployment) SyncEffectiveFieldsDuringRead(existingState JobDeployment) { } +func (c JobDeployment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "kind")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobDeployment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4190,22 +4410,22 @@ type JobEmailNotifications struct { // If true, do not send email to recipients specified in `on_failure` if the // run is skipped. This field is `deprecated`. Please use the // `notification_settings.no_alert_for_skipped_runs` field. - NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:""` // A list of email addresses to be notified when the duration of a run // exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in // the `health` field. If no rule for the `RUN_DURATION_SECONDS` metric is // specified in the `health` field for the job, notifications are not sent. - OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:"optional"` + OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:""` // A list of email addresses to be notified when a run unsuccessfully // completes. A run is considered to have completed unsuccessfully if it // ends with an `INTERNAL_ERROR` `life_cycle_state` or a `FAILED`, or // `TIMED_OUT` result_state. If this is not specified on job creation, // reset, or update the list is empty, and notifications are not sent. - OnFailure types.List `tfsdk:"on_failure" tf:"optional"` + OnFailure types.List `tfsdk:"on_failure" tf:""` // A list of email addresses to be notified when a run begins. If not // specified on job creation, reset, or update, the list is empty, and // notifications are not sent. - OnStart types.List `tfsdk:"on_start" tf:"optional"` + OnStart types.List `tfsdk:"on_start" tf:""` // A list of email addresses to notify when any streaming backlog thresholds // are exceeded for any stream. Streaming backlog thresholds can be set in // the `health` field using the following metrics: @@ -4213,13 +4433,13 @@ type JobEmailNotifications struct { // `STREAMING_BACKLOG_SECONDS`, or `STREAMING_BACKLOG_FILES`. Alerting is // based on the 10-minute average of these metrics. If the issue persists, // notifications are resent every 30 minutes. - OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:"optional"` + OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:""` // A list of email addresses to be notified when a run successfully // completes. A run is considered to have completed successfully if it ends // with a `TERMINATED` `life_cycle_state` and a `SUCCESS` result_state. If // not specified on job creation, reset, or update, the list is empty, and // notifications are not sent. - OnSuccess types.List `tfsdk:"on_success" tf:"optional"` + OnSuccess types.List `tfsdk:"on_success" tf:""` } func (newState *JobEmailNotifications) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobEmailNotifications) { @@ -4228,6 +4448,11 @@ func (newState *JobEmailNotifications) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *JobEmailNotifications) SyncEffectiveFieldsDuringRead(existingState JobEmailNotifications) { } +func (c JobEmailNotifications) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobEmailNotifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4421,7 +4646,7 @@ type JobEnvironment struct { // The environment entity used to preserve serverless environment side panel // and jobs' environment for non-notebook task. In this minimal environment // spec, only pip dependencies are supported. - Spec types.Object `tfsdk:"spec" tf:"optional,object"` + Spec types.Object `tfsdk:"spec" tf:"object"` } func (newState *JobEnvironment) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobEnvironment) { @@ -4430,6 +4655,13 @@ func (newState *JobEnvironment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job func (newState *JobEnvironment) SyncEffectiveFieldsDuringRead(existingState JobEnvironment) { } +func (c JobEnvironment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "environment_key")...) + compute_tf.Environment{}.ToSchema(cs, append(path, "spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobEnvironment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4496,10 +4728,10 @@ func (o *JobEnvironment) SetSpec(ctx context.Context, v compute_tf.Environment) type JobNotificationSettings struct { // If true, do not send notifications to recipients specified in // `on_failure` if the run is canceled. - NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:"optional"` + NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:""` // If true, do not send notifications to recipients specified in // `on_failure` if the run is skipped. - NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:""` } func (newState *JobNotificationSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobNotificationSettings) { @@ -4508,6 +4740,11 @@ func (newState *JobNotificationSettings) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *JobNotificationSettings) SyncEffectiveFieldsDuringRead(existingState JobNotificationSettings) { } +func (c JobNotificationSettings) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobNotificationSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4543,11 +4780,11 @@ func (o JobNotificationSettings) Type(ctx context.Context) attr.Type { type JobParameter struct { // The optional default value of the parameter - Default types.String `tfsdk:"default" tf:"optional"` + Default types.String `tfsdk:"default" tf:""` // The name of the parameter - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The value used in the run - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *JobParameter) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobParameter) { @@ -4556,6 +4793,11 @@ func (newState *JobParameter) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPa func (newState *JobParameter) SyncEffectiveFieldsDuringRead(existingState JobParameter) { } +func (c JobParameter) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobParameter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4605,6 +4847,13 @@ func (newState *JobParameterDefinition) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *JobParameterDefinition) SyncEffectiveFieldsDuringRead(existingState JobParameterDefinition) { } +func (c JobParameterDefinition) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "default")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobParameterDefinition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4639,11 +4888,11 @@ func (o JobParameterDefinition) Type(ctx context.Context) attr.Type { } type JobPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *JobPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermission) { @@ -4652,6 +4901,11 @@ func (newState *JobPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobP func (newState *JobPermission) SyncEffectiveFieldsDuringRead(existingState JobPermission) { } +func (c JobPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4718,11 +4972,11 @@ func (o *JobPermission) SetInheritedFromObject(ctx context.Context, v []types.St } type JobPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *JobPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermissions) { @@ -4731,6 +4985,12 @@ func (newState *JobPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job func (newState *JobPermissions) SyncEffectiveFieldsDuringRead(existingState JobPermissions) { } +func (c JobPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4797,9 +5057,9 @@ func (o *JobPermissions) SetAccessControlList(ctx context.Context, v []JobAccess } type JobPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *JobPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermissionsDescription) { @@ -4808,6 +5068,11 @@ func (newState *JobPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpda func (newState *JobPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState JobPermissionsDescription) { } +func (c JobPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4842,7 +5107,7 @@ func (o JobPermissionsDescription) Type(ctx context.Context) attr.Type { } type JobPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The job for which to get or manage permissions. JobId types.String `tfsdk:"-"` } @@ -4853,6 +5118,13 @@ func (newState *JobPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *JobPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState JobPermissionsRequest) { } +func (c JobPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4924,10 +5196,10 @@ func (o *JobPermissionsRequest) SetAccessControlList(ctx context.Context, v []Jo type JobRunAs struct { // Application ID of an active service principal. Setting this field // requires the `servicePrincipal/user` role. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // The email of an active workspace user. Non-admin users can only set this // field to their own email. - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *JobRunAs) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobRunAs) { @@ -4936,6 +5208,11 @@ func (newState *JobRunAs) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobRunAs) func (newState *JobRunAs) SyncEffectiveFieldsDuringRead(existingState JobRunAs) { } +func (c JobRunAs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobRunAs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4974,35 +5251,35 @@ type JobSettings struct { // specified, a default budget policy may be applied when creating or // modifying the job. See `effective_budget_policy_id` for the budget policy // used by this workload. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // An optional continuous property for this job. The continuous property // will ensure that there is always one run executing. Only one of // `schedule` and `continuous` can be used. - Continuous types.Object `tfsdk:"continuous" tf:"optional,object"` + Continuous types.Object `tfsdk:"continuous" tf:"object"` // Deployment information for jobs managed by external sources. - Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"object"` // An optional description for the job. The maximum length is 27700 // characters in UTF-8 encoding. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Edit mode of the job. // // * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * // `EDITABLE`: The job is in an editable state and can be modified. - EditMode types.String `tfsdk:"edit_mode" tf:"optional"` + EditMode types.String `tfsdk:"edit_mode" tf:""` // An optional set of email addresses that is notified when runs of this job // begin or complete as well as when this job is deleted. - EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"object"` // A list of task execution environment specifications that can be // referenced by serverless tasks of this job. An environment is required to // be present for serverless tasks. For serverless notebook tasks, the // environment is accessible in the notebook environment panel. For other // serverless tasks, the task environment is required to be specified using // environment_key in the task settings. - Environments types.List `tfsdk:"environment" tf:"optional"` + Environments types.List `tfsdk:"environment" tf:""` // Used to tell what is the format of the job. This field is ignored in // Create/Update/Reset calls. When using the Jobs API 2.1 this value is // always set to `"MULTI_TASK"`. - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -5013,13 +5290,15 @@ type JobSettings struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.Object `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"object"` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. - // You must declare dependent libraries in task settings. - JobClusters types.List `tfsdk:"job_cluster" tf:"optional"` + // You must declare dependent libraries in task settings. If more than 100 + // job clusters are available, you can paginate through them using + // :method:jobs/get. + JobClusters types.List `tfsdk:"job_cluster" tf:""` // An optional maximum allowed number of concurrent runs of the job. Set // this value if you want to be able to execute multiple runs of the same // job concurrently. This is useful for example if you trigger your job on a @@ -5031,45 +5310,48 @@ type JobSettings struct { // runs. However, from then on, new runs are skipped unless there are fewer // than 3 active runs. This value cannot exceed 1000. Setting this value to // `0` causes all new runs to be skipped. - MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:"optional"` + MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:""` // An optional name for the job. The maximum length is 4096 bytes in UTF-8 // encoding. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // job. - NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"object"` // Job-level parameter definitions - Parameters types.List `tfsdk:"parameter" tf:"optional"` + Parameters types.List `tfsdk:"parameter" tf:""` // The queue settings of the job. - Queue types.Object `tfsdk:"queue" tf:"optional,object"` + Queue types.Object `tfsdk:"queue" tf:"object"` // Write-only setting. Specifies the user or service principal that the job // runs as. If not specified, the job runs as the user who created the job. // // Either `user_name` or `service_principal_name` should be specified. If // not, an error is thrown. - RunAs types.Object `tfsdk:"run_as" tf:"optional,object"` + RunAs types.Object `tfsdk:"run_as" tf:"object"` // An optional periodic schedule for this job. The default behavior is that // the job only runs when triggered by clicking “Run Now” in the Jobs UI // or sending an API request to `runNow`. - Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"object"` // A map of tags associated with the job. These are forwarded to the cluster // as cluster tags for jobs clusters, and are subject to the same // limitations as cluster tags. A maximum of 25 tags can be added to the // job. - Tags types.Map `tfsdk:"tags" tf:"optional"` - // A list of task specifications to be executed by this job. - Tasks types.List `tfsdk:"task" tf:"optional"` + Tags types.Map `tfsdk:"tags" tf:""` + // A list of task specifications to be executed by this job. If more than + // 100 tasks are available, you can paginate through them using + // :method:jobs/get. Use the `next_page_token` field at the object root to + // determine if more results are available. + Tasks types.List `tfsdk:"task" tf:""` // An optional timeout applied to each run of this job. A value of `0` means // no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A configuration to trigger a run when certain conditions are met. The // default behavior is that the job runs only when triggered by clicking // “Run Now” in the Jobs UI or sending an API request to `runNow`. - Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"object"` // A collection of system notification IDs to notify when runs of this job // begin or complete. - WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"object"` } func (newState *JobSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSettings) { @@ -5078,6 +5360,26 @@ func (newState *JobSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSet func (newState *JobSettings) SyncEffectiveFieldsDuringRead(existingState JobSettings) { } +func (c JobSettings) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Continuous{}.ToSchema(cs, append(path, "continuous")...) + JobDeployment{}.ToSchema(cs, append(path, "deployment")...) + JobEmailNotifications{}.ToSchema(cs, append(path, "email_notifications")...) + JobEnvironment{}.ToSchema(cs, append(path, "environment")...) + GitSource{}.ToSchema(cs, append(path, "git_source")...) + JobsHealthRules{}.ToSchema(cs, append(path, "health")...) + JobCluster{}.ToSchema(cs, append(path, "job_cluster")...) + JobNotificationSettings{}.ToSchema(cs, append(path, "notification_settings")...) + JobParameterDefinition{}.ToSchema(cs, append(path, "parameter")...) + QueueSettings{}.ToSchema(cs, append(path, "queue")...) + JobRunAs{}.ToSchema(cs, append(path, "run_as")...) + CronSchedule{}.ToSchema(cs, append(path, "schedule")...) + Task{}.ToSchema(cs, append(path, "task")...) + TriggerSettings{}.ToSchema(cs, append(path, "trigger")...) + WebhookNotifications{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5630,7 +5932,7 @@ type JobSource struct { // disconnected from the remote job specification and is allowed for live // edit. Import the remote job specification again from UI to make the job // fully synced. - DirtyState types.String `tfsdk:"dirty_state" tf:"optional"` + DirtyState types.String `tfsdk:"dirty_state" tf:""` // Name of the branch which the job is imported from. ImportFromGitBranch types.String `tfsdk:"import_from_git_branch" tf:""` // Path of the job YAML file that contains the job specification. @@ -5643,6 +5945,13 @@ func (newState *JobSource) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSourc func (newState *JobSource) SyncEffectiveFieldsDuringRead(existingState JobSource) { } +func (c JobSource) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "import_from_git_branch")...) + cs.SetRequired(append(path, "job_config_path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5706,6 +6015,14 @@ func (newState *JobsHealthRule) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job func (newState *JobsHealthRule) SyncEffectiveFieldsDuringRead(existingState JobsHealthRule) { } +func (c JobsHealthRule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "metric")...) + cs.SetRequired(append(path, "op")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobsHealthRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5743,7 +6060,7 @@ func (o JobsHealthRule) Type(ctx context.Context) attr.Type { // An optional set of health rules that can be defined for this job. type JobsHealthRules struct { - Rules types.List `tfsdk:"rules" tf:"optional"` + Rules types.List `tfsdk:"rules" tf:""` } func (newState *JobsHealthRules) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobsHealthRules) { @@ -5752,6 +6069,12 @@ func (newState *JobsHealthRules) SyncEffectiveFieldsDuringCreateOrUpdate(plan Jo func (newState *JobsHealthRules) SyncEffectiveFieldsDuringRead(existingState JobsHealthRules) { } +func (c JobsHealthRules) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobsHealthRule{}.ToSchema(cs, append(path, "rules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobsHealthRules. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5815,15 +6138,15 @@ func (o *JobsHealthRules) SetRules(ctx context.Context, v []JobsHealthRule) { type ListJobComplianceForPolicyResponse struct { // A list of jobs and their policy compliance statuses. - Jobs types.List `tfsdk:"jobs" tf:"optional"` + Jobs types.List `tfsdk:"jobs" tf:""` // This field represents the pagination token to retrieve the next page of // results. If this field is not in the response, it means no further // results for the request. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // This field represents the pagination token to retrieve the previous page // of results. If this field is not in the response, it means no further // results for the request. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListJobComplianceForPolicyResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobComplianceForPolicyResponse) { @@ -5832,6 +6155,12 @@ func (newState *ListJobComplianceForPolicyResponse) SyncEffectiveFieldsDuringCre func (newState *ListJobComplianceForPolicyResponse) SyncEffectiveFieldsDuringRead(existingState ListJobComplianceForPolicyResponse) { } +func (c ListJobComplianceForPolicyResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobCompliance{}.ToSchema(cs, append(path, "jobs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobComplianceForPolicyResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5910,12 +6239,6 @@ type ListJobComplianceRequest struct { PolicyId types.String `tfsdk:"-"` } -func (newState *ListJobComplianceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobComplianceRequest) { -} - -func (newState *ListJobComplianceRequest) SyncEffectiveFieldsDuringRead(existingState ListJobComplianceRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobComplianceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5953,7 +6276,9 @@ func (o ListJobComplianceRequest) Type(ctx context.Context) attr.Type { // List jobs type ListJobsRequest struct { - // Whether to include task and cluster details in the response. + // Whether to include task and cluster details in the response. Note that in + // API 2.2, only the first 100 elements will be shown. Use :method:jobs/get + // to paginate through all tasks and clusters. ExpandTasks types.Bool `tfsdk:"-"` // The number of jobs to return. This value must be greater than 0 and less // or equal to 100. The default value is 20. @@ -5969,12 +6294,6 @@ type ListJobsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListJobsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobsRequest) { -} - -func (newState *ListJobsRequest) SyncEffectiveFieldsDuringRead(existingState ListJobsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6018,15 +6337,15 @@ func (o ListJobsRequest) Type(ctx context.Context) attr.Type { type ListJobsResponse struct { // If true, additional jobs matching the provided filter are available for // listing. - HasMore types.Bool `tfsdk:"has_more" tf:"optional"` + HasMore types.Bool `tfsdk:"has_more" tf:""` // The list of jobs. Only included in the response if there are jobs to // list. - Jobs types.List `tfsdk:"jobs" tf:"optional"` + Jobs types.List `tfsdk:"jobs" tf:""` // A token that can be used to list the next page of jobs (if applicable). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // A token that can be used to list the previous page of jobs (if // applicable). - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListJobsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobsResponse) { @@ -6035,6 +6354,12 @@ func (newState *ListJobsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan L func (newState *ListJobsResponse) SyncEffectiveFieldsDuringRead(existingState ListJobsResponse) { } +func (c ListJobsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BaseJob{}.ToSchema(cs, append(path, "jobs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6113,7 +6438,9 @@ type ListRunsRequest struct { // results; otherwise, lists both active and completed runs. This field // cannot be `true` when active_only is `true`. CompletedOnly types.Bool `tfsdk:"-"` - // Whether to include task and cluster details in the response. + // Whether to include task and cluster details in the response. Note that in + // API 2.2, only the first 100 elements will be shown. Use + // :method:jobs/getrun to paginate through all tasks and clusters. ExpandTasks types.Bool `tfsdk:"-"` // The job for which to list runs. If omitted, the Jobs service lists runs // from all jobs. @@ -6142,12 +6469,6 @@ type ListRunsRequest struct { StartTimeTo types.Int64 `tfsdk:"-"` } -func (newState *ListRunsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRunsRequest) { -} - -func (newState *ListRunsRequest) SyncEffectiveFieldsDuringRead(existingState ListRunsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRunsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6201,15 +6522,15 @@ func (o ListRunsRequest) Type(ctx context.Context) attr.Type { type ListRunsResponse struct { // If true, additional runs matching the provided filter are available for // listing. - HasMore types.Bool `tfsdk:"has_more" tf:"optional"` + HasMore types.Bool `tfsdk:"has_more" tf:""` // A token that can be used to list the next page of runs (if applicable). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // A token that can be used to list the previous page of runs (if // applicable). - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` // A list of runs, from most recently started to least. Only included in the // response if there are runs to list. - Runs types.List `tfsdk:"runs" tf:"optional"` + Runs types.List `tfsdk:"runs" tf:""` } func (newState *ListRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRunsResponse) { @@ -6218,6 +6539,12 @@ func (newState *ListRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan L func (newState *ListRunsResponse) SyncEffectiveFieldsDuringRead(existingState ListRunsResponse) { } +func (c ListRunsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BaseRun{}.ToSchema(cs, append(path, "runs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6292,9 +6619,9 @@ type NotebookOutput struct { // a larger result, your job can store the results in a cloud storage // service. This field is absent if `dbutils.notebook.exit()` was never // called. - Result types.String `tfsdk:"result" tf:"optional"` + Result types.String `tfsdk:"result" tf:""` // Whether or not the result was truncated. - Truncated types.Bool `tfsdk:"truncated" tf:"optional"` + Truncated types.Bool `tfsdk:"truncated" tf:""` } func (newState *NotebookOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotebookOutput) { @@ -6303,6 +6630,11 @@ func (newState *NotebookOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan Not func (newState *NotebookOutput) SyncEffectiveFieldsDuringRead(existingState NotebookOutput) { } +func (c NotebookOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NotebookOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6354,7 +6686,7 @@ type NotebookTask struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-widgets - BaseParameters types.Map `tfsdk:"base_parameters" tf:"optional"` + BaseParameters types.Map `tfsdk:"base_parameters" tf:""` // The path of the notebook to be run in the Databricks workspace or remote // repository. For notebooks stored in the Databricks workspace, the path // must be absolute and begin with a slash. For notebooks stored in a remote @@ -6367,14 +6699,14 @@ type NotebookTask struct { // `git_source` is defined and `WORKSPACE` otherwise. * `WORKSPACE`: // Notebook is located in Databricks workspace. * `GIT`: Notebook is located // in cloud Git provider. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // Optional `warehouse_id` to run the notebook on a SQL warehouse. Classic // SQL warehouses are NOT supported, please use serverless or pro SQL // warehouses. // // Note that SQL warehouses only support SQL cells; if the notebook contains // non-SQL cells, the run will fail. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *NotebookTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotebookTask) { @@ -6383,6 +6715,12 @@ func (newState *NotebookTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan Noteb func (newState *NotebookTask) SyncEffectiveFieldsDuringRead(existingState NotebookTask) { } +func (c NotebookTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "notebook_path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NotebookTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6463,6 +6801,13 @@ func (newState *PeriodicTriggerConfiguration) SyncEffectiveFieldsDuringCreateOrU func (newState *PeriodicTriggerConfiguration) SyncEffectiveFieldsDuringRead(existingState PeriodicTriggerConfiguration) { } +func (c PeriodicTriggerConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "interval")...) + cs.SetRequired(append(path, "unit")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PeriodicTriggerConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6498,7 +6843,7 @@ func (o PeriodicTriggerConfiguration) Type(ctx context.Context) attr.Type { type PipelineParams struct { // If true, triggers a full refresh on the delta live table. - FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + FullRefresh types.Bool `tfsdk:"full_refresh" tf:""` } func (newState *PipelineParams) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineParams) { @@ -6507,6 +6852,11 @@ func (newState *PipelineParams) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pip func (newState *PipelineParams) SyncEffectiveFieldsDuringRead(existingState PipelineParams) { } +func (c PipelineParams) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineParams. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6540,7 +6890,7 @@ func (o PipelineParams) Type(ctx context.Context) attr.Type { type PipelineTask struct { // If true, triggers a full refresh on the delta live table. - FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + FullRefresh types.Bool `tfsdk:"full_refresh" tf:""` // The full name of the pipeline task to execute. PipelineId types.String `tfsdk:"pipeline_id" tf:""` } @@ -6551,6 +6901,12 @@ func (newState *PipelineTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pipel func (newState *PipelineTask) SyncEffectiveFieldsDuringRead(existingState PipelineTask) { } +func (c PipelineTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "pipeline_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6592,12 +6948,12 @@ type PythonWheelTask struct { // Command-line parameters passed to Python wheel task in the form of // `["--name=task", "--data=dbfs:/path/to/data.json"]`. Leave it empty if // `parameters` is not null. - NamedParameters types.Map `tfsdk:"named_parameters" tf:"optional"` + NamedParameters types.Map `tfsdk:"named_parameters" tf:""` // Name of the package to execute PackageName types.String `tfsdk:"package_name" tf:""` // Command-line parameters passed to Python wheel task. Leave it empty if // `named_parameters` is not null. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *PythonWheelTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan PythonWheelTask) { @@ -6606,6 +6962,13 @@ func (newState *PythonWheelTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan Py func (newState *PythonWheelTask) SyncEffectiveFieldsDuringRead(existingState PythonWheelTask) { } +func (c PythonWheelTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "entry_point")...) + cs.SetRequired(append(path, "package_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PythonWheelTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6709,10 +7072,10 @@ type QueueDetails struct { // per-job limit of concurrent job runs. * // `ACTIVE_RUN_JOB_TASKS_LIMIT_REACHED`: The run was queued due to reaching // the workspace limit of active run job tasks. - Code types.String `tfsdk:"code" tf:"optional"` + Code types.String `tfsdk:"code" tf:""` // A descriptive message with the queuing details. This field is // unstructured, and its exact format is subject to change. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *QueueDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueueDetails) { @@ -6721,6 +7084,11 @@ func (newState *QueueDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan Queue func (newState *QueueDetails) SyncEffectiveFieldsDuringRead(existingState QueueDetails) { } +func (c QueueDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueueDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6765,6 +7133,12 @@ func (newState *QueueSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan Queu func (newState *QueueSettings) SyncEffectiveFieldsDuringRead(existingState QueueSettings) { } +func (c QueueSettings) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "enabled")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueueSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6798,22 +7172,22 @@ func (o QueueSettings) Type(ctx context.Context) attr.Type { type RepairHistoryItem struct { // The end time of the (repaired) run. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The ID of the repair. Only returned for the items that represent a repair // in `repair_history`. - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` // The start time of the (repaired) run. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Deprecated. Please use the `status` field instead. - State types.Object `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"object"` // The current status of the run - Status types.Object `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"object"` // The run IDs of the task runs that ran as part of this repair history // item. - TaskRunIds types.List `tfsdk:"task_run_ids" tf:"optional"` + TaskRunIds types.List `tfsdk:"task_run_ids" tf:""` // The repair history item type. Indicates whether a run is the original run // or a repair run. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *RepairHistoryItem) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairHistoryItem) { @@ -6822,6 +7196,13 @@ func (newState *RepairHistoryItem) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RepairHistoryItem) SyncEffectiveFieldsDuringRead(existingState RepairHistoryItem) { } +func (c RepairHistoryItem) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RunState{}.ToSchema(cs, append(path, "state")...) + RunStatus{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepairHistoryItem. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6957,7 +7338,7 @@ type RepairRun struct { // An array of commands to execute for jobs with the dbt task, for example // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt // run"]` - DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + DbtCommands types.List `tfsdk:"dbt_commands" tf:""` // A list of parameters for jobs with Spark JAR tasks, for example // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the // main function of the main class specified in the Spark JAR task. If not @@ -6970,14 +7351,14 @@ type RepairRun struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - JarParams types.List `tfsdk:"jar_params" tf:"optional"` + JarParams types.List `tfsdk:"jar_params" tf:""` // Job-level parameters used in the run. for example `"param": // "overriding_val"` - JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.Map `tfsdk:"job_parameters" tf:""` // The ID of the latest repair. This parameter is not required when // repairing a run for the first time, but must be provided on subsequent // requests to repair the same run. - LatestRepairId types.Int64 `tfsdk:"latest_repair_id" tf:"optional"` + LatestRepairId types.Int64 `tfsdk:"latest_repair_id" tf:""` // A map from keys to values for jobs with notebook task, for example // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed // to the notebook and is accessible through the [dbutils.widgets.get] @@ -6997,11 +7378,11 @@ type RepairRun struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html - NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + NotebookParams types.Map `tfsdk:"notebook_params" tf:""` // Controls whether the pipeline should perform a full refresh - PipelineParams types.Object `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.Object `tfsdk:"pipeline_params" tf:"object"` - PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:""` // A list of parameters for jobs with Python tasks, for example // `"python_params": ["john doe", "35"]`. The parameters are passed to // Python file as command-line parameters. If specified upon `run-now`, it @@ -7019,16 +7400,16 @@ type RepairRun struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - PythonParams types.List `tfsdk:"python_params" tf:"optional"` + PythonParams types.List `tfsdk:"python_params" tf:""` // If true, repair all failed tasks. Only one of `rerun_tasks` or // `rerun_all_failed_tasks` can be used. - RerunAllFailedTasks types.Bool `tfsdk:"rerun_all_failed_tasks" tf:"optional"` + RerunAllFailedTasks types.Bool `tfsdk:"rerun_all_failed_tasks" tf:""` // If true, repair all tasks that depend on the tasks in `rerun_tasks`, even // if they were previously successful. Can be also used in combination with // `rerun_all_failed_tasks`. - RerunDependentTasks types.Bool `tfsdk:"rerun_dependent_tasks" tf:"optional"` + RerunDependentTasks types.Bool `tfsdk:"rerun_dependent_tasks" tf:""` // The task keys of the task runs to repair. - RerunTasks types.List `tfsdk:"rerun_tasks" tf:"optional"` + RerunTasks types.List `tfsdk:"rerun_tasks" tf:""` // The job run ID of the run to repair. The run must not be in progress. RunId types.Int64 `tfsdk:"run_id" tf:""` // A list of parameters for jobs with spark submit task, for example @@ -7049,11 +7430,11 @@ type RepairRun struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:""` // A map from keys to values for jobs with SQL task, for example // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task // does not support custom parameters. - SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` + SqlParams types.Map `tfsdk:"sql_params" tf:""` } func (newState *RepairRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairRun) { @@ -7062,6 +7443,13 @@ func (newState *RepairRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairRu func (newState *RepairRun) SyncEffectiveFieldsDuringRead(existingState RepairRun) { } +func (c RepairRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineParams{}.ToSchema(cs, append(path, "pipeline_params")...) + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepairRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7414,7 +7802,7 @@ func (o *RepairRun) SetSqlParams(ctx context.Context, v map[string]types.String) type RepairRunResponse struct { // The ID of the repair. Must be provided in subsequent repairs using the // `latest_repair_id` field to ensure sequential repairs. - RepairId types.Int64 `tfsdk:"repair_id" tf:"optional"` + RepairId types.Int64 `tfsdk:"repair_id" tf:""` } func (newState *RepairRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairRunResponse) { @@ -7423,6 +7811,11 @@ func (newState *RepairRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RepairRunResponse) SyncEffectiveFieldsDuringRead(existingState RepairRunResponse) { } +func (c RepairRunResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepairRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7471,6 +7864,14 @@ func (newState *ResetJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResetJob) func (newState *ResetJob) SyncEffectiveFieldsDuringRead(existingState ResetJob) { } +func (c ResetJob) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + cs.SetRequired(append(path, "new_settings")...) + JobSettings{}.ToSchema(cs, append(path, "new_settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResetJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7537,12 +7938,6 @@ func (o *ResetJob) SetNewSettings(ctx context.Context, v JobSettings) { type ResetResponse struct { } -func (newState *ResetResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResetResponse) { -} - -func (newState *ResetResponse) SyncEffectiveFieldsDuringRead(existingState ResetResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResetResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7571,9 +7966,9 @@ func (o ResetResponse) Type(ctx context.Context) attr.Type { } type ResolvedConditionTaskValues struct { - Left types.String `tfsdk:"left" tf:"optional"` + Left types.String `tfsdk:"left" tf:""` - Right types.String `tfsdk:"right" tf:"optional"` + Right types.String `tfsdk:"right" tf:""` } func (newState *ResolvedConditionTaskValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedConditionTaskValues) { @@ -7582,6 +7977,11 @@ func (newState *ResolvedConditionTaskValues) SyncEffectiveFieldsDuringCreateOrUp func (newState *ResolvedConditionTaskValues) SyncEffectiveFieldsDuringRead(existingState ResolvedConditionTaskValues) { } +func (c ResolvedConditionTaskValues) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedConditionTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7616,7 +8016,7 @@ func (o ResolvedConditionTaskValues) Type(ctx context.Context) attr.Type { } type ResolvedDbtTaskValues struct { - Commands types.List `tfsdk:"commands" tf:"optional"` + Commands types.List `tfsdk:"commands" tf:""` } func (newState *ResolvedDbtTaskValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedDbtTaskValues) { @@ -7625,6 +8025,11 @@ func (newState *ResolvedDbtTaskValues) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ResolvedDbtTaskValues) SyncEffectiveFieldsDuringRead(existingState ResolvedDbtTaskValues) { } +func (c ResolvedDbtTaskValues) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedDbtTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7687,7 +8092,7 @@ func (o *ResolvedDbtTaskValues) SetCommands(ctx context.Context, v []types.Strin } type ResolvedNotebookTaskValues struct { - BaseParameters types.Map `tfsdk:"base_parameters" tf:"optional"` + BaseParameters types.Map `tfsdk:"base_parameters" tf:""` } func (newState *ResolvedNotebookTaskValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedNotebookTaskValues) { @@ -7696,6 +8101,11 @@ func (newState *ResolvedNotebookTaskValues) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ResolvedNotebookTaskValues) SyncEffectiveFieldsDuringRead(existingState ResolvedNotebookTaskValues) { } +func (c ResolvedNotebookTaskValues) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedNotebookTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7758,7 +8168,7 @@ func (o *ResolvedNotebookTaskValues) SetBaseParameters(ctx context.Context, v ma } type ResolvedParamPairValues struct { - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` } func (newState *ResolvedParamPairValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedParamPairValues) { @@ -7767,6 +8177,11 @@ func (newState *ResolvedParamPairValues) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ResolvedParamPairValues) SyncEffectiveFieldsDuringRead(existingState ResolvedParamPairValues) { } +func (c ResolvedParamPairValues) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedParamPairValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7829,9 +8244,9 @@ func (o *ResolvedParamPairValues) SetParameters(ctx context.Context, v map[strin } type ResolvedPythonWheelTaskValues struct { - NamedParameters types.Map `tfsdk:"named_parameters" tf:"optional"` + NamedParameters types.Map `tfsdk:"named_parameters" tf:""` - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *ResolvedPythonWheelTaskValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedPythonWheelTaskValues) { @@ -7840,6 +8255,11 @@ func (newState *ResolvedPythonWheelTaskValues) SyncEffectiveFieldsDuringCreateOr func (newState *ResolvedPythonWheelTaskValues) SyncEffectiveFieldsDuringRead(existingState ResolvedPythonWheelTaskValues) { } +func (c ResolvedPythonWheelTaskValues) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedPythonWheelTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7933,9 +8353,9 @@ func (o *ResolvedPythonWheelTaskValues) SetParameters(ctx context.Context, v []t } type ResolvedRunJobTaskValues struct { - JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.Map `tfsdk:"job_parameters" tf:""` - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` } func (newState *ResolvedRunJobTaskValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedRunJobTaskValues) { @@ -7944,6 +8364,11 @@ func (newState *ResolvedRunJobTaskValues) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ResolvedRunJobTaskValues) SyncEffectiveFieldsDuringRead(existingState ResolvedRunJobTaskValues) { } +func (c ResolvedRunJobTaskValues) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedRunJobTaskValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8037,7 +8462,7 @@ func (o *ResolvedRunJobTaskValues) SetParameters(ctx context.Context, v map[stri } type ResolvedStringParamsValues struct { - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *ResolvedStringParamsValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedStringParamsValues) { @@ -8046,6 +8471,11 @@ func (newState *ResolvedStringParamsValues) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ResolvedStringParamsValues) SyncEffectiveFieldsDuringRead(existingState ResolvedStringParamsValues) { } +func (c ResolvedStringParamsValues) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedStringParamsValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8108,25 +8538,25 @@ func (o *ResolvedStringParamsValues) SetParameters(ctx context.Context, v []type } type ResolvedValues struct { - ConditionTask types.Object `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.Object `tfsdk:"condition_task" tf:"object"` - DbtTask types.Object `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.Object `tfsdk:"dbt_task" tf:"object"` - NotebookTask types.Object `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.Object `tfsdk:"notebook_task" tf:"object"` - PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"object"` - RunJobTask types.Object `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.Object `tfsdk:"run_job_task" tf:"object"` - SimulationTask types.Object `tfsdk:"simulation_task" tf:"optional,object"` + SimulationTask types.Object `tfsdk:"simulation_task" tf:"object"` - SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"object"` - SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"object"` - SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"object"` - SqlTask types.Object `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.Object `tfsdk:"sql_task" tf:"object"` } func (newState *ResolvedValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedValues) { @@ -8135,6 +8565,21 @@ func (newState *ResolvedValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan Res func (newState *ResolvedValues) SyncEffectiveFieldsDuringRead(existingState ResolvedValues) { } +func (c ResolvedValues) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ResolvedConditionTaskValues{}.ToSchema(cs, append(path, "condition_task")...) + ResolvedDbtTaskValues{}.ToSchema(cs, append(path, "dbt_task")...) + ResolvedNotebookTaskValues{}.ToSchema(cs, append(path, "notebook_task")...) + ResolvedPythonWheelTaskValues{}.ToSchema(cs, append(path, "python_wheel_task")...) + ResolvedRunJobTaskValues{}.ToSchema(cs, append(path, "run_job_task")...) + ResolvedParamPairValues{}.ToSchema(cs, append(path, "simulation_task")...) + ResolvedStringParamsValues{}.ToSchema(cs, append(path, "spark_jar_task")...) + ResolvedStringParamsValues{}.ToSchema(cs, append(path, "spark_python_task")...) + ResolvedStringParamsValues{}.ToSchema(cs, append(path, "spark_submit_task")...) + ResolvedParamPairValues{}.ToSchema(cs, append(path, "sql_task")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedValues. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8484,28 +8929,28 @@ type Run struct { // original attempt’s ID and an incrementing `attempt_number`. Runs are // retried only until they succeed, and the maximum `attempt_number` is the // same as the `max_retries` value for the job. - AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:""` // The time in milliseconds it took to terminate the cluster and clean up // any associated artifacts. The duration of a task run is the sum of the // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The // `cleanup_duration` field is set to 0 for multitask job runs. The total // duration of a multitask job run is the value of the `run_duration` field. - CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:"optional"` + CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:""` // The cluster used for this run. If the run is specified to use a new // cluster, this field is set once the Jobs service has requested a cluster // for the run. - ClusterInstance types.Object `tfsdk:"cluster_instance" tf:"optional,object"` + ClusterInstance types.Object `tfsdk:"cluster_instance" tf:"object"` // A snapshot of the job’s cluster specification when this run was // created. - ClusterSpec types.Object `tfsdk:"cluster_spec" tf:"optional,object"` + ClusterSpec types.Object `tfsdk:"cluster_spec" tf:"object"` // The creator user name. This field won’t be included in the response if // the user has already been deleted. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Description of the run - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The time at which this run ended in epoch milliseconds (milliseconds // since 1/1/1970 UTC). This field is set to 0 if the job is still running. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The time in milliseconds it took to execute the commands in the JAR or // notebook until they completed, failed, timed out, were cancelled, or // encountered an unexpected error. The duration of a task run is the sum of @@ -8513,7 +8958,7 @@ type Run struct { // The `execution_duration` field is set to 0 for multitask job runs. The // total duration of a multitask job run is the value of the `run_duration` // field. - ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:"optional"` + ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -8524,58 +8969,65 @@ type Run struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"object"` + // Indicates if the run has more sub-resources (`tasks`, `job_clusters`) + // that are not shown. They can be accessed via :method:jobs/getrun + // endpoint. It is only relevant for API 2.2 :method:jobs/listruns requests + // with `expand_tasks=true`. + HasMore types.Bool `tfsdk:"has_more" tf:""` // Only populated by for-each iterations. The parent for-each task is // located in tasks array. - Iterations types.List `tfsdk:"iterations" tf:"optional"` + Iterations types.List `tfsdk:"iterations" tf:""` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. - // You must declare dependent libraries in task settings. - JobClusters types.List `tfsdk:"job_clusters" tf:"optional"` + // You must declare dependent libraries in task settings. If more than 100 + // job clusters are available, you can paginate through them using + // :method:jobs/getrun. + JobClusters types.List `tfsdk:"job_clusters" tf:""` // The canonical identifier of the job that contains this run. - JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + JobId types.Int64 `tfsdk:"job_id" tf:""` // Job-level parameters used in the run - JobParameters types.List `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.List `tfsdk:"job_parameters" tf:""` // ID of the job run that this run belongs to. For legacy and single-task // job runs the field is populated with the job run ID. For task runs, the // field is populated with the ID of the job run that the task run belongs // to. - JobRunId types.Int64 `tfsdk:"job_run_id" tf:"optional"` + JobRunId types.Int64 `tfsdk:"job_run_id" tf:""` // A token that can be used to list the next page of sub-resources. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // A unique identifier for this job run. This is set to the same value as // `run_id`. - NumberInJob types.Int64 `tfsdk:"number_in_job" tf:"optional"` + NumberInJob types.Int64 `tfsdk:"number_in_job" tf:""` // If this run is a retry of a prior run attempt, this field contains the // run_id of the original attempt; otherwise, it is the same as the run_id. - OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:"optional"` + OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:""` // The parameters used for this run. - OverridingParameters types.Object `tfsdk:"overriding_parameters" tf:"optional,object"` + OverridingParameters types.Object `tfsdk:"overriding_parameters" tf:"object"` // The time in milliseconds that the run has spent in the queue. - QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` + QueueDuration types.Int64 `tfsdk:"queue_duration" tf:""` // The repair history of the run. - RepairHistory types.List `tfsdk:"repair_history" tf:"optional"` + RepairHistory types.List `tfsdk:"repair_history" tf:""` // The time in milliseconds it took the job run and all of its repairs to // finish. - RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + RunDuration types.Int64 `tfsdk:"run_duration" tf:""` // The canonical identifier of the run. This ID is unique across all runs of // all jobs. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` // An optional name for the run. The maximum length is 4096 bytes in UTF-8 // encoding. - RunName types.String `tfsdk:"run_name" tf:"optional"` + RunName types.String `tfsdk:"run_name" tf:""` // The URL to the detail page of the run. - RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` + RunPageUrl types.String `tfsdk:"run_page_url" tf:""` // The type of a run. * `JOB_RUN`: Normal job run. A run created with // :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow run. A run created with // [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with // :method:jobs/submit. // // [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow - RunType types.String `tfsdk:"run_type" tf:"optional"` + RunType types.String `tfsdk:"run_type" tf:""` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. - Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"object"` // The time in milliseconds it took to set up the cluster. For runs that run // on new clusters this is the cluster creation time, for runs that run on // existing clusters this time should be very short. The duration of a task @@ -8583,19 +9035,22 @@ type Run struct { // `cleanup_duration`. The `setup_duration` field is set to 0 for multitask // job runs. The total duration of a multitask job run is the value of the // `run_duration` field. - SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` + SetupDuration types.Int64 `tfsdk:"setup_duration" tf:""` // The time at which this run was started in epoch milliseconds // (milliseconds since 1/1/1970 UTC). This may not be the time when the job // task starts executing, for example, if the job is scheduled to run on a // new cluster, this is the time the cluster creation call is issued. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Deprecated. Please use the `status` field instead. - State types.Object `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"object"` // The current status of the run - Status types.Object `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"object"` // The list of tasks performed by the run. Each task has its own `run_id` - // which you can use to call `JobsGetOutput` to retrieve the run resutls. - Tasks types.List `tfsdk:"tasks" tf:"optional"` + // which you can use to call `JobsGetOutput` to retrieve the run resutls. If + // more than 100 tasks are available, you can paginate through them using + // :method:jobs/getrun. Use the `next_page_token` field at the object root + // to determine if more results are available. + Tasks types.List `tfsdk:"tasks" tf:""` // The type of trigger that fired this run. // // * `PERIODIC`: Schedules that periodically trigger runs, such as a cron @@ -8608,9 +9063,9 @@ type Run struct { // arrival. * `TABLE`: Indicates a run that is triggered by a table update. // * `CONTINUOUS_RESTART`: Indicates a run created by user to manually // restart a continuous job run. - Trigger types.String `tfsdk:"trigger" tf:"optional"` + Trigger types.String `tfsdk:"trigger" tf:""` // Additional details about what triggered the run - TriggerInfo types.Object `tfsdk:"trigger_info" tf:"optional,object"` + TriggerInfo types.Object `tfsdk:"trigger_info" tf:"object"` } func (newState *Run) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run) { @@ -8619,6 +9074,24 @@ func (newState *Run) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run) { func (newState *Run) SyncEffectiveFieldsDuringRead(existingState Run) { } +func (c Run) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterInstance{}.ToSchema(cs, append(path, "cluster_instance")...) + ClusterSpec{}.ToSchema(cs, append(path, "cluster_spec")...) + GitSource{}.ToSchema(cs, append(path, "git_source")...) + RunTask{}.ToSchema(cs, append(path, "iterations")...) + JobCluster{}.ToSchema(cs, append(path, "job_clusters")...) + JobParameter{}.ToSchema(cs, append(path, "job_parameters")...) + RunParameters{}.ToSchema(cs, append(path, "overriding_parameters")...) + RepairHistoryItem{}.ToSchema(cs, append(path, "repair_history")...) + CronSchedule{}.ToSchema(cs, append(path, "schedule")...) + RunState{}.ToSchema(cs, append(path, "state")...) + RunStatus{}.ToSchema(cs, append(path, "status")...) + RunTask{}.ToSchema(cs, append(path, "tasks")...) + TriggerInfo{}.ToSchema(cs, append(path, "trigger_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Run. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8660,6 +9133,7 @@ func (o Run) ToObjectValue(ctx context.Context) basetypes.ObjectValue { "end_time": o.EndTime, "execution_duration": o.ExecutionDuration, "git_source": o.GitSource, + "has_more": o.HasMore, "iterations": o.Iterations, "job_clusters": o.JobClusters, "job_id": o.JobId, @@ -8700,6 +9174,7 @@ func (o Run) Type(ctx context.Context) attr.Type { "end_time": types.Int64Type, "execution_duration": types.Int64Type, "git_source": GitSource{}.Type(ctx), + "has_more": types.BoolType, "iterations": basetypes.ListType{ ElemType: RunTask{}.Type(ctx), }, @@ -9109,7 +9584,7 @@ type RunConditionTask struct { Op types.String `tfsdk:"op" tf:""` // The condition expression evaluation result. Filled in if the task was // successfully completed. Can be `"true"` or `"false"` - Outcome types.String `tfsdk:"outcome" tf:"optional"` + Outcome types.String `tfsdk:"outcome" tf:""` // The right operand of the condition task. Can be either a string value or // a job state or parameter reference. Right types.String `tfsdk:"right" tf:""` @@ -9121,6 +9596,14 @@ func (newState *RunConditionTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan R func (newState *RunConditionTask) SyncEffectiveFieldsDuringRead(existingState RunConditionTask) { } +func (c RunConditionTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "left")...) + cs.SetRequired(append(path, "op")...) + cs.SetRequired(append(path, "right")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunConditionTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9162,13 +9645,13 @@ type RunForEachTask struct { // An optional maximum allowed number of concurrent runs of the task. Set // this value if you want to be able to execute multiple runs of the task // concurrently. - Concurrency types.Int64 `tfsdk:"concurrency" tf:"optional"` + Concurrency types.Int64 `tfsdk:"concurrency" tf:""` // Array for task to iterate on. This can be a JSON string or a reference to // an array parameter. Inputs types.String `tfsdk:"inputs" tf:""` // Read only field. Populated for GetRun and ListRuns RPC calls and stores // the execution stats of an For each task - Stats types.Object `tfsdk:"stats" tf:"optional,object"` + Stats types.Object `tfsdk:"stats" tf:"object"` // Configuration for the task that will be run for each element in the array Task types.Object `tfsdk:"task" tf:"object"` } @@ -9179,6 +9662,15 @@ func (newState *RunForEachTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run func (newState *RunForEachTask) SyncEffectiveFieldsDuringRead(existingState RunForEachTask) { } +func (c RunForEachTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "inputs")...) + ForEachStats{}.ToSchema(cs, append(path, "stats")...) + cs.SetRequired(append(path, "task")...) + Task{}.ToSchema(cs, append(path, "task")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunForEachTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9277,7 +9769,7 @@ func (o *RunForEachTask) SetTask(ctx context.Context, v Task) { type RunJobOutput struct { // The run id of the triggered job run - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` } func (newState *RunJobOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunJobOutput) { @@ -9286,6 +9778,11 @@ func (newState *RunJobOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunJo func (newState *RunJobOutput) SyncEffectiveFieldsDuringRead(existingState RunJobOutput) { } +func (c RunJobOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunJobOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9321,7 +9818,7 @@ type RunJobTask struct { // An array of commands to execute for jobs with the dbt task, for example // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt // run"]` - DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + DbtCommands types.List `tfsdk:"dbt_commands" tf:""` // A list of parameters for jobs with Spark JAR tasks, for example // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the // main function of the main class specified in the Spark JAR task. If not @@ -9334,11 +9831,11 @@ type RunJobTask struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - JarParams types.List `tfsdk:"jar_params" tf:"optional"` + JarParams types.List `tfsdk:"jar_params" tf:""` // ID of the job to trigger. JobId types.Int64 `tfsdk:"job_id" tf:""` // Job-level parameters used to trigger the job. - JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.Map `tfsdk:"job_parameters" tf:""` // A map from keys to values for jobs with notebook task, for example // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed // to the notebook and is accessible through the [dbutils.widgets.get] @@ -9358,11 +9855,11 @@ type RunJobTask struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html - NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + NotebookParams types.Map `tfsdk:"notebook_params" tf:""` // Controls whether the pipeline should perform a full refresh - PipelineParams types.Object `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.Object `tfsdk:"pipeline_params" tf:"object"` - PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:""` // A list of parameters for jobs with Python tasks, for example // `"python_params": ["john doe", "35"]`. The parameters are passed to // Python file as command-line parameters. If specified upon `run-now`, it @@ -9380,7 +9877,7 @@ type RunJobTask struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - PythonParams types.List `tfsdk:"python_params" tf:"optional"` + PythonParams types.List `tfsdk:"python_params" tf:""` // A list of parameters for jobs with spark submit task, for example // `"spark_submit_params": ["--class", // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to @@ -9399,11 +9896,11 @@ type RunJobTask struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:""` // A map from keys to values for jobs with SQL task, for example // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task // does not support custom parameters. - SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` + SqlParams types.Map `tfsdk:"sql_params" tf:""` } func (newState *RunJobTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunJobTask) { @@ -9412,6 +9909,13 @@ func (newState *RunJobTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunJobT func (newState *RunJobTask) SyncEffectiveFieldsDuringRead(existingState RunJobTask) { } +func (c RunJobTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + PipelineParams{}.ToSchema(cs, append(path, "pipeline_params")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunJobTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9727,7 +10231,7 @@ type RunNow struct { // An array of commands to execute for jobs with the dbt task, for example // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt // run"]` - DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + DbtCommands types.List `tfsdk:"dbt_commands" tf:""` // An optional token to guarantee the idempotency of job run requests. If a // run with the provided token already exists, the request does not create a // new run but returns the ID of the existing run instead. If a run with the @@ -9742,7 +10246,7 @@ type RunNow struct { // For more information, see [How to ensure idempotency for jobs]. // // [How to ensure idempotency for jobs]: https://kb.databricks.com/jobs/jobs-idempotency.html - IdempotencyToken types.String `tfsdk:"idempotency_token" tf:"optional"` + IdempotencyToken types.String `tfsdk:"idempotency_token" tf:""` // A list of parameters for jobs with Spark JAR tasks, for example // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the // main function of the main class specified in the Spark JAR task. If not @@ -9755,12 +10259,12 @@ type RunNow struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - JarParams types.List `tfsdk:"jar_params" tf:"optional"` + JarParams types.List `tfsdk:"jar_params" tf:""` // The ID of the job to be executed JobId types.Int64 `tfsdk:"job_id" tf:""` // Job-level parameters used in the run. for example `"param": // "overriding_val"` - JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + JobParameters types.Map `tfsdk:"job_parameters" tf:""` // A map from keys to values for jobs with notebook task, for example // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed // to the notebook and is accessible through the [dbutils.widgets.get] @@ -9780,14 +10284,14 @@ type RunNow struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html - NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + NotebookParams types.Map `tfsdk:"notebook_params" tf:""` // A list of task keys to run inside of the job. If this field is not // provided, all tasks in the job will be run. - Only types.List `tfsdk:"only" tf:"optional"` + Only types.List `tfsdk:"only" tf:""` // Controls whether the pipeline should perform a full refresh - PipelineParams types.Object `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.Object `tfsdk:"pipeline_params" tf:"object"` - PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:""` // A list of parameters for jobs with Python tasks, for example // `"python_params": ["john doe", "35"]`. The parameters are passed to // Python file as command-line parameters. If specified upon `run-now`, it @@ -9805,9 +10309,9 @@ type RunNow struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - PythonParams types.List `tfsdk:"python_params" tf:"optional"` + PythonParams types.List `tfsdk:"python_params" tf:""` // The queue settings of the run. - Queue types.Object `tfsdk:"queue" tf:"optional,object"` + Queue types.Object `tfsdk:"queue" tf:"object"` // A list of parameters for jobs with spark submit task, for example // `"spark_submit_params": ["--class", // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to @@ -9826,11 +10330,11 @@ type RunNow struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:""` // A map from keys to values for jobs with SQL task, for example // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task // does not support custom parameters. - SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` + SqlParams types.Map `tfsdk:"sql_params" tf:""` } func (newState *RunNow) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNow) { @@ -9839,6 +10343,14 @@ func (newState *RunNow) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNow) { func (newState *RunNow) SyncEffectiveFieldsDuringRead(existingState RunNow) { } +func (c RunNow) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + PipelineParams{}.ToSchema(cs, append(path, "pipeline_params")...) + QueueSettings{}.ToSchema(cs, append(path, "queue")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunNow. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10218,9 +10730,9 @@ func (o *RunNow) SetSqlParams(ctx context.Context, v map[string]types.String) { type RunNowResponse struct { // A unique identifier for this job run. This is set to the same value as // `run_id`. - NumberInJob types.Int64 `tfsdk:"number_in_job" tf:"optional"` + NumberInJob types.Int64 `tfsdk:"number_in_job" tf:""` // The globally unique ID of the newly triggered run. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` } func (newState *RunNowResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNowResponse) { @@ -10229,6 +10741,11 @@ func (newState *RunNowResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run func (newState *RunNowResponse) SyncEffectiveFieldsDuringRead(existingState RunNowResponse) { } +func (c RunNowResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunNowResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10265,16 +10782,16 @@ func (o RunNowResponse) Type(ctx context.Context) attr.Type { // Run output was retrieved successfully. type RunOutput struct { // The output of a dbt task, if available. - DbtOutput types.Object `tfsdk:"dbt_output" tf:"optional,object"` + DbtOutput types.Object `tfsdk:"dbt_output" tf:"object"` // An error message indicating why a task failed or why output is not // available. The message is unstructured, and its exact format is subject // to change. - Error types.String `tfsdk:"error" tf:"optional"` + Error types.String `tfsdk:"error" tf:""` // If there was an error executing the run, this field contains any // available stack traces. - ErrorTrace types.String `tfsdk:"error_trace" tf:"optional"` + ErrorTrace types.String `tfsdk:"error_trace" tf:""` - Info types.String `tfsdk:"info" tf:"optional"` + Info types.String `tfsdk:"info" tf:""` // The output from tasks that write to standard streams (stdout/stderr) such // as spark_jar_task, spark_python_task, python_wheel_task. // @@ -10282,11 +10799,11 @@ type RunOutput struct { // spark_submit_task. // // Databricks restricts this API to return the last 5 MB of these logs. - Logs types.String `tfsdk:"logs" tf:"optional"` + Logs types.String `tfsdk:"logs" tf:""` // Whether the logs are truncated. - LogsTruncated types.Bool `tfsdk:"logs_truncated" tf:"optional"` + LogsTruncated types.Bool `tfsdk:"logs_truncated" tf:""` // All details of the run except for its output. - Metadata types.Object `tfsdk:"metadata" tf:"optional,object"` + Metadata types.Object `tfsdk:"metadata" tf:"object"` // The output of a notebook task, if available. A notebook task that // terminates (either successfully or with a failure) without calling // `dbutils.notebook.exit()` is considered to have an empty output. This @@ -10295,11 +10812,11 @@ type RunOutput struct { // the [ClusterLogConf] field to configure log storage for the job cluster. // // [ClusterLogConf]: https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterlogconf - NotebookOutput types.Object `tfsdk:"notebook_output" tf:"optional,object"` + NotebookOutput types.Object `tfsdk:"notebook_output" tf:"object"` // The output of a run job task, if available - RunJobOutput types.Object `tfsdk:"run_job_output" tf:"optional,object"` + RunJobOutput types.Object `tfsdk:"run_job_output" tf:"object"` // The output of a SQL task, if available. - SqlOutput types.Object `tfsdk:"sql_output" tf:"optional,object"` + SqlOutput types.Object `tfsdk:"sql_output" tf:"object"` } func (newState *RunOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunOutput) { @@ -10308,6 +10825,16 @@ func (newState *RunOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunOutpu func (newState *RunOutput) SyncEffectiveFieldsDuringRead(existingState RunOutput) { } +func (c RunOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DbtOutput{}.ToSchema(cs, append(path, "dbt_output")...) + Run{}.ToSchema(cs, append(path, "metadata")...) + NotebookOutput{}.ToSchema(cs, append(path, "notebook_output")...) + RunJobOutput{}.ToSchema(cs, append(path, "run_job_output")...) + SqlOutput{}.ToSchema(cs, append(path, "sql_output")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10507,7 +11034,7 @@ type RunParameters struct { // An array of commands to execute for jobs with the dbt task, for example // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt // run"]` - DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + DbtCommands types.List `tfsdk:"dbt_commands" tf:""` // A list of parameters for jobs with Spark JAR tasks, for example // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the // main function of the main class specified in the Spark JAR task. If not @@ -10520,7 +11047,7 @@ type RunParameters struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - JarParams types.List `tfsdk:"jar_params" tf:"optional"` + JarParams types.List `tfsdk:"jar_params" tf:""` // A map from keys to values for jobs with notebook task, for example // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed // to the notebook and is accessible through the [dbutils.widgets.get] @@ -10540,11 +11067,11 @@ type RunParameters struct { // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html - NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + NotebookParams types.Map `tfsdk:"notebook_params" tf:""` // Controls whether the pipeline should perform a full refresh - PipelineParams types.Object `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.Object `tfsdk:"pipeline_params" tf:"object"` - PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:""` // A list of parameters for jobs with Python tasks, for example // `"python_params": ["john doe", "35"]`. The parameters are passed to // Python file as command-line parameters. If specified upon `run-now`, it @@ -10562,7 +11089,7 @@ type RunParameters struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - PythonParams types.List `tfsdk:"python_params" tf:"optional"` + PythonParams types.List `tfsdk:"python_params" tf:""` // A list of parameters for jobs with spark submit task, for example // `"spark_submit_params": ["--class", // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to @@ -10581,11 +11108,11 @@ type RunParameters struct { // non-ASCII characters are Chinese, Japanese kanjis, and emojis. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:""` // A map from keys to values for jobs with SQL task, for example // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task // does not support custom parameters. - SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` + SqlParams types.Map `tfsdk:"sql_params" tf:""` } func (newState *RunParameters) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunParameters) { @@ -10594,6 +11121,12 @@ func (newState *RunParameters) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunP func (newState *RunParameters) SyncEffectiveFieldsDuringRead(existingState RunParameters) { } +func (c RunParameters) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineParams{}.ToSchema(cs, append(path, "pipeline_params")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunParameters. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10876,18 +11409,18 @@ func (o *RunParameters) SetSqlParams(ctx context.Context, v map[string]types.Str type RunState struct { // A value indicating the run's current lifecycle state. This field is // always available in the response. - LifeCycleState types.String `tfsdk:"life_cycle_state" tf:"optional"` + LifeCycleState types.String `tfsdk:"life_cycle_state" tf:""` // The reason indicating why the run was queued. - QueueReason types.String `tfsdk:"queue_reason" tf:"optional"` + QueueReason types.String `tfsdk:"queue_reason" tf:""` // A value indicating the run's result. This field is only available for // terminal lifecycle states. - ResultState types.String `tfsdk:"result_state" tf:"optional"` + ResultState types.String `tfsdk:"result_state" tf:""` // A descriptive message for the current state. This field is unstructured, // and its exact format is subject to change. - StateMessage types.String `tfsdk:"state_message" tf:"optional"` + StateMessage types.String `tfsdk:"state_message" tf:""` // A value indicating whether a run was canceled manually by a user or by // the scheduler because the run timed out. - UserCancelledOrTimedout types.Bool `tfsdk:"user_cancelled_or_timedout" tf:"optional"` + UserCancelledOrTimedout types.Bool `tfsdk:"user_cancelled_or_timedout" tf:""` } func (newState *RunState) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunState) { @@ -10896,6 +11429,11 @@ func (newState *RunState) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunState) func (newState *RunState) SyncEffectiveFieldsDuringRead(existingState RunState) { } +func (c RunState) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10938,12 +11476,12 @@ func (o RunState) Type(ctx context.Context) attr.Type { // The current status of the run type RunStatus struct { // If the run was queued, details about the reason for queuing the run. - QueueDetails types.Object `tfsdk:"queue_details" tf:"optional,object"` + QueueDetails types.Object `tfsdk:"queue_details" tf:"object"` // The current state of the run. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // If the run is in a TERMINATING or TERMINATED state, details about the // reason for terminating the run. - TerminationDetails types.Object `tfsdk:"termination_details" tf:"optional,object"` + TerminationDetails types.Object `tfsdk:"termination_details" tf:"object"` } func (newState *RunStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunStatus) { @@ -10952,6 +11490,13 @@ func (newState *RunStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunStatu func (newState *RunStatus) SyncEffectiveFieldsDuringRead(existingState RunStatus) { } +func (c RunStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueueDetails{}.ToSchema(cs, append(path, "queue_details")...) + TerminationDetails{}.ToSchema(cs, append(path, "termination_details")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11055,48 +11600,48 @@ type RunTask struct { // original attempt’s ID and an incrementing `attempt_number`. Runs are // retried only until they succeed, and the maximum `attempt_number` is the // same as the `max_retries` value for the job. - AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:""` // The task runs a [clean rooms] notebook when the // `clean_rooms_notebook_task` field is present. // // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html - CleanRoomsNotebookTask types.Object `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` + CleanRoomsNotebookTask types.Object `tfsdk:"clean_rooms_notebook_task" tf:"object"` // The time in milliseconds it took to terminate the cluster and clean up // any associated artifacts. The duration of a task run is the sum of the // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The // `cleanup_duration` field is set to 0 for multitask job runs. The total // duration of a multitask job run is the value of the `run_duration` field. - CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:"optional"` + CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:""` // The cluster used for this run. If the run is specified to use a new // cluster, this field is set once the Jobs service has requested a cluster // for the run. - ClusterInstance types.Object `tfsdk:"cluster_instance" tf:"optional,object"` + ClusterInstance types.Object `tfsdk:"cluster_instance" tf:"object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries // or notifications. - ConditionTask types.Object `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.Object `tfsdk:"condition_task" tf:"object"` // The task runs one or more dbt commands when the `dbt_task` field is // present. The dbt task requires both Databricks SQL and the ability to use // a serverless or a pro SQL warehouse. - DbtTask types.Object `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.Object `tfsdk:"dbt_task" tf:"object"` // An optional array of objects specifying the dependency graph of the task. // All tasks specified in this field must complete successfully before // executing this task. The key is `task_key`, and the value is the name // assigned to the dependent task. - DependsOn types.List `tfsdk:"depends_on" tf:"optional"` + DependsOn types.List `tfsdk:"depends_on" tf:""` // An optional description for this task. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // An optional set of email addresses notified when the task run begins or // completes. The default behavior is to not send any emails. - EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"object"` // The time at which this run ended in epoch milliseconds (milliseconds // since 1/1/1970 UTC). This field is set to 0 if the job is still running. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The key that references an environment spec in a job. This field is // required for Python script, Python wheel and dbt tasks when using // serverless compute. - EnvironmentKey types.String `tfsdk:"environment_key" tf:"optional"` + EnvironmentKey types.String `tfsdk:"environment_key" tf:""` // The time in milliseconds it took to execute the commands in the JAR or // notebook until they completed, failed, timed out, were cancelled, or // encountered an unexpected error. The duration of a task run is the sum of @@ -11104,15 +11649,15 @@ type RunTask struct { // The `execution_duration` field is set to 0 for multitask job runs. The // total duration of a multitask job run is the value of the `run_duration` // field. - ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:"optional"` + ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:""` // If existing_cluster_id, the ID of an existing cluster that is used for // all runs. When running jobs or tasks on an existing cluster, you may need // to manually restart the cluster if it stops responding. We suggest // running jobs and tasks on new clusters for greater reliability - ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:""` // The task executes a nested task for every input provided when the // `for_each_task` field is present. - ForEachTask types.Object `tfsdk:"for_each_task" tf:"optional,object"` + ForEachTask types.Object `tfsdk:"for_each_task" tf:"object"` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. If `git_source` is set, @@ -11121,46 +11666,46 @@ type RunTask struct { // `WORKSPACE` on the task. Note: dbt and SQL File tasks support only // version-controlled sources. If dbt or SQL File tasks are used, // `git_source` must be defined on the job. - GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"object"` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. - JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:""` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. - Libraries types.List `tfsdk:"library" tf:"optional"` + Libraries types.List `tfsdk:"library" tf:""` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.Object `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.Object `tfsdk:"new_cluster" tf:"object"` // The task runs a notebook when the `notebook_task` field is present. - NotebookTask types.Object `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.Object `tfsdk:"notebook_task" tf:"object"` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // task run. - NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"object"` // The task triggers a pipeline update when the `pipeline_task` field is // present. Only pipelines configured to use triggered more are supported. - PipelineTask types.Object `tfsdk:"pipeline_task" tf:"optional,object"` + PipelineTask types.Object `tfsdk:"pipeline_task" tf:"object"` // The task runs a Python wheel when the `python_wheel_task` field is // present. - PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"object"` // The time in milliseconds that the run has spent in the queue. - QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` + QueueDuration types.Int64 `tfsdk:"queue_duration" tf:""` // Parameter values including resolved references - ResolvedValues types.Object `tfsdk:"resolved_values" tf:"optional,object"` + ResolvedValues types.Object `tfsdk:"resolved_values" tf:"object"` // The time in milliseconds it took the job run and all of its repairs to // finish. - RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + RunDuration types.Int64 `tfsdk:"run_duration" tf:""` // The ID of the task run. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` // An optional value indicating the condition that determines whether the // task should be run once its dependencies have been completed. When // omitted, defaults to `ALL_SUCCESS`. See :method:jobs/create for a list of // possible values. - RunIf types.String `tfsdk:"run_if" tf:"optional"` + RunIf types.String `tfsdk:"run_if" tf:""` // The task triggers another job when the `run_job_task` field is present. - RunJobTask types.Object `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.Object `tfsdk:"run_job_task" tf:"object"` - RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` + RunPageUrl types.String `tfsdk:"run_page_url" tf:""` // The time in milliseconds it took to set up the cluster. For runs that run // on new clusters this is the cluster creation time, for runs that run on // existing clusters this time should be very short. The duration of a task @@ -11168,12 +11713,12 @@ type RunTask struct { // `cleanup_duration`. The `setup_duration` field is set to 0 for multitask // job runs. The total duration of a multitask job run is the value of the // `run_duration` field. - SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` + SetupDuration types.Int64 `tfsdk:"setup_duration" tf:""` // The task runs a JAR when the `spark_jar_task` field is present. - SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"object"` // The task runs a Python file when the `spark_python_task` field is // present. - SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"object"` // (Legacy) The task runs the spark-submit script when the // `spark_submit_task` field is present. This task can run only on new // clusters and is not compatible with serverless compute. @@ -11192,19 +11737,19 @@ type RunTask struct { // // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 // paths. - SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"object"` // The task runs a SQL query or file, or it refreshes a SQL alert or a // legacy SQL dashboard when the `sql_task` field is present. - SqlTask types.Object `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.Object `tfsdk:"sql_task" tf:"object"` // The time at which this run was started in epoch milliseconds // (milliseconds since 1/1/1970 UTC). This may not be the time when the job // task starts executing, for example, if the job is scheduled to run on a // new cluster, this is the time the cluster creation call is issued. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Deprecated. Please use the `status` field instead. - State types.Object `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"object"` // The current status of the run - Status types.Object `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"object"` // A unique name for the task. This field is used to refer to this task from // other tasks. This field is required and must be unique within its parent // job. On Update or Reset, this field is used to reference the tasks to be @@ -11212,11 +11757,11 @@ type RunTask struct { TaskKey types.String `tfsdk:"task_key" tf:""` // An optional timeout applied to each run of this job task. A value of `0` // means no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A collection of system notification IDs to notify when the run begins or // completes. The default behavior is to not send any system notifications. // Task webhooks respect the task notification settings. - WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"object"` } func (newState *RunTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTask) { @@ -11225,6 +11770,34 @@ func (newState *RunTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTask) { func (newState *RunTask) SyncEffectiveFieldsDuringRead(existingState RunTask) { } +func (c RunTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomsNotebookTask{}.ToSchema(cs, append(path, "clean_rooms_notebook_task")...) + ClusterInstance{}.ToSchema(cs, append(path, "cluster_instance")...) + RunConditionTask{}.ToSchema(cs, append(path, "condition_task")...) + DbtTask{}.ToSchema(cs, append(path, "dbt_task")...) + TaskDependency{}.ToSchema(cs, append(path, "depends_on")...) + JobEmailNotifications{}.ToSchema(cs, append(path, "email_notifications")...) + RunForEachTask{}.ToSchema(cs, append(path, "for_each_task")...) + GitSource{}.ToSchema(cs, append(path, "git_source")...) + compute_tf.ClusterSpec{}.ToSchema(cs, append(path, "new_cluster")...) + NotebookTask{}.ToSchema(cs, append(path, "notebook_task")...) + TaskNotificationSettings{}.ToSchema(cs, append(path, "notification_settings")...) + PipelineTask{}.ToSchema(cs, append(path, "pipeline_task")...) + PythonWheelTask{}.ToSchema(cs, append(path, "python_wheel_task")...) + ResolvedValues{}.ToSchema(cs, append(path, "resolved_values")...) + RunJobTask{}.ToSchema(cs, append(path, "run_job_task")...) + SparkJarTask{}.ToSchema(cs, append(path, "spark_jar_task")...) + SparkPythonTask{}.ToSchema(cs, append(path, "spark_python_task")...) + SparkSubmitTask{}.ToSchema(cs, append(path, "spark_submit_task")...) + SqlTask{}.ToSchema(cs, append(path, "sql_task")...) + RunState{}.ToSchema(cs, append(path, "state")...) + RunStatus{}.ToSchema(cs, append(path, "status")...) + cs.SetRequired(append(path, "task_key")...) + WebhookNotifications{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12005,20 +12578,20 @@ func (o *RunTask) SetWebhookNotifications(ctx context.Context, v WebhookNotifica type SparkJarTask struct { // Deprecated since 04/2016. Provide a `jar` through the `libraries` field // instead. For an example, see :method:jobs/create. - JarUri types.String `tfsdk:"jar_uri" tf:"optional"` + JarUri types.String `tfsdk:"jar_uri" tf:""` // The full name of the class containing the main method to be executed. // This class must be contained in a JAR provided as a library. // // The code must use `SparkContext.getOrCreate` to obtain a Spark context; // otherwise, runs of the job fail. - MainClassName types.String `tfsdk:"main_class_name" tf:"optional"` + MainClassName types.String `tfsdk:"main_class_name" tf:""` // Parameters passed to the main method. // // Use [Task parameter variables] to set parameters containing information // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *SparkJarTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkJarTask) { @@ -12027,6 +12600,11 @@ func (newState *SparkJarTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan Spark func (newState *SparkJarTask) SyncEffectiveFieldsDuringRead(existingState SparkJarTask) { } +func (c SparkJarTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkJarTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12099,7 +12677,7 @@ type SparkPythonTask struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // The Python file to be executed. Cloud file URIs (such as dbfs:/, s3:/, // adls:/, gcs:/) and workspace paths are supported. For python files stored // in the Databricks workspace, the path must be absolute and begin with @@ -12115,7 +12693,7 @@ type SparkPythonTask struct { // * `WORKSPACE`: The Python file is located in a Databricks workspace or at // a cloud filesystem URI. * `GIT`: The Python file is located in a remote // Git repository. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` } func (newState *SparkPythonTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkPythonTask) { @@ -12124,6 +12702,12 @@ func (newState *SparkPythonTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sp func (newState *SparkPythonTask) SyncEffectiveFieldsDuringRead(existingState SparkPythonTask) { } +func (c SparkPythonTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "python_file")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkPythonTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12196,7 +12780,7 @@ type SparkSubmitTask struct { // about job runs. // // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` } func (newState *SparkSubmitTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkSubmitTask) { @@ -12205,6 +12789,11 @@ func (newState *SparkSubmitTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sp func (newState *SparkSubmitTask) SyncEffectiveFieldsDuringRead(existingState SparkSubmitTask) { } +func (c SparkSubmitTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkSubmitTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12272,16 +12861,16 @@ type SqlAlertOutput struct { // * UNKNOWN: alert yet to be evaluated * OK: alert evaluated and did not // fulfill trigger conditions * TRIGGERED: alert evaluated and fulfilled // trigger conditions - AlertState types.String `tfsdk:"alert_state" tf:"optional"` + AlertState types.String `tfsdk:"alert_state" tf:""` // The link to find the output results. - OutputLink types.String `tfsdk:"output_link" tf:"optional"` + OutputLink types.String `tfsdk:"output_link" tf:""` // The text of the SQL query. Can Run permission of the SQL query associated // with the SQL alert is required to view this field. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Information about SQL statements executed in the run. - SqlStatements types.List `tfsdk:"sql_statements" tf:"optional"` + SqlStatements types.List `tfsdk:"sql_statements" tf:""` // The canonical identifier of the SQL warehouse. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *SqlAlertOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlAlertOutput) { @@ -12290,6 +12879,12 @@ func (newState *SqlAlertOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sql func (newState *SqlAlertOutput) SyncEffectiveFieldsDuringRead(existingState SqlAlertOutput) { } +func (c SqlAlertOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlStatementOutput{}.ToSchema(cs, append(path, "sql_statements")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlAlertOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12361,9 +12956,9 @@ func (o *SqlAlertOutput) SetSqlStatements(ctx context.Context, v []SqlStatementO type SqlDashboardOutput struct { // The canonical identifier of the SQL warehouse. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` // Widgets executed in the run. Only SQL query based widgets are listed. - Widgets types.List `tfsdk:"widgets" tf:"optional"` + Widgets types.List `tfsdk:"widgets" tf:""` } func (newState *SqlDashboardOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlDashboardOutput) { @@ -12372,6 +12967,12 @@ func (newState *SqlDashboardOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SqlDashboardOutput) SyncEffectiveFieldsDuringRead(existingState SqlDashboardOutput) { } +func (c SqlDashboardOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlDashboardWidgetOutput{}.ToSchema(cs, append(path, "widgets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlDashboardOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12437,19 +13038,19 @@ func (o *SqlDashboardOutput) SetWidgets(ctx context.Context, v []SqlDashboardWid type SqlDashboardWidgetOutput struct { // Time (in epoch milliseconds) when execution of the SQL widget ends. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The information about the error when execution fails. - Error types.Object `tfsdk:"error" tf:"optional,object"` + Error types.Object `tfsdk:"error" tf:"object"` // The link to find the output results. - OutputLink types.String `tfsdk:"output_link" tf:"optional"` + OutputLink types.String `tfsdk:"output_link" tf:""` // Time (in epoch milliseconds) when execution of the SQL widget starts. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // The execution status of the SQL widget. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The canonical identifier of the SQL widget. - WidgetId types.String `tfsdk:"widget_id" tf:"optional"` + WidgetId types.String `tfsdk:"widget_id" tf:""` // The title of the SQL widget. - WidgetTitle types.String `tfsdk:"widget_title" tf:"optional"` + WidgetTitle types.String `tfsdk:"widget_title" tf:""` } func (newState *SqlDashboardWidgetOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlDashboardWidgetOutput) { @@ -12458,6 +13059,12 @@ func (newState *SqlDashboardWidgetOutput) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *SqlDashboardWidgetOutput) SyncEffectiveFieldsDuringRead(existingState SqlDashboardWidgetOutput) { } +func (c SqlDashboardWidgetOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlOutputError{}.ToSchema(cs, append(path, "error")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlDashboardWidgetOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12533,11 +13140,11 @@ func (o *SqlDashboardWidgetOutput) SetError(ctx context.Context, v SqlOutputErro type SqlOutput struct { // The output of a SQL alert task, if available. - AlertOutput types.Object `tfsdk:"alert_output" tf:"optional,object"` + AlertOutput types.Object `tfsdk:"alert_output" tf:"object"` // The output of a SQL dashboard task, if available. - DashboardOutput types.Object `tfsdk:"dashboard_output" tf:"optional,object"` + DashboardOutput types.Object `tfsdk:"dashboard_output" tf:"object"` // The output of a SQL query task, if available. - QueryOutput types.Object `tfsdk:"query_output" tf:"optional,object"` + QueryOutput types.Object `tfsdk:"query_output" tf:"object"` } func (newState *SqlOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlOutput) { @@ -12546,6 +13153,14 @@ func (newState *SqlOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlOutpu func (newState *SqlOutput) SyncEffectiveFieldsDuringRead(existingState SqlOutput) { } +func (c SqlOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlAlertOutput{}.ToSchema(cs, append(path, "alert_output")...) + SqlDashboardOutput{}.ToSchema(cs, append(path, "dashboard_output")...) + SqlQueryOutput{}.ToSchema(cs, append(path, "query_output")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12671,7 +13286,7 @@ func (o *SqlOutput) SetQueryOutput(ctx context.Context, v SqlQueryOutput) { type SqlOutputError struct { // The error message when execution fails. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *SqlOutputError) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlOutputError) { @@ -12680,6 +13295,11 @@ func (newState *SqlOutputError) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sql func (newState *SqlOutputError) SyncEffectiveFieldsDuringRead(existingState SqlOutputError) { } +func (c SqlOutputError) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlOutputError. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12712,16 +13332,16 @@ func (o SqlOutputError) Type(ctx context.Context) attr.Type { } type SqlQueryOutput struct { - EndpointId types.String `tfsdk:"endpoint_id" tf:"optional"` + EndpointId types.String `tfsdk:"endpoint_id" tf:""` // The link to find the output results. - OutputLink types.String `tfsdk:"output_link" tf:"optional"` + OutputLink types.String `tfsdk:"output_link" tf:""` // The text of the SQL query. Can Run permission of the SQL query is // required to view this field. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Information about SQL statements executed in the run. - SqlStatements types.List `tfsdk:"sql_statements" tf:"optional"` + SqlStatements types.List `tfsdk:"sql_statements" tf:""` // The canonical identifier of the SQL warehouse. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *SqlQueryOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlQueryOutput) { @@ -12730,6 +13350,12 @@ func (newState *SqlQueryOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sql func (newState *SqlQueryOutput) SyncEffectiveFieldsDuringRead(existingState SqlQueryOutput) { } +func (c SqlQueryOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlStatementOutput{}.ToSchema(cs, append(path, "sql_statements")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlQueryOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12801,7 +13427,7 @@ func (o *SqlQueryOutput) SetSqlStatements(ctx context.Context, v []SqlStatementO type SqlStatementOutput struct { // A key that can be used to look up query details. - LookupKey types.String `tfsdk:"lookup_key" tf:"optional"` + LookupKey types.String `tfsdk:"lookup_key" tf:""` } func (newState *SqlStatementOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlStatementOutput) { @@ -12810,6 +13436,11 @@ func (newState *SqlStatementOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SqlStatementOutput) SyncEffectiveFieldsDuringRead(existingState SqlStatementOutput) { } +func (c SqlStatementOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlStatementOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12843,17 +13474,17 @@ func (o SqlStatementOutput) Type(ctx context.Context) attr.Type { type SqlTask struct { // If alert, indicates that this job must refresh a SQL alert. - Alert types.Object `tfsdk:"alert" tf:"optional,object"` + Alert types.Object `tfsdk:"alert" tf:"object"` // If dashboard, indicates that this job must refresh a SQL dashboard. - Dashboard types.Object `tfsdk:"dashboard" tf:"optional,object"` + Dashboard types.Object `tfsdk:"dashboard" tf:"object"` // If file, indicates that this job runs a SQL file in a remote Git // repository. - File types.Object `tfsdk:"file" tf:"optional,object"` + File types.Object `tfsdk:"file" tf:"object"` // Parameters to be used for each run of this job. The SQL alert task does // not support custom parameters. - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` // If query, indicates that this job must execute a SQL query. - Query types.Object `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"object"` // The canonical identifier of the SQL warehouse. Recommended to use with // serverless or pro SQL warehouses. Classic SQL warehouses are only // supported for SQL alert, dashboard and query tasks and are limited to @@ -12867,6 +13498,16 @@ func (newState *SqlTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTask) { func (newState *SqlTask) SyncEffectiveFieldsDuringRead(existingState SqlTask) { } +func (c SqlTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SqlTaskAlert{}.ToSchema(cs, append(path, "alert")...) + SqlTaskDashboard{}.ToSchema(cs, append(path, "dashboard")...) + SqlTaskFile{}.ToSchema(cs, append(path, "file")...) + SqlTaskQuery{}.ToSchema(cs, append(path, "query")...) + cs.SetRequired(append(path, "warehouse_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13058,9 +13699,9 @@ type SqlTaskAlert struct { // The canonical identifier of the SQL alert. AlertId types.String `tfsdk:"alert_id" tf:""` // If true, the alert notifications are not sent to subscribers. - PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:"optional"` + PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:""` // If specified, alert notifications are sent to subscribers. - Subscriptions types.List `tfsdk:"subscriptions" tf:"optional"` + Subscriptions types.List `tfsdk:"subscriptions" tf:""` } func (newState *SqlTaskAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskAlert) { @@ -13069,6 +13710,13 @@ func (newState *SqlTaskAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTa func (newState *SqlTaskAlert) SyncEffectiveFieldsDuringRead(existingState SqlTaskAlert) { } +func (c SqlTaskAlert) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "alert_id")...) + SqlTaskSubscription{}.ToSchema(cs, append(path, "subscriptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13136,14 +13784,14 @@ func (o *SqlTaskAlert) SetSubscriptions(ctx context.Context, v []SqlTaskSubscrip type SqlTaskDashboard struct { // Subject of the email sent to subscribers of this task. - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The canonical identifier of the SQL dashboard. DashboardId types.String `tfsdk:"dashboard_id" tf:""` // If true, the dashboard snapshot is not taken, and emails are not sent to // subscribers. - PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:"optional"` + PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:""` // If specified, dashboard snapshots are sent to subscriptions. - Subscriptions types.List `tfsdk:"subscriptions" tf:"optional"` + Subscriptions types.List `tfsdk:"subscriptions" tf:""` } func (newState *SqlTaskDashboard) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskDashboard) { @@ -13152,6 +13800,13 @@ func (newState *SqlTaskDashboard) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *SqlTaskDashboard) SyncEffectiveFieldsDuringRead(existingState SqlTaskDashboard) { } +func (c SqlTaskDashboard) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + SqlTaskSubscription{}.ToSchema(cs, append(path, "subscriptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskDashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13231,7 +13886,7 @@ type SqlTaskFile struct { // // * `WORKSPACE`: SQL file is located in Databricks workspace. * `GIT`: SQL // file is located in cloud Git provider. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` } func (newState *SqlTaskFile) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskFile) { @@ -13240,6 +13895,12 @@ func (newState *SqlTaskFile) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTas func (newState *SqlTaskFile) SyncEffectiveFieldsDuringRead(existingState SqlTaskFile) { } +func (c SqlTaskFile) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskFile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13284,6 +13945,12 @@ func (newState *SqlTaskQuery) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTa func (newState *SqlTaskQuery) SyncEffectiveFieldsDuringRead(existingState SqlTaskQuery) { } +func (c SqlTaskQuery) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "query_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13320,11 +13987,11 @@ type SqlTaskSubscription struct { // notification. This parameter is mutually exclusive with user_name. You // cannot set both destination_id and user_name for subscription // notifications. - DestinationId types.String `tfsdk:"destination_id" tf:"optional"` + DestinationId types.String `tfsdk:"destination_id" tf:""` // The user name to receive the subscription email. This parameter is // mutually exclusive with destination_id. You cannot set both // destination_id and user_name for subscription notifications. - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *SqlTaskSubscription) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskSubscription) { @@ -13333,6 +14000,11 @@ func (newState *SqlTaskSubscription) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *SqlTaskSubscription) SyncEffectiveFieldsDuringRead(existingState SqlTaskSubscription) { } +func (c SqlTaskSubscription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskSubscription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13368,16 +14040,16 @@ func (o SqlTaskSubscription) Type(ctx context.Context) attr.Type { type SubmitRun struct { // List of permissions to set on the job. - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The user specified id of the budget policy to use for this one-time run. // If not specified, the run will be not be attributed to any budget policy. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // An optional set of email addresses notified when the run begins or // completes. - EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"object"` // A list of task execution environment specifications that can be // referenced by tasks of this run. - Environments types.List `tfsdk:"environments" tf:"optional"` + Environments types.List `tfsdk:"environments" tf:""` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. @@ -13388,9 +14060,9 @@ type SubmitRun struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.Object `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"object"` // An optional token that can be used to guarantee the idempotency of job // run requests. If a run with the provided token already exists, the // request does not create a new run but returns the ID of the existing run @@ -13406,26 +14078,26 @@ type SubmitRun struct { // For more information, see [How to ensure idempotency for jobs]. // // [How to ensure idempotency for jobs]: https://kb.databricks.com/jobs/jobs-idempotency.html - IdempotencyToken types.String `tfsdk:"idempotency_token" tf:"optional"` + IdempotencyToken types.String `tfsdk:"idempotency_token" tf:""` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // run. - NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"object"` // The queue settings of the one-time run. - Queue types.Object `tfsdk:"queue" tf:"optional,object"` + Queue types.Object `tfsdk:"queue" tf:"object"` // Specifies the user or service principal that the job runs as. If not // specified, the job runs as the user who submits the request. - RunAs types.Object `tfsdk:"run_as" tf:"optional,object"` + RunAs types.Object `tfsdk:"run_as" tf:"object"` // An optional name for the run. The default value is `Untitled`. - RunName types.String `tfsdk:"run_name" tf:"optional"` + RunName types.String `tfsdk:"run_name" tf:""` - Tasks types.List `tfsdk:"tasks" tf:"optional"` + Tasks types.List `tfsdk:"tasks" tf:""` // An optional timeout applied to each run of this job. A value of `0` means // no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A collection of system notification IDs to notify when the run begins or // completes. - WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"object"` } func (newState *SubmitRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRun) { @@ -13434,6 +14106,21 @@ func (newState *SubmitRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRu func (newState *SubmitRun) SyncEffectiveFieldsDuringRead(existingState SubmitRun) { } +func (c SubmitRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + JobAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + JobEmailNotifications{}.ToSchema(cs, append(path, "email_notifications")...) + JobEnvironment{}.ToSchema(cs, append(path, "environments")...) + GitSource{}.ToSchema(cs, append(path, "git_source")...) + JobsHealthRules{}.ToSchema(cs, append(path, "health")...) + JobNotificationSettings{}.ToSchema(cs, append(path, "notification_settings")...) + QueueSettings{}.ToSchema(cs, append(path, "queue")...) + JobRunAs{}.ToSchema(cs, append(path, "run_as")...) + SubmitTask{}.ToSchema(cs, append(path, "tasks")...) + WebhookNotifications{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubmitRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13785,7 +14472,7 @@ func (o *SubmitRun) SetWebhookNotifications(ctx context.Context, v WebhookNotifi // Run was created and started successfully. type SubmitRunResponse struct { // The canonical identifier for the newly submitted run. - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` } func (newState *SubmitRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRunResponse) { @@ -13794,6 +14481,11 @@ func (newState *SubmitRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SubmitRunResponse) SyncEffectiveFieldsDuringRead(existingState SubmitRunResponse) { } +func (c SubmitRunResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubmitRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13830,70 +14522,70 @@ type SubmitTask struct { // `clean_rooms_notebook_task` field is present. // // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html - CleanRoomsNotebookTask types.Object `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` + CleanRoomsNotebookTask types.Object `tfsdk:"clean_rooms_notebook_task" tf:"object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries // or notifications. - ConditionTask types.Object `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.Object `tfsdk:"condition_task" tf:"object"` // The task runs one or more dbt commands when the `dbt_task` field is // present. The dbt task requires both Databricks SQL and the ability to use // a serverless or a pro SQL warehouse. - DbtTask types.Object `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.Object `tfsdk:"dbt_task" tf:"object"` // An optional array of objects specifying the dependency graph of the task. // All tasks specified in this field must complete successfully before // executing this task. The key is `task_key`, and the value is the name // assigned to the dependent task. - DependsOn types.List `tfsdk:"depends_on" tf:"optional"` + DependsOn types.List `tfsdk:"depends_on" tf:""` // An optional description for this task. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // An optional set of email addresses notified when the task run begins or // completes. The default behavior is to not send any emails. - EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"object"` // The key that references an environment spec in a job. This field is // required for Python script, Python wheel and dbt tasks when using // serverless compute. - EnvironmentKey types.String `tfsdk:"environment_key" tf:"optional"` + EnvironmentKey types.String `tfsdk:"environment_key" tf:""` // If existing_cluster_id, the ID of an existing cluster that is used for // all runs. When running jobs or tasks on an existing cluster, you may need // to manually restart the cluster if it stops responding. We suggest // running jobs and tasks on new clusters for greater reliability - ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:""` // The task executes a nested task for every input provided when the // `for_each_task` field is present. - ForEachTask types.Object `tfsdk:"for_each_task" tf:"optional,object"` + ForEachTask types.Object `tfsdk:"for_each_task" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.Object `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"object"` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. - Libraries types.List `tfsdk:"library" tf:"optional"` + Libraries types.List `tfsdk:"library" tf:""` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.Object `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.Object `tfsdk:"new_cluster" tf:"object"` // The task runs a notebook when the `notebook_task` field is present. - NotebookTask types.Object `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.Object `tfsdk:"notebook_task" tf:"object"` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // task run. - NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"object"` // The task triggers a pipeline update when the `pipeline_task` field is // present. Only pipelines configured to use triggered more are supported. - PipelineTask types.Object `tfsdk:"pipeline_task" tf:"optional,object"` + PipelineTask types.Object `tfsdk:"pipeline_task" tf:"object"` // The task runs a Python wheel when the `python_wheel_task` field is // present. - PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"object"` // An optional value indicating the condition that determines whether the // task should be run once its dependencies have been completed. When // omitted, defaults to `ALL_SUCCESS`. See :method:jobs/create for a list of // possible values. - RunIf types.String `tfsdk:"run_if" tf:"optional"` + RunIf types.String `tfsdk:"run_if" tf:""` // The task triggers another job when the `run_job_task` field is present. - RunJobTask types.Object `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.Object `tfsdk:"run_job_task" tf:"object"` // The task runs a JAR when the `spark_jar_task` field is present. - SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"object"` // The task runs a Python file when the `spark_python_task` field is // present. - SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"object"` // (Legacy) The task runs the spark-submit script when the // `spark_submit_task` field is present. This task can run only on new // clusters and is not compatible with serverless compute. @@ -13912,10 +14604,10 @@ type SubmitTask struct { // // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 // paths. - SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"object"` // The task runs a SQL query or file, or it refreshes a SQL alert or a // legacy SQL dashboard when the `sql_task` field is present. - SqlTask types.Object `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.Object `tfsdk:"sql_task" tf:"object"` // A unique name for the task. This field is used to refer to this task from // other tasks. This field is required and must be unique within its parent // job. On Update or Reset, this field is used to reference the tasks to be @@ -13923,11 +14615,11 @@ type SubmitTask struct { TaskKey types.String `tfsdk:"task_key" tf:""` // An optional timeout applied to each run of this job task. A value of `0` // means no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A collection of system notification IDs to notify when the run begins or // completes. The default behavior is to not send any system notifications. // Task webhooks respect the task notification settings. - WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"object"` } func (newState *SubmitTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitTask) { @@ -13936,6 +14628,30 @@ func (newState *SubmitTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitT func (newState *SubmitTask) SyncEffectiveFieldsDuringRead(existingState SubmitTask) { } +func (c SubmitTask) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomsNotebookTask{}.ToSchema(cs, append(path, "clean_rooms_notebook_task")...) + ConditionTask{}.ToSchema(cs, append(path, "condition_task")...) + DbtTask{}.ToSchema(cs, append(path, "dbt_task")...) + TaskDependency{}.ToSchema(cs, append(path, "depends_on")...) + JobEmailNotifications{}.ToSchema(cs, append(path, "email_notifications")...) + ForEachTask{}.ToSchema(cs, append(path, "for_each_task")...) + JobsHealthRules{}.ToSchema(cs, append(path, "health")...) + compute_tf.ClusterSpec{}.ToSchema(cs, append(path, "new_cluster")...) + NotebookTask{}.ToSchema(cs, append(path, "notebook_task")...) + TaskNotificationSettings{}.ToSchema(cs, append(path, "notification_settings")...) + PipelineTask{}.ToSchema(cs, append(path, "pipeline_task")...) + PythonWheelTask{}.ToSchema(cs, append(path, "python_wheel_task")...) + RunJobTask{}.ToSchema(cs, append(path, "run_job_task")...) + SparkJarTask{}.ToSchema(cs, append(path, "spark_jar_task")...) + SparkPythonTask{}.ToSchema(cs, append(path, "spark_python_task")...) + SparkSubmitTask{}.ToSchema(cs, append(path, "spark_submit_task")...) + SqlTask{}.ToSchema(cs, append(path, "sql_task")...) + cs.SetRequired(append(path, "task_key")...) + WebhookNotifications{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SubmitTask. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14569,19 +15285,19 @@ func (o *SubmitTask) SetWebhookNotifications(ctx context.Context, v WebhookNotif type TableUpdateTriggerConfiguration struct { // The table(s) condition based on which to trigger a job run. - Condition types.String `tfsdk:"condition" tf:"optional"` + Condition types.String `tfsdk:"condition" tf:""` // If set, the trigger starts a run only after the specified amount of time // has passed since the last time the trigger fired. The minimum allowed // value is 60 seconds. - MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:"optional"` + MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:""` // A list of Delta tables to monitor for changes. The table name must be in // the format `catalog_name.schema_name.table_name`. - TableNames types.List `tfsdk:"table_names" tf:"optional"` + TableNames types.List `tfsdk:"table_names" tf:""` // If set, the trigger starts a run only after no table updates have // occurred for the specified time and can be used to wait for a series of // table updates before triggering a run. The minimum allowed value is 60 // seconds. - WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:"optional"` + WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:""` } func (newState *TableUpdateTriggerConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableUpdateTriggerConfiguration) { @@ -14590,6 +15306,11 @@ func (newState *TableUpdateTriggerConfiguration) SyncEffectiveFieldsDuringCreate func (newState *TableUpdateTriggerConfiguration) SyncEffectiveFieldsDuringRead(existingState TableUpdateTriggerConfiguration) { } +func (c TableUpdateTriggerConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableUpdateTriggerConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14662,76 +15383,76 @@ type Task struct { // `clean_rooms_notebook_task` field is present. // // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html - CleanRoomsNotebookTask types.Object `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` + CleanRoomsNotebookTask types.Object `tfsdk:"clean_rooms_notebook_task" tf:"object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries // or notifications. - ConditionTask types.Object `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.Object `tfsdk:"condition_task" tf:"object"` // The task runs one or more dbt commands when the `dbt_task` field is // present. The dbt task requires both Databricks SQL and the ability to use // a serverless or a pro SQL warehouse. - DbtTask types.Object `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.Object `tfsdk:"dbt_task" tf:"object"` // An optional array of objects specifying the dependency graph of the task. // All tasks specified in this field must complete before executing this // task. The task will run only if the `run_if` condition is true. The key // is `task_key`, and the value is the name assigned to the dependent task. - DependsOn types.List `tfsdk:"depends_on" tf:"optional"` + DependsOn types.List `tfsdk:"depends_on" tf:""` // An optional description for this task. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // An option to disable auto optimization in serverless - DisableAutoOptimization types.Bool `tfsdk:"disable_auto_optimization" tf:"optional"` + DisableAutoOptimization types.Bool `tfsdk:"disable_auto_optimization" tf:""` // An optional set of email addresses that is notified when runs of this // task begin or complete as well as when this task is deleted. The default // behavior is to not send any emails. - EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"object"` // The key that references an environment spec in a job. This field is // required for Python script, Python wheel and dbt tasks when using // serverless compute. - EnvironmentKey types.String `tfsdk:"environment_key" tf:"optional"` + EnvironmentKey types.String `tfsdk:"environment_key" tf:""` // If existing_cluster_id, the ID of an existing cluster that is used for // all runs. When running jobs or tasks on an existing cluster, you may need // to manually restart the cluster if it stops responding. We suggest // running jobs and tasks on new clusters for greater reliability - ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:""` // The task executes a nested task for every input provided when the // `for_each_task` field is present. - ForEachTask types.Object `tfsdk:"for_each_task" tf:"optional,object"` + ForEachTask types.Object `tfsdk:"for_each_task" tf:"object"` // An optional set of health rules that can be defined for this job. - Health types.Object `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"object"` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. - JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:""` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. - Libraries types.List `tfsdk:"library" tf:"optional"` + Libraries types.List `tfsdk:"library" tf:""` // An optional maximum number of times to retry an unsuccessful run. A run // is considered to be unsuccessful if it completes with the `FAILED` // result_state or `INTERNAL_ERROR` `life_cycle_state`. The value `-1` means // to retry indefinitely and the value `0` means to never retry. - MaxRetries types.Int64 `tfsdk:"max_retries" tf:"optional"` + MaxRetries types.Int64 `tfsdk:"max_retries" tf:""` // An optional minimal interval in milliseconds between the start of the // failed run and the subsequent retry run. The default behavior is that // unsuccessful runs are immediately retried. - MinRetryIntervalMillis types.Int64 `tfsdk:"min_retry_interval_millis" tf:"optional"` + MinRetryIntervalMillis types.Int64 `tfsdk:"min_retry_interval_millis" tf:""` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.Object `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.Object `tfsdk:"new_cluster" tf:"object"` // The task runs a notebook when the `notebook_task` field is present. - NotebookTask types.Object `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.Object `tfsdk:"notebook_task" tf:"object"` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // task. - NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"object"` // The task triggers a pipeline update when the `pipeline_task` field is // present. Only pipelines configured to use triggered more are supported. - PipelineTask types.Object `tfsdk:"pipeline_task" tf:"optional,object"` + PipelineTask types.Object `tfsdk:"pipeline_task" tf:"object"` // The task runs a Python wheel when the `python_wheel_task` field is // present. - PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"object"` // An optional policy to specify whether to retry a job when it times out. // The default behavior is to not retry on timeout. - RetryOnTimeout types.Bool `tfsdk:"retry_on_timeout" tf:"optional"` + RetryOnTimeout types.Bool `tfsdk:"retry_on_timeout" tf:""` // An optional value specifying the condition determining whether the task // is run once its dependencies have been completed. // @@ -14741,14 +15462,14 @@ type Task struct { // executed * `ALL_DONE`: All dependencies have been completed * // `AT_LEAST_ONE_FAILED`: At least one dependency failed * `ALL_FAILED`: ALl // dependencies have failed - RunIf types.String `tfsdk:"run_if" tf:"optional"` + RunIf types.String `tfsdk:"run_if" tf:""` // The task triggers another job when the `run_job_task` field is present. - RunJobTask types.Object `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.Object `tfsdk:"run_job_task" tf:"object"` // The task runs a JAR when the `spark_jar_task` field is present. - SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"object"` // The task runs a Python file when the `spark_python_task` field is // present. - SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"object"` // (Legacy) The task runs the spark-submit script when the // `spark_submit_task` field is present. This task can run only on new // clusters and is not compatible with serverless compute. @@ -14767,10 +15488,10 @@ type Task struct { // // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 // paths. - SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"object"` // The task runs a SQL query or file, or it refreshes a SQL alert or a // legacy SQL dashboard when the `sql_task` field is present. - SqlTask types.Object `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.Object `tfsdk:"sql_task" tf:"object"` // A unique name for the task. This field is used to refer to this task from // other tasks. This field is required and must be unique within its parent // job. On Update or Reset, this field is used to reference the tasks to be @@ -14778,11 +15499,11 @@ type Task struct { TaskKey types.String `tfsdk:"task_key" tf:""` // An optional timeout applied to each run of this job task. A value of `0` // means no timeout. - TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:""` // A collection of system notification IDs to notify when runs of this task // begin or complete. The default behavior is to not send any system // notifications. - WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"object"` } func (newState *Task) SyncEffectiveFieldsDuringCreateOrUpdate(plan Task) { @@ -14791,6 +15512,30 @@ func (newState *Task) SyncEffectiveFieldsDuringCreateOrUpdate(plan Task) { func (newState *Task) SyncEffectiveFieldsDuringRead(existingState Task) { } +func (c Task) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CleanRoomsNotebookTask{}.ToSchema(cs, append(path, "clean_rooms_notebook_task")...) + ConditionTask{}.ToSchema(cs, append(path, "condition_task")...) + DbtTask{}.ToSchema(cs, append(path, "dbt_task")...) + TaskDependency{}.ToSchema(cs, append(path, "depends_on")...) + TaskEmailNotifications{}.ToSchema(cs, append(path, "email_notifications")...) + ForEachTask{}.ToSchema(cs, append(path, "for_each_task")...) + JobsHealthRules{}.ToSchema(cs, append(path, "health")...) + compute_tf.ClusterSpec{}.ToSchema(cs, append(path, "new_cluster")...) + NotebookTask{}.ToSchema(cs, append(path, "notebook_task")...) + TaskNotificationSettings{}.ToSchema(cs, append(path, "notification_settings")...) + PipelineTask{}.ToSchema(cs, append(path, "pipeline_task")...) + PythonWheelTask{}.ToSchema(cs, append(path, "python_wheel_task")...) + RunJobTask{}.ToSchema(cs, append(path, "run_job_task")...) + SparkJarTask{}.ToSchema(cs, append(path, "spark_jar_task")...) + SparkPythonTask{}.ToSchema(cs, append(path, "spark_python_task")...) + SparkSubmitTask{}.ToSchema(cs, append(path, "spark_submit_task")...) + SqlTask{}.ToSchema(cs, append(path, "sql_task")...) + cs.SetRequired(append(path, "task_key")...) + WebhookNotifications{}.ToSchema(cs, append(path, "webhook_notifications")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Task. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15435,7 +16180,7 @@ func (o *Task) SetWebhookNotifications(ctx context.Context, v WebhookNotificatio type TaskDependency struct { // Can only be specified on condition task dependencies. The outcome of the // dependent task that must be met for this task to run. - Outcome types.String `tfsdk:"outcome" tf:"optional"` + Outcome types.String `tfsdk:"outcome" tf:""` // The name of the task this task depends on. TaskKey types.String `tfsdk:"task_key" tf:""` } @@ -15446,6 +16191,12 @@ func (newState *TaskDependency) SyncEffectiveFieldsDuringCreateOrUpdate(plan Tas func (newState *TaskDependency) SyncEffectiveFieldsDuringRead(existingState TaskDependency) { } +func (c TaskDependency) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "task_key")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TaskDependency. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15483,22 +16234,22 @@ type TaskEmailNotifications struct { // If true, do not send email to recipients specified in `on_failure` if the // run is skipped. This field is `deprecated`. Please use the // `notification_settings.no_alert_for_skipped_runs` field. - NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:""` // A list of email addresses to be notified when the duration of a run // exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in // the `health` field. If no rule for the `RUN_DURATION_SECONDS` metric is // specified in the `health` field for the job, notifications are not sent. - OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:"optional"` + OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:""` // A list of email addresses to be notified when a run unsuccessfully // completes. A run is considered to have completed unsuccessfully if it // ends with an `INTERNAL_ERROR` `life_cycle_state` or a `FAILED`, or // `TIMED_OUT` result_state. If this is not specified on job creation, // reset, or update the list is empty, and notifications are not sent. - OnFailure types.List `tfsdk:"on_failure" tf:"optional"` + OnFailure types.List `tfsdk:"on_failure" tf:""` // A list of email addresses to be notified when a run begins. If not // specified on job creation, reset, or update, the list is empty, and // notifications are not sent. - OnStart types.List `tfsdk:"on_start" tf:"optional"` + OnStart types.List `tfsdk:"on_start" tf:""` // A list of email addresses to notify when any streaming backlog thresholds // are exceeded for any stream. Streaming backlog thresholds can be set in // the `health` field using the following metrics: @@ -15506,13 +16257,13 @@ type TaskEmailNotifications struct { // `STREAMING_BACKLOG_SECONDS`, or `STREAMING_BACKLOG_FILES`. Alerting is // based on the 10-minute average of these metrics. If the issue persists, // notifications are resent every 30 minutes. - OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:"optional"` + OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:""` // A list of email addresses to be notified when a run successfully // completes. A run is considered to have completed successfully if it ends // with a `TERMINATED` `life_cycle_state` and a `SUCCESS` result_state. If // not specified on job creation, reset, or update, the list is empty, and // notifications are not sent. - OnSuccess types.List `tfsdk:"on_success" tf:"optional"` + OnSuccess types.List `tfsdk:"on_success" tf:""` } func (newState *TaskEmailNotifications) SyncEffectiveFieldsDuringCreateOrUpdate(plan TaskEmailNotifications) { @@ -15521,6 +16272,11 @@ func (newState *TaskEmailNotifications) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *TaskEmailNotifications) SyncEffectiveFieldsDuringRead(existingState TaskEmailNotifications) { } +func (c TaskEmailNotifications) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TaskEmailNotifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15712,13 +16468,13 @@ type TaskNotificationSettings struct { // If true, do not send notifications to recipients specified in `on_start` // for the retried runs and do not send notifications to recipients // specified in `on_failure` until the last retry of the run. - AlertOnLastAttempt types.Bool `tfsdk:"alert_on_last_attempt" tf:"optional"` + AlertOnLastAttempt types.Bool `tfsdk:"alert_on_last_attempt" tf:""` // If true, do not send notifications to recipients specified in // `on_failure` if the run is canceled. - NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:"optional"` + NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:""` // If true, do not send notifications to recipients specified in // `on_failure` if the run is skipped. - NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:""` } func (newState *TaskNotificationSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan TaskNotificationSettings) { @@ -15727,6 +16483,11 @@ func (newState *TaskNotificationSettings) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *TaskNotificationSettings) SyncEffectiveFieldsDuringRead(existingState TaskNotificationSettings) { } +func (c TaskNotificationSettings) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TaskNotificationSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15808,10 +16569,10 @@ type TerminationDetails struct { // The run was skipped due to reaching the job level queue size limit. // // [Link]: https://kb.databricks.com/en_US/notebooks/too-many-execution-contexts-are-open-right-now - Code types.String `tfsdk:"code" tf:"optional"` + Code types.String `tfsdk:"code" tf:""` // A descriptive message with the termination details. This field is // unstructured and the format might change. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // * `SUCCESS`: The run terminated without any issues * `INTERNAL_ERROR`: An // error occurred in the Databricks platform. Please look at the [status // page] or contact support if the issue persists. * `CLIENT_ERROR`: The run @@ -15820,7 +16581,7 @@ type TerminationDetails struct { // issue with your cloud provider. // // [status page]: https://status.databricks.com/ - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *TerminationDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan TerminationDetails) { @@ -15829,6 +16590,11 @@ func (newState *TerminationDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *TerminationDetails) SyncEffectiveFieldsDuringRead(existingState TerminationDetails) { } +func (c TerminationDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TerminationDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15867,7 +16633,7 @@ func (o TerminationDetails) Type(ctx context.Context) attr.Type { // Additional details about what triggered the run type TriggerInfo struct { // The run id of the Run Job task run - RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + RunId types.Int64 `tfsdk:"run_id" tf:""` } func (newState *TriggerInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggerInfo) { @@ -15876,6 +16642,11 @@ func (newState *TriggerInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Trigge func (newState *TriggerInfo) SyncEffectiveFieldsDuringRead(existingState TriggerInfo) { } +func (c TriggerInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TriggerInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15909,15 +16680,15 @@ func (o TriggerInfo) Type(ctx context.Context) attr.Type { type TriggerSettings struct { // File arrival trigger settings. - FileArrival types.Object `tfsdk:"file_arrival" tf:"optional,object"` + FileArrival types.Object `tfsdk:"file_arrival" tf:"object"` // Whether this trigger is paused or not. - PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + PauseStatus types.String `tfsdk:"pause_status" tf:""` // Periodic trigger settings. - Periodic types.Object `tfsdk:"periodic" tf:"optional,object"` + Periodic types.Object `tfsdk:"periodic" tf:"object"` // Old table trigger settings name. Deprecated in favor of `table_update`. - Table types.Object `tfsdk:"table" tf:"optional,object"` + Table types.Object `tfsdk:"table" tf:"object"` - TableUpdate types.Object `tfsdk:"table_update" tf:"optional,object"` + TableUpdate types.Object `tfsdk:"table_update" tf:"object"` } func (newState *TriggerSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggerSettings) { @@ -15926,6 +16697,15 @@ func (newState *TriggerSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan Tr func (newState *TriggerSettings) SyncEffectiveFieldsDuringRead(existingState TriggerSettings) { } +func (c TriggerSettings) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileArrivalTriggerConfiguration{}.ToSchema(cs, append(path, "file_arrival")...) + PeriodicTriggerConfiguration{}.ToSchema(cs, append(path, "periodic")...) + TableUpdateTriggerConfiguration{}.ToSchema(cs, append(path, "table")...) + TableUpdateTriggerConfiguration{}.ToSchema(cs, append(path, "table_update")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TriggerSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16086,7 +16866,7 @@ type UpdateJob struct { // Remove top-level fields in the job settings. Removing nested fields is // not supported, except for tasks and job clusters (`tasks/task_1`). This // field is optional. - FieldsToRemove types.List `tfsdk:"fields_to_remove" tf:"optional"` + FieldsToRemove types.List `tfsdk:"fields_to_remove" tf:""` // The canonical identifier of the job to update. This field is required. JobId types.Int64 `tfsdk:"job_id" tf:""` // The new settings for the job. @@ -16100,7 +16880,7 @@ type UpdateJob struct { // // Changes to the field `JobSettings.timeout_seconds` are applied to active // runs. Changes to other fields are applied to future runs only. - NewSettings types.Object `tfsdk:"new_settings" tf:"optional,object"` + NewSettings types.Object `tfsdk:"new_settings" tf:"object"` } func (newState *UpdateJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateJob) { @@ -16109,6 +16889,13 @@ func (newState *UpdateJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateJo func (newState *UpdateJob) SyncEffectiveFieldsDuringRead(existingState UpdateJob) { } +func (c UpdateJob) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "job_id")...) + JobSettings{}.ToSchema(cs, append(path, "new_settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateJob. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16206,12 +16993,6 @@ func (o *UpdateJob) SetNewSettings(ctx context.Context, v JobSettings) { type UpdateResponse struct { } -func (newState *UpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse) { -} - -func (newState *UpdateResponse) SyncEffectiveFieldsDuringRead(existingState UpdateResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16241,13 +17022,13 @@ func (o UpdateResponse) Type(ctx context.Context) attr.Type { type ViewItem struct { // Content of the view. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // Name of the view item. In the case of code view, it would be the // notebook’s name. In the case of dashboard view, it would be the // dashboard’s name. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Type of the view item. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *ViewItem) SyncEffectiveFieldsDuringCreateOrUpdate(plan ViewItem) { @@ -16256,6 +17037,11 @@ func (newState *ViewItem) SyncEffectiveFieldsDuringCreateOrUpdate(plan ViewItem) func (newState *ViewItem) SyncEffectiveFieldsDuringRead(existingState ViewItem) { } +func (c ViewItem) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ViewItem. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16301,6 +17087,12 @@ func (newState *Webhook) SyncEffectiveFieldsDuringCreateOrUpdate(plan Webhook) { func (newState *Webhook) SyncEffectiveFieldsDuringRead(existingState Webhook) { } +func (c Webhook) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Webhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -16337,13 +17129,13 @@ type WebhookNotifications struct { // a run exceeds the threshold specified for the `RUN_DURATION_SECONDS` // metric in the `health` field. A maximum of 3 destinations can be // specified for the `on_duration_warning_threshold_exceeded` property. - OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:"optional"` + OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:""` // An optional list of system notification IDs to call when the run fails. A // maximum of 3 destinations can be specified for the `on_failure` property. - OnFailure types.List `tfsdk:"on_failure" tf:"optional"` + OnFailure types.List `tfsdk:"on_failure" tf:""` // An optional list of system notification IDs to call when the run starts. // A maximum of 3 destinations can be specified for the `on_start` property. - OnStart types.List `tfsdk:"on_start" tf:"optional"` + OnStart types.List `tfsdk:"on_start" tf:""` // An optional list of system notification IDs to call when any streaming // backlog thresholds are exceeded for any stream. Streaming backlog // thresholds can be set in the `health` field using the following metrics: @@ -16352,11 +17144,11 @@ type WebhookNotifications struct { // based on the 10-minute average of these metrics. If the issue persists, // notifications are resent every 30 minutes. A maximum of 3 destinations // can be specified for the `on_streaming_backlog_exceeded` property. - OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:"optional"` + OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:""` // An optional list of system notification IDs to call when the run // completes successfully. A maximum of 3 destinations can be specified for // the `on_success` property. - OnSuccess types.List `tfsdk:"on_success" tf:"optional"` + OnSuccess types.List `tfsdk:"on_success" tf:""` } func (newState *WebhookNotifications) SyncEffectiveFieldsDuringCreateOrUpdate(plan WebhookNotifications) { @@ -16365,6 +17157,16 @@ func (newState *WebhookNotifications) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *WebhookNotifications) SyncEffectiveFieldsDuringRead(existingState WebhookNotifications) { } +func (c WebhookNotifications) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Webhook{}.ToSchema(cs, append(path, "on_duration_warning_threshold_exceeded")...) + Webhook{}.ToSchema(cs, append(path, "on_failure")...) + Webhook{}.ToSchema(cs, append(path, "on_start")...) + Webhook{}.ToSchema(cs, append(path, "on_streaming_backlog_exceeded")...) + Webhook{}.ToSchema(cs, append(path, "on_success")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WebhookNotifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/marketplace_tf/legacy_model.go b/internal/service/marketplace_tf/legacy_model.go index 98b3310e8..c420deca2 100755 --- a/internal/service/marketplace_tf/legacy_model.go +++ b/internal/service/marketplace_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -33,6 +34,13 @@ func (newState *AddExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringCre func (newState *AddExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddExchangeForListingRequest_SdkV2) { } +func (c AddExchangeForListingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "exchange_id")...) + cs.SetRequired(append(path, "listing_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddExchangeForListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -67,7 +75,7 @@ func (o AddExchangeForListingRequest_SdkV2) Type(ctx context.Context) attr.Type } type AddExchangeForListingResponse_SdkV2 struct { - ExchangeForListing types.List `tfsdk:"exchange_for_listing" tf:"optional,object"` + ExchangeForListing types.List `tfsdk:"exchange_for_listing" tf:"object"` } func (newState *AddExchangeForListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddExchangeForListingResponse_SdkV2) { @@ -76,6 +84,12 @@ func (newState *AddExchangeForListingResponse_SdkV2) SyncEffectiveFieldsDuringCr func (newState *AddExchangeForListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddExchangeForListingResponse_SdkV2) { } +func (c AddExchangeForListingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeListing_SdkV2{}.ToSchema(cs, append(path, "exchange_for_listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddExchangeForListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -142,12 +156,6 @@ type BatchGetListingsRequest_SdkV2 struct { Ids types.List `tfsdk:"-"` } -func (newState *BatchGetListingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetListingsRequest_SdkV2) { -} - -func (newState *BatchGetListingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState BatchGetListingsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetListingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -210,7 +218,7 @@ func (o *BatchGetListingsRequest_SdkV2) SetIds(ctx context.Context, v []types.St } type BatchGetListingsResponse_SdkV2 struct { - Listings types.List `tfsdk:"listings" tf:"optional"` + Listings types.List `tfsdk:"listings" tf:""` } func (newState *BatchGetListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetListingsResponse_SdkV2) { @@ -219,6 +227,12 @@ func (newState *BatchGetListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *BatchGetListingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState BatchGetListingsResponse_SdkV2) { } +func (c BatchGetListingsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing_SdkV2{}.ToSchema(cs, append(path, "listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetListingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -285,12 +299,6 @@ type BatchGetProvidersRequest_SdkV2 struct { Ids types.List `tfsdk:"-"` } -func (newState *BatchGetProvidersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetProvidersRequest_SdkV2) { -} - -func (newState *BatchGetProvidersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState BatchGetProvidersRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetProvidersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -353,7 +361,7 @@ func (o *BatchGetProvidersRequest_SdkV2) SetIds(ctx context.Context, v []types.S } type BatchGetProvidersResponse_SdkV2 struct { - Providers types.List `tfsdk:"providers" tf:"optional"` + Providers types.List `tfsdk:"providers" tf:""` } func (newState *BatchGetProvidersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetProvidersResponse_SdkV2) { @@ -362,6 +370,12 @@ func (newState *BatchGetProvidersResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *BatchGetProvidersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState BatchGetProvidersResponse_SdkV2) { } +func (c BatchGetProvidersResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo_SdkV2{}.ToSchema(cs, append(path, "providers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetProvidersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -433,6 +447,12 @@ func (newState *ConsumerTerms_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ConsumerTerms_SdkV2) SyncEffectiveFieldsDuringRead(existingState ConsumerTerms_SdkV2) { } +func (c ConsumerTerms_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ConsumerTerms. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -467,13 +487,13 @@ func (o ConsumerTerms_SdkV2) Type(ctx context.Context) attr.Type { // contact info for the consumer requesting data or performing a listing // installation type ContactInfo_SdkV2 struct { - Company types.String `tfsdk:"company" tf:"optional"` + Company types.String `tfsdk:"company" tf:""` - Email types.String `tfsdk:"email" tf:"optional"` + Email types.String `tfsdk:"email" tf:""` - FirstName types.String `tfsdk:"first_name" tf:"optional"` + FirstName types.String `tfsdk:"first_name" tf:""` - LastName types.String `tfsdk:"last_name" tf:"optional"` + LastName types.String `tfsdk:"last_name" tf:""` } func (newState *ContactInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContactInfo_SdkV2) { @@ -482,6 +502,11 @@ func (newState *ContactInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ContactInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ContactInfo_SdkV2) { } +func (c ContactInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ContactInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -529,6 +554,13 @@ func (newState *CreateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *CreateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeFilterRequest_SdkV2) { } +func (c CreateExchangeFilterRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "filter")...) + ExchangeFilter_SdkV2{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeFilterRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -591,7 +623,7 @@ func (o *CreateExchangeFilterRequest_SdkV2) SetFilter(ctx context.Context, v Exc } type CreateExchangeFilterResponse_SdkV2 struct { - FilterId types.String `tfsdk:"filter_id" tf:"optional"` + FilterId types.String `tfsdk:"filter_id" tf:""` } func (newState *CreateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeFilterResponse_SdkV2) { @@ -600,6 +632,11 @@ func (newState *CreateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *CreateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeFilterResponse_SdkV2) { } +func (c CreateExchangeFilterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeFilterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -641,6 +678,13 @@ func (newState *CreateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeRequest_SdkV2) { } +func (c CreateExchangeRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "exchange")...) + Exchange_SdkV2{}.ToSchema(cs, append(path, "exchange")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -703,7 +747,7 @@ func (o *CreateExchangeRequest_SdkV2) SetExchange(ctx context.Context, v Exchang } type CreateExchangeResponse_SdkV2 struct { - ExchangeId types.String `tfsdk:"exchange_id" tf:"optional"` + ExchangeId types.String `tfsdk:"exchange_id" tf:""` } func (newState *CreateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeResponse_SdkV2) { @@ -712,6 +756,11 @@ func (newState *CreateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CreateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeResponse_SdkV2) { } +func (c CreateExchangeResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -744,7 +793,7 @@ func (o CreateExchangeResponse_SdkV2) Type(ctx context.Context) attr.Type { } type CreateFileRequest_SdkV2 struct { - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` FileParent types.List `tfsdk:"file_parent" tf:"object"` @@ -759,6 +808,15 @@ func (newState *CreateFileRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateFileRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFileRequest_SdkV2) { } +func (c CreateFileRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "file_parent")...) + FileParent_SdkV2{}.ToSchema(cs, append(path, "file_parent")...) + cs.SetRequired(append(path, "marketplace_file_type")...) + cs.SetRequired(append(path, "mime_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFileRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -827,9 +885,9 @@ func (o *CreateFileRequest_SdkV2) SetFileParent(ctx context.Context, v FileParen } type CreateFileResponse_SdkV2 struct { - FileInfo types.List `tfsdk:"file_info" tf:"optional,object"` + FileInfo types.List `tfsdk:"file_info" tf:"object"` // Pre-signed POST URL to blob storage - UploadUrl types.String `tfsdk:"upload_url" tf:"optional"` + UploadUrl types.String `tfsdk:"upload_url" tf:""` } func (newState *CreateFileResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFileResponse_SdkV2) { @@ -838,6 +896,12 @@ func (newState *CreateFileResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateFileResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFileResponse_SdkV2) { } +func (c CreateFileResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo_SdkV2{}.ToSchema(cs, append(path, "file_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFileResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -902,17 +966,17 @@ func (o *CreateFileResponse_SdkV2) SetFileInfo(ctx context.Context, v FileInfo_S } type CreateInstallationRequest_SdkV2 struct { - AcceptedConsumerTerms types.List `tfsdk:"accepted_consumer_terms" tf:"optional,object"` + AcceptedConsumerTerms types.List `tfsdk:"accepted_consumer_terms" tf:"object"` - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` ListingId types.String `tfsdk:"-"` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` // for git repo installations - RepoDetail types.List `tfsdk:"repo_detail" tf:"optional,object"` + RepoDetail types.List `tfsdk:"repo_detail" tf:"object"` - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` } func (newState *CreateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstallationRequest_SdkV2) { @@ -921,6 +985,14 @@ func (newState *CreateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *CreateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateInstallationRequest_SdkV2) { } +func (c CreateInstallationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ConsumerTerms_SdkV2{}.ToSchema(cs, append(path, "accepted_consumer_terms")...) + cs.SetRequired(append(path, "listing_id")...) + RepoInstallation_SdkV2{}.ToSchema(cs, append(path, "repo_detail")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateInstallationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1031,6 +1103,13 @@ func (newState *CreateListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CreateListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateListingRequest_SdkV2) { } +func (c CreateListingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "listing")...) + Listing_SdkV2{}.ToSchema(cs, append(path, "listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1093,7 +1172,7 @@ func (o *CreateListingRequest_SdkV2) SetListing(ctx context.Context, v Listing_S } type CreateListingResponse_SdkV2 struct { - ListingId types.String `tfsdk:"listing_id" tf:"optional"` + ListingId types.String `tfsdk:"listing_id" tf:""` } func (newState *CreateListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateListingResponse_SdkV2) { @@ -1102,6 +1181,11 @@ func (newState *CreateListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateListingResponse_SdkV2) { } +func (c CreateListingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1137,21 +1221,21 @@ func (o CreateListingResponse_SdkV2) Type(ctx context.Context) attr.Type { type CreatePersonalizationRequest_SdkV2 struct { AcceptedConsumerTerms types.List `tfsdk:"accepted_consumer_terms" tf:"object"` - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - Company types.String `tfsdk:"company" tf:"optional"` + Company types.String `tfsdk:"company" tf:""` - FirstName types.String `tfsdk:"first_name" tf:"optional"` + FirstName types.String `tfsdk:"first_name" tf:""` IntendedUse types.String `tfsdk:"intended_use" tf:""` - IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:"optional"` + IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:""` - LastName types.String `tfsdk:"last_name" tf:"optional"` + LastName types.String `tfsdk:"last_name" tf:""` ListingId types.String `tfsdk:"-"` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` } func (newState *CreatePersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePersonalizationRequest_SdkV2) { @@ -1160,6 +1244,15 @@ func (newState *CreatePersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringCre func (newState *CreatePersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePersonalizationRequest_SdkV2) { } +func (c CreatePersonalizationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "accepted_consumer_terms")...) + ConsumerTerms_SdkV2{}.ToSchema(cs, append(path, "accepted_consumer_terms")...) + cs.SetRequired(append(path, "intended_use")...) + cs.SetRequired(append(path, "listing_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePersonalizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1238,7 +1331,7 @@ func (o *CreatePersonalizationRequest_SdkV2) SetAcceptedConsumerTerms(ctx contex } type CreatePersonalizationRequestResponse_SdkV2 struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *CreatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePersonalizationRequestResponse_SdkV2) { @@ -1247,6 +1340,11 @@ func (newState *CreatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsD func (newState *CreatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePersonalizationRequestResponse_SdkV2) { } +func (c CreatePersonalizationRequestResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePersonalizationRequestResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1288,6 +1386,13 @@ func (newState *CreateProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateProviderRequest_SdkV2) { } +func (c CreateProviderRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "provider")...) + ProviderInfo_SdkV2{}.ToSchema(cs, append(path, "provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1350,7 +1455,7 @@ func (o *CreateProviderRequest_SdkV2) SetProvider(ctx context.Context, v Provide } type CreateProviderResponse_SdkV2 struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *CreateProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProviderResponse_SdkV2) { @@ -1359,6 +1464,11 @@ func (newState *CreateProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CreateProviderResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateProviderResponse_SdkV2) { } +func (c CreateProviderResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1402,6 +1512,13 @@ func (newState *DataRefreshInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *DataRefreshInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataRefreshInfo_SdkV2) { } +func (c DataRefreshInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "interval")...) + cs.SetRequired(append(path, "unit")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataRefreshInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1440,12 +1557,6 @@ type DeleteExchangeFilterRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExchangeFilterRequest_SdkV2) { -} - -func (newState *DeleteExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeFilterRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeFilterRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1486,6 +1597,11 @@ func (newState *DeleteExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *DeleteExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeFilterResponse_SdkV2) { } +func (c DeleteExchangeFilterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeFilterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1518,12 +1634,6 @@ type DeleteExchangeRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExchangeRequest_SdkV2) { -} - -func (newState *DeleteExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1564,6 +1674,11 @@ func (newState *DeleteExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *DeleteExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeResponse_SdkV2) { } +func (c DeleteExchangeResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1596,12 +1711,6 @@ type DeleteFileRequest_SdkV2 struct { FileId types.String `tfsdk:"-"` } -func (newState *DeleteFileRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFileRequest_SdkV2) { -} - -func (newState *DeleteFileRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteFileRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFileRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1642,6 +1751,11 @@ func (newState *DeleteFileResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *DeleteFileResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteFileResponse_SdkV2) { } +func (c DeleteFileResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFileResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1676,12 +1790,6 @@ type DeleteInstallationRequest_SdkV2 struct { ListingId types.String `tfsdk:"-"` } -func (newState *DeleteInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteInstallationRequest_SdkV2) { -} - -func (newState *DeleteInstallationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteInstallationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstallationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1724,6 +1832,11 @@ func (newState *DeleteInstallationResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *DeleteInstallationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteInstallationResponse_SdkV2) { } +func (c DeleteInstallationResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstallationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1756,12 +1869,6 @@ type DeleteListingRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteListingRequest_SdkV2) { -} - -func (newState *DeleteListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteListingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1802,6 +1909,11 @@ func (newState *DeleteListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *DeleteListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteListingResponse_SdkV2) { } +func (c DeleteListingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1834,12 +1946,6 @@ type DeleteProviderRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteProviderRequest_SdkV2) { -} - -func (newState *DeleteProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteProviderRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1880,6 +1986,11 @@ func (newState *DeleteProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *DeleteProviderResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteProviderResponse_SdkV2) { } +func (c DeleteProviderResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteProviderResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1908,23 +2019,23 @@ func (o DeleteProviderResponse_SdkV2) Type(ctx context.Context) attr.Type { } type Exchange_SdkV2 struct { - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - Filters types.List `tfsdk:"filters" tf:"optional"` + Filters types.List `tfsdk:"filters" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - LinkedListings types.List `tfsdk:"linked_listings" tf:"optional"` + LinkedListings types.List `tfsdk:"linked_listings" tf:""` Name types.String `tfsdk:"name" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *Exchange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exchange_SdkV2) { @@ -1933,6 +2044,14 @@ func (newState *Exchange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exc func (newState *Exchange_SdkV2) SyncEffectiveFieldsDuringRead(existingState Exchange_SdkV2) { } +func (c Exchange_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeFilter_SdkV2{}.ToSchema(cs, append(path, "filters")...) + ExchangeListing_SdkV2{}.ToSchema(cs, append(path, "linked_listings")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Exchange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2040,9 +2159,9 @@ func (o *Exchange_SdkV2) SetLinkedListings(ctx context.Context, v []ExchangeList } type ExchangeFilter_SdkV2 struct { - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` ExchangeId types.String `tfsdk:"exchange_id" tf:""` @@ -2050,13 +2169,13 @@ type ExchangeFilter_SdkV2 struct { FilterValue types.String `tfsdk:"filter_value" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *ExchangeFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeFilter_SdkV2) { @@ -2065,6 +2184,14 @@ func (newState *ExchangeFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ExchangeFilter_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeFilter_SdkV2) { } +func (c ExchangeFilter_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "exchange_id")...) + cs.SetRequired(append(path, "filter_type")...) + cs.SetRequired(append(path, "filter_value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeFilter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2113,19 +2240,19 @@ func (o ExchangeFilter_SdkV2) Type(ctx context.Context) attr.Type { } type ExchangeListing_SdkV2 struct { - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - ExchangeId types.String `tfsdk:"exchange_id" tf:"optional"` + ExchangeId types.String `tfsdk:"exchange_id" tf:""` - ExchangeName types.String `tfsdk:"exchange_name" tf:"optional"` + ExchangeName types.String `tfsdk:"exchange_name" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - ListingId types.String `tfsdk:"listing_id" tf:"optional"` + ListingId types.String `tfsdk:"listing_id" tf:""` - ListingName types.String `tfsdk:"listing_name" tf:"optional"` + ListingName types.String `tfsdk:"listing_name" tf:""` } func (newState *ExchangeListing_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeListing_SdkV2) { @@ -2134,6 +2261,11 @@ func (newState *ExchangeListing_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ExchangeListing_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeListing_SdkV2) { } +func (c ExchangeListing_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeListing. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2178,26 +2310,26 @@ func (o ExchangeListing_SdkV2) Type(ctx context.Context) attr.Type { } type FileInfo_SdkV2 struct { - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Name displayed to users for applicable files, e.g. embedded notebooks - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` - DownloadLink types.String `tfsdk:"download_link" tf:"optional"` + DownloadLink types.String `tfsdk:"download_link" tf:""` - FileParent types.List `tfsdk:"file_parent" tf:"optional,object"` + FileParent types.List `tfsdk:"file_parent" tf:"object"` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - MarketplaceFileType types.String `tfsdk:"marketplace_file_type" tf:"optional"` + MarketplaceFileType types.String `tfsdk:"marketplace_file_type" tf:""` - MimeType types.String `tfsdk:"mime_type" tf:"optional"` + MimeType types.String `tfsdk:"mime_type" tf:""` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // Populated if status is in a failed state with more information on reason // for the failure. - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` } func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo_SdkV2) { @@ -2206,6 +2338,12 @@ func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Fil func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileInfo_SdkV2) { } +func (c FileInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileParent_SdkV2{}.ToSchema(cs, append(path, "file_parent")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2286,9 +2424,9 @@ func (o *FileInfo_SdkV2) SetFileParent(ctx context.Context, v FileParent_SdkV2) } type FileParent_SdkV2 struct { - FileParentType types.String `tfsdk:"file_parent_type" tf:"optional"` + FileParentType types.String `tfsdk:"file_parent_type" tf:""` // TODO make the following fields required - ParentId types.String `tfsdk:"parent_id" tf:"optional"` + ParentId types.String `tfsdk:"parent_id" tf:""` } func (newState *FileParent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileParent_SdkV2) { @@ -2297,6 +2435,11 @@ func (newState *FileParent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan F func (newState *FileParent_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileParent_SdkV2) { } +func (c FileParent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileParent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2335,12 +2478,6 @@ type GetExchangeRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExchangeRequest_SdkV2) { -} - -func (newState *GetExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExchangeRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2373,7 +2510,7 @@ func (o GetExchangeRequest_SdkV2) Type(ctx context.Context) attr.Type { } type GetExchangeResponse_SdkV2 struct { - Exchange types.List `tfsdk:"exchange" tf:"optional,object"` + Exchange types.List `tfsdk:"exchange" tf:"object"` } func (newState *GetExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExchangeResponse_SdkV2) { @@ -2382,6 +2519,12 @@ func (newState *GetExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *GetExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExchangeResponse_SdkV2) { } +func (c GetExchangeResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Exchange_SdkV2{}.ToSchema(cs, append(path, "exchange")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2448,12 +2591,6 @@ type GetFileRequest_SdkV2 struct { FileId types.String `tfsdk:"-"` } -func (newState *GetFileRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFileRequest_SdkV2) { -} - -func (newState *GetFileRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetFileRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFileRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2486,7 +2623,7 @@ func (o GetFileRequest_SdkV2) Type(ctx context.Context) attr.Type { } type GetFileResponse_SdkV2 struct { - FileInfo types.List `tfsdk:"file_info" tf:"optional,object"` + FileInfo types.List `tfsdk:"file_info" tf:"object"` } func (newState *GetFileResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFileResponse_SdkV2) { @@ -2495,6 +2632,12 @@ func (newState *GetFileResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *GetFileResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetFileResponse_SdkV2) { } +func (c GetFileResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo_SdkV2{}.ToSchema(cs, append(path, "file_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFileResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2558,7 +2701,7 @@ func (o *GetFileResponse_SdkV2) SetFileInfo(ctx context.Context, v FileInfo_SdkV type GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2 struct { // version here is latest logical version of the dashboard template - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) { @@ -2567,6 +2710,11 @@ func (newState *GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) SyncEf func (newState *GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) { } +func (c GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionProviderAnalyticsDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2607,12 +2755,6 @@ type GetListingContentMetadataRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *GetListingContentMetadataRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingContentMetadataRequest_SdkV2) { -} - -func (newState *GetListingContentMetadataRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingContentMetadataRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingContentMetadataRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2649,9 +2791,9 @@ func (o GetListingContentMetadataRequest_SdkV2) Type(ctx context.Context) attr.T } type GetListingContentMetadataResponse_SdkV2 struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - SharedDataObjects types.List `tfsdk:"shared_data_objects" tf:"optional"` + SharedDataObjects types.List `tfsdk:"shared_data_objects" tf:""` } func (newState *GetListingContentMetadataResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingContentMetadataResponse_SdkV2) { @@ -2660,6 +2802,12 @@ func (newState *GetListingContentMetadataResponse_SdkV2) SyncEffectiveFieldsDuri func (newState *GetListingContentMetadataResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingContentMetadataResponse_SdkV2) { } +func (c GetListingContentMetadataResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SharedDataObject_SdkV2{}.ToSchema(cs, append(path, "shared_data_objects")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingContentMetadataResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2728,12 +2876,6 @@ type GetListingRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingRequest_SdkV2) { -} - -func (newState *GetListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2766,7 +2908,7 @@ func (o GetListingRequest_SdkV2) Type(ctx context.Context) attr.Type { } type GetListingResponse_SdkV2 struct { - Listing types.List `tfsdk:"listing" tf:"optional,object"` + Listing types.List `tfsdk:"listing" tf:"object"` } func (newState *GetListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingResponse_SdkV2) { @@ -2775,6 +2917,12 @@ func (newState *GetListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *GetListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingResponse_SdkV2) { } +func (c GetListingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing_SdkV2{}.ToSchema(cs, append(path, "listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2843,12 +2991,6 @@ type GetListingsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *GetListingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingsRequest_SdkV2) { -} - -func (newState *GetListingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2883,9 +3025,9 @@ func (o GetListingsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type GetListingsResponse_SdkV2 struct { - Listings types.List `tfsdk:"listings" tf:"optional"` + Listings types.List `tfsdk:"listings" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingsResponse_SdkV2) { @@ -2894,6 +3036,12 @@ func (newState *GetListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *GetListingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingsResponse_SdkV2) { } +func (c GetListingsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing_SdkV2{}.ToSchema(cs, append(path, "listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2962,12 +3110,6 @@ type GetPersonalizationRequestRequest_SdkV2 struct { ListingId types.String `tfsdk:"-"` } -func (newState *GetPersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPersonalizationRequestRequest_SdkV2) { -} - -func (newState *GetPersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPersonalizationRequestRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPersonalizationRequestRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3000,7 +3142,7 @@ func (o GetPersonalizationRequestRequest_SdkV2) Type(ctx context.Context) attr.T } type GetPersonalizationRequestResponse_SdkV2 struct { - PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:"optional"` + PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:""` } func (newState *GetPersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPersonalizationRequestResponse_SdkV2) { @@ -3009,6 +3151,12 @@ func (newState *GetPersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuri func (newState *GetPersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPersonalizationRequestResponse_SdkV2) { } +func (c GetPersonalizationRequestResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PersonalizationRequest_SdkV2{}.ToSchema(cs, append(path, "personalization_requests")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPersonalizationRequestResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3075,12 +3223,6 @@ type GetProviderRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderRequest_SdkV2) { -} - -func (newState *GetProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetProviderRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3113,7 +3255,7 @@ func (o GetProviderRequest_SdkV2) Type(ctx context.Context) attr.Type { } type GetProviderResponse_SdkV2 struct { - Provider types.List `tfsdk:"provider" tf:"optional,object"` + Provider types.List `tfsdk:"provider" tf:"object"` } func (newState *GetProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderResponse_SdkV2) { @@ -3122,6 +3264,12 @@ func (newState *GetProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *GetProviderResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetProviderResponse_SdkV2) { } +func (c GetProviderResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo_SdkV2{}.ToSchema(cs, append(path, "provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetProviderResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3184,7 +3332,7 @@ func (o *GetProviderResponse_SdkV2) SetProvider(ctx context.Context, v ProviderI } type Installation_SdkV2 struct { - Installation types.List `tfsdk:"installation" tf:"optional,object"` + Installation types.List `tfsdk:"installation" tf:"object"` } func (newState *Installation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Installation_SdkV2) { @@ -3193,6 +3341,12 @@ func (newState *Installation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *Installation_SdkV2) SyncEffectiveFieldsDuringRead(existingState Installation_SdkV2) { } +func (c Installation_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstallationDetail_SdkV2{}.ToSchema(cs, append(path, "installation")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Installation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3255,31 +3409,31 @@ func (o *Installation_SdkV2) SetInstallation(ctx context.Context, v Installation } type InstallationDetail_SdkV2 struct { - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - InstalledOn types.Int64 `tfsdk:"installed_on" tf:"optional"` + InstalledOn types.Int64 `tfsdk:"installed_on" tf:""` - ListingId types.String `tfsdk:"listing_id" tf:"optional"` + ListingId types.String `tfsdk:"listing_id" tf:""` - ListingName types.String `tfsdk:"listing_name" tf:"optional"` + ListingName types.String `tfsdk:"listing_name" tf:""` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` - RepoName types.String `tfsdk:"repo_name" tf:"optional"` + RepoName types.String `tfsdk:"repo_name" tf:""` - RepoPath types.String `tfsdk:"repo_path" tf:"optional"` + RepoPath types.String `tfsdk:"repo_path" tf:""` - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` - TokenDetail types.List `tfsdk:"token_detail" tf:"optional,object"` + TokenDetail types.List `tfsdk:"token_detail" tf:"object"` - Tokens types.List `tfsdk:"tokens" tf:"optional"` + Tokens types.List `tfsdk:"tokens" tf:""` } func (newState *InstallationDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstallationDetail_SdkV2) { @@ -3288,6 +3442,13 @@ func (newState *InstallationDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *InstallationDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstallationDetail_SdkV2) { } +func (c InstallationDetail_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenDetail_SdkV2{}.ToSchema(cs, append(path, "token_detail")...) + TokenInfo_SdkV2{}.ToSchema(cs, append(path, "tokens")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstallationDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3409,12 +3570,6 @@ type ListAllInstallationsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAllInstallationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllInstallationsRequest_SdkV2) { -} - -func (newState *ListAllInstallationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllInstallationsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllInstallationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3449,9 +3604,9 @@ func (o ListAllInstallationsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListAllInstallationsResponse_SdkV2 struct { - Installations types.List `tfsdk:"installations" tf:"optional"` + Installations types.List `tfsdk:"installations" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListAllInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllInstallationsResponse_SdkV2) { @@ -3460,6 +3615,12 @@ func (newState *ListAllInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *ListAllInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllInstallationsResponse_SdkV2) { } +func (c ListAllInstallationsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstallationDetail_SdkV2{}.ToSchema(cs, append(path, "installations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllInstallationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3530,12 +3691,6 @@ type ListAllPersonalizationRequestsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAllPersonalizationRequestsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllPersonalizationRequestsRequest_SdkV2) { -} - -func (newState *ListAllPersonalizationRequestsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllPersonalizationRequestsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllPersonalizationRequestsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3570,9 +3725,9 @@ func (o ListAllPersonalizationRequestsRequest_SdkV2) Type(ctx context.Context) a } type ListAllPersonalizationRequestsResponse_SdkV2 struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:"optional"` + PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:""` } func (newState *ListAllPersonalizationRequestsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllPersonalizationRequestsResponse_SdkV2) { @@ -3581,6 +3736,12 @@ func (newState *ListAllPersonalizationRequestsResponse_SdkV2) SyncEffectiveField func (newState *ListAllPersonalizationRequestsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllPersonalizationRequestsResponse_SdkV2) { } +func (c ListAllPersonalizationRequestsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PersonalizationRequest_SdkV2{}.ToSchema(cs, append(path, "personalization_requests")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllPersonalizationRequestsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3653,12 +3814,6 @@ type ListExchangeFiltersRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListExchangeFiltersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangeFiltersRequest_SdkV2) { -} - -func (newState *ListExchangeFiltersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangeFiltersRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangeFiltersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3695,9 +3850,9 @@ func (o ListExchangeFiltersRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListExchangeFiltersResponse_SdkV2 struct { - Filters types.List `tfsdk:"filters" tf:"optional"` + Filters types.List `tfsdk:"filters" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExchangeFiltersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangeFiltersResponse_SdkV2) { @@ -3706,6 +3861,12 @@ func (newState *ListExchangeFiltersResponse_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *ListExchangeFiltersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangeFiltersResponse_SdkV2) { } +func (c ListExchangeFiltersResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeFilter_SdkV2{}.ToSchema(cs, append(path, "filters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangeFiltersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3778,12 +3939,6 @@ type ListExchangesForListingRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListExchangesForListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesForListingRequest_SdkV2) { -} - -func (newState *ListExchangesForListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangesForListingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesForListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3820,9 +3975,9 @@ func (o ListExchangesForListingRequest_SdkV2) Type(ctx context.Context) attr.Typ } type ListExchangesForListingResponse_SdkV2 struct { - ExchangeListing types.List `tfsdk:"exchange_listing" tf:"optional"` + ExchangeListing types.List `tfsdk:"exchange_listing" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExchangesForListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesForListingResponse_SdkV2) { @@ -3831,6 +3986,12 @@ func (newState *ListExchangesForListingResponse_SdkV2) SyncEffectiveFieldsDuring func (newState *ListExchangesForListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangesForListingResponse_SdkV2) { } +func (c ListExchangesForListingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeListing_SdkV2{}.ToSchema(cs, append(path, "exchange_listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesForListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3901,12 +4062,6 @@ type ListExchangesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListExchangesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesRequest_SdkV2) { -} - -func (newState *ListExchangesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3941,9 +4096,9 @@ func (o ListExchangesRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListExchangesResponse_SdkV2 struct { - Exchanges types.List `tfsdk:"exchanges" tf:"optional"` + Exchanges types.List `tfsdk:"exchanges" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExchangesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesResponse_SdkV2) { @@ -3952,6 +4107,12 @@ func (newState *ListExchangesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListExchangesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangesResponse_SdkV2) { } +func (c ListExchangesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Exchange_SdkV2{}.ToSchema(cs, append(path, "exchanges")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4024,12 +4185,6 @@ type ListFilesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListFilesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFilesRequest_SdkV2) { -} - -func (newState *ListFilesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFilesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFilesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4096,9 +4251,9 @@ func (o *ListFilesRequest_SdkV2) SetFileParent(ctx context.Context, v FileParent } type ListFilesResponse_SdkV2 struct { - FileInfos types.List `tfsdk:"file_infos" tf:"optional"` + FileInfos types.List `tfsdk:"file_infos" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListFilesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFilesResponse_SdkV2) { @@ -4107,6 +4262,12 @@ func (newState *ListFilesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ListFilesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFilesResponse_SdkV2) { } +func (c ListFilesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo_SdkV2{}.ToSchema(cs, append(path, "file_infos")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFilesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4179,12 +4340,6 @@ type ListFulfillmentsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListFulfillmentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFulfillmentsRequest_SdkV2) { -} - -func (newState *ListFulfillmentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFulfillmentsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFulfillmentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4221,9 +4376,9 @@ func (o ListFulfillmentsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListFulfillmentsResponse_SdkV2 struct { - Fulfillments types.List `tfsdk:"fulfillments" tf:"optional"` + Fulfillments types.List `tfsdk:"fulfillments" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListFulfillmentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFulfillmentsResponse_SdkV2) { @@ -4232,6 +4387,12 @@ func (newState *ListFulfillmentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *ListFulfillmentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFulfillmentsResponse_SdkV2) { } +func (c ListFulfillmentsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListingFulfillment_SdkV2{}.ToSchema(cs, append(path, "fulfillments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFulfillmentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4304,12 +4465,6 @@ type ListInstallationsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListInstallationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstallationsRequest_SdkV2) { -} - -func (newState *ListInstallationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListInstallationsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstallationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4346,9 +4501,9 @@ func (o ListInstallationsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListInstallationsResponse_SdkV2 struct { - Installations types.List `tfsdk:"installations" tf:"optional"` + Installations types.List `tfsdk:"installations" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstallationsResponse_SdkV2) { @@ -4357,6 +4512,12 @@ func (newState *ListInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ListInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListInstallationsResponse_SdkV2) { } +func (c ListInstallationsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstallationDetail_SdkV2{}.ToSchema(cs, append(path, "installations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstallationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4429,12 +4590,6 @@ type ListListingsForExchangeRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListListingsForExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsForExchangeRequest_SdkV2) { -} - -func (newState *ListListingsForExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListListingsForExchangeRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsForExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4471,9 +4626,9 @@ func (o ListListingsForExchangeRequest_SdkV2) Type(ctx context.Context) attr.Typ } type ListListingsForExchangeResponse_SdkV2 struct { - ExchangeListings types.List `tfsdk:"exchange_listings" tf:"optional"` + ExchangeListings types.List `tfsdk:"exchange_listings" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListListingsForExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsForExchangeResponse_SdkV2) { @@ -4482,6 +4637,12 @@ func (newState *ListListingsForExchangeResponse_SdkV2) SyncEffectiveFieldsDuring func (newState *ListListingsForExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListListingsForExchangeResponse_SdkV2) { } +func (c ListListingsForExchangeResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeListing_SdkV2{}.ToSchema(cs, append(path, "exchange_listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsForExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4567,12 +4728,6 @@ type ListListingsRequest_SdkV2 struct { Tags types.List `tfsdk:"-"` } -func (newState *ListListingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsRequest_SdkV2) { -} - -func (newState *ListListingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListListingsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4738,9 +4893,9 @@ func (o *ListListingsRequest_SdkV2) SetTags(ctx context.Context, v []ListingTag_ } type ListListingsResponse_SdkV2 struct { - Listings types.List `tfsdk:"listings" tf:"optional"` + Listings types.List `tfsdk:"listings" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsResponse_SdkV2) { @@ -4749,6 +4904,12 @@ func (newState *ListListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListListingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListListingsResponse_SdkV2) { } +func (c ListListingsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing_SdkV2{}.ToSchema(cs, append(path, "listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4818,7 +4979,7 @@ type ListProviderAnalyticsDashboardResponse_SdkV2 struct { Id types.String `tfsdk:"id" tf:""` - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *ListProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProviderAnalyticsDashboardResponse_SdkV2) { @@ -4827,6 +4988,13 @@ func (newState *ListProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveField func (newState *ListProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProviderAnalyticsDashboardResponse_SdkV2) { } +func (c ListProviderAnalyticsDashboardResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProviderAnalyticsDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4871,12 +5039,6 @@ type ListProvidersRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListProvidersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersRequest_SdkV2) { -} - -func (newState *ListProvidersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProvidersRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4913,9 +5075,9 @@ func (o ListProvidersRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListProvidersResponse_SdkV2 struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Providers types.List `tfsdk:"providers" tf:"optional"` + Providers types.List `tfsdk:"providers" tf:""` } func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersResponse_SdkV2) { @@ -4924,6 +5086,12 @@ func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProvidersResponse_SdkV2) { } +func (c ListProvidersResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo_SdkV2{}.ToSchema(cs, append(path, "providers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4988,9 +5156,9 @@ func (o *ListProvidersResponse_SdkV2) SetProviders(ctx context.Context, v []Prov } type Listing_SdkV2 struct { - Detail types.List `tfsdk:"detail" tf:"optional,object"` + Detail types.List `tfsdk:"detail" tf:"object"` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Next Number: 26 Summary types.List `tfsdk:"summary" tf:"object"` } @@ -5001,6 +5169,14 @@ func (newState *Listing_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan List func (newState *Listing_SdkV2) SyncEffectiveFieldsDuringRead(existingState Listing_SdkV2) { } +func (c Listing_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListingDetail_SdkV2{}.ToSchema(cs, append(path, "detail")...) + cs.SetRequired(append(path, "summary")...) + ListingSummary_SdkV2{}.ToSchema(cs, append(path, "summary")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Listing. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5098,40 +5274,40 @@ func (o *Listing_SdkV2) SetSummary(ctx context.Context, v ListingSummary_SdkV2) type ListingDetail_SdkV2 struct { // Type of assets included in the listing. eg. GIT_REPO, DATA_TABLE, MODEL, // NOTEBOOK - Assets types.List `tfsdk:"assets" tf:"optional"` + Assets types.List `tfsdk:"assets" tf:""` // The ending date timestamp for when the data spans - CollectionDateEnd types.Int64 `tfsdk:"collection_date_end" tf:"optional"` + CollectionDateEnd types.Int64 `tfsdk:"collection_date_end" tf:""` // The starting date timestamp for when the data spans - CollectionDateStart types.Int64 `tfsdk:"collection_date_start" tf:"optional"` + CollectionDateStart types.Int64 `tfsdk:"collection_date_start" tf:""` // Smallest unit of time in the dataset - CollectionGranularity types.List `tfsdk:"collection_granularity" tf:"optional,object"` + CollectionGranularity types.List `tfsdk:"collection_granularity" tf:"object"` // Whether the dataset is free or paid - Cost types.String `tfsdk:"cost" tf:"optional"` + Cost types.String `tfsdk:"cost" tf:""` // Where/how the data is sourced - DataSource types.String `tfsdk:"data_source" tf:"optional"` + DataSource types.String `tfsdk:"data_source" tf:""` - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - DocumentationLink types.String `tfsdk:"documentation_link" tf:"optional"` + DocumentationLink types.String `tfsdk:"documentation_link" tf:""` - EmbeddedNotebookFileInfos types.List `tfsdk:"embedded_notebook_file_infos" tf:"optional"` + EmbeddedNotebookFileInfos types.List `tfsdk:"embedded_notebook_file_infos" tf:""` - FileIds types.List `tfsdk:"file_ids" tf:"optional"` + FileIds types.List `tfsdk:"file_ids" tf:""` // Which geo region the listing data is collected from - GeographicalCoverage types.String `tfsdk:"geographical_coverage" tf:"optional"` + GeographicalCoverage types.String `tfsdk:"geographical_coverage" tf:""` // ID 20, 21 removed don't use License of the data asset - Required for // listings with model based assets - License types.String `tfsdk:"license" tf:"optional"` + License types.String `tfsdk:"license" tf:""` // What the pricing model is (e.g. paid, subscription, paid upfront); should // only be present if cost is paid TODO: Not used yet, should deprecate if // we will never use it - PricingModel types.String `tfsdk:"pricing_model" tf:"optional"` + PricingModel types.String `tfsdk:"pricing_model" tf:""` - PrivacyPolicyLink types.String `tfsdk:"privacy_policy_link" tf:"optional"` + PrivacyPolicyLink types.String `tfsdk:"privacy_policy_link" tf:""` // size of the dataset in GB - Size types.Float64 `tfsdk:"size" tf:"optional"` + Size types.Float64 `tfsdk:"size" tf:""` - SupportLink types.String `tfsdk:"support_link" tf:"optional"` + SupportLink types.String `tfsdk:"support_link" tf:""` // Listing tags - Simple key value pair to annotate listings. When should I // use tags vs dedicated fields? Using tags avoids the need to add new // columns in the database for new annotations. However, this should be used @@ -5139,11 +5315,11 @@ type ListingDetail_SdkV2 struct { // the field is optional and won't need to have NOT NULL integrity check 2. // The value is fairly fixed, static and low cardinality (eg. enums). 3. The // value won't be used in filters or joins with other tables. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` - TermsOfService types.String `tfsdk:"terms_of_service" tf:"optional"` + TermsOfService types.String `tfsdk:"terms_of_service" tf:""` // How often data is updated - UpdateFrequency types.List `tfsdk:"update_frequency" tf:"optional,object"` + UpdateFrequency types.List `tfsdk:"update_frequency" tf:"object"` } func (newState *ListingDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingDetail_SdkV2) { @@ -5152,6 +5328,15 @@ func (newState *ListingDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ListingDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingDetail_SdkV2) { } +func (c ListingDetail_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DataRefreshInfo_SdkV2{}.ToSchema(cs, append(path, "collection_granularity")...) + FileInfo_SdkV2{}.ToSchema(cs, append(path, "embedded_notebook_file_infos")...) + ListingTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + DataRefreshInfo_SdkV2{}.ToSchema(cs, append(path, "update_frequency")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5395,15 +5580,15 @@ func (o *ListingDetail_SdkV2) SetUpdateFrequency(ctx context.Context, v DataRefr } type ListingFulfillment_SdkV2 struct { - FulfillmentType types.String `tfsdk:"fulfillment_type" tf:"optional"` + FulfillmentType types.String `tfsdk:"fulfillment_type" tf:""` ListingId types.String `tfsdk:"listing_id" tf:""` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` - RepoInfo types.List `tfsdk:"repo_info" tf:"optional,object"` + RepoInfo types.List `tfsdk:"repo_info" tf:"object"` - ShareInfo types.List `tfsdk:"share_info" tf:"optional,object"` + ShareInfo types.List `tfsdk:"share_info" tf:"object"` } func (newState *ListingFulfillment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingFulfillment_SdkV2) { @@ -5412,6 +5597,14 @@ func (newState *ListingFulfillment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListingFulfillment_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingFulfillment_SdkV2) { } +func (c ListingFulfillment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "listing_id")...) + RepoInfo_SdkV2{}.ToSchema(cs, append(path, "repo_info")...) + ShareInfo_SdkV2{}.ToSchema(cs, append(path, "share_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingFulfillment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5511,7 +5704,7 @@ func (o *ListingFulfillment_SdkV2) SetShareInfo(ctx context.Context, v ShareInfo } type ListingSetting_SdkV2 struct { - Visibility types.String `tfsdk:"visibility" tf:"optional"` + Visibility types.String `tfsdk:"visibility" tf:""` } func (newState *ListingSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingSetting_SdkV2) { @@ -5520,6 +5713,11 @@ func (newState *ListingSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ListingSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingSetting_SdkV2) { } +func (c ListingSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5553,44 +5751,44 @@ func (o ListingSetting_SdkV2) Type(ctx context.Context) attr.Type { // Next Number: 26 type ListingSummary_SdkV2 struct { - Categories types.List `tfsdk:"categories" tf:"optional"` + Categories types.List `tfsdk:"categories" tf:""` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - CreatedById types.Int64 `tfsdk:"created_by_id" tf:"optional"` + CreatedById types.Int64 `tfsdk:"created_by_id" tf:""` - ExchangeIds types.List `tfsdk:"exchange_ids" tf:"optional"` + ExchangeIds types.List `tfsdk:"exchange_ids" tf:""` // if a git repo is being created, a listing will be initialized with this // field as opposed to a share - GitRepo types.List `tfsdk:"git_repo" tf:"optional,object"` + GitRepo types.List `tfsdk:"git_repo" tf:"object"` ListingType types.String `tfsdk:"listingType" tf:""` Name types.String `tfsdk:"name" tf:""` - ProviderId types.String `tfsdk:"provider_id" tf:"optional"` + ProviderId types.String `tfsdk:"provider_id" tf:""` - ProviderRegion types.List `tfsdk:"provider_region" tf:"optional,object"` + ProviderRegion types.List `tfsdk:"provider_region" tf:"object"` - PublishedAt types.Int64 `tfsdk:"published_at" tf:"optional"` + PublishedAt types.Int64 `tfsdk:"published_at" tf:""` - PublishedBy types.String `tfsdk:"published_by" tf:"optional"` + PublishedBy types.String `tfsdk:"published_by" tf:""` - Setting types.List `tfsdk:"setting" tf:"optional,object"` + Setting types.List `tfsdk:"setting" tf:"object"` - Share types.List `tfsdk:"share" tf:"optional,object"` + Share types.List `tfsdk:"share" tf:"object"` // Enums - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` - Subtitle types.String `tfsdk:"subtitle" tf:"optional"` + Subtitle types.String `tfsdk:"subtitle" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` - UpdatedById types.Int64 `tfsdk:"updated_by_id" tf:"optional"` + UpdatedById types.Int64 `tfsdk:"updated_by_id" tf:""` } func (newState *ListingSummary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingSummary_SdkV2) { @@ -5599,6 +5797,17 @@ func (newState *ListingSummary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ListingSummary_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingSummary_SdkV2) { } +func (c ListingSummary_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoInfo_SdkV2{}.ToSchema(cs, append(path, "git_repo")...) + cs.SetRequired(append(path, "listingType")...) + cs.SetRequired(append(path, "name")...) + RegionInfo_SdkV2{}.ToSchema(cs, append(path, "provider_region")...) + ListingSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + ShareInfo_SdkV2{}.ToSchema(cs, append(path, "share")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingSummary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5843,10 +6052,10 @@ func (o *ListingSummary_SdkV2) SetShare(ctx context.Context, v ShareInfo_SdkV2) type ListingTag_SdkV2 struct { // Tag name (enum) - TagName types.String `tfsdk:"tag_name" tf:"optional"` + TagName types.String `tfsdk:"tag_name" tf:""` // String representation of the tag value. Values should be string literals // (no complex types) - TagValues types.List `tfsdk:"tag_values" tf:"optional"` + TagValues types.List `tfsdk:"tag_values" tf:""` } func (newState *ListingTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingTag_SdkV2) { @@ -5855,6 +6064,11 @@ func (newState *ListingTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan L func (newState *ListingTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingTag_SdkV2) { } +func (c ListingTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5919,38 +6133,38 @@ func (o *ListingTag_SdkV2) SetTagValues(ctx context.Context, v []types.String) { } type PersonalizationRequest_SdkV2 struct { - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` ConsumerRegion types.List `tfsdk:"consumer_region" tf:"object"` // contact info for the consumer requesting data or performing a listing // installation - ContactInfo types.List `tfsdk:"contact_info" tf:"optional,object"` + ContactInfo types.List `tfsdk:"contact_info" tf:"object"` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - IntendedUse types.String `tfsdk:"intended_use" tf:"optional"` + IntendedUse types.String `tfsdk:"intended_use" tf:""` - IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:"optional"` + IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:""` - ListingId types.String `tfsdk:"listing_id" tf:"optional"` + ListingId types.String `tfsdk:"listing_id" tf:""` - ListingName types.String `tfsdk:"listing_name" tf:"optional"` + ListingName types.String `tfsdk:"listing_name" tf:""` - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` - ProviderId types.String `tfsdk:"provider_id" tf:"optional"` + ProviderId types.String `tfsdk:"provider_id" tf:""` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` - Share types.List `tfsdk:"share" tf:"optional,object"` + Share types.List `tfsdk:"share" tf:"object"` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` } func (newState *PersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PersonalizationRequest_SdkV2) { @@ -5959,6 +6173,15 @@ func (newState *PersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *PersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PersonalizationRequest_SdkV2) { } +func (c PersonalizationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "consumer_region")...) + RegionInfo_SdkV2{}.ToSchema(cs, append(path, "consumer_region")...) + ContactInfo_SdkV2{}.ToSchema(cs, append(path, "contact_info")...) + ShareInfo_SdkV2{}.ToSchema(cs, append(path, "share")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PersonalizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6118,6 +6341,12 @@ func (newState *ProviderAnalyticsDashboard_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ProviderAnalyticsDashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProviderAnalyticsDashboard_SdkV2) { } +func (c ProviderAnalyticsDashboard_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderAnalyticsDashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6152,29 +6381,29 @@ func (o ProviderAnalyticsDashboard_SdkV2) Type(ctx context.Context) attr.Type { type ProviderInfo_SdkV2 struct { BusinessContactEmail types.String `tfsdk:"business_contact_email" tf:""` - CompanyWebsiteLink types.String `tfsdk:"company_website_link" tf:"optional"` + CompanyWebsiteLink types.String `tfsdk:"company_website_link" tf:""` - DarkModeIconFileId types.String `tfsdk:"dark_mode_icon_file_id" tf:"optional"` + DarkModeIconFileId types.String `tfsdk:"dark_mode_icon_file_id" tf:""` - DarkModeIconFilePath types.String `tfsdk:"dark_mode_icon_file_path" tf:"optional"` + DarkModeIconFilePath types.String `tfsdk:"dark_mode_icon_file_path" tf:""` - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - IconFileId types.String `tfsdk:"icon_file_id" tf:"optional"` + IconFileId types.String `tfsdk:"icon_file_id" tf:""` - IconFilePath types.String `tfsdk:"icon_file_path" tf:"optional"` + IconFilePath types.String `tfsdk:"icon_file_path" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // is_featured is accessible by consumers only - IsFeatured types.Bool `tfsdk:"is_featured" tf:"optional"` + IsFeatured types.Bool `tfsdk:"is_featured" tf:""` Name types.String `tfsdk:"name" tf:""` PrivacyPolicyLink types.String `tfsdk:"privacy_policy_link" tf:""` // published_by is only applicable to data aggregators (e.g. Crux) - PublishedBy types.String `tfsdk:"published_by" tf:"optional"` + PublishedBy types.String `tfsdk:"published_by" tf:""` - SupportContactEmail types.String `tfsdk:"support_contact_email" tf:"optional"` + SupportContactEmail types.String `tfsdk:"support_contact_email" tf:""` TermOfServiceLink types.String `tfsdk:"term_of_service_link" tf:""` } @@ -6185,6 +6414,15 @@ func (newState *ProviderInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ProviderInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProviderInfo_SdkV2) { } +func (c ProviderInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "business_contact_email")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "privacy_policy_link")...) + cs.SetRequired(append(path, "term_of_service_link")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6243,9 +6481,9 @@ func (o ProviderInfo_SdkV2) Type(ctx context.Context) attr.Type { } type RegionInfo_SdkV2 struct { - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *RegionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegionInfo_SdkV2) { @@ -6254,6 +6492,11 @@ func (newState *RegionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan R func (newState *RegionInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegionInfo_SdkV2) { } +func (c RegionInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegionInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6292,12 +6535,6 @@ type RemoveExchangeForListingRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *RemoveExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveExchangeForListingRequest_SdkV2) { -} - -func (newState *RemoveExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RemoveExchangeForListingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveExchangeForListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6338,6 +6575,11 @@ func (newState *RemoveExchangeForListingResponse_SdkV2) SyncEffectiveFieldsDurin func (newState *RemoveExchangeForListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RemoveExchangeForListingResponse_SdkV2) { } +func (c RemoveExchangeForListingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveExchangeForListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6376,6 +6618,12 @@ func (newState *RepoInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Rep func (newState *RepoInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoInfo_SdkV2) { } +func (c RepoInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "git_repo_url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6422,6 +6670,13 @@ func (newState *RepoInstallation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *RepoInstallation_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoInstallation_SdkV2) { } +func (c RepoInstallation_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "repo_name")...) + cs.SetRequired(append(path, "repo_path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoInstallation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6475,12 +6730,6 @@ type SearchListingsRequest_SdkV2 struct { Query types.String `tfsdk:"-"` } -func (newState *SearchListingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchListingsRequest_SdkV2) { -} - -func (newState *SearchListingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchListingsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchListingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6615,9 +6864,9 @@ func (o *SearchListingsRequest_SdkV2) SetProviderIds(ctx context.Context, v []ty } type SearchListingsResponse_SdkV2 struct { - Listings types.List `tfsdk:"listings" tf:"optional"` + Listings types.List `tfsdk:"listings" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *SearchListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchListingsResponse_SdkV2) { @@ -6626,6 +6875,12 @@ func (newState *SearchListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *SearchListingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchListingsResponse_SdkV2) { } +func (c SearchListingsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing_SdkV2{}.ToSchema(cs, append(path, "listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchListingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6701,6 +6956,13 @@ func (newState *ShareInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sh func (newState *ShareInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ShareInfo_SdkV2) { } +func (c ShareInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ShareInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6737,9 +6999,9 @@ func (o ShareInfo_SdkV2) Type(ctx context.Context) attr.Type { type SharedDataObject_SdkV2 struct { // The type of the data object. Could be one of: TABLE, SCHEMA, // NOTEBOOK_FILE, MODEL, VOLUME - DataObjectType types.String `tfsdk:"data_object_type" tf:"optional"` + DataObjectType types.String `tfsdk:"data_object_type" tf:""` // Name of the shared object - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *SharedDataObject_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObject_SdkV2) { @@ -6748,6 +7010,11 @@ func (newState *SharedDataObject_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *SharedDataObject_SdkV2) SyncEffectiveFieldsDuringRead(existingState SharedDataObject_SdkV2) { } +func (c SharedDataObject_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SharedDataObject. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6782,15 +7049,15 @@ func (o SharedDataObject_SdkV2) Type(ctx context.Context) attr.Type { } type TokenDetail_SdkV2 struct { - BearerToken types.String `tfsdk:"bearerToken" tf:"optional"` + BearerToken types.String `tfsdk:"bearerToken" tf:""` - Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + Endpoint types.String `tfsdk:"endpoint" tf:""` - ExpirationTime types.String `tfsdk:"expirationTime" tf:"optional"` + ExpirationTime types.String `tfsdk:"expirationTime" tf:""` // These field names must follow the delta sharing protocol. Original // message: RetrieveToken.Response in // managed-catalog/api/messages/recipient.proto - ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:"optional"` + ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:""` } func (newState *TokenDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenDetail_SdkV2) { @@ -6799,6 +7066,11 @@ func (newState *TokenDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *TokenDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenDetail_SdkV2) { } +func (c TokenDetail_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6839,19 +7111,19 @@ func (o TokenDetail_SdkV2) Type(ctx context.Context) attr.Type { type TokenInfo_SdkV2 struct { // Full activation url to retrieve the access token. It will be empty if the // token is already retrieved. - ActivationUrl types.String `tfsdk:"activation_url" tf:"optional"` + ActivationUrl types.String `tfsdk:"activation_url" tf:""` // Time at which this Recipient Token was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of Recipient Token creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Expiration timestamp of the token in epoch milliseconds. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // Unique id of the Recipient Token. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time at which this Recipient Token was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of Recipient Token updater. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenInfo_SdkV2) { @@ -6860,6 +7132,11 @@ func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan To func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenInfo_SdkV2) { } +func (c TokenInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6915,6 +7192,14 @@ func (newState *UpdateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *UpdateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeFilterRequest_SdkV2) { } +func (c UpdateExchangeFilterRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "filter")...) + ExchangeFilter_SdkV2{}.ToSchema(cs, append(path, "filter")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeFilterRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6979,7 +7264,7 @@ func (o *UpdateExchangeFilterRequest_SdkV2) SetFilter(ctx context.Context, v Exc } type UpdateExchangeFilterResponse_SdkV2 struct { - Filter types.List `tfsdk:"filter" tf:"optional,object"` + Filter types.List `tfsdk:"filter" tf:"object"` } func (newState *UpdateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeFilterResponse_SdkV2) { @@ -6988,6 +7273,12 @@ func (newState *UpdateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *UpdateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeFilterResponse_SdkV2) { } +func (c UpdateExchangeFilterResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeFilter_SdkV2{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeFilterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7061,6 +7352,14 @@ func (newState *UpdateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *UpdateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeRequest_SdkV2) { } +func (c UpdateExchangeRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "exchange")...) + Exchange_SdkV2{}.ToSchema(cs, append(path, "exchange")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7125,7 +7424,7 @@ func (o *UpdateExchangeRequest_SdkV2) SetExchange(ctx context.Context, v Exchang } type UpdateExchangeResponse_SdkV2 struct { - Exchange types.List `tfsdk:"exchange" tf:"optional,object"` + Exchange types.List `tfsdk:"exchange" tf:"object"` } func (newState *UpdateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeResponse_SdkV2) { @@ -7134,6 +7433,12 @@ func (newState *UpdateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *UpdateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeResponse_SdkV2) { } +func (c UpdateExchangeResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Exchange_SdkV2{}.ToSchema(cs, append(path, "exchange")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7202,7 +7507,7 @@ type UpdateInstallationRequest_SdkV2 struct { ListingId types.String `tfsdk:"-"` - RotateToken types.Bool `tfsdk:"rotate_token" tf:"optional"` + RotateToken types.Bool `tfsdk:"rotate_token" tf:""` } func (newState *UpdateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInstallationRequest_SdkV2) { @@ -7211,6 +7516,15 @@ func (newState *UpdateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *UpdateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateInstallationRequest_SdkV2) { } +func (c UpdateInstallationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "installation")...) + InstallationDetail_SdkV2{}.ToSchema(cs, append(path, "installation")...) + cs.SetRequired(append(path, "installation_id")...) + cs.SetRequired(append(path, "listing_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateInstallationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7279,7 +7593,7 @@ func (o *UpdateInstallationRequest_SdkV2) SetInstallation(ctx context.Context, v } type UpdateInstallationResponse_SdkV2 struct { - Installation types.List `tfsdk:"installation" tf:"optional,object"` + Installation types.List `tfsdk:"installation" tf:"object"` } func (newState *UpdateInstallationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInstallationResponse_SdkV2) { @@ -7288,6 +7602,12 @@ func (newState *UpdateInstallationResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *UpdateInstallationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateInstallationResponse_SdkV2) { } +func (c UpdateInstallationResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstallationDetail_SdkV2{}.ToSchema(cs, append(path, "installation")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateInstallationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7361,6 +7681,14 @@ func (newState *UpdateListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UpdateListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateListingRequest_SdkV2) { } +func (c UpdateListingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "listing")...) + Listing_SdkV2{}.ToSchema(cs, append(path, "listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7425,7 +7753,7 @@ func (o *UpdateListingRequest_SdkV2) SetListing(ctx context.Context, v Listing_S } type UpdateListingResponse_SdkV2 struct { - Listing types.List `tfsdk:"listing" tf:"optional,object"` + Listing types.List `tfsdk:"listing" tf:"object"` } func (newState *UpdateListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateListingResponse_SdkV2) { @@ -7434,6 +7762,12 @@ func (newState *UpdateListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *UpdateListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateListingResponse_SdkV2) { } +func (c UpdateListingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing_SdkV2{}.ToSchema(cs, append(path, "listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7498,11 +7832,11 @@ func (o *UpdateListingResponse_SdkV2) SetListing(ctx context.Context, v Listing_ type UpdatePersonalizationRequestRequest_SdkV2 struct { ListingId types.String `tfsdk:"-"` - Reason types.String `tfsdk:"reason" tf:"optional"` + Reason types.String `tfsdk:"reason" tf:""` RequestId types.String `tfsdk:"-"` - Share types.List `tfsdk:"share" tf:"optional,object"` + Share types.List `tfsdk:"share" tf:"object"` Status types.String `tfsdk:"status" tf:""` } @@ -7513,6 +7847,15 @@ func (newState *UpdatePersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDu func (newState *UpdatePersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalizationRequestRequest_SdkV2) { } +func (c UpdatePersonalizationRequestRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "listing_id")...) + cs.SetRequired(append(path, "request_id")...) + ShareInfo_SdkV2{}.ToSchema(cs, append(path, "share")...) + cs.SetRequired(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePersonalizationRequestRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7583,7 +7926,7 @@ func (o *UpdatePersonalizationRequestRequest_SdkV2) SetShare(ctx context.Context } type UpdatePersonalizationRequestResponse_SdkV2 struct { - Request types.List `tfsdk:"request" tf:"optional,object"` + Request types.List `tfsdk:"request" tf:"object"` } func (newState *UpdatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalizationRequestResponse_SdkV2) { @@ -7592,6 +7935,12 @@ func (newState *UpdatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsD func (newState *UpdatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalizationRequestResponse_SdkV2) { } +func (c UpdatePersonalizationRequestResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PersonalizationRequest_SdkV2{}.ToSchema(cs, append(path, "request")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePersonalizationRequestResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7659,7 +8008,7 @@ type UpdateProviderAnalyticsDashboardRequest_SdkV2 struct { // this is the version of the dashboard template we want to update our user // to current expectation is that it should be equal to latest version of // the dashboard template - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *UpdateProviderAnalyticsDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderAnalyticsDashboardRequest_SdkV2) { @@ -7668,6 +8017,12 @@ func (newState *UpdateProviderAnalyticsDashboardRequest_SdkV2) SyncEffectiveFiel func (newState *UpdateProviderAnalyticsDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderAnalyticsDashboardRequest_SdkV2) { } +func (c UpdateProviderAnalyticsDashboardRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderAnalyticsDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7707,7 +8062,7 @@ type UpdateProviderAnalyticsDashboardResponse_SdkV2 struct { // id & version should be the same as the request Id types.String `tfsdk:"id" tf:""` - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *UpdateProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderAnalyticsDashboardResponse_SdkV2) { @@ -7716,6 +8071,13 @@ func (newState *UpdateProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFie func (newState *UpdateProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderAnalyticsDashboardResponse_SdkV2) { } +func (c UpdateProviderAnalyticsDashboardResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderAnalyticsDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7763,6 +8125,14 @@ func (newState *UpdateProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *UpdateProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderRequest_SdkV2) { } +func (c UpdateProviderRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "provider")...) + ProviderInfo_SdkV2{}.ToSchema(cs, append(path, "provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7827,7 +8197,7 @@ func (o *UpdateProviderRequest_SdkV2) SetProvider(ctx context.Context, v Provide } type UpdateProviderResponse_SdkV2 struct { - Provider types.List `tfsdk:"provider" tf:"optional,object"` + Provider types.List `tfsdk:"provider" tf:"object"` } func (newState *UpdateProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderResponse_SdkV2) { @@ -7836,6 +8206,12 @@ func (newState *UpdateProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *UpdateProviderResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderResponse_SdkV2) { } +func (c UpdateProviderResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo_SdkV2{}.ToSchema(cs, append(path, "provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/marketplace_tf/model.go b/internal/service/marketplace_tf/model.go index dbd7a512c..ce00a06be 100755 --- a/internal/service/marketplace_tf/model.go +++ b/internal/service/marketplace_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -33,6 +34,13 @@ func (newState *AddExchangeForListingRequest) SyncEffectiveFieldsDuringCreateOrU func (newState *AddExchangeForListingRequest) SyncEffectiveFieldsDuringRead(existingState AddExchangeForListingRequest) { } +func (c AddExchangeForListingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "exchange_id")...) + cs.SetRequired(append(path, "listing_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddExchangeForListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -67,7 +75,7 @@ func (o AddExchangeForListingRequest) Type(ctx context.Context) attr.Type { } type AddExchangeForListingResponse struct { - ExchangeForListing types.Object `tfsdk:"exchange_for_listing" tf:"optional,object"` + ExchangeForListing types.Object `tfsdk:"exchange_for_listing" tf:"object"` } func (newState *AddExchangeForListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddExchangeForListingResponse) { @@ -76,6 +84,12 @@ func (newState *AddExchangeForListingResponse) SyncEffectiveFieldsDuringCreateOr func (newState *AddExchangeForListingResponse) SyncEffectiveFieldsDuringRead(existingState AddExchangeForListingResponse) { } +func (c AddExchangeForListingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeListing{}.ToSchema(cs, append(path, "exchange_for_listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AddExchangeForListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -142,12 +156,6 @@ type BatchGetListingsRequest struct { Ids types.List `tfsdk:"-"` } -func (newState *BatchGetListingsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetListingsRequest) { -} - -func (newState *BatchGetListingsRequest) SyncEffectiveFieldsDuringRead(existingState BatchGetListingsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetListingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -210,7 +218,7 @@ func (o *BatchGetListingsRequest) SetIds(ctx context.Context, v []types.String) } type BatchGetListingsResponse struct { - Listings types.List `tfsdk:"listings" tf:"optional"` + Listings types.List `tfsdk:"listings" tf:""` } func (newState *BatchGetListingsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetListingsResponse) { @@ -219,6 +227,12 @@ func (newState *BatchGetListingsResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *BatchGetListingsResponse) SyncEffectiveFieldsDuringRead(existingState BatchGetListingsResponse) { } +func (c BatchGetListingsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing{}.ToSchema(cs, append(path, "listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetListingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -285,12 +299,6 @@ type BatchGetProvidersRequest struct { Ids types.List `tfsdk:"-"` } -func (newState *BatchGetProvidersRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetProvidersRequest) { -} - -func (newState *BatchGetProvidersRequest) SyncEffectiveFieldsDuringRead(existingState BatchGetProvidersRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetProvidersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -353,7 +361,7 @@ func (o *BatchGetProvidersRequest) SetIds(ctx context.Context, v []types.String) } type BatchGetProvidersResponse struct { - Providers types.List `tfsdk:"providers" tf:"optional"` + Providers types.List `tfsdk:"providers" tf:""` } func (newState *BatchGetProvidersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetProvidersResponse) { @@ -362,6 +370,12 @@ func (newState *BatchGetProvidersResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *BatchGetProvidersResponse) SyncEffectiveFieldsDuringRead(existingState BatchGetProvidersResponse) { } +func (c BatchGetProvidersResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo{}.ToSchema(cs, append(path, "providers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetProvidersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -433,6 +447,12 @@ func (newState *ConsumerTerms) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cons func (newState *ConsumerTerms) SyncEffectiveFieldsDuringRead(existingState ConsumerTerms) { } +func (c ConsumerTerms) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ConsumerTerms. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -467,13 +487,13 @@ func (o ConsumerTerms) Type(ctx context.Context) attr.Type { // contact info for the consumer requesting data or performing a listing // installation type ContactInfo struct { - Company types.String `tfsdk:"company" tf:"optional"` + Company types.String `tfsdk:"company" tf:""` - Email types.String `tfsdk:"email" tf:"optional"` + Email types.String `tfsdk:"email" tf:""` - FirstName types.String `tfsdk:"first_name" tf:"optional"` + FirstName types.String `tfsdk:"first_name" tf:""` - LastName types.String `tfsdk:"last_name" tf:"optional"` + LastName types.String `tfsdk:"last_name" tf:""` } func (newState *ContactInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContactInfo) { @@ -482,6 +502,11 @@ func (newState *ContactInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Contac func (newState *ContactInfo) SyncEffectiveFieldsDuringRead(existingState ContactInfo) { } +func (c ContactInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ContactInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -529,6 +554,13 @@ func (newState *CreateExchangeFilterRequest) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateExchangeFilterRequest) SyncEffectiveFieldsDuringRead(existingState CreateExchangeFilterRequest) { } +func (c CreateExchangeFilterRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "filter")...) + ExchangeFilter{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeFilterRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -591,7 +623,7 @@ func (o *CreateExchangeFilterRequest) SetFilter(ctx context.Context, v ExchangeF } type CreateExchangeFilterResponse struct { - FilterId types.String `tfsdk:"filter_id" tf:"optional"` + FilterId types.String `tfsdk:"filter_id" tf:""` } func (newState *CreateExchangeFilterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeFilterResponse) { @@ -600,6 +632,11 @@ func (newState *CreateExchangeFilterResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *CreateExchangeFilterResponse) SyncEffectiveFieldsDuringRead(existingState CreateExchangeFilterResponse) { } +func (c CreateExchangeFilterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeFilterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -641,6 +678,13 @@ func (newState *CreateExchangeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateExchangeRequest) SyncEffectiveFieldsDuringRead(existingState CreateExchangeRequest) { } +func (c CreateExchangeRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "exchange")...) + Exchange{}.ToSchema(cs, append(path, "exchange")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -703,7 +747,7 @@ func (o *CreateExchangeRequest) SetExchange(ctx context.Context, v Exchange) { } type CreateExchangeResponse struct { - ExchangeId types.String `tfsdk:"exchange_id" tf:"optional"` + ExchangeId types.String `tfsdk:"exchange_id" tf:""` } func (newState *CreateExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeResponse) { @@ -712,6 +756,11 @@ func (newState *CreateExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateExchangeResponse) SyncEffectiveFieldsDuringRead(existingState CreateExchangeResponse) { } +func (c CreateExchangeResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -744,7 +793,7 @@ func (o CreateExchangeResponse) Type(ctx context.Context) attr.Type { } type CreateFileRequest struct { - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` FileParent types.Object `tfsdk:"file_parent" tf:"object"` @@ -759,6 +808,15 @@ func (newState *CreateFileRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateFileRequest) SyncEffectiveFieldsDuringRead(existingState CreateFileRequest) { } +func (c CreateFileRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "file_parent")...) + FileParent{}.ToSchema(cs, append(path, "file_parent")...) + cs.SetRequired(append(path, "marketplace_file_type")...) + cs.SetRequired(append(path, "mime_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFileRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -827,9 +885,9 @@ func (o *CreateFileRequest) SetFileParent(ctx context.Context, v FileParent) { } type CreateFileResponse struct { - FileInfo types.Object `tfsdk:"file_info" tf:"optional,object"` + FileInfo types.Object `tfsdk:"file_info" tf:"object"` // Pre-signed POST URL to blob storage - UploadUrl types.String `tfsdk:"upload_url" tf:"optional"` + UploadUrl types.String `tfsdk:"upload_url" tf:""` } func (newState *CreateFileResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFileResponse) { @@ -838,6 +896,12 @@ func (newState *CreateFileResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateFileResponse) SyncEffectiveFieldsDuringRead(existingState CreateFileResponse) { } +func (c CreateFileResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo{}.ToSchema(cs, append(path, "file_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFileResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -902,17 +966,17 @@ func (o *CreateFileResponse) SetFileInfo(ctx context.Context, v FileInfo) { } type CreateInstallationRequest struct { - AcceptedConsumerTerms types.Object `tfsdk:"accepted_consumer_terms" tf:"optional,object"` + AcceptedConsumerTerms types.Object `tfsdk:"accepted_consumer_terms" tf:"object"` - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` ListingId types.String `tfsdk:"-"` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` // for git repo installations - RepoDetail types.Object `tfsdk:"repo_detail" tf:"optional,object"` + RepoDetail types.Object `tfsdk:"repo_detail" tf:"object"` - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` } func (newState *CreateInstallationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstallationRequest) { @@ -921,6 +985,14 @@ func (newState *CreateInstallationRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *CreateInstallationRequest) SyncEffectiveFieldsDuringRead(existingState CreateInstallationRequest) { } +func (c CreateInstallationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ConsumerTerms{}.ToSchema(cs, append(path, "accepted_consumer_terms")...) + cs.SetRequired(append(path, "listing_id")...) + RepoInstallation{}.ToSchema(cs, append(path, "repo_detail")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateInstallationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1031,6 +1103,13 @@ func (newState *CreateListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CreateListingRequest) SyncEffectiveFieldsDuringRead(existingState CreateListingRequest) { } +func (c CreateListingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "listing")...) + Listing{}.ToSchema(cs, append(path, "listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1093,7 +1172,7 @@ func (o *CreateListingRequest) SetListing(ctx context.Context, v Listing) { } type CreateListingResponse struct { - ListingId types.String `tfsdk:"listing_id" tf:"optional"` + ListingId types.String `tfsdk:"listing_id" tf:""` } func (newState *CreateListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateListingResponse) { @@ -1102,6 +1181,11 @@ func (newState *CreateListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateListingResponse) SyncEffectiveFieldsDuringRead(existingState CreateListingResponse) { } +func (c CreateListingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1137,21 +1221,21 @@ func (o CreateListingResponse) Type(ctx context.Context) attr.Type { type CreatePersonalizationRequest struct { AcceptedConsumerTerms types.Object `tfsdk:"accepted_consumer_terms" tf:"object"` - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - Company types.String `tfsdk:"company" tf:"optional"` + Company types.String `tfsdk:"company" tf:""` - FirstName types.String `tfsdk:"first_name" tf:"optional"` + FirstName types.String `tfsdk:"first_name" tf:""` IntendedUse types.String `tfsdk:"intended_use" tf:""` - IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:"optional"` + IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:""` - LastName types.String `tfsdk:"last_name" tf:"optional"` + LastName types.String `tfsdk:"last_name" tf:""` ListingId types.String `tfsdk:"-"` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` } func (newState *CreatePersonalizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePersonalizationRequest) { @@ -1160,6 +1244,15 @@ func (newState *CreatePersonalizationRequest) SyncEffectiveFieldsDuringCreateOrU func (newState *CreatePersonalizationRequest) SyncEffectiveFieldsDuringRead(existingState CreatePersonalizationRequest) { } +func (c CreatePersonalizationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "accepted_consumer_terms")...) + ConsumerTerms{}.ToSchema(cs, append(path, "accepted_consumer_terms")...) + cs.SetRequired(append(path, "intended_use")...) + cs.SetRequired(append(path, "listing_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePersonalizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1238,7 +1331,7 @@ func (o *CreatePersonalizationRequest) SetAcceptedConsumerTerms(ctx context.Cont } type CreatePersonalizationRequestResponse struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *CreatePersonalizationRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePersonalizationRequestResponse) { @@ -1247,6 +1340,11 @@ func (newState *CreatePersonalizationRequestResponse) SyncEffectiveFieldsDuringC func (newState *CreatePersonalizationRequestResponse) SyncEffectiveFieldsDuringRead(existingState CreatePersonalizationRequestResponse) { } +func (c CreatePersonalizationRequestResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePersonalizationRequestResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1288,6 +1386,13 @@ func (newState *CreateProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateProviderRequest) SyncEffectiveFieldsDuringRead(existingState CreateProviderRequest) { } +func (c CreateProviderRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "provider")...) + ProviderInfo{}.ToSchema(cs, append(path, "provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1350,7 +1455,7 @@ func (o *CreateProviderRequest) SetProvider(ctx context.Context, v ProviderInfo) } type CreateProviderResponse struct { - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *CreateProviderResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProviderResponse) { @@ -1359,6 +1464,11 @@ func (newState *CreateProviderResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateProviderResponse) SyncEffectiveFieldsDuringRead(existingState CreateProviderResponse) { } +func (c CreateProviderResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1402,6 +1512,13 @@ func (newState *DataRefreshInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Da func (newState *DataRefreshInfo) SyncEffectiveFieldsDuringRead(existingState DataRefreshInfo) { } +func (c DataRefreshInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "interval")...) + cs.SetRequired(append(path, "unit")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataRefreshInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1440,12 +1557,6 @@ type DeleteExchangeFilterRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteExchangeFilterRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExchangeFilterRequest) { -} - -func (newState *DeleteExchangeFilterRequest) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeFilterRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeFilterRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1486,6 +1597,11 @@ func (newState *DeleteExchangeFilterResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *DeleteExchangeFilterResponse) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeFilterResponse) { } +func (c DeleteExchangeFilterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeFilterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1518,12 +1634,6 @@ type DeleteExchangeRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteExchangeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExchangeRequest) { -} - -func (newState *DeleteExchangeRequest) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1564,6 +1674,11 @@ func (newState *DeleteExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *DeleteExchangeResponse) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeResponse) { } +func (c DeleteExchangeResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1596,12 +1711,6 @@ type DeleteFileRequest struct { FileId types.String `tfsdk:"-"` } -func (newState *DeleteFileRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFileRequest) { -} - -func (newState *DeleteFileRequest) SyncEffectiveFieldsDuringRead(existingState DeleteFileRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFileRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1642,6 +1751,11 @@ func (newState *DeleteFileResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DeleteFileResponse) SyncEffectiveFieldsDuringRead(existingState DeleteFileResponse) { } +func (c DeleteFileResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFileResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1676,12 +1790,6 @@ type DeleteInstallationRequest struct { ListingId types.String `tfsdk:"-"` } -func (newState *DeleteInstallationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteInstallationRequest) { -} - -func (newState *DeleteInstallationRequest) SyncEffectiveFieldsDuringRead(existingState DeleteInstallationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstallationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1724,6 +1832,11 @@ func (newState *DeleteInstallationResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *DeleteInstallationResponse) SyncEffectiveFieldsDuringRead(existingState DeleteInstallationResponse) { } +func (c DeleteInstallationResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstallationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1756,12 +1869,6 @@ type DeleteListingRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteListingRequest) { -} - -func (newState *DeleteListingRequest) SyncEffectiveFieldsDuringRead(existingState DeleteListingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1802,6 +1909,11 @@ func (newState *DeleteListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *DeleteListingResponse) SyncEffectiveFieldsDuringRead(existingState DeleteListingResponse) { } +func (c DeleteListingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1834,12 +1946,6 @@ type DeleteProviderRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteProviderRequest) { -} - -func (newState *DeleteProviderRequest) SyncEffectiveFieldsDuringRead(existingState DeleteProviderRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1880,6 +1986,11 @@ func (newState *DeleteProviderResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *DeleteProviderResponse) SyncEffectiveFieldsDuringRead(existingState DeleteProviderResponse) { } +func (c DeleteProviderResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteProviderResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1908,23 +2019,23 @@ func (o DeleteProviderResponse) Type(ctx context.Context) attr.Type { } type Exchange struct { - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - Filters types.List `tfsdk:"filters" tf:"optional"` + Filters types.List `tfsdk:"filters" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - LinkedListings types.List `tfsdk:"linked_listings" tf:"optional"` + LinkedListings types.List `tfsdk:"linked_listings" tf:""` Name types.String `tfsdk:"name" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *Exchange) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exchange) { @@ -1933,6 +2044,14 @@ func (newState *Exchange) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exchange) func (newState *Exchange) SyncEffectiveFieldsDuringRead(existingState Exchange) { } +func (c Exchange) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeFilter{}.ToSchema(cs, append(path, "filters")...) + ExchangeListing{}.ToSchema(cs, append(path, "linked_listings")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Exchange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2040,9 +2159,9 @@ func (o *Exchange) SetLinkedListings(ctx context.Context, v []ExchangeListing) { } type ExchangeFilter struct { - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` ExchangeId types.String `tfsdk:"exchange_id" tf:""` @@ -2050,13 +2169,13 @@ type ExchangeFilter struct { FilterValue types.String `tfsdk:"filter_value" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *ExchangeFilter) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeFilter) { @@ -2065,6 +2184,14 @@ func (newState *ExchangeFilter) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exc func (newState *ExchangeFilter) SyncEffectiveFieldsDuringRead(existingState ExchangeFilter) { } +func (c ExchangeFilter) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "exchange_id")...) + cs.SetRequired(append(path, "filter_type")...) + cs.SetRequired(append(path, "filter_value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeFilter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2113,19 +2240,19 @@ func (o ExchangeFilter) Type(ctx context.Context) attr.Type { } type ExchangeListing struct { - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - ExchangeId types.String `tfsdk:"exchange_id" tf:"optional"` + ExchangeId types.String `tfsdk:"exchange_id" tf:""` - ExchangeName types.String `tfsdk:"exchange_name" tf:"optional"` + ExchangeName types.String `tfsdk:"exchange_name" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - ListingId types.String `tfsdk:"listing_id" tf:"optional"` + ListingId types.String `tfsdk:"listing_id" tf:""` - ListingName types.String `tfsdk:"listing_name" tf:"optional"` + ListingName types.String `tfsdk:"listing_name" tf:""` } func (newState *ExchangeListing) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeListing) { @@ -2134,6 +2261,11 @@ func (newState *ExchangeListing) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ex func (newState *ExchangeListing) SyncEffectiveFieldsDuringRead(existingState ExchangeListing) { } +func (c ExchangeListing) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeListing. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2178,26 +2310,26 @@ func (o ExchangeListing) Type(ctx context.Context) attr.Type { } type FileInfo struct { - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Name displayed to users for applicable files, e.g. embedded notebooks - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` - DownloadLink types.String `tfsdk:"download_link" tf:"optional"` + DownloadLink types.String `tfsdk:"download_link" tf:""` - FileParent types.Object `tfsdk:"file_parent" tf:"optional,object"` + FileParent types.Object `tfsdk:"file_parent" tf:"object"` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - MarketplaceFileType types.String `tfsdk:"marketplace_file_type" tf:"optional"` + MarketplaceFileType types.String `tfsdk:"marketplace_file_type" tf:""` - MimeType types.String `tfsdk:"mime_type" tf:"optional"` + MimeType types.String `tfsdk:"mime_type" tf:""` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // Populated if status is in a failed state with more information on reason // for the failure. - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` } func (newState *FileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo) { @@ -2206,6 +2338,12 @@ func (newState *FileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo) func (newState *FileInfo) SyncEffectiveFieldsDuringRead(existingState FileInfo) { } +func (c FileInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileParent{}.ToSchema(cs, append(path, "file_parent")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2286,9 +2424,9 @@ func (o *FileInfo) SetFileParent(ctx context.Context, v FileParent) { } type FileParent struct { - FileParentType types.String `tfsdk:"file_parent_type" tf:"optional"` + FileParentType types.String `tfsdk:"file_parent_type" tf:""` // TODO make the following fields required - ParentId types.String `tfsdk:"parent_id" tf:"optional"` + ParentId types.String `tfsdk:"parent_id" tf:""` } func (newState *FileParent) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileParent) { @@ -2297,6 +2435,11 @@ func (newState *FileParent) SyncEffectiveFieldsDuringCreateOrUpdate(plan FilePar func (newState *FileParent) SyncEffectiveFieldsDuringRead(existingState FileParent) { } +func (c FileParent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileParent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2335,12 +2478,6 @@ type GetExchangeRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetExchangeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExchangeRequest) { -} - -func (newState *GetExchangeRequest) SyncEffectiveFieldsDuringRead(existingState GetExchangeRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2373,7 +2510,7 @@ func (o GetExchangeRequest) Type(ctx context.Context) attr.Type { } type GetExchangeResponse struct { - Exchange types.Object `tfsdk:"exchange" tf:"optional,object"` + Exchange types.Object `tfsdk:"exchange" tf:"object"` } func (newState *GetExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExchangeResponse) { @@ -2382,6 +2519,12 @@ func (newState *GetExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *GetExchangeResponse) SyncEffectiveFieldsDuringRead(existingState GetExchangeResponse) { } +func (c GetExchangeResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Exchange{}.ToSchema(cs, append(path, "exchange")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2448,12 +2591,6 @@ type GetFileRequest struct { FileId types.String `tfsdk:"-"` } -func (newState *GetFileRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFileRequest) { -} - -func (newState *GetFileRequest) SyncEffectiveFieldsDuringRead(existingState GetFileRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFileRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2486,7 +2623,7 @@ func (o GetFileRequest) Type(ctx context.Context) attr.Type { } type GetFileResponse struct { - FileInfo types.Object `tfsdk:"file_info" tf:"optional,object"` + FileInfo types.Object `tfsdk:"file_info" tf:"object"` } func (newState *GetFileResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFileResponse) { @@ -2495,6 +2632,12 @@ func (newState *GetFileResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ge func (newState *GetFileResponse) SyncEffectiveFieldsDuringRead(existingState GetFileResponse) { } +func (c GetFileResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo{}.ToSchema(cs, append(path, "file_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFileResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2558,7 +2701,7 @@ func (o *GetFileResponse) SetFileInfo(ctx context.Context, v FileInfo) { type GetLatestVersionProviderAnalyticsDashboardResponse struct { // version here is latest logical version of the dashboard template - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *GetLatestVersionProviderAnalyticsDashboardResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionProviderAnalyticsDashboardResponse) { @@ -2567,6 +2710,11 @@ func (newState *GetLatestVersionProviderAnalyticsDashboardResponse) SyncEffectiv func (newState *GetLatestVersionProviderAnalyticsDashboardResponse) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionProviderAnalyticsDashboardResponse) { } +func (c GetLatestVersionProviderAnalyticsDashboardResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionProviderAnalyticsDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2607,12 +2755,6 @@ type GetListingContentMetadataRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *GetListingContentMetadataRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingContentMetadataRequest) { -} - -func (newState *GetListingContentMetadataRequest) SyncEffectiveFieldsDuringRead(existingState GetListingContentMetadataRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingContentMetadataRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2649,9 +2791,9 @@ func (o GetListingContentMetadataRequest) Type(ctx context.Context) attr.Type { } type GetListingContentMetadataResponse struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - SharedDataObjects types.List `tfsdk:"shared_data_objects" tf:"optional"` + SharedDataObjects types.List `tfsdk:"shared_data_objects" tf:""` } func (newState *GetListingContentMetadataResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingContentMetadataResponse) { @@ -2660,6 +2802,12 @@ func (newState *GetListingContentMetadataResponse) SyncEffectiveFieldsDuringCrea func (newState *GetListingContentMetadataResponse) SyncEffectiveFieldsDuringRead(existingState GetListingContentMetadataResponse) { } +func (c GetListingContentMetadataResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SharedDataObject{}.ToSchema(cs, append(path, "shared_data_objects")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingContentMetadataResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2728,12 +2876,6 @@ type GetListingRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingRequest) { -} - -func (newState *GetListingRequest) SyncEffectiveFieldsDuringRead(existingState GetListingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2766,7 +2908,7 @@ func (o GetListingRequest) Type(ctx context.Context) attr.Type { } type GetListingResponse struct { - Listing types.Object `tfsdk:"listing" tf:"optional,object"` + Listing types.Object `tfsdk:"listing" tf:"object"` } func (newState *GetListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingResponse) { @@ -2775,6 +2917,12 @@ func (newState *GetListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *GetListingResponse) SyncEffectiveFieldsDuringRead(existingState GetListingResponse) { } +func (c GetListingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing{}.ToSchema(cs, append(path, "listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2843,12 +2991,6 @@ type GetListingsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *GetListingsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingsRequest) { -} - -func (newState *GetListingsRequest) SyncEffectiveFieldsDuringRead(existingState GetListingsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2883,9 +3025,9 @@ func (o GetListingsRequest) Type(ctx context.Context) attr.Type { } type GetListingsResponse struct { - Listings types.List `tfsdk:"listings" tf:"optional"` + Listings types.List `tfsdk:"listings" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetListingsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingsResponse) { @@ -2894,6 +3036,12 @@ func (newState *GetListingsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *GetListingsResponse) SyncEffectiveFieldsDuringRead(existingState GetListingsResponse) { } +func (c GetListingsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing{}.ToSchema(cs, append(path, "listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2962,12 +3110,6 @@ type GetPersonalizationRequestRequest struct { ListingId types.String `tfsdk:"-"` } -func (newState *GetPersonalizationRequestRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPersonalizationRequestRequest) { -} - -func (newState *GetPersonalizationRequestRequest) SyncEffectiveFieldsDuringRead(existingState GetPersonalizationRequestRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPersonalizationRequestRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3000,7 +3142,7 @@ func (o GetPersonalizationRequestRequest) Type(ctx context.Context) attr.Type { } type GetPersonalizationRequestResponse struct { - PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:"optional"` + PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:""` } func (newState *GetPersonalizationRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPersonalizationRequestResponse) { @@ -3009,6 +3151,12 @@ func (newState *GetPersonalizationRequestResponse) SyncEffectiveFieldsDuringCrea func (newState *GetPersonalizationRequestResponse) SyncEffectiveFieldsDuringRead(existingState GetPersonalizationRequestResponse) { } +func (c GetPersonalizationRequestResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PersonalizationRequest{}.ToSchema(cs, append(path, "personalization_requests")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPersonalizationRequestResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3075,12 +3223,6 @@ type GetProviderRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderRequest) { -} - -func (newState *GetProviderRequest) SyncEffectiveFieldsDuringRead(existingState GetProviderRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3113,7 +3255,7 @@ func (o GetProviderRequest) Type(ctx context.Context) attr.Type { } type GetProviderResponse struct { - Provider types.Object `tfsdk:"provider" tf:"optional,object"` + Provider types.Object `tfsdk:"provider" tf:"object"` } func (newState *GetProviderResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderResponse) { @@ -3122,6 +3264,12 @@ func (newState *GetProviderResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *GetProviderResponse) SyncEffectiveFieldsDuringRead(existingState GetProviderResponse) { } +func (c GetProviderResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo{}.ToSchema(cs, append(path, "provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetProviderResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3184,7 +3332,7 @@ func (o *GetProviderResponse) SetProvider(ctx context.Context, v ProviderInfo) { } type Installation struct { - Installation types.Object `tfsdk:"installation" tf:"optional,object"` + Installation types.Object `tfsdk:"installation" tf:"object"` } func (newState *Installation) SyncEffectiveFieldsDuringCreateOrUpdate(plan Installation) { @@ -3193,6 +3341,12 @@ func (newState *Installation) SyncEffectiveFieldsDuringCreateOrUpdate(plan Insta func (newState *Installation) SyncEffectiveFieldsDuringRead(existingState Installation) { } +func (c Installation) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstallationDetail{}.ToSchema(cs, append(path, "installation")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Installation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3255,31 +3409,31 @@ func (o *Installation) SetInstallation(ctx context.Context, v InstallationDetail } type InstallationDetail struct { - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - InstalledOn types.Int64 `tfsdk:"installed_on" tf:"optional"` + InstalledOn types.Int64 `tfsdk:"installed_on" tf:""` - ListingId types.String `tfsdk:"listing_id" tf:"optional"` + ListingId types.String `tfsdk:"listing_id" tf:""` - ListingName types.String `tfsdk:"listing_name" tf:"optional"` + ListingName types.String `tfsdk:"listing_name" tf:""` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` - RepoName types.String `tfsdk:"repo_name" tf:"optional"` + RepoName types.String `tfsdk:"repo_name" tf:""` - RepoPath types.String `tfsdk:"repo_path" tf:"optional"` + RepoPath types.String `tfsdk:"repo_path" tf:""` - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` - TokenDetail types.Object `tfsdk:"token_detail" tf:"optional,object"` + TokenDetail types.Object `tfsdk:"token_detail" tf:"object"` - Tokens types.List `tfsdk:"tokens" tf:"optional"` + Tokens types.List `tfsdk:"tokens" tf:""` } func (newState *InstallationDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstallationDetail) { @@ -3288,6 +3442,13 @@ func (newState *InstallationDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *InstallationDetail) SyncEffectiveFieldsDuringRead(existingState InstallationDetail) { } +func (c InstallationDetail) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenDetail{}.ToSchema(cs, append(path, "token_detail")...) + TokenInfo{}.ToSchema(cs, append(path, "tokens")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InstallationDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3409,12 +3570,6 @@ type ListAllInstallationsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAllInstallationsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllInstallationsRequest) { -} - -func (newState *ListAllInstallationsRequest) SyncEffectiveFieldsDuringRead(existingState ListAllInstallationsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllInstallationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3449,9 +3604,9 @@ func (o ListAllInstallationsRequest) Type(ctx context.Context) attr.Type { } type ListAllInstallationsResponse struct { - Installations types.List `tfsdk:"installations" tf:"optional"` + Installations types.List `tfsdk:"installations" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListAllInstallationsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllInstallationsResponse) { @@ -3460,6 +3615,12 @@ func (newState *ListAllInstallationsResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *ListAllInstallationsResponse) SyncEffectiveFieldsDuringRead(existingState ListAllInstallationsResponse) { } +func (c ListAllInstallationsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstallationDetail{}.ToSchema(cs, append(path, "installations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllInstallationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3530,12 +3691,6 @@ type ListAllPersonalizationRequestsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAllPersonalizationRequestsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllPersonalizationRequestsRequest) { -} - -func (newState *ListAllPersonalizationRequestsRequest) SyncEffectiveFieldsDuringRead(existingState ListAllPersonalizationRequestsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllPersonalizationRequestsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3570,9 +3725,9 @@ func (o ListAllPersonalizationRequestsRequest) Type(ctx context.Context) attr.Ty } type ListAllPersonalizationRequestsResponse struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:"optional"` + PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:""` } func (newState *ListAllPersonalizationRequestsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllPersonalizationRequestsResponse) { @@ -3581,6 +3736,12 @@ func (newState *ListAllPersonalizationRequestsResponse) SyncEffectiveFieldsDurin func (newState *ListAllPersonalizationRequestsResponse) SyncEffectiveFieldsDuringRead(existingState ListAllPersonalizationRequestsResponse) { } +func (c ListAllPersonalizationRequestsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PersonalizationRequest{}.ToSchema(cs, append(path, "personalization_requests")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllPersonalizationRequestsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3653,12 +3814,6 @@ type ListExchangeFiltersRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListExchangeFiltersRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangeFiltersRequest) { -} - -func (newState *ListExchangeFiltersRequest) SyncEffectiveFieldsDuringRead(existingState ListExchangeFiltersRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangeFiltersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3695,9 +3850,9 @@ func (o ListExchangeFiltersRequest) Type(ctx context.Context) attr.Type { } type ListExchangeFiltersResponse struct { - Filters types.List `tfsdk:"filters" tf:"optional"` + Filters types.List `tfsdk:"filters" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExchangeFiltersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangeFiltersResponse) { @@ -3706,6 +3861,12 @@ func (newState *ListExchangeFiltersResponse) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListExchangeFiltersResponse) SyncEffectiveFieldsDuringRead(existingState ListExchangeFiltersResponse) { } +func (c ListExchangeFiltersResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeFilter{}.ToSchema(cs, append(path, "filters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangeFiltersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3778,12 +3939,6 @@ type ListExchangesForListingRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListExchangesForListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesForListingRequest) { -} - -func (newState *ListExchangesForListingRequest) SyncEffectiveFieldsDuringRead(existingState ListExchangesForListingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesForListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3820,9 +3975,9 @@ func (o ListExchangesForListingRequest) Type(ctx context.Context) attr.Type { } type ListExchangesForListingResponse struct { - ExchangeListing types.List `tfsdk:"exchange_listing" tf:"optional"` + ExchangeListing types.List `tfsdk:"exchange_listing" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExchangesForListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesForListingResponse) { @@ -3831,6 +3986,12 @@ func (newState *ListExchangesForListingResponse) SyncEffectiveFieldsDuringCreate func (newState *ListExchangesForListingResponse) SyncEffectiveFieldsDuringRead(existingState ListExchangesForListingResponse) { } +func (c ListExchangesForListingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeListing{}.ToSchema(cs, append(path, "exchange_listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesForListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3901,12 +4062,6 @@ type ListExchangesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListExchangesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesRequest) { -} - -func (newState *ListExchangesRequest) SyncEffectiveFieldsDuringRead(existingState ListExchangesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3941,9 +4096,9 @@ func (o ListExchangesRequest) Type(ctx context.Context) attr.Type { } type ListExchangesResponse struct { - Exchanges types.List `tfsdk:"exchanges" tf:"optional"` + Exchanges types.List `tfsdk:"exchanges" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExchangesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesResponse) { @@ -3952,6 +4107,12 @@ func (newState *ListExchangesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListExchangesResponse) SyncEffectiveFieldsDuringRead(existingState ListExchangesResponse) { } +func (c ListExchangesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Exchange{}.ToSchema(cs, append(path, "exchanges")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4024,12 +4185,6 @@ type ListFilesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListFilesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFilesRequest) { -} - -func (newState *ListFilesRequest) SyncEffectiveFieldsDuringRead(existingState ListFilesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFilesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4096,9 +4251,9 @@ func (o *ListFilesRequest) SetFileParent(ctx context.Context, v FileParent) { } type ListFilesResponse struct { - FileInfos types.List `tfsdk:"file_infos" tf:"optional"` + FileInfos types.List `tfsdk:"file_infos" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListFilesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFilesResponse) { @@ -4107,6 +4262,12 @@ func (newState *ListFilesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListFilesResponse) SyncEffectiveFieldsDuringRead(existingState ListFilesResponse) { } +func (c ListFilesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo{}.ToSchema(cs, append(path, "file_infos")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFilesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4179,12 +4340,6 @@ type ListFulfillmentsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListFulfillmentsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFulfillmentsRequest) { -} - -func (newState *ListFulfillmentsRequest) SyncEffectiveFieldsDuringRead(existingState ListFulfillmentsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFulfillmentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4221,9 +4376,9 @@ func (o ListFulfillmentsRequest) Type(ctx context.Context) attr.Type { } type ListFulfillmentsResponse struct { - Fulfillments types.List `tfsdk:"fulfillments" tf:"optional"` + Fulfillments types.List `tfsdk:"fulfillments" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListFulfillmentsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFulfillmentsResponse) { @@ -4232,6 +4387,12 @@ func (newState *ListFulfillmentsResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListFulfillmentsResponse) SyncEffectiveFieldsDuringRead(existingState ListFulfillmentsResponse) { } +func (c ListFulfillmentsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListingFulfillment{}.ToSchema(cs, append(path, "fulfillments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFulfillmentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4304,12 +4465,6 @@ type ListInstallationsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListInstallationsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstallationsRequest) { -} - -func (newState *ListInstallationsRequest) SyncEffectiveFieldsDuringRead(existingState ListInstallationsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstallationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4346,9 +4501,9 @@ func (o ListInstallationsRequest) Type(ctx context.Context) attr.Type { } type ListInstallationsResponse struct { - Installations types.List `tfsdk:"installations" tf:"optional"` + Installations types.List `tfsdk:"installations" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListInstallationsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstallationsResponse) { @@ -4357,6 +4512,12 @@ func (newState *ListInstallationsResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ListInstallationsResponse) SyncEffectiveFieldsDuringRead(existingState ListInstallationsResponse) { } +func (c ListInstallationsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstallationDetail{}.ToSchema(cs, append(path, "installations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstallationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4429,12 +4590,6 @@ type ListListingsForExchangeRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListListingsForExchangeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsForExchangeRequest) { -} - -func (newState *ListListingsForExchangeRequest) SyncEffectiveFieldsDuringRead(existingState ListListingsForExchangeRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsForExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4471,9 +4626,9 @@ func (o ListListingsForExchangeRequest) Type(ctx context.Context) attr.Type { } type ListListingsForExchangeResponse struct { - ExchangeListings types.List `tfsdk:"exchange_listings" tf:"optional"` + ExchangeListings types.List `tfsdk:"exchange_listings" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListListingsForExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsForExchangeResponse) { @@ -4482,6 +4637,12 @@ func (newState *ListListingsForExchangeResponse) SyncEffectiveFieldsDuringCreate func (newState *ListListingsForExchangeResponse) SyncEffectiveFieldsDuringRead(existingState ListListingsForExchangeResponse) { } +func (c ListListingsForExchangeResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeListing{}.ToSchema(cs, append(path, "exchange_listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsForExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4567,12 +4728,6 @@ type ListListingsRequest struct { Tags types.List `tfsdk:"-"` } -func (newState *ListListingsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsRequest) { -} - -func (newState *ListListingsRequest) SyncEffectiveFieldsDuringRead(existingState ListListingsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4738,9 +4893,9 @@ func (o *ListListingsRequest) SetTags(ctx context.Context, v []ListingTag) { } type ListListingsResponse struct { - Listings types.List `tfsdk:"listings" tf:"optional"` + Listings types.List `tfsdk:"listings" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListListingsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsResponse) { @@ -4749,6 +4904,12 @@ func (newState *ListListingsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ListListingsResponse) SyncEffectiveFieldsDuringRead(existingState ListListingsResponse) { } +func (c ListListingsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing{}.ToSchema(cs, append(path, "listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4818,7 +4979,7 @@ type ListProviderAnalyticsDashboardResponse struct { Id types.String `tfsdk:"id" tf:""` - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *ListProviderAnalyticsDashboardResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProviderAnalyticsDashboardResponse) { @@ -4827,6 +4988,13 @@ func (newState *ListProviderAnalyticsDashboardResponse) SyncEffectiveFieldsDurin func (newState *ListProviderAnalyticsDashboardResponse) SyncEffectiveFieldsDuringRead(existingState ListProviderAnalyticsDashboardResponse) { } +func (c ListProviderAnalyticsDashboardResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProviderAnalyticsDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4871,12 +5039,6 @@ type ListProvidersRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListProvidersRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersRequest) { -} - -func (newState *ListProvidersRequest) SyncEffectiveFieldsDuringRead(existingState ListProvidersRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4913,9 +5075,9 @@ func (o ListProvidersRequest) Type(ctx context.Context) attr.Type { } type ListProvidersResponse struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Providers types.List `tfsdk:"providers" tf:"optional"` + Providers types.List `tfsdk:"providers" tf:""` } func (newState *ListProvidersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersResponse) { @@ -4924,6 +5086,12 @@ func (newState *ListProvidersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListProvidersResponse) SyncEffectiveFieldsDuringRead(existingState ListProvidersResponse) { } +func (c ListProvidersResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo{}.ToSchema(cs, append(path, "providers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4988,9 +5156,9 @@ func (o *ListProvidersResponse) SetProviders(ctx context.Context, v []ProviderIn } type Listing struct { - Detail types.Object `tfsdk:"detail" tf:"optional,object"` + Detail types.Object `tfsdk:"detail" tf:"object"` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Next Number: 26 Summary types.Object `tfsdk:"summary" tf:"object"` } @@ -5001,6 +5169,14 @@ func (newState *Listing) SyncEffectiveFieldsDuringCreateOrUpdate(plan Listing) { func (newState *Listing) SyncEffectiveFieldsDuringRead(existingState Listing) { } +func (c Listing) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListingDetail{}.ToSchema(cs, append(path, "detail")...) + cs.SetRequired(append(path, "summary")...) + ListingSummary{}.ToSchema(cs, append(path, "summary")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Listing. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5098,40 +5274,40 @@ func (o *Listing) SetSummary(ctx context.Context, v ListingSummary) { type ListingDetail struct { // Type of assets included in the listing. eg. GIT_REPO, DATA_TABLE, MODEL, // NOTEBOOK - Assets types.List `tfsdk:"assets" tf:"optional"` + Assets types.List `tfsdk:"assets" tf:""` // The ending date timestamp for when the data spans - CollectionDateEnd types.Int64 `tfsdk:"collection_date_end" tf:"optional"` + CollectionDateEnd types.Int64 `tfsdk:"collection_date_end" tf:""` // The starting date timestamp for when the data spans - CollectionDateStart types.Int64 `tfsdk:"collection_date_start" tf:"optional"` + CollectionDateStart types.Int64 `tfsdk:"collection_date_start" tf:""` // Smallest unit of time in the dataset - CollectionGranularity types.Object `tfsdk:"collection_granularity" tf:"optional,object"` + CollectionGranularity types.Object `tfsdk:"collection_granularity" tf:"object"` // Whether the dataset is free or paid - Cost types.String `tfsdk:"cost" tf:"optional"` + Cost types.String `tfsdk:"cost" tf:""` // Where/how the data is sourced - DataSource types.String `tfsdk:"data_source" tf:"optional"` + DataSource types.String `tfsdk:"data_source" tf:""` - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - DocumentationLink types.String `tfsdk:"documentation_link" tf:"optional"` + DocumentationLink types.String `tfsdk:"documentation_link" tf:""` - EmbeddedNotebookFileInfos types.List `tfsdk:"embedded_notebook_file_infos" tf:"optional"` + EmbeddedNotebookFileInfos types.List `tfsdk:"embedded_notebook_file_infos" tf:""` - FileIds types.List `tfsdk:"file_ids" tf:"optional"` + FileIds types.List `tfsdk:"file_ids" tf:""` // Which geo region the listing data is collected from - GeographicalCoverage types.String `tfsdk:"geographical_coverage" tf:"optional"` + GeographicalCoverage types.String `tfsdk:"geographical_coverage" tf:""` // ID 20, 21 removed don't use License of the data asset - Required for // listings with model based assets - License types.String `tfsdk:"license" tf:"optional"` + License types.String `tfsdk:"license" tf:""` // What the pricing model is (e.g. paid, subscription, paid upfront); should // only be present if cost is paid TODO: Not used yet, should deprecate if // we will never use it - PricingModel types.String `tfsdk:"pricing_model" tf:"optional"` + PricingModel types.String `tfsdk:"pricing_model" tf:""` - PrivacyPolicyLink types.String `tfsdk:"privacy_policy_link" tf:"optional"` + PrivacyPolicyLink types.String `tfsdk:"privacy_policy_link" tf:""` // size of the dataset in GB - Size types.Float64 `tfsdk:"size" tf:"optional"` + Size types.Float64 `tfsdk:"size" tf:""` - SupportLink types.String `tfsdk:"support_link" tf:"optional"` + SupportLink types.String `tfsdk:"support_link" tf:""` // Listing tags - Simple key value pair to annotate listings. When should I // use tags vs dedicated fields? Using tags avoids the need to add new // columns in the database for new annotations. However, this should be used @@ -5139,11 +5315,11 @@ type ListingDetail struct { // the field is optional and won't need to have NOT NULL integrity check 2. // The value is fairly fixed, static and low cardinality (eg. enums). 3. The // value won't be used in filters or joins with other tables. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` - TermsOfService types.String `tfsdk:"terms_of_service" tf:"optional"` + TermsOfService types.String `tfsdk:"terms_of_service" tf:""` // How often data is updated - UpdateFrequency types.Object `tfsdk:"update_frequency" tf:"optional,object"` + UpdateFrequency types.Object `tfsdk:"update_frequency" tf:"object"` } func (newState *ListingDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingDetail) { @@ -5152,6 +5328,15 @@ func (newState *ListingDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan List func (newState *ListingDetail) SyncEffectiveFieldsDuringRead(existingState ListingDetail) { } +func (c ListingDetail) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DataRefreshInfo{}.ToSchema(cs, append(path, "collection_granularity")...) + FileInfo{}.ToSchema(cs, append(path, "embedded_notebook_file_infos")...) + ListingTag{}.ToSchema(cs, append(path, "tags")...) + DataRefreshInfo{}.ToSchema(cs, append(path, "update_frequency")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5395,15 +5580,15 @@ func (o *ListingDetail) SetUpdateFrequency(ctx context.Context, v DataRefreshInf } type ListingFulfillment struct { - FulfillmentType types.String `tfsdk:"fulfillment_type" tf:"optional"` + FulfillmentType types.String `tfsdk:"fulfillment_type" tf:""` ListingId types.String `tfsdk:"listing_id" tf:""` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` - RepoInfo types.Object `tfsdk:"repo_info" tf:"optional,object"` + RepoInfo types.Object `tfsdk:"repo_info" tf:"object"` - ShareInfo types.Object `tfsdk:"share_info" tf:"optional,object"` + ShareInfo types.Object `tfsdk:"share_info" tf:"object"` } func (newState *ListingFulfillment) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingFulfillment) { @@ -5412,6 +5597,14 @@ func (newState *ListingFulfillment) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListingFulfillment) SyncEffectiveFieldsDuringRead(existingState ListingFulfillment) { } +func (c ListingFulfillment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "listing_id")...) + RepoInfo{}.ToSchema(cs, append(path, "repo_info")...) + ShareInfo{}.ToSchema(cs, append(path, "share_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingFulfillment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5511,7 +5704,7 @@ func (o *ListingFulfillment) SetShareInfo(ctx context.Context, v ShareInfo) { } type ListingSetting struct { - Visibility types.String `tfsdk:"visibility" tf:"optional"` + Visibility types.String `tfsdk:"visibility" tf:""` } func (newState *ListingSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingSetting) { @@ -5520,6 +5713,11 @@ func (newState *ListingSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan Lis func (newState *ListingSetting) SyncEffectiveFieldsDuringRead(existingState ListingSetting) { } +func (c ListingSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5553,44 +5751,44 @@ func (o ListingSetting) Type(ctx context.Context) attr.Type { // Next Number: 26 type ListingSummary struct { - Categories types.List `tfsdk:"categories" tf:"optional"` + Categories types.List `tfsdk:"categories" tf:""` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` - CreatedById types.Int64 `tfsdk:"created_by_id" tf:"optional"` + CreatedById types.Int64 `tfsdk:"created_by_id" tf:""` - ExchangeIds types.List `tfsdk:"exchange_ids" tf:"optional"` + ExchangeIds types.List `tfsdk:"exchange_ids" tf:""` // if a git repo is being created, a listing will be initialized with this // field as opposed to a share - GitRepo types.Object `tfsdk:"git_repo" tf:"optional,object"` + GitRepo types.Object `tfsdk:"git_repo" tf:"object"` ListingType types.String `tfsdk:"listingType" tf:""` Name types.String `tfsdk:"name" tf:""` - ProviderId types.String `tfsdk:"provider_id" tf:"optional"` + ProviderId types.String `tfsdk:"provider_id" tf:""` - ProviderRegion types.Object `tfsdk:"provider_region" tf:"optional,object"` + ProviderRegion types.Object `tfsdk:"provider_region" tf:"object"` - PublishedAt types.Int64 `tfsdk:"published_at" tf:"optional"` + PublishedAt types.Int64 `tfsdk:"published_at" tf:""` - PublishedBy types.String `tfsdk:"published_by" tf:"optional"` + PublishedBy types.String `tfsdk:"published_by" tf:""` - Setting types.Object `tfsdk:"setting" tf:"optional,object"` + Setting types.Object `tfsdk:"setting" tf:"object"` - Share types.Object `tfsdk:"share" tf:"optional,object"` + Share types.Object `tfsdk:"share" tf:"object"` // Enums - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` - Subtitle types.String `tfsdk:"subtitle" tf:"optional"` + Subtitle types.String `tfsdk:"subtitle" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` - UpdatedById types.Int64 `tfsdk:"updated_by_id" tf:"optional"` + UpdatedById types.Int64 `tfsdk:"updated_by_id" tf:""` } func (newState *ListingSummary) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingSummary) { @@ -5599,6 +5797,17 @@ func (newState *ListingSummary) SyncEffectiveFieldsDuringCreateOrUpdate(plan Lis func (newState *ListingSummary) SyncEffectiveFieldsDuringRead(existingState ListingSummary) { } +func (c ListingSummary) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoInfo{}.ToSchema(cs, append(path, "git_repo")...) + cs.SetRequired(append(path, "listingType")...) + cs.SetRequired(append(path, "name")...) + RegionInfo{}.ToSchema(cs, append(path, "provider_region")...) + ListingSetting{}.ToSchema(cs, append(path, "setting")...) + ShareInfo{}.ToSchema(cs, append(path, "share")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingSummary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5843,10 +6052,10 @@ func (o *ListingSummary) SetShare(ctx context.Context, v ShareInfo) { type ListingTag struct { // Tag name (enum) - TagName types.String `tfsdk:"tag_name" tf:"optional"` + TagName types.String `tfsdk:"tag_name" tf:""` // String representation of the tag value. Values should be string literals // (no complex types) - TagValues types.List `tfsdk:"tag_values" tf:"optional"` + TagValues types.List `tfsdk:"tag_values" tf:""` } func (newState *ListingTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingTag) { @@ -5855,6 +6064,11 @@ func (newState *ListingTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan Listing func (newState *ListingTag) SyncEffectiveFieldsDuringRead(existingState ListingTag) { } +func (c ListingTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5919,38 +6133,38 @@ func (o *ListingTag) SetTagValues(ctx context.Context, v []types.String) { } type PersonalizationRequest struct { - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` ConsumerRegion types.Object `tfsdk:"consumer_region" tf:"object"` // contact info for the consumer requesting data or performing a listing // installation - ContactInfo types.Object `tfsdk:"contact_info" tf:"optional,object"` + ContactInfo types.Object `tfsdk:"contact_info" tf:"object"` - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - IntendedUse types.String `tfsdk:"intended_use" tf:"optional"` + IntendedUse types.String `tfsdk:"intended_use" tf:""` - IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:"optional"` + IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:""` - ListingId types.String `tfsdk:"listing_id" tf:"optional"` + ListingId types.String `tfsdk:"listing_id" tf:""` - ListingName types.String `tfsdk:"listing_name" tf:"optional"` + ListingName types.String `tfsdk:"listing_name" tf:""` - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` - ProviderId types.String `tfsdk:"provider_id" tf:"optional"` + ProviderId types.String `tfsdk:"provider_id" tf:""` - RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + RecipientType types.String `tfsdk:"recipient_type" tf:""` - Share types.Object `tfsdk:"share" tf:"optional,object"` + Share types.Object `tfsdk:"share" tf:"object"` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` } func (newState *PersonalizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PersonalizationRequest) { @@ -5959,6 +6173,15 @@ func (newState *PersonalizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *PersonalizationRequest) SyncEffectiveFieldsDuringRead(existingState PersonalizationRequest) { } +func (c PersonalizationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "consumer_region")...) + RegionInfo{}.ToSchema(cs, append(path, "consumer_region")...) + ContactInfo{}.ToSchema(cs, append(path, "contact_info")...) + ShareInfo{}.ToSchema(cs, append(path, "share")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PersonalizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6118,6 +6341,12 @@ func (newState *ProviderAnalyticsDashboard) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ProviderAnalyticsDashboard) SyncEffectiveFieldsDuringRead(existingState ProviderAnalyticsDashboard) { } +func (c ProviderAnalyticsDashboard) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderAnalyticsDashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6152,29 +6381,29 @@ func (o ProviderAnalyticsDashboard) Type(ctx context.Context) attr.Type { type ProviderInfo struct { BusinessContactEmail types.String `tfsdk:"business_contact_email" tf:""` - CompanyWebsiteLink types.String `tfsdk:"company_website_link" tf:"optional"` + CompanyWebsiteLink types.String `tfsdk:"company_website_link" tf:""` - DarkModeIconFileId types.String `tfsdk:"dark_mode_icon_file_id" tf:"optional"` + DarkModeIconFileId types.String `tfsdk:"dark_mode_icon_file_id" tf:""` - DarkModeIconFilePath types.String `tfsdk:"dark_mode_icon_file_path" tf:"optional"` + DarkModeIconFilePath types.String `tfsdk:"dark_mode_icon_file_path" tf:""` - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` - IconFileId types.String `tfsdk:"icon_file_id" tf:"optional"` + IconFileId types.String `tfsdk:"icon_file_id" tf:""` - IconFilePath types.String `tfsdk:"icon_file_path" tf:"optional"` + IconFilePath types.String `tfsdk:"icon_file_path" tf:""` - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // is_featured is accessible by consumers only - IsFeatured types.Bool `tfsdk:"is_featured" tf:"optional"` + IsFeatured types.Bool `tfsdk:"is_featured" tf:""` Name types.String `tfsdk:"name" tf:""` PrivacyPolicyLink types.String `tfsdk:"privacy_policy_link" tf:""` // published_by is only applicable to data aggregators (e.g. Crux) - PublishedBy types.String `tfsdk:"published_by" tf:"optional"` + PublishedBy types.String `tfsdk:"published_by" tf:""` - SupportContactEmail types.String `tfsdk:"support_contact_email" tf:"optional"` + SupportContactEmail types.String `tfsdk:"support_contact_email" tf:""` TermOfServiceLink types.String `tfsdk:"term_of_service_link" tf:""` } @@ -6185,6 +6414,15 @@ func (newState *ProviderInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Provi func (newState *ProviderInfo) SyncEffectiveFieldsDuringRead(existingState ProviderInfo) { } +func (c ProviderInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "business_contact_email")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "privacy_policy_link")...) + cs.SetRequired(append(path, "term_of_service_link")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6243,9 +6481,9 @@ func (o ProviderInfo) Type(ctx context.Context) attr.Type { } type RegionInfo struct { - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *RegionInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegionInfo) { @@ -6254,6 +6492,11 @@ func (newState *RegionInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegionI func (newState *RegionInfo) SyncEffectiveFieldsDuringRead(existingState RegionInfo) { } +func (c RegionInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegionInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6292,12 +6535,6 @@ type RemoveExchangeForListingRequest struct { Id types.String `tfsdk:"-"` } -func (newState *RemoveExchangeForListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveExchangeForListingRequest) { -} - -func (newState *RemoveExchangeForListingRequest) SyncEffectiveFieldsDuringRead(existingState RemoveExchangeForListingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveExchangeForListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6338,6 +6575,11 @@ func (newState *RemoveExchangeForListingResponse) SyncEffectiveFieldsDuringCreat func (newState *RemoveExchangeForListingResponse) SyncEffectiveFieldsDuringRead(existingState RemoveExchangeForListingResponse) { } +func (c RemoveExchangeForListingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveExchangeForListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6376,6 +6618,12 @@ func (newState *RepoInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoInfo) func (newState *RepoInfo) SyncEffectiveFieldsDuringRead(existingState RepoInfo) { } +func (c RepoInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "git_repo_url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6422,6 +6670,13 @@ func (newState *RepoInstallation) SyncEffectiveFieldsDuringCreateOrUpdate(plan R func (newState *RepoInstallation) SyncEffectiveFieldsDuringRead(existingState RepoInstallation) { } +func (c RepoInstallation) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "repo_name")...) + cs.SetRequired(append(path, "repo_path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoInstallation. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6475,12 +6730,6 @@ type SearchListingsRequest struct { Query types.String `tfsdk:"-"` } -func (newState *SearchListingsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchListingsRequest) { -} - -func (newState *SearchListingsRequest) SyncEffectiveFieldsDuringRead(existingState SearchListingsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchListingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6615,9 +6864,9 @@ func (o *SearchListingsRequest) SetProviderIds(ctx context.Context, v []types.St } type SearchListingsResponse struct { - Listings types.List `tfsdk:"listings" tf:"optional"` + Listings types.List `tfsdk:"listings" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *SearchListingsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchListingsResponse) { @@ -6626,6 +6875,12 @@ func (newState *SearchListingsResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *SearchListingsResponse) SyncEffectiveFieldsDuringRead(existingState SearchListingsResponse) { } +func (c SearchListingsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing{}.ToSchema(cs, append(path, "listings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchListingsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6701,6 +6956,13 @@ func (newState *ShareInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ShareInf func (newState *ShareInfo) SyncEffectiveFieldsDuringRead(existingState ShareInfo) { } +func (c ShareInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ShareInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6737,9 +6999,9 @@ func (o ShareInfo) Type(ctx context.Context) attr.Type { type SharedDataObject struct { // The type of the data object. Could be one of: TABLE, SCHEMA, // NOTEBOOK_FILE, MODEL, VOLUME - DataObjectType types.String `tfsdk:"data_object_type" tf:"optional"` + DataObjectType types.String `tfsdk:"data_object_type" tf:""` // Name of the shared object - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *SharedDataObject) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObject) { @@ -6748,6 +7010,11 @@ func (newState *SharedDataObject) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *SharedDataObject) SyncEffectiveFieldsDuringRead(existingState SharedDataObject) { } +func (c SharedDataObject) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SharedDataObject. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6782,15 +7049,15 @@ func (o SharedDataObject) Type(ctx context.Context) attr.Type { } type TokenDetail struct { - BearerToken types.String `tfsdk:"bearerToken" tf:"optional"` + BearerToken types.String `tfsdk:"bearerToken" tf:""` - Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + Endpoint types.String `tfsdk:"endpoint" tf:""` - ExpirationTime types.String `tfsdk:"expirationTime" tf:"optional"` + ExpirationTime types.String `tfsdk:"expirationTime" tf:""` // These field names must follow the delta sharing protocol. Original // message: RetrieveToken.Response in // managed-catalog/api/messages/recipient.proto - ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:"optional"` + ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:""` } func (newState *TokenDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenDetail) { @@ -6799,6 +7066,11 @@ func (newState *TokenDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenD func (newState *TokenDetail) SyncEffectiveFieldsDuringRead(existingState TokenDetail) { } +func (c TokenDetail) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6839,19 +7111,19 @@ func (o TokenDetail) Type(ctx context.Context) attr.Type { type TokenInfo struct { // Full activation url to retrieve the access token. It will be empty if the // token is already retrieved. - ActivationUrl types.String `tfsdk:"activation_url" tf:"optional"` + ActivationUrl types.String `tfsdk:"activation_url" tf:""` // Time at which this Recipient Token was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of Recipient Token creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Expiration timestamp of the token in epoch milliseconds. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // Unique id of the Recipient Token. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time at which this Recipient Token was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of Recipient Token updater. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *TokenInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenInfo) { @@ -6860,6 +7132,11 @@ func (newState *TokenInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenInf func (newState *TokenInfo) SyncEffectiveFieldsDuringRead(existingState TokenInfo) { } +func (c TokenInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6915,6 +7192,14 @@ func (newState *UpdateExchangeFilterRequest) SyncEffectiveFieldsDuringCreateOrUp func (newState *UpdateExchangeFilterRequest) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeFilterRequest) { } +func (c UpdateExchangeFilterRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "filter")...) + ExchangeFilter{}.ToSchema(cs, append(path, "filter")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeFilterRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6979,7 +7264,7 @@ func (o *UpdateExchangeFilterRequest) SetFilter(ctx context.Context, v ExchangeF } type UpdateExchangeFilterResponse struct { - Filter types.Object `tfsdk:"filter" tf:"optional,object"` + Filter types.Object `tfsdk:"filter" tf:"object"` } func (newState *UpdateExchangeFilterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeFilterResponse) { @@ -6988,6 +7273,12 @@ func (newState *UpdateExchangeFilterResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *UpdateExchangeFilterResponse) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeFilterResponse) { } +func (c UpdateExchangeFilterResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeFilter{}.ToSchema(cs, append(path, "filter")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeFilterResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7061,6 +7352,14 @@ func (newState *UpdateExchangeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *UpdateExchangeRequest) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeRequest) { } +func (c UpdateExchangeRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "exchange")...) + Exchange{}.ToSchema(cs, append(path, "exchange")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7125,7 +7424,7 @@ func (o *UpdateExchangeRequest) SetExchange(ctx context.Context, v Exchange) { } type UpdateExchangeResponse struct { - Exchange types.Object `tfsdk:"exchange" tf:"optional,object"` + Exchange types.Object `tfsdk:"exchange" tf:"object"` } func (newState *UpdateExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeResponse) { @@ -7134,6 +7433,12 @@ func (newState *UpdateExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *UpdateExchangeResponse) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeResponse) { } +func (c UpdateExchangeResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Exchange{}.ToSchema(cs, append(path, "exchange")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7202,7 +7507,7 @@ type UpdateInstallationRequest struct { ListingId types.String `tfsdk:"-"` - RotateToken types.Bool `tfsdk:"rotate_token" tf:"optional"` + RotateToken types.Bool `tfsdk:"rotate_token" tf:""` } func (newState *UpdateInstallationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInstallationRequest) { @@ -7211,6 +7516,15 @@ func (newState *UpdateInstallationRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *UpdateInstallationRequest) SyncEffectiveFieldsDuringRead(existingState UpdateInstallationRequest) { } +func (c UpdateInstallationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "installation")...) + InstallationDetail{}.ToSchema(cs, append(path, "installation")...) + cs.SetRequired(append(path, "installation_id")...) + cs.SetRequired(append(path, "listing_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateInstallationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7279,7 +7593,7 @@ func (o *UpdateInstallationRequest) SetInstallation(ctx context.Context, v Insta } type UpdateInstallationResponse struct { - Installation types.Object `tfsdk:"installation" tf:"optional,object"` + Installation types.Object `tfsdk:"installation" tf:"object"` } func (newState *UpdateInstallationResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInstallationResponse) { @@ -7288,6 +7602,12 @@ func (newState *UpdateInstallationResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UpdateInstallationResponse) SyncEffectiveFieldsDuringRead(existingState UpdateInstallationResponse) { } +func (c UpdateInstallationResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + InstallationDetail{}.ToSchema(cs, append(path, "installation")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateInstallationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7361,6 +7681,14 @@ func (newState *UpdateListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *UpdateListingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateListingRequest) { } +func (c UpdateListingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "listing")...) + Listing{}.ToSchema(cs, append(path, "listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateListingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7425,7 +7753,7 @@ func (o *UpdateListingRequest) SetListing(ctx context.Context, v Listing) { } type UpdateListingResponse struct { - Listing types.Object `tfsdk:"listing" tf:"optional,object"` + Listing types.Object `tfsdk:"listing" tf:"object"` } func (newState *UpdateListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateListingResponse) { @@ -7434,6 +7762,12 @@ func (newState *UpdateListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *UpdateListingResponse) SyncEffectiveFieldsDuringRead(existingState UpdateListingResponse) { } +func (c UpdateListingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Listing{}.ToSchema(cs, append(path, "listing")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateListingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7498,11 +7832,11 @@ func (o *UpdateListingResponse) SetListing(ctx context.Context, v Listing) { type UpdatePersonalizationRequestRequest struct { ListingId types.String `tfsdk:"-"` - Reason types.String `tfsdk:"reason" tf:"optional"` + Reason types.String `tfsdk:"reason" tf:""` RequestId types.String `tfsdk:"-"` - Share types.Object `tfsdk:"share" tf:"optional,object"` + Share types.Object `tfsdk:"share" tf:"object"` Status types.String `tfsdk:"status" tf:""` } @@ -7513,6 +7847,15 @@ func (newState *UpdatePersonalizationRequestRequest) SyncEffectiveFieldsDuringCr func (newState *UpdatePersonalizationRequestRequest) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalizationRequestRequest) { } +func (c UpdatePersonalizationRequestRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "listing_id")...) + cs.SetRequired(append(path, "request_id")...) + ShareInfo{}.ToSchema(cs, append(path, "share")...) + cs.SetRequired(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePersonalizationRequestRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7583,7 +7926,7 @@ func (o *UpdatePersonalizationRequestRequest) SetShare(ctx context.Context, v Sh } type UpdatePersonalizationRequestResponse struct { - Request types.Object `tfsdk:"request" tf:"optional,object"` + Request types.Object `tfsdk:"request" tf:"object"` } func (newState *UpdatePersonalizationRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalizationRequestResponse) { @@ -7592,6 +7935,12 @@ func (newState *UpdatePersonalizationRequestResponse) SyncEffectiveFieldsDuringC func (newState *UpdatePersonalizationRequestResponse) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalizationRequestResponse) { } +func (c UpdatePersonalizationRequestResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PersonalizationRequest{}.ToSchema(cs, append(path, "request")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePersonalizationRequestResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7659,7 +8008,7 @@ type UpdateProviderAnalyticsDashboardRequest struct { // this is the version of the dashboard template we want to update our user // to current expectation is that it should be equal to latest version of // the dashboard template - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *UpdateProviderAnalyticsDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderAnalyticsDashboardRequest) { @@ -7668,6 +8017,12 @@ func (newState *UpdateProviderAnalyticsDashboardRequest) SyncEffectiveFieldsDuri func (newState *UpdateProviderAnalyticsDashboardRequest) SyncEffectiveFieldsDuringRead(existingState UpdateProviderAnalyticsDashboardRequest) { } +func (c UpdateProviderAnalyticsDashboardRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderAnalyticsDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7707,7 +8062,7 @@ type UpdateProviderAnalyticsDashboardResponse struct { // id & version should be the same as the request Id types.String `tfsdk:"id" tf:""` - Version types.Int64 `tfsdk:"version" tf:"optional"` + Version types.Int64 `tfsdk:"version" tf:""` } func (newState *UpdateProviderAnalyticsDashboardResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderAnalyticsDashboardResponse) { @@ -7716,6 +8071,13 @@ func (newState *UpdateProviderAnalyticsDashboardResponse) SyncEffectiveFieldsDur func (newState *UpdateProviderAnalyticsDashboardResponse) SyncEffectiveFieldsDuringRead(existingState UpdateProviderAnalyticsDashboardResponse) { } +func (c UpdateProviderAnalyticsDashboardResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderAnalyticsDashboardResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7763,6 +8125,14 @@ func (newState *UpdateProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *UpdateProviderRequest) SyncEffectiveFieldsDuringRead(existingState UpdateProviderRequest) { } +func (c UpdateProviderRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "provider")...) + ProviderInfo{}.ToSchema(cs, append(path, "provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7827,7 +8197,7 @@ func (o *UpdateProviderRequest) SetProvider(ctx context.Context, v ProviderInfo) } type UpdateProviderResponse struct { - Provider types.Object `tfsdk:"provider" tf:"optional,object"` + Provider types.Object `tfsdk:"provider" tf:"object"` } func (newState *UpdateProviderResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderResponse) { @@ -7836,6 +8206,12 @@ func (newState *UpdateProviderResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *UpdateProviderResponse) SyncEffectiveFieldsDuringRead(existingState UpdateProviderResponse) { } +func (c UpdateProviderResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo{}.ToSchema(cs, append(path, "provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/ml_tf/legacy_model.go b/internal/service/ml_tf/legacy_model.go index 1a2925293..c3886d57b 100755 --- a/internal/service/ml_tf/legacy_model.go +++ b/internal/service/ml_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -37,11 +38,11 @@ type Activity_SdkV2 struct { // // * `SYSTEM_TRANSITION`: For events performed as a side effect, such as // archiving existing model versions in a stage. - ActivityType types.String `tfsdk:"activity_type" tf:"optional"` + ActivityType types.String `tfsdk:"activity_type" tf:""` // User-provided comment associated with the activity. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Source stage of the transition (if the activity is stage transition // related). Valid values are: // @@ -52,16 +53,16 @@ type Activity_SdkV2 struct { // * `Production`: Production stage. // // * `Archived`: Archived stage. - FromStage types.String `tfsdk:"from_stage" tf:"optional"` + FromStage types.String `tfsdk:"from_stage" tf:""` // Unique identifier for the object. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Comment made by system, for example explaining an activity of type // `SYSTEM_TRANSITION`. It usually describes a side effect, such as a // version being archived as part of another version's stage transition, and // may not be returned for some activity types. - SystemComment types.String `tfsdk:"system_comment" tf:"optional"` + SystemComment types.String `tfsdk:"system_comment" tf:""` // Target stage of the transition (if the activity is stage transition // related). Valid values are: // @@ -72,9 +73,9 @@ type Activity_SdkV2 struct { // * `Production`: Production stage. // // * `Archived`: Archived stage. - ToStage types.String `tfsdk:"to_stage" tf:"optional"` + ToStage types.String `tfsdk:"to_stage" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *Activity_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Activity_SdkV2) { @@ -83,6 +84,11 @@ func (newState *Activity_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Act func (newState *Activity_SdkV2) SyncEffectiveFieldsDuringRead(existingState Activity_SdkV2) { } +func (c Activity_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Activity. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -135,7 +141,7 @@ type ApproveTransitionRequest_SdkV2 struct { // stage. ArchiveExistingVersions types.Bool `tfsdk:"archive_existing_versions" tf:""` // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the model. Name types.String `tfsdk:"name" tf:""` // Target stage of the transition. Valid values are: @@ -158,6 +164,15 @@ func (newState *ApproveTransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *ApproveTransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ApproveTransitionRequest_SdkV2) { } +func (c ApproveTransitionRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "archive_existing_versions")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "stage")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ApproveTransitionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -199,13 +214,7 @@ func (o ApproveTransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { type ApproveTransitionRequestResponse_SdkV2 struct { // Activity recorded for the action. - Activity types.List `tfsdk:"activity" tf:"optional,object"` -} - -func (newState *ApproveTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApproveTransitionRequestResponse_SdkV2) { -} - -func (newState *ApproveTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ApproveTransitionRequestResponse_SdkV2) { + Activity types.List `tfsdk:"activity" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ApproveTransitionRequestResponse. @@ -272,17 +281,17 @@ func (o *ApproveTransitionRequestResponse_SdkV2) SetActivity(ctx context.Context // Comment details. type CommentObject_SdkV2 struct { // Array of actions on the activity allowed for the current viewer. - AvailableActions types.List `tfsdk:"available_actions" tf:"optional"` + AvailableActions types.List `tfsdk:"available_actions" tf:""` // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Comment ID - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *CommentObject_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CommentObject_SdkV2) { @@ -291,6 +300,11 @@ func (newState *CommentObject_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CommentObject_SdkV2) SyncEffectiveFieldsDuringRead(existingState CommentObject_SdkV2) { } +func (c CommentObject_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CommentObject. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -377,6 +391,14 @@ func (newState *CreateComment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CreateComment_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateComment_SdkV2) { } +func (c CreateComment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "comment")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateComment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -414,13 +436,7 @@ func (o CreateComment_SdkV2) Type(ctx context.Context) attr.Type { type CreateCommentResponse_SdkV2 struct { // Comment details. - Comment types.List `tfsdk:"comment" tf:"optional,object"` -} - -func (newState *CreateCommentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCommentResponse_SdkV2) { -} - -func (newState *CreateCommentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCommentResponse_SdkV2) { + Comment types.List `tfsdk:"comment" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCommentResponse. @@ -487,7 +503,7 @@ func (o *CreateCommentResponse_SdkV2) SetComment(ctx context.Context, v CommentO type CreateExperiment_SdkV2 struct { // Location where all artifacts for the experiment are stored. If not // provided, the remote server will select an appropriate default. - ArtifactLocation types.String `tfsdk:"artifact_location" tf:"optional"` + ArtifactLocation types.String `tfsdk:"artifact_location" tf:""` // Experiment name. Name types.String `tfsdk:"name" tf:""` // A collection of tags to set on the experiment. Maximum tag size and @@ -495,7 +511,7 @@ type CreateExperiment_SdkV2 struct { // backends are guaranteed to support tag keys up to 250 bytes in size and // tag values up to 5000 bytes in size. All storage backends are also // guaranteed to support up to 20 tags per request. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *CreateExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExperiment_SdkV2) { @@ -504,6 +520,13 @@ func (newState *CreateExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExperiment_SdkV2) { } +func (c CreateExperiment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + ExperimentTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExperiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -571,7 +594,7 @@ func (o *CreateExperiment_SdkV2) SetTags(ctx context.Context, v []ExperimentTag_ type CreateExperimentResponse_SdkV2 struct { // Unique identifier for the experiment. - ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + ExperimentId types.String `tfsdk:"experiment_id" tf:""` } func (newState *CreateExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExperimentResponse_SdkV2) { @@ -580,6 +603,11 @@ func (newState *CreateExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *CreateExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExperimentResponse_SdkV2) { } +func (c CreateExperimentResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -613,11 +641,11 @@ func (o CreateExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { type CreateModelRequest_SdkV2 struct { // Optional description for registered model. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Register models under this name Name types.String `tfsdk:"name" tf:""` // Additional metadata for registered model. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *CreateModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelRequest_SdkV2) { @@ -626,6 +654,13 @@ func (newState *CreateModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelRequest_SdkV2) { } +func (c CreateModelRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + ModelTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -692,7 +727,7 @@ func (o *CreateModelRequest_SdkV2) SetTags(ctx context.Context, v []ModelTag_Sdk } type CreateModelResponse_SdkV2 struct { - RegisteredModel types.List `tfsdk:"registered_model" tf:"optional,object"` + RegisteredModel types.List `tfsdk:"registered_model" tf:"object"` } func (newState *CreateModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelResponse_SdkV2) { @@ -701,6 +736,12 @@ func (newState *CreateModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *CreateModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelResponse_SdkV2) { } +func (c CreateModelResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Model_SdkV2{}.ToSchema(cs, append(path, "registered_model")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -764,19 +805,19 @@ func (o *CreateModelResponse_SdkV2) SetRegisteredModel(ctx context.Context, v Mo type CreateModelVersionRequest_SdkV2 struct { // Optional description for model version. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Register model under this name Name types.String `tfsdk:"name" tf:""` // MLflow run ID for correlation, if `source` was generated by an experiment // run in MLflow tracking server - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // MLflow run link - this is the exact link of the run that generated this // model version, potentially hosted at another instance of MLflow. - RunLink types.String `tfsdk:"run_link" tf:"optional"` + RunLink types.String `tfsdk:"run_link" tf:""` // URI indicating the location of the model artifacts. Source types.String `tfsdk:"source" tf:""` // Additional metadata for model version. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *CreateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelVersionRequest_SdkV2) { @@ -785,6 +826,14 @@ func (newState *CreateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *CreateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelVersionRequest_SdkV2) { } +func (c CreateModelVersionRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "source")...) + ModelVersionTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -858,7 +907,7 @@ func (o *CreateModelVersionRequest_SdkV2) SetTags(ctx context.Context, v []Model type CreateModelVersionResponse_SdkV2 struct { // Return new version number generated for this model in registry. - ModelVersion types.List `tfsdk:"model_version" tf:"optional,object"` + ModelVersion types.List `tfsdk:"model_version" tf:"object"` } func (newState *CreateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelVersionResponse_SdkV2) { @@ -867,6 +916,12 @@ func (newState *CreateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *CreateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelVersionResponse_SdkV2) { } +func (c CreateModelVersionResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion_SdkV2{}.ToSchema(cs, append(path, "model_version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelVersionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -930,7 +985,7 @@ func (o *CreateModelVersionResponse_SdkV2) SetModelVersion(ctx context.Context, type CreateRegistryWebhook_SdkV2 struct { // User-specified description for the webhook. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A // new model version was created for the associated model. // @@ -966,11 +1021,11 @@ type CreateRegistryWebhook_SdkV2 struct { // version be archived. Events types.List `tfsdk:"events" tf:""` - HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"optional,object"` + HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"object"` - JobSpec types.List `tfsdk:"job_spec" tf:"optional,object"` + JobSpec types.List `tfsdk:"job_spec" tf:"object"` // Name of the model whose events would trigger this webhook. - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // Enable or disable triggering the webhook, or put the webhook into test // mode. The default is `ACTIVE`: * `ACTIVE`: Webhook is triggered when an // associated event happens. @@ -979,7 +1034,7 @@ type CreateRegistryWebhook_SdkV2 struct { // // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is // not triggered on a real event. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *CreateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegistryWebhook_SdkV2) { @@ -988,6 +1043,14 @@ func (newState *CreateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRegistryWebhook_SdkV2) { } +func (c CreateRegistryWebhook_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "events")...) + HttpUrlSpec_SdkV2{}.ToSchema(cs, append(path, "http_url_spec")...) + JobSpec_SdkV2{}.ToSchema(cs, append(path, "job_spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRegistryWebhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1119,15 +1182,15 @@ func (o *CreateRegistryWebhook_SdkV2) SetJobSpec(ctx context.Context, v JobSpec_ type CreateRun_SdkV2 struct { // ID of the associated experiment. - ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + ExperimentId types.String `tfsdk:"experiment_id" tf:""` // Unix timestamp in milliseconds of when the run started. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Additional metadata for run. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // ID of the user executing the run. This field is deprecated as of MLflow // 1.0, and will be removed in a future MLflow release. Use 'mlflow.user' // tag instead. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *CreateRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRun_SdkV2) { @@ -1136,6 +1199,12 @@ func (newState *CreateRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cr func (newState *CreateRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRun_SdkV2) { } +func (c CreateRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RunTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1205,7 +1274,7 @@ func (o *CreateRun_SdkV2) SetTags(ctx context.Context, v []RunTag_SdkV2) { type CreateRunResponse_SdkV2 struct { // The newly created run. - Run types.List `tfsdk:"run" tf:"optional,object"` + Run types.List `tfsdk:"run" tf:"object"` } func (newState *CreateRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRunResponse_SdkV2) { @@ -1214,6 +1283,12 @@ func (newState *CreateRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRunResponse_SdkV2) { } +func (c CreateRunResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Run_SdkV2{}.ToSchema(cs, append(path, "run")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1277,7 +1352,7 @@ func (o *CreateRunResponse_SdkV2) SetRun(ctx context.Context, v Run_SdkV2) { type CreateTransitionRequest_SdkV2 struct { // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the model. Name types.String `tfsdk:"name" tf:""` // Target stage of the transition. Valid values are: @@ -1300,6 +1375,14 @@ func (newState *CreateTransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *CreateTransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTransitionRequest_SdkV2) { } +func (c CreateTransitionRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "stage")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTransitionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1339,13 +1422,7 @@ func (o CreateTransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { type CreateTransitionRequestResponse_SdkV2 struct { // Transition request details. - Request types.List `tfsdk:"request" tf:"optional,object"` -} - -func (newState *CreateTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTransitionRequestResponse_SdkV2) { -} - -func (newState *CreateTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTransitionRequestResponse_SdkV2) { + Request types.List `tfsdk:"request" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTransitionRequestResponse. @@ -1410,13 +1487,7 @@ func (o *CreateTransitionRequestResponse_SdkV2) SetRequest(ctx context.Context, } type CreateWebhookResponse_SdkV2 struct { - Webhook types.List `tfsdk:"webhook" tf:"optional,object"` -} - -func (newState *CreateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWebhookResponse_SdkV2) { -} - -func (newState *CreateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWebhookResponse_SdkV2) { + Webhook types.List `tfsdk:"webhook" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWebhookResponse. @@ -1483,24 +1554,24 @@ func (o *CreateWebhookResponse_SdkV2) SetWebhook(ctx context.Context, v Registry type Dataset_SdkV2 struct { // Dataset digest, e.g. an md5 hash of the dataset that uniquely identifies // it within datasets of the same name. - Digest types.String `tfsdk:"digest" tf:"optional"` + Digest types.String `tfsdk:"digest" tf:""` // The name of the dataset. E.g. “my.uc.table@2” “nyc-taxi-dataset”, // “fantastic-elk-3” - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The profile of the dataset. Summary statistics for the dataset, such as // the number of rows in a table, the mean / std / mode of each column in a // table, or the number of elements in an array. - Profile types.String `tfsdk:"profile" tf:"optional"` + Profile types.String `tfsdk:"profile" tf:""` // The schema of the dataset. E.g., MLflow ColSpec JSON for a dataframe, // MLflow TensorSpec JSON for an ndarray, or another schema format. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // The type of the dataset source, e.g. ‘databricks-uc-table’, // ‘DBFS’, ‘S3’, ... - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // Source information for the dataset. Note that the source may not exactly // reproduce the dataset if it was transformed / modified before use with // MLflow. - SourceType types.String `tfsdk:"source_type" tf:"optional"` + SourceType types.String `tfsdk:"source_type" tf:""` } func (newState *Dataset_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dataset_SdkV2) { @@ -1509,6 +1580,11 @@ func (newState *Dataset_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Data func (newState *Dataset_SdkV2) SyncEffectiveFieldsDuringRead(existingState Dataset_SdkV2) { } +func (c Dataset_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Dataset. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1552,10 +1628,10 @@ func (o Dataset_SdkV2) Type(ctx context.Context) attr.Type { type DatasetInput_SdkV2 struct { // The dataset being used as a Run input. - Dataset types.List `tfsdk:"dataset" tf:"optional,object"` + Dataset types.List `tfsdk:"dataset" tf:"object"` // A list of tags for the dataset input, e.g. a “context” tag with value // “training” - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *DatasetInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatasetInput_SdkV2) { @@ -1564,6 +1640,13 @@ func (newState *DatasetInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DatasetInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatasetInput_SdkV2) { } +func (c DatasetInput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Dataset_SdkV2{}.ToSchema(cs, append(path, "dataset")...) + InputTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatasetInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1661,12 +1744,6 @@ type DeleteCommentRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteCommentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCommentRequest_SdkV2) { -} - -func (newState *DeleteCommentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCommentRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCommentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1701,12 +1778,6 @@ func (o DeleteCommentRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteCommentResponse_SdkV2 struct { } -func (newState *DeleteCommentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCommentResponse_SdkV2) { -} - -func (newState *DeleteCommentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCommentResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCommentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1745,6 +1816,12 @@ func (newState *DeleteExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *DeleteExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExperiment_SdkV2) { } +func (c DeleteExperiment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExperiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1785,6 +1862,11 @@ func (newState *DeleteExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *DeleteExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExperimentResponse_SdkV2) { } +func (c DeleteExperimentResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1818,12 +1900,6 @@ type DeleteModelRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelRequest_SdkV2) { -} - -func (newState *DeleteModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1858,12 +1934,6 @@ func (o DeleteModelRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteModelResponse_SdkV2 struct { } -func (newState *DeleteModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelResponse_SdkV2) { -} - -func (newState *DeleteModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1900,12 +1970,6 @@ type DeleteModelTagRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteModelTagRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelTagRequest_SdkV2) { -} - -func (newState *DeleteModelTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelTagRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelTagRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1942,12 +2006,6 @@ func (o DeleteModelTagRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteModelTagResponse_SdkV2 struct { } -func (newState *DeleteModelTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelTagResponse_SdkV2) { -} - -func (newState *DeleteModelTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelTagResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1983,12 +2041,6 @@ type DeleteModelVersionRequest_SdkV2 struct { Version types.String `tfsdk:"-"` } -func (newState *DeleteModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionRequest_SdkV2) { -} - -func (newState *DeleteModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2025,12 +2077,6 @@ func (o DeleteModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteModelVersionResponse_SdkV2 struct { } -func (newState *DeleteModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionResponse_SdkV2) { -} - -func (newState *DeleteModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2069,12 +2115,6 @@ type DeleteModelVersionTagRequest_SdkV2 struct { Version types.String `tfsdk:"-"` } -func (newState *DeleteModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionTagRequest_SdkV2) { -} - -func (newState *DeleteModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionTagRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionTagRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2113,12 +2153,6 @@ func (o DeleteModelVersionTagRequest_SdkV2) Type(ctx context.Context) attr.Type type DeleteModelVersionTagResponse_SdkV2 struct { } -func (newState *DeleteModelVersionTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionTagResponse_SdkV2) { -} - -func (newState *DeleteModelVersionTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionTagResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2157,6 +2191,12 @@ func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan De func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRun_SdkV2) { } +func (c DeleteRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2197,6 +2237,11 @@ func (newState *DeleteRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *DeleteRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRunResponse_SdkV2) { } +func (c DeleteRunResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2229,7 +2274,7 @@ type DeleteRuns_SdkV2 struct { ExperimentId types.String `tfsdk:"experiment_id" tf:""` // An optional positive integer indicating the maximum number of runs to // delete. The maximum allowed value for max_runs is 10000. - MaxRuns types.Int64 `tfsdk:"max_runs" tf:"optional"` + MaxRuns types.Int64 `tfsdk:"max_runs" tf:""` // The maximum creation timestamp in milliseconds since the UNIX epoch for // deleting runs. Only runs created prior to or at this timestamp are // deleted. @@ -2242,6 +2287,13 @@ func (newState *DeleteRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan D func (newState *DeleteRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRuns_SdkV2) { } +func (c DeleteRuns_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + cs.SetRequired(append(path, "max_timestamp_millis")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRuns. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2279,7 +2331,7 @@ func (o DeleteRuns_SdkV2) Type(ctx context.Context) attr.Type { type DeleteRunsResponse_SdkV2 struct { // The number of runs deleted. - RunsDeleted types.Int64 `tfsdk:"runs_deleted" tf:"optional"` + RunsDeleted types.Int64 `tfsdk:"runs_deleted" tf:""` } func (newState *DeleteRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRunsResponse_SdkV2) { @@ -2288,6 +2340,11 @@ func (newState *DeleteRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *DeleteRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRunsResponse_SdkV2) { } +func (c DeleteRunsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2332,6 +2389,13 @@ func (newState *DeleteTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan De func (newState *DeleteTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTag_SdkV2) { } +func (c DeleteTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2374,6 +2438,11 @@ func (newState *DeleteTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *DeleteTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTagResponse_SdkV2) { } +func (c DeleteTagResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2425,12 +2494,6 @@ type DeleteTransitionRequestRequest_SdkV2 struct { Version types.String `tfsdk:"-"` } -func (newState *DeleteTransitionRequestRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTransitionRequestRequest_SdkV2) { -} - -func (newState *DeleteTransitionRequestRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTransitionRequestRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTransitionRequestRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2473,12 +2536,6 @@ func (o DeleteTransitionRequestRequest_SdkV2) Type(ctx context.Context) attr.Typ type DeleteTransitionRequestResponse_SdkV2 struct { } -func (newState *DeleteTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTransitionRequestResponse_SdkV2) { -} - -func (newState *DeleteTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTransitionRequestResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTransitionRequestResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2512,12 +2569,6 @@ type DeleteWebhookRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteWebhookRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWebhookRequest_SdkV2) { -} - -func (newState *DeleteWebhookRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWebhookRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWebhookRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2552,12 +2603,6 @@ func (o DeleteWebhookRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteWebhookResponse_SdkV2 struct { } -func (newState *DeleteWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWebhookResponse_SdkV2) { -} - -func (newState *DeleteWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWebhookResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWebhookResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2587,20 +2632,20 @@ func (o DeleteWebhookResponse_SdkV2) Type(ctx context.Context) attr.Type { type Experiment_SdkV2 struct { // Location where artifacts for the experiment are stored. - ArtifactLocation types.String `tfsdk:"artifact_location" tf:"optional"` + ArtifactLocation types.String `tfsdk:"artifact_location" tf:""` // Creation time - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Unique identifier for the experiment. - ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + ExperimentId types.String `tfsdk:"experiment_id" tf:""` // Last update time - LastUpdateTime types.Int64 `tfsdk:"last_update_time" tf:"optional"` + LastUpdateTime types.Int64 `tfsdk:"last_update_time" tf:""` // Current life cycle stage of the experiment: "active" or "deleted". // Deleted experiments are not returned by APIs. - LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:"optional"` + LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:""` // Human readable name that identifies the experiment. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Tags: Additional metadata key-value pairs. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *Experiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Experiment_SdkV2) { @@ -2609,6 +2654,12 @@ func (newState *Experiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan E func (newState *Experiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState Experiment_SdkV2) { } +func (c Experiment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Experiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2684,13 +2735,13 @@ func (o *Experiment_SdkV2) SetTags(ctx context.Context, v []ExperimentTag_SdkV2) type ExperimentAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ExperimentAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentAccessControlRequest_SdkV2) { @@ -2699,6 +2750,11 @@ func (newState *ExperimentAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringC func (newState *ExperimentAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentAccessControlRequest_SdkV2) { } +func (c ExperimentAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2738,15 +2794,15 @@ func (o ExperimentAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Typ type ExperimentAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ExperimentAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentAccessControlResponse_SdkV2) { @@ -2755,6 +2811,12 @@ func (newState *ExperimentAccessControlResponse_SdkV2) SyncEffectiveFieldsDuring func (newState *ExperimentAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentAccessControlResponse_SdkV2) { } +func (c ExperimentAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2825,11 +2887,11 @@ func (o *ExperimentAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Co } type ExperimentPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ExperimentPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermission_SdkV2) { @@ -2838,6 +2900,11 @@ func (newState *ExperimentPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ExperimentPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentPermission_SdkV2) { } +func (c ExperimentPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2904,11 +2971,11 @@ func (o *ExperimentPermission_SdkV2) SetInheritedFromObject(ctx context.Context, } type ExperimentPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ExperimentPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermissions_SdkV2) { @@ -2917,6 +2984,12 @@ func (newState *ExperimentPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ExperimentPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissions_SdkV2) { } +func (c ExperimentPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2983,9 +3056,9 @@ func (o *ExperimentPermissions_SdkV2) SetAccessControlList(ctx context.Context, } type ExperimentPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ExperimentPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermissionsDescription_SdkV2) { @@ -2994,6 +3067,11 @@ func (newState *ExperimentPermissionsDescription_SdkV2) SyncEffectiveFieldsDurin func (newState *ExperimentPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissionsDescription_SdkV2) { } +func (c ExperimentPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3028,7 +3106,7 @@ func (o ExperimentPermissionsDescription_SdkV2) Type(ctx context.Context) attr.T } type ExperimentPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The experiment for which to get or manage permissions. ExperimentId types.String `tfsdk:"-"` } @@ -3039,6 +3117,13 @@ func (newState *ExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCre func (newState *ExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissionsRequest_SdkV2) { } +func (c ExperimentPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "experiment_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3104,9 +3189,9 @@ func (o *ExperimentPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Co type ExperimentTag_SdkV2 struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *ExperimentTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentTag_SdkV2) { @@ -3115,6 +3200,11 @@ func (newState *ExperimentTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ExperimentTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentTag_SdkV2) { } +func (c ExperimentTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3150,11 +3240,11 @@ func (o ExperimentTag_SdkV2) Type(ctx context.Context) attr.Type { type FileInfo_SdkV2 struct { // Size in bytes. Unset for directories. - FileSize types.Int64 `tfsdk:"file_size" tf:"optional"` + FileSize types.Int64 `tfsdk:"file_size" tf:""` // Whether the path is a directory. - IsDir types.Bool `tfsdk:"is_dir" tf:"optional"` + IsDir types.Bool `tfsdk:"is_dir" tf:""` // Path relative to the root artifact directory run. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo_SdkV2) { @@ -3163,6 +3253,11 @@ func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Fil func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileInfo_SdkV2) { } +func (c FileInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3204,12 +3299,6 @@ type GetByNameRequest_SdkV2 struct { ExperimentName types.String `tfsdk:"-"` } -func (newState *GetByNameRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetByNameRequest_SdkV2) { -} - -func (newState *GetByNameRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetByNameRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetByNameRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3247,12 +3336,6 @@ type GetExperimentPermissionLevelsRequest_SdkV2 struct { ExperimentId types.String `tfsdk:"-"` } -func (newState *GetExperimentPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetExperimentPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3286,7 +3369,7 @@ func (o GetExperimentPermissionLevelsRequest_SdkV2) Type(ctx context.Context) at type GetExperimentPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetExperimentPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentPermissionLevelsResponse_SdkV2) { @@ -3295,6 +3378,12 @@ func (newState *GetExperimentPermissionLevelsResponse_SdkV2) SyncEffectiveFields func (newState *GetExperimentPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentPermissionLevelsResponse_SdkV2) { } +func (c GetExperimentPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3362,12 +3451,6 @@ type GetExperimentPermissionsRequest_SdkV2 struct { ExperimentId types.String `tfsdk:"-"` } -func (newState *GetExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentPermissionsRequest_SdkV2) { -} - -func (newState *GetExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3405,12 +3488,6 @@ type GetExperimentRequest_SdkV2 struct { ExperimentId types.String `tfsdk:"-"` } -func (newState *GetExperimentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentRequest_SdkV2) { -} - -func (newState *GetExperimentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3444,7 +3521,7 @@ func (o GetExperimentRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetExperimentResponse_SdkV2 struct { // Experiment details. - Experiment types.List `tfsdk:"experiment" tf:"optional,object"` + Experiment types.List `tfsdk:"experiment" tf:"object"` } func (newState *GetExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentResponse_SdkV2) { @@ -3453,6 +3530,12 @@ func (newState *GetExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *GetExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentResponse_SdkV2) { } +func (c GetExperimentResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Experiment_SdkV2{}.ToSchema(cs, append(path, "experiment")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3531,12 +3614,6 @@ type GetHistoryRequest_SdkV2 struct { RunUuid types.String `tfsdk:"-"` } -func (newState *GetHistoryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetHistoryRequest_SdkV2) { -} - -func (newState *GetHistoryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetHistoryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetHistoryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3580,7 +3657,7 @@ type GetLatestVersionsRequest_SdkV2 struct { // Registered model unique name identifier. Name types.String `tfsdk:"name" tf:""` // List of stages. - Stages types.List `tfsdk:"stages" tf:"optional"` + Stages types.List `tfsdk:"stages" tf:""` } func (newState *GetLatestVersionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionsRequest_SdkV2) { @@ -3589,6 +3666,12 @@ func (newState *GetLatestVersionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *GetLatestVersionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionsRequest_SdkV2) { } +func (c GetLatestVersionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3656,7 +3739,7 @@ type GetLatestVersionsResponse_SdkV2 struct { // Latest version models for each requests stage. Only return models with // current `READY` status. If no `stages` provided, returns the latest // version for each stage, including `"None"`. - ModelVersions types.List `tfsdk:"model_versions" tf:"optional"` + ModelVersions types.List `tfsdk:"model_versions" tf:""` } func (newState *GetLatestVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionsResponse_SdkV2) { @@ -3665,6 +3748,12 @@ func (newState *GetLatestVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *GetLatestVersionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionsResponse_SdkV2) { } +func (c GetLatestVersionsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion_SdkV2{}.ToSchema(cs, append(path, "model_versions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3728,10 +3817,10 @@ func (o *GetLatestVersionsResponse_SdkV2) SetModelVersions(ctx context.Context, type GetMetricHistoryResponse_SdkV2 struct { // All logged values for this metric. - Metrics types.List `tfsdk:"metrics" tf:"optional"` + Metrics types.List `tfsdk:"metrics" tf:""` // Token that can be used to retrieve the next page of metric history // results - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetMetricHistoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetricHistoryResponse_SdkV2) { @@ -3740,6 +3829,12 @@ func (newState *GetMetricHistoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *GetMetricHistoryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetricHistoryResponse_SdkV2) { } +func (c GetMetricHistoryResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Metric_SdkV2{}.ToSchema(cs, append(path, "metrics")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetricHistoryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3809,12 +3904,6 @@ type GetModelRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelRequest_SdkV2) { -} - -func (newState *GetModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3847,13 +3936,7 @@ func (o GetModelRequest_SdkV2) Type(ctx context.Context) attr.Type { } type GetModelResponse_SdkV2 struct { - RegisteredModelDatabricks types.List `tfsdk:"registered_model_databricks" tf:"optional,object"` -} - -func (newState *GetModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelResponse_SdkV2) { -} - -func (newState *GetModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelResponse_SdkV2) { + RegisteredModelDatabricks types.List `tfsdk:"registered_model_databricks" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelResponse. @@ -3925,12 +4008,6 @@ type GetModelVersionDownloadUriRequest_SdkV2 struct { Version types.String `tfsdk:"-"` } -func (newState *GetModelVersionDownloadUriRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionDownloadUriRequest_SdkV2) { -} - -func (newState *GetModelVersionDownloadUriRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionDownloadUriRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionDownloadUriRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3966,7 +4043,7 @@ func (o GetModelVersionDownloadUriRequest_SdkV2) Type(ctx context.Context) attr. type GetModelVersionDownloadUriResponse_SdkV2 struct { // URI corresponding to where artifacts for this model version are stored. - ArtifactUri types.String `tfsdk:"artifact_uri" tf:"optional"` + ArtifactUri types.String `tfsdk:"artifact_uri" tf:""` } func (newState *GetModelVersionDownloadUriResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionDownloadUriResponse_SdkV2) { @@ -3975,6 +4052,11 @@ func (newState *GetModelVersionDownloadUriResponse_SdkV2) SyncEffectiveFieldsDur func (newState *GetModelVersionDownloadUriResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionDownloadUriResponse_SdkV2) { } +func (c GetModelVersionDownloadUriResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionDownloadUriResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4014,12 +4096,6 @@ type GetModelVersionRequest_SdkV2 struct { Version types.String `tfsdk:"-"` } -func (newState *GetModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionRequest_SdkV2) { -} - -func (newState *GetModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4054,7 +4130,7 @@ func (o GetModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { } type GetModelVersionResponse_SdkV2 struct { - ModelVersion types.List `tfsdk:"model_version" tf:"optional,object"` + ModelVersion types.List `tfsdk:"model_version" tf:"object"` } func (newState *GetModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionResponse_SdkV2) { @@ -4063,6 +4139,12 @@ func (newState *GetModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *GetModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionResponse_SdkV2) { } +func (c GetModelVersionResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion_SdkV2{}.ToSchema(cs, append(path, "model_version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4130,12 +4212,6 @@ type GetRegisteredModelPermissionLevelsRequest_SdkV2 struct { RegisteredModelId types.String `tfsdk:"-"` } -func (newState *GetRegisteredModelPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetRegisteredModelPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4169,7 +4245,7 @@ func (o GetRegisteredModelPermissionLevelsRequest_SdkV2) Type(ctx context.Contex type GetRegisteredModelPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetRegisteredModelPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelPermissionLevelsResponse_SdkV2) { @@ -4178,6 +4254,12 @@ func (newState *GetRegisteredModelPermissionLevelsResponse_SdkV2) SyncEffectiveF func (newState *GetRegisteredModelPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelPermissionLevelsResponse_SdkV2) { } +func (c GetRegisteredModelPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4245,12 +4327,6 @@ type GetRegisteredModelPermissionsRequest_SdkV2 struct { RegisteredModelId types.String `tfsdk:"-"` } -func (newState *GetRegisteredModelPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelPermissionsRequest_SdkV2) { -} - -func (newState *GetRegisteredModelPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4291,12 +4367,6 @@ type GetRunRequest_SdkV2 struct { RunUuid types.String `tfsdk:"-"` } -func (newState *GetRunRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunRequest_SdkV2) { -} - -func (newState *GetRunRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRunRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4333,7 +4403,7 @@ func (o GetRunRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetRunResponse_SdkV2 struct { // Run metadata (name, start time, etc) and data (metrics, params, and // tags). - Run types.List `tfsdk:"run" tf:"optional,object"` + Run types.List `tfsdk:"run" tf:"object"` } func (newState *GetRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunResponse_SdkV2) { @@ -4342,6 +4412,12 @@ func (newState *GetRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *GetRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRunResponse_SdkV2) { } +func (c GetRunResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Run_SdkV2{}.ToSchema(cs, append(path, "run")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4408,7 +4484,7 @@ type HttpUrlSpec_SdkV2 struct { // by the wehbook. It should be of the form `" "`. // If set to an empty string, no authorization header will be included in // the request. - Authorization types.String `tfsdk:"authorization" tf:"optional"` + Authorization types.String `tfsdk:"authorization" tf:""` // Enable/disable SSL certificate validation. Default is true. For // self-signed certificates, this field must be false AND the destination // server must disable certificate validation as well. For security @@ -4416,11 +4492,11 @@ type HttpUrlSpec_SdkV2 struct { // HMAC-encoded portion of the payload and acknowledge the risk associated // with disabling hostname validation whereby it becomes more likely that // requests can be maliciously routed to an unintended host. - EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:"optional"` + EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:""` // Shared secret required for HMAC encoding payload. The HMAC-encoded // payload will be sent in the header as: { "X-Databricks-Signature": // $encoded_payload }. - Secret types.String `tfsdk:"secret" tf:"optional"` + Secret types.String `tfsdk:"secret" tf:""` // External HTTPS URL called on event trigger (by using a POST request). Url types.String `tfsdk:"url" tf:""` } @@ -4431,6 +4507,12 @@ func (newState *HttpUrlSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *HttpUrlSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState HttpUrlSpec_SdkV2) { } +func (c HttpUrlSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in HttpUrlSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4476,9 +4558,9 @@ type HttpUrlSpecWithoutSecret_SdkV2 struct { // HMAC-encoded portion of the payload and acknowledge the risk associated // with disabling hostname validation whereby it becomes more likely that // requests can be maliciously routed to an unintended host. - EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:"optional"` + EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:""` // External HTTPS URL called on event trigger (by using a POST request). - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *HttpUrlSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan HttpUrlSpecWithoutSecret_SdkV2) { @@ -4487,6 +4569,11 @@ func (newState *HttpUrlSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *HttpUrlSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState HttpUrlSpecWithoutSecret_SdkV2) { } +func (c HttpUrlSpecWithoutSecret_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in HttpUrlSpecWithoutSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4522,9 +4609,9 @@ func (o HttpUrlSpecWithoutSecret_SdkV2) Type(ctx context.Context) attr.Type { type InputTag_SdkV2 struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *InputTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InputTag_SdkV2) { @@ -4533,6 +4620,11 @@ func (newState *InputTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Inp func (newState *InputTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState InputTag_SdkV2) { } +func (c InputTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InputTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4574,7 +4666,7 @@ type JobSpec_SdkV2 struct { // URL of the workspace containing the job that this webhook runs. If not // specified, the job’s workspace URL is assumed to be the same as the // workspace where the webhook is created. - WorkspaceUrl types.String `tfsdk:"workspace_url" tf:"optional"` + WorkspaceUrl types.String `tfsdk:"workspace_url" tf:""` } func (newState *JobSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSpec_SdkV2) { @@ -4583,6 +4675,13 @@ func (newState *JobSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobS func (newState *JobSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobSpec_SdkV2) { } +func (c JobSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_token")...) + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4620,11 +4719,11 @@ func (o JobSpec_SdkV2) Type(ctx context.Context) attr.Type { type JobSpecWithoutSecret_SdkV2 struct { // ID of the job that the webhook runs. - JobId types.String `tfsdk:"job_id" tf:"optional"` + JobId types.String `tfsdk:"job_id" tf:""` // URL of the workspace containing the job that this webhook runs. Defaults // to the workspace URL in which the webhook is created. If not specified, // the job’s workspace is assumed to be the same as the webhook’s. - WorkspaceUrl types.String `tfsdk:"workspace_url" tf:"optional"` + WorkspaceUrl types.String `tfsdk:"workspace_url" tf:""` } func (newState *JobSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSpecWithoutSecret_SdkV2) { @@ -4633,6 +4732,11 @@ func (newState *JobSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *JobSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobSpecWithoutSecret_SdkV2) { } +func (c JobSpecWithoutSecret_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSpecWithoutSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4685,12 +4789,6 @@ type ListArtifactsRequest_SdkV2 struct { RunUuid types.String `tfsdk:"-"` } -func (newState *ListArtifactsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListArtifactsRequest_SdkV2) { -} - -func (newState *ListArtifactsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListArtifactsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListArtifactsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4730,11 +4828,11 @@ func (o ListArtifactsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListArtifactsResponse_SdkV2 struct { // File location and metadata for artifacts. - Files types.List `tfsdk:"files" tf:"optional"` + Files types.List `tfsdk:"files" tf:""` // Token that can be used to retrieve the next page of artifact results - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Root artifact directory for the run. - RootUri types.String `tfsdk:"root_uri" tf:"optional"` + RootUri types.String `tfsdk:"root_uri" tf:""` } func (newState *ListArtifactsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListArtifactsResponse_SdkV2) { @@ -4743,6 +4841,12 @@ func (newState *ListArtifactsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListArtifactsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListArtifactsResponse_SdkV2) { } +func (c ListArtifactsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo_SdkV2{}.ToSchema(cs, append(path, "files")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListArtifactsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4823,12 +4927,6 @@ type ListExperimentsRequest_SdkV2 struct { ViewType types.String `tfsdk:"-"` } -func (newState *ListExperimentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsRequest_SdkV2) { -} - -func (newState *ListExperimentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExperimentsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExperimentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4867,10 +4965,10 @@ func (o ListExperimentsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListExperimentsResponse_SdkV2 struct { // Paginated Experiments beginning with the first item on the requested // page. - Experiments types.List `tfsdk:"experiments" tf:"optional"` + Experiments types.List `tfsdk:"experiments" tf:""` // Token that can be used to retrieve the next page of experiments. Empty // token means no more experiment is available for retrieval. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsResponse_SdkV2) { @@ -4879,6 +4977,12 @@ func (newState *ListExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ListExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExperimentsResponse_SdkV2) { } +func (c ListExperimentsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Experiment_SdkV2{}.ToSchema(cs, append(path, "experiments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExperimentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4950,12 +5054,6 @@ type ListModelsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListModelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelsRequest_SdkV2) { -} - -func (newState *ListModelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListModelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4991,9 +5089,9 @@ func (o ListModelsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListModelsResponse_SdkV2 struct { // Pagination token to request next page of models for the same query. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - RegisteredModels types.List `tfsdk:"registered_models" tf:"optional"` + RegisteredModels types.List `tfsdk:"registered_models" tf:""` } func (newState *ListModelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelsResponse_SdkV2) { @@ -5002,6 +5100,12 @@ func (newState *ListModelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListModelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListModelsResponse_SdkV2) { } +func (c ListModelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Model_SdkV2{}.ToSchema(cs, append(path, "registered_models")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5067,9 +5171,9 @@ func (o *ListModelsResponse_SdkV2) SetRegisteredModels(ctx context.Context, v [] type ListRegistryWebhooks_SdkV2 struct { // Token that can be used to retrieve the next page of artifact results - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Array of registry webhooks. - Webhooks types.List `tfsdk:"webhooks" tf:"optional"` + Webhooks types.List `tfsdk:"webhooks" tf:""` } func (newState *ListRegistryWebhooks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRegistryWebhooks_SdkV2) { @@ -5078,6 +5182,12 @@ func (newState *ListRegistryWebhooks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListRegistryWebhooks_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRegistryWebhooks_SdkV2) { } +func (c ListRegistryWebhooks_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegistryWebhook_SdkV2{}.ToSchema(cs, append(path, "webhooks")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRegistryWebhooks. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5149,12 +5259,6 @@ type ListTransitionRequestsRequest_SdkV2 struct { Version types.String `tfsdk:"-"` } -func (newState *ListTransitionRequestsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTransitionRequestsRequest_SdkV2) { -} - -func (newState *ListTransitionRequestsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTransitionRequestsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTransitionRequestsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5190,13 +5294,7 @@ func (o ListTransitionRequestsRequest_SdkV2) Type(ctx context.Context) attr.Type type ListTransitionRequestsResponse_SdkV2 struct { // Array of open transition requests. - Requests types.List `tfsdk:"requests" tf:"optional"` -} - -func (newState *ListTransitionRequestsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTransitionRequestsResponse_SdkV2) { -} - -func (newState *ListTransitionRequestsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTransitionRequestsResponse_SdkV2) { + Requests types.List `tfsdk:"requests" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTransitionRequestsResponse. @@ -5273,12 +5371,6 @@ type ListWebhooksRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListWebhooksRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWebhooksRequest_SdkV2) { -} - -func (newState *ListWebhooksRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWebhooksRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWebhooksRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5347,15 +5439,15 @@ func (o *ListWebhooksRequest_SdkV2) SetEvents(ctx context.Context, v []types.Str type LogBatch_SdkV2 struct { // Metrics to log. A single request can contain up to 1000 metrics, and up // to 1000 metrics, params, and tags in total. - Metrics types.List `tfsdk:"metrics" tf:"optional"` + Metrics types.List `tfsdk:"metrics" tf:""` // Params to log. A single request can contain up to 100 params, and up to // 1000 metrics, params, and tags in total. - Params types.List `tfsdk:"params" tf:"optional"` + Params types.List `tfsdk:"params" tf:""` // ID of the run to log under - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // Tags to log. A single request can contain up to 100 tags, and up to 1000 // metrics, params, and tags in total. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *LogBatch_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogBatch_SdkV2) { @@ -5364,6 +5456,14 @@ func (newState *LogBatch_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Log func (newState *LogBatch_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogBatch_SdkV2) { } +func (c LogBatch_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Metric_SdkV2{}.ToSchema(cs, append(path, "metrics")...) + Param_SdkV2{}.ToSchema(cs, append(path, "params")...) + RunTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogBatch. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5498,6 +5598,11 @@ func (newState *LogBatchResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *LogBatchResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogBatchResponse_SdkV2) { } +func (c LogBatchResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogBatchResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5527,9 +5632,9 @@ func (o LogBatchResponse_SdkV2) Type(ctx context.Context) attr.Type { type LogInputs_SdkV2 struct { // Dataset inputs - Datasets types.List `tfsdk:"datasets" tf:"optional"` + Datasets types.List `tfsdk:"datasets" tf:""` // ID of the run to log under - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` } func (newState *LogInputs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogInputs_SdkV2) { @@ -5538,6 +5643,12 @@ func (newState *LogInputs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Lo func (newState *LogInputs_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogInputs_SdkV2) { } +func (c LogInputs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DatasetInput_SdkV2{}.ToSchema(cs, append(path, "datasets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogInputs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5607,7 +5718,12 @@ type LogInputsResponse_SdkV2 struct { func (newState *LogInputsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogInputsResponse_SdkV2) { } -func (newState *LogInputsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogInputsResponse_SdkV2) { +func (newState *LogInputsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogInputsResponse_SdkV2) { +} + +func (c LogInputsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogInputsResponse. @@ -5641,12 +5757,12 @@ type LogMetric_SdkV2 struct { // Name of the metric. Key types.String `tfsdk:"key" tf:""` // ID of the run under which to log the metric. Must be provided. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] ID of the run under which to log the // metric. This field will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // Step at which to log the metric - Step types.Int64 `tfsdk:"step" tf:"optional"` + Step types.Int64 `tfsdk:"step" tf:""` // Unix timestamp in milliseconds at the time metric was logged. Timestamp types.Int64 `tfsdk:"timestamp" tf:""` // Double value of the metric being logged. @@ -5659,6 +5775,14 @@ func (newState *LogMetric_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Lo func (newState *LogMetric_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogMetric_SdkV2) { } +func (c LogMetric_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "timestamp")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogMetric. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5709,6 +5833,11 @@ func (newState *LogMetricResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *LogMetricResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogMetricResponse_SdkV2) { } +func (c LogMetricResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogMetricResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5738,9 +5867,9 @@ func (o LogMetricResponse_SdkV2) Type(ctx context.Context) attr.Type { type LogModel_SdkV2 struct { // MLmodel file in json format. - ModelJson types.String `tfsdk:"model_json" tf:"optional"` + ModelJson types.String `tfsdk:"model_json" tf:""` // ID of the run to log under - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` } func (newState *LogModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogModel_SdkV2) { @@ -5749,6 +5878,11 @@ func (newState *LogModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Log func (newState *LogModel_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogModel_SdkV2) { } +func (c LogModel_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogModel. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5791,6 +5925,11 @@ func (newState *LogModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *LogModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogModelResponse_SdkV2) { } +func (c LogModelResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5822,10 +5961,10 @@ type LogParam_SdkV2 struct { // Name of the param. Maximum size is 255 bytes. Key types.String `tfsdk:"key" tf:""` // ID of the run under which to log the param. Must be provided. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] ID of the run under which to log the // param. This field will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // String value of the param being logged. Maximum size is 500 bytes. Value types.String `tfsdk:"value" tf:""` } @@ -5836,6 +5975,13 @@ func (newState *LogParam_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Log func (newState *LogParam_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogParam_SdkV2) { } +func (c LogParam_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogParam. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5882,6 +6028,11 @@ func (newState *LogParamResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *LogParamResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogParamResponse_SdkV2) { } +func (c LogParamResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogParamResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5911,13 +6062,13 @@ func (o LogParamResponse_SdkV2) Type(ctx context.Context) attr.Type { type Metric_SdkV2 struct { // Key identifying this metric. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Step at which to log the metric. - Step types.Int64 `tfsdk:"step" tf:"optional"` + Step types.Int64 `tfsdk:"step" tf:""` // The timestamp at which this metric was recorded. - Timestamp types.Int64 `tfsdk:"timestamp" tf:"optional"` + Timestamp types.Int64 `tfsdk:"timestamp" tf:""` // Value associated with this metric. - Value types.Float64 `tfsdk:"value" tf:"optional"` + Value types.Float64 `tfsdk:"value" tf:""` } func (newState *Metric_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Metric_SdkV2) { @@ -5926,6 +6077,11 @@ func (newState *Metric_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Metri func (newState *Metric_SdkV2) SyncEffectiveFieldsDuringRead(existingState Metric_SdkV2) { } +func (c Metric_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Metric. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5965,21 +6121,21 @@ func (o Metric_SdkV2) Type(ctx context.Context) attr.Type { type Model_SdkV2 struct { // Timestamp recorded when this `registered_model` was created. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Description of this `registered_model`. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Timestamp recorded when metadata for this `registered_model` was last // updated. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Collection of latest model versions for each stage. Only contains models // with current `READY` status. - LatestVersions types.List `tfsdk:"latest_versions" tf:"optional"` + LatestVersions types.List `tfsdk:"latest_versions" tf:""` // Unique name for the model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Tags: Additional metadata key-value pairs for this `registered_model`. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // User that created this `registered_model` - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *Model_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Model_SdkV2) { @@ -5988,6 +6144,13 @@ func (newState *Model_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Model_ func (newState *Model_SdkV2) SyncEffectiveFieldsDuringRead(existingState Model_SdkV2) { } +func (c Model_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion_SdkV2{}.ToSchema(cs, append(path, "latest_versions")...) + ModelTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Model. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6092,24 +6255,24 @@ func (o *Model_SdkV2) SetTags(ctx context.Context, v []ModelTag_SdkV2) { type ModelDatabricks_SdkV2 struct { // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // User-specified description for the object. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Unique identifier for the object. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Array of model versions, each the latest version for its stage. - LatestVersions types.List `tfsdk:"latest_versions" tf:"optional"` + LatestVersions types.List `tfsdk:"latest_versions" tf:""` // Name of the model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Permission level of the requesting user on the object. For what is // allowed at each level, see [MLflow Model permissions](..). - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // Array of tags associated with the model. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *ModelDatabricks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelDatabricks_SdkV2) { @@ -6118,6 +6281,13 @@ func (newState *ModelDatabricks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ModelDatabricks_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelDatabricks_SdkV2) { } +func (c ModelDatabricks_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion_SdkV2{}.ToSchema(cs, append(path, "latest_versions")...) + ModelTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelDatabricks. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6226,9 +6396,9 @@ func (o *ModelDatabricks_SdkV2) SetTags(ctx context.Context, v []ModelTag_SdkV2) type ModelTag_SdkV2 struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *ModelTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelTag_SdkV2) { @@ -6237,6 +6407,11 @@ func (newState *ModelTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mod func (newState *ModelTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelTag_SdkV2) { } +func (c ModelTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6272,34 +6447,34 @@ func (o ModelTag_SdkV2) Type(ctx context.Context) attr.Type { type ModelVersion_SdkV2 struct { // Timestamp recorded when this `model_version` was created. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Current stage for this `model_version`. - CurrentStage types.String `tfsdk:"current_stage" tf:"optional"` + CurrentStage types.String `tfsdk:"current_stage" tf:""` // Description of this `model_version`. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Timestamp recorded when metadata for this `model_version` was last // updated. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Unique name of the model - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // MLflow run ID used when creating `model_version`, if `source` was // generated by an experiment run stored in MLflow tracking server. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // Run Link: Direct link to the run that generated this version - RunLink types.String `tfsdk:"run_link" tf:"optional"` + RunLink types.String `tfsdk:"run_link" tf:""` // URI indicating the location of the source model artifacts, used when // creating `model_version` - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // Current status of `model_version` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // Details on current `status`, if it is pending or failed. - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` // Tags: Additional metadata key-value pairs for this `model_version`. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // User that created this `model_version`. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` // Model's version number. - Version types.String `tfsdk:"version" tf:"optional"` + Version types.String `tfsdk:"version" tf:""` } func (newState *ModelVersion_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersion_SdkV2) { @@ -6308,6 +6483,12 @@ func (newState *ModelVersion_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ModelVersion_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelVersion_SdkV2) { } +func (c ModelVersion_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersionTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersion. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6395,7 +6576,7 @@ func (o *ModelVersion_SdkV2) SetTags(ctx context.Context, v []ModelVersionTag_Sd type ModelVersionDatabricks_SdkV2 struct { // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Stage of the model version. Valid values are: // // * `None`: The initial stage of a model version. @@ -6405,26 +6586,26 @@ type ModelVersionDatabricks_SdkV2 struct { // * `Production`: Production stage. // // * `Archived`: Archived stage. - CurrentStage types.String `tfsdk:"current_stage" tf:"optional"` + CurrentStage types.String `tfsdk:"current_stage" tf:""` // User-specified description for the object. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Name of the model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Permission level of the requesting user on the object. For what is // allowed at each level, see [MLflow Model permissions](..). - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // Unique identifier for the MLflow tracking run associated with the source // model artifacts. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // URL of the run associated with the model artifacts. This field is set at // model version creation time only for model versions whose source run is // from a tracking server that is different from the registry server. - RunLink types.String `tfsdk:"run_link" tf:"optional"` + RunLink types.String `tfsdk:"run_link" tf:""` // URI that indicates the location of the source model artifacts. This is // used when creating the model version. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // The status of the model version. Valid values are: * // `PENDING_REGISTRATION`: Request to register a new model version is // pending as server performs background tasks. @@ -6433,15 +6614,15 @@ type ModelVersionDatabricks_SdkV2 struct { // failed. // // * `READY`: Model version is ready for use. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // Details on the current status, for example why registration failed. - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` // Array of tags that are associated with the model version. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` // Version of the model. - Version types.String `tfsdk:"version" tf:"optional"` + Version types.String `tfsdk:"version" tf:""` } func (newState *ModelVersionDatabricks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersionDatabricks_SdkV2) { @@ -6450,6 +6631,12 @@ func (newState *ModelVersionDatabricks_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *ModelVersionDatabricks_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelVersionDatabricks_SdkV2) { } +func (c ModelVersionDatabricks_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersionTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersionDatabricks. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6539,9 +6726,9 @@ func (o *ModelVersionDatabricks_SdkV2) SetTags(ctx context.Context, v []ModelVer type ModelVersionTag_SdkV2 struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *ModelVersionTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersionTag_SdkV2) { @@ -6550,6 +6737,11 @@ func (newState *ModelVersionTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ModelVersionTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelVersionTag_SdkV2) { } +func (c ModelVersionTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersionTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6585,9 +6777,9 @@ func (o ModelVersionTag_SdkV2) Type(ctx context.Context) attr.Type { type Param_SdkV2 struct { // Key identifying this param. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Value associated with this param. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *Param_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Param_SdkV2) { @@ -6596,6 +6788,11 @@ func (newState *Param_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Param_ func (newState *Param_SdkV2) SyncEffectiveFieldsDuringRead(existingState Param_SdkV2) { } +func (c Param_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Param. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6631,13 +6828,13 @@ func (o Param_SdkV2) Type(ctx context.Context) attr.Type { type RegisteredModelAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *RegisteredModelAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelAccessControlRequest_SdkV2) { @@ -6646,6 +6843,11 @@ func (newState *RegisteredModelAccessControlRequest_SdkV2) SyncEffectiveFieldsDu func (newState *RegisteredModelAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelAccessControlRequest_SdkV2) { } +func (c RegisteredModelAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6685,15 +6887,15 @@ func (o RegisteredModelAccessControlRequest_SdkV2) Type(ctx context.Context) att type RegisteredModelAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *RegisteredModelAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelAccessControlResponse_SdkV2) { @@ -6702,6 +6904,12 @@ func (newState *RegisteredModelAccessControlResponse_SdkV2) SyncEffectiveFieldsD func (newState *RegisteredModelAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelAccessControlResponse_SdkV2) { } +func (c RegisteredModelAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6772,11 +6980,11 @@ func (o *RegisteredModelAccessControlResponse_SdkV2) SetAllPermissions(ctx conte } type RegisteredModelPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *RegisteredModelPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermission_SdkV2) { @@ -6785,6 +6993,11 @@ func (newState *RegisteredModelPermission_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *RegisteredModelPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermission_SdkV2) { } +func (c RegisteredModelPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6851,11 +7064,11 @@ func (o *RegisteredModelPermission_SdkV2) SetInheritedFromObject(ctx context.Con } type RegisteredModelPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *RegisteredModelPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermissions_SdkV2) { @@ -6864,6 +7077,12 @@ func (newState *RegisteredModelPermissions_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *RegisteredModelPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissions_SdkV2) { } +func (c RegisteredModelPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6930,9 +7149,9 @@ func (o *RegisteredModelPermissions_SdkV2) SetAccessControlList(ctx context.Cont } type RegisteredModelPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *RegisteredModelPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermissionsDescription_SdkV2) { @@ -6941,6 +7160,11 @@ func (newState *RegisteredModelPermissionsDescription_SdkV2) SyncEffectiveFields func (newState *RegisteredModelPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissionsDescription_SdkV2) { } +func (c RegisteredModelPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6975,7 +7199,7 @@ func (o RegisteredModelPermissionsDescription_SdkV2) Type(ctx context.Context) a } type RegisteredModelPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The registered model for which to get or manage permissions. RegisteredModelId types.String `tfsdk:"-"` } @@ -6986,6 +7210,13 @@ func (newState *RegisteredModelPermissionsRequest_SdkV2) SyncEffectiveFieldsDuri func (newState *RegisteredModelPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissionsRequest_SdkV2) { } +func (c RegisteredModelPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "registered_model_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7051,9 +7282,9 @@ func (o *RegisteredModelPermissionsRequest_SdkV2) SetAccessControlList(ctx conte type RegistryWebhook_SdkV2 struct { // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // User-specified description for the webhook. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A // new model version was created for the associated model. // @@ -7087,17 +7318,17 @@ type RegistryWebhook_SdkV2 struct { // // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model // version be archived. - Events types.List `tfsdk:"events" tf:"optional"` + Events types.List `tfsdk:"events" tf:""` - HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"optional,object"` + HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"object"` // Webhook ID - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - JobSpec types.List `tfsdk:"job_spec" tf:"optional,object"` + JobSpec types.List `tfsdk:"job_spec" tf:"object"` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Name of the model whose events would trigger this webhook. - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // Enable or disable triggering the webhook, or put the webhook into test // mode. The default is `ACTIVE`: * `ACTIVE`: Webhook is triggered when an // associated event happens. @@ -7106,7 +7337,7 @@ type RegistryWebhook_SdkV2 struct { // // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is // not triggered on a real event. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *RegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegistryWebhook_SdkV2) { @@ -7115,6 +7346,13 @@ func (newState *RegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *RegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegistryWebhook_SdkV2) { } +func (c RegistryWebhook_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + HttpUrlSpecWithoutSecret_SdkV2{}.ToSchema(cs, append(path, "http_url_spec")...) + JobSpecWithoutSecret_SdkV2{}.ToSchema(cs, append(path, "job_spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegistryWebhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7252,7 +7490,7 @@ func (o *RegistryWebhook_SdkV2) SetJobSpec(ctx context.Context, v JobSpecWithout type RejectTransitionRequest_SdkV2 struct { // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the model. Name types.String `tfsdk:"name" tf:""` // Target stage of the transition. Valid values are: @@ -7275,6 +7513,14 @@ func (newState *RejectTransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *RejectTransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RejectTransitionRequest_SdkV2) { } +func (c RejectTransitionRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "stage")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RejectTransitionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7314,13 +7560,7 @@ func (o RejectTransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { type RejectTransitionRequestResponse_SdkV2 struct { // Activity recorded for the action. - Activity types.List `tfsdk:"activity" tf:"optional,object"` -} - -func (newState *RejectTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RejectTransitionRequestResponse_SdkV2) { -} - -func (newState *RejectTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RejectTransitionRequestResponse_SdkV2) { + Activity types.List `tfsdk:"activity" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in RejectTransitionRequestResponse. @@ -7388,7 +7628,7 @@ type RenameModelRequest_SdkV2 struct { // Registered model unique name identifier. Name types.String `tfsdk:"name" tf:""` // If provided, updates the name for this `registered_model`. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` } func (newState *RenameModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RenameModelRequest_SdkV2) { @@ -7397,6 +7637,12 @@ func (newState *RenameModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *RenameModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RenameModelRequest_SdkV2) { } +func (c RenameModelRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RenameModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7431,7 +7677,7 @@ func (o RenameModelRequest_SdkV2) Type(ctx context.Context) attr.Type { } type RenameModelResponse_SdkV2 struct { - RegisteredModel types.List `tfsdk:"registered_model" tf:"optional,object"` + RegisteredModel types.List `tfsdk:"registered_model" tf:"object"` } func (newState *RenameModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RenameModelResponse_SdkV2) { @@ -7440,6 +7686,12 @@ func (newState *RenameModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *RenameModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RenameModelResponse_SdkV2) { } +func (c RenameModelResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Model_SdkV2{}.ToSchema(cs, append(path, "registered_model")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RenameModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7512,6 +7764,12 @@ func (newState *RestoreExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *RestoreExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreExperiment_SdkV2) { } +func (c RestoreExperiment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreExperiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7552,6 +7810,11 @@ func (newState *RestoreExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *RestoreExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreExperimentResponse_SdkV2) { } +func (c RestoreExperimentResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7590,6 +7853,12 @@ func (newState *RestoreRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan R func (newState *RestoreRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRun_SdkV2) { } +func (c RestoreRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7630,6 +7899,11 @@ func (newState *RestoreRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *RestoreRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRunResponse_SdkV2) { } +func (c RestoreRunResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7662,7 +7936,7 @@ type RestoreRuns_SdkV2 struct { ExperimentId types.String `tfsdk:"experiment_id" tf:""` // An optional positive integer indicating the maximum number of runs to // restore. The maximum allowed value for max_runs is 10000. - MaxRuns types.Int64 `tfsdk:"max_runs" tf:"optional"` + MaxRuns types.Int64 `tfsdk:"max_runs" tf:""` // The minimum deletion timestamp in milliseconds since the UNIX epoch for // restoring runs. Only runs deleted no earlier than this timestamp are // restored. @@ -7675,6 +7949,13 @@ func (newState *RestoreRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RestoreRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRuns_SdkV2) { } +func (c RestoreRuns_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + cs.SetRequired(append(path, "min_timestamp_millis")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRuns. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7712,7 +7993,7 @@ func (o RestoreRuns_SdkV2) Type(ctx context.Context) attr.Type { type RestoreRunsResponse_SdkV2 struct { // The number of runs restored. - RunsRestored types.Int64 `tfsdk:"runs_restored" tf:"optional"` + RunsRestored types.Int64 `tfsdk:"runs_restored" tf:""` } func (newState *RestoreRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRunsResponse_SdkV2) { @@ -7721,6 +8002,11 @@ func (newState *RestoreRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *RestoreRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRunsResponse_SdkV2) { } +func (c RestoreRunsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7754,11 +8040,11 @@ func (o RestoreRunsResponse_SdkV2) Type(ctx context.Context) attr.Type { type Run_SdkV2 struct { // Run data. - Data types.List `tfsdk:"data" tf:"optional,object"` + Data types.List `tfsdk:"data" tf:"object"` // Run metadata. - Info types.List `tfsdk:"info" tf:"optional,object"` + Info types.List `tfsdk:"info" tf:"object"` // Run inputs. - Inputs types.List `tfsdk:"inputs" tf:"optional,object"` + Inputs types.List `tfsdk:"inputs" tf:"object"` } func (newState *Run_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run_SdkV2) { @@ -7767,6 +8053,14 @@ func (newState *Run_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run_SdkV func (newState *Run_SdkV2) SyncEffectiveFieldsDuringRead(existingState Run_SdkV2) { } +func (c Run_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RunData_SdkV2{}.ToSchema(cs, append(path, "data")...) + RunInfo_SdkV2{}.ToSchema(cs, append(path, "info")...) + RunInputs_SdkV2{}.ToSchema(cs, append(path, "inputs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Run. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7892,11 +8186,11 @@ func (o *Run_SdkV2) SetInputs(ctx context.Context, v RunInputs_SdkV2) { type RunData_SdkV2 struct { // Run metrics. - Metrics types.List `tfsdk:"metrics" tf:"optional"` + Metrics types.List `tfsdk:"metrics" tf:""` // Run parameters. - Params types.List `tfsdk:"params" tf:"optional"` + Params types.List `tfsdk:"params" tf:""` // Additional metadata key-value pairs. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *RunData_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunData_SdkV2) { @@ -7905,6 +8199,14 @@ func (newState *RunData_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunD func (newState *RunData_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunData_SdkV2) { } +func (c RunData_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Metric_SdkV2{}.ToSchema(cs, append(path, "metrics")...) + Param_SdkV2{}.ToSchema(cs, append(path, "params")...) + RunTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunData. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8033,26 +8335,26 @@ type RunInfo_SdkV2 struct { // local path (starting with "/"), or a distributed file system (DFS) path, // like `s3://bucket/directory` or `dbfs:/my/directory`. If not set, the // local `./mlruns` directory is chosen. - ArtifactUri types.String `tfsdk:"artifact_uri" tf:"optional"` + ArtifactUri types.String `tfsdk:"artifact_uri" tf:""` // Unix timestamp of when the run ended in milliseconds. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The experiment ID. - ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + ExperimentId types.String `tfsdk:"experiment_id" tf:""` // Current life cycle stage of the experiment : OneOf("active", "deleted") - LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:"optional"` + LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:""` // Unique identifier for the run. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] Unique identifier for the run. This // field will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // Unix timestamp of when the run started in milliseconds. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Current status of the run. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // User who initiated the run. This field is deprecated as of MLflow 1.0, // and will be removed in a future MLflow release. Use 'mlflow.user' tag // instead. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *RunInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunInfo_SdkV2) { @@ -8061,6 +8363,11 @@ func (newState *RunInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunI func (newState *RunInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunInfo_SdkV2) { } +func (c RunInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8110,7 +8417,7 @@ func (o RunInfo_SdkV2) Type(ctx context.Context) attr.Type { type RunInputs_SdkV2 struct { // Run metrics. - DatasetInputs types.List `tfsdk:"dataset_inputs" tf:"optional"` + DatasetInputs types.List `tfsdk:"dataset_inputs" tf:""` } func (newState *RunInputs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunInputs_SdkV2) { @@ -8119,6 +8426,12 @@ func (newState *RunInputs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ru func (newState *RunInputs_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunInputs_SdkV2) { } +func (c RunInputs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DatasetInput_SdkV2{}.ToSchema(cs, append(path, "dataset_inputs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunInputs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8182,9 +8495,9 @@ func (o *RunInputs_SdkV2) SetDatasetInputs(ctx context.Context, v []DatasetInput type RunTag_SdkV2 struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *RunTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTag_SdkV2) { @@ -8193,6 +8506,11 @@ func (newState *RunTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTa func (newState *RunTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunTag_SdkV2) { } +func (c RunTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8229,19 +8547,19 @@ func (o RunTag_SdkV2) Type(ctx context.Context) attr.Type { type SearchExperiments_SdkV2 struct { // String representing a SQL filter condition (e.g. "name ILIKE // 'my-experiment%'") - Filter types.String `tfsdk:"filter" tf:"optional"` + Filter types.String `tfsdk:"filter" tf:""` // Maximum number of experiments desired. Max threshold is 3000. - MaxResults types.Int64 `tfsdk:"max_results" tf:"optional"` + MaxResults types.Int64 `tfsdk:"max_results" tf:""` // List of columns for ordering search results, which can include experiment // name and last updated timestamp with an optional "DESC" or "ASC" // annotation, where "ASC" is the default. Tiebreaks are done by experiment // id DESC. - OrderBy types.List `tfsdk:"order_by" tf:"optional"` + OrderBy types.List `tfsdk:"order_by" tf:""` // Token indicating the page of experiments to fetch - PageToken types.String `tfsdk:"page_token" tf:"optional"` + PageToken types.String `tfsdk:"page_token" tf:""` // Qualifier for type of experiments to be returned. If unspecified, return // only active experiments. - ViewType types.String `tfsdk:"view_type" tf:"optional"` + ViewType types.String `tfsdk:"view_type" tf:""` } func (newState *SearchExperiments_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchExperiments_SdkV2) { @@ -8250,6 +8568,11 @@ func (newState *SearchExperiments_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *SearchExperiments_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchExperiments_SdkV2) { } +func (c SearchExperiments_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchExperiments. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8321,10 +8644,10 @@ func (o *SearchExperiments_SdkV2) SetOrderBy(ctx context.Context, v []types.Stri type SearchExperimentsResponse_SdkV2 struct { // Experiments that match the search criteria - Experiments types.List `tfsdk:"experiments" tf:"optional"` + Experiments types.List `tfsdk:"experiments" tf:""` // Token that can be used to retrieve the next page of experiments. An empty // token means that no more experiments are available for retrieval. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *SearchExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchExperimentsResponse_SdkV2) { @@ -8333,6 +8656,12 @@ func (newState *SearchExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *SearchExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchExperimentsResponse_SdkV2) { } +func (c SearchExperimentsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Experiment_SdkV2{}.ToSchema(cs, append(path, "experiments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchExperimentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8412,12 +8741,6 @@ type SearchModelVersionsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *SearchModelVersionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelVersionsRequest_SdkV2) { -} - -func (newState *SearchModelVersionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchModelVersionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelVersionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8487,10 +8810,10 @@ func (o *SearchModelVersionsRequest_SdkV2) SetOrderBy(ctx context.Context, v []t type SearchModelVersionsResponse_SdkV2 struct { // Models that match the search criteria - ModelVersions types.List `tfsdk:"model_versions" tf:"optional"` + ModelVersions types.List `tfsdk:"model_versions" tf:""` // Pagination token to request next page of models for the same search // query. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *SearchModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelVersionsResponse_SdkV2) { @@ -8499,6 +8822,12 @@ func (newState *SearchModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *SearchModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchModelVersionsResponse_SdkV2) { } +func (c SearchModelVersionsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion_SdkV2{}.ToSchema(cs, append(path, "model_versions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelVersionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8578,12 +8907,6 @@ type SearchModelsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *SearchModelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelsRequest_SdkV2) { -} - -func (newState *SearchModelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchModelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8653,9 +8976,9 @@ func (o *SearchModelsRequest_SdkV2) SetOrderBy(ctx context.Context, v []types.St type SearchModelsResponse_SdkV2 struct { // Pagination token to request the next page of models. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Registered Models that match the search criteria. - RegisteredModels types.List `tfsdk:"registered_models" tf:"optional"` + RegisteredModels types.List `tfsdk:"registered_models" tf:""` } func (newState *SearchModelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelsResponse_SdkV2) { @@ -8664,6 +8987,12 @@ func (newState *SearchModelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *SearchModelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchModelsResponse_SdkV2) { } +func (c SearchModelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Model_SdkV2{}.ToSchema(cs, append(path, "registered_models")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8729,7 +9058,7 @@ func (o *SearchModelsResponse_SdkV2) SetRegisteredModels(ctx context.Context, v type SearchRuns_SdkV2 struct { // List of experiment IDs to search over. - ExperimentIds types.List `tfsdk:"experiment_ids" tf:"optional"` + ExperimentIds types.List `tfsdk:"experiment_ids" tf:""` // A filter expression over params, metrics, and tags, that allows returning // a subset of runs. The syntax is a subset of SQL that supports ANDing // together binary operations between a param, metric, or tag and a @@ -8742,21 +9071,21 @@ type SearchRuns_SdkV2 struct { // and tags."user-name" = 'Tomas'` // // Supported operators are `=`, `!=`, `>`, `>=`, `<`, and `<=`. - Filter types.String `tfsdk:"filter" tf:"optional"` + Filter types.String `tfsdk:"filter" tf:""` // Maximum number of runs desired. Max threshold is 50000 - MaxResults types.Int64 `tfsdk:"max_results" tf:"optional"` + MaxResults types.Int64 `tfsdk:"max_results" tf:""` // List of columns to be ordered by, including attributes, params, metrics, // and tags with an optional "DESC" or "ASC" annotation, where "ASC" is the // default. Example: ["params.input DESC", "metrics.alpha ASC", // "metrics.rmse"] Tiebreaks are done by start_time DESC followed by run_id // for runs with the same start time (and this is the default ordering // criterion if order_by is not provided). - OrderBy types.List `tfsdk:"order_by" tf:"optional"` + OrderBy types.List `tfsdk:"order_by" tf:""` // Token for the current page of runs. - PageToken types.String `tfsdk:"page_token" tf:"optional"` + PageToken types.String `tfsdk:"page_token" tf:""` // Whether to display only active, only deleted, or all runs. Defaults to // only active runs. - RunViewType types.String `tfsdk:"run_view_type" tf:"optional"` + RunViewType types.String `tfsdk:"run_view_type" tf:""` } func (newState *SearchRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchRuns_SdkV2) { @@ -8765,6 +9094,11 @@ func (newState *SearchRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *SearchRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchRuns_SdkV2) { } +func (c SearchRuns_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchRuns. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8867,9 +9201,9 @@ func (o *SearchRuns_SdkV2) SetOrderBy(ctx context.Context, v []types.String) { type SearchRunsResponse_SdkV2 struct { // Token for the next page of runs. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Runs that match the search criteria. - Runs types.List `tfsdk:"runs" tf:"optional"` + Runs types.List `tfsdk:"runs" tf:""` } func (newState *SearchRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchRunsResponse_SdkV2) { @@ -8878,6 +9212,12 @@ func (newState *SearchRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *SearchRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchRunsResponse_SdkV2) { } +func (c SearchRunsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Run_SdkV2{}.ToSchema(cs, append(path, "runs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8959,6 +9299,14 @@ func (newState *SetExperimentTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *SetExperimentTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetExperimentTag_SdkV2) { } +func (c SetExperimentTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetExperimentTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9003,6 +9351,11 @@ func (newState *SetExperimentTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *SetExperimentTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetExperimentTagResponse_SdkV2) { } +func (c SetExperimentTagResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetExperimentTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9050,6 +9403,14 @@ func (newState *SetModelTagRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *SetModelTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelTagRequest_SdkV2) { } +func (c SetModelTagRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelTagRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9094,6 +9455,11 @@ func (newState *SetModelTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *SetModelTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelTagResponse_SdkV2) { } +func (c SetModelTagResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9143,6 +9509,15 @@ func (newState *SetModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *SetModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelVersionTagRequest_SdkV2) { } +func (c SetModelVersionTagRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "value")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelVersionTagRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9189,6 +9564,11 @@ func (newState *SetModelVersionTagResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *SetModelVersionTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelVersionTagResponse_SdkV2) { } +func (c SetModelVersionTagResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelVersionTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9221,10 +9601,10 @@ type SetTag_SdkV2 struct { // backends are guaranteed to support key values up to 250 bytes in size. Key types.String `tfsdk:"key" tf:""` // ID of the run under which to log the tag. Must be provided. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] ID of the run under which to log the // tag. This field will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // String value of the tag being logged. Maximum size depends on storage // backend. All storage backends are guaranteed to support key values up to // 5000 bytes in size. @@ -9237,6 +9617,13 @@ func (newState *SetTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetTa func (newState *SetTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetTag_SdkV2) { } +func (c SetTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9283,6 +9670,11 @@ func (newState *SetTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SetTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetTagResponse_SdkV2) { } +func (c SetTagResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9313,9 +9705,9 @@ func (o SetTagResponse_SdkV2) Type(ctx context.Context) attr.Type { // Test webhook response object. type TestRegistryWebhook_SdkV2 struct { // Body of the response from the webhook URL - Body types.String `tfsdk:"body" tf:"optional"` + Body types.String `tfsdk:"body" tf:""` // Status code returned by the webhook URL - StatusCode types.Int64 `tfsdk:"status_code" tf:"optional"` + StatusCode types.Int64 `tfsdk:"status_code" tf:""` } func (newState *TestRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhook_SdkV2) { @@ -9324,6 +9716,11 @@ func (newState *TestRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *TestRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhook_SdkV2) { } +func (c TestRegistryWebhook_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TestRegistryWebhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9361,7 +9758,7 @@ type TestRegistryWebhookRequest_SdkV2 struct { // If `event` is specified, the test trigger uses the specified event. If // `event` is not specified, the test trigger uses a randomly chosen event // associated with the webhook. - Event types.String `tfsdk:"event" tf:"optional"` + Event types.String `tfsdk:"event" tf:""` // Webhook ID Id types.String `tfsdk:"id" tf:""` } @@ -9372,6 +9769,12 @@ func (newState *TestRegistryWebhookRequest_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *TestRegistryWebhookRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhookRequest_SdkV2) { } +func (c TestRegistryWebhookRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TestRegistryWebhookRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9407,13 +9810,7 @@ func (o TestRegistryWebhookRequest_SdkV2) Type(ctx context.Context) attr.Type { type TestRegistryWebhookResponse_SdkV2 struct { // Test webhook response object. - Webhook types.List `tfsdk:"webhook" tf:"optional,object"` -} - -func (newState *TestRegistryWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhookResponse_SdkV2) { -} - -func (newState *TestRegistryWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhookResponse_SdkV2) { + Webhook types.List `tfsdk:"webhook" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in TestRegistryWebhookResponse. @@ -9482,7 +9879,7 @@ type TransitionModelVersionStageDatabricks_SdkV2 struct { // stage. ArchiveExistingVersions types.Bool `tfsdk:"archive_existing_versions" tf:""` // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the model. Name types.String `tfsdk:"name" tf:""` // Target stage of the transition. Valid values are: @@ -9505,6 +9902,15 @@ func (newState *TransitionModelVersionStageDatabricks_SdkV2) SyncEffectiveFields func (newState *TransitionModelVersionStageDatabricks_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransitionModelVersionStageDatabricks_SdkV2) { } +func (c TransitionModelVersionStageDatabricks_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "archive_existing_versions")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "stage")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransitionModelVersionStageDatabricks. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9547,11 +9953,11 @@ func (o TransitionModelVersionStageDatabricks_SdkV2) Type(ctx context.Context) a // Transition request details. type TransitionRequest_SdkV2 struct { // Array of actions on the activity allowed for the current viewer. - AvailableActions types.List `tfsdk:"available_actions" tf:"optional"` + AvailableActions types.List `tfsdk:"available_actions" tf:""` // User-provided comment associated with the transition request. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Target stage of the transition (if the activity is stage transition // related). Valid values are: // @@ -9562,9 +9968,9 @@ type TransitionRequest_SdkV2 struct { // * `Production`: Production stage. // // * `Archived`: Archived stage. - ToStage types.String `tfsdk:"to_stage" tf:"optional"` + ToStage types.String `tfsdk:"to_stage" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *TransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionRequest_SdkV2) { @@ -9573,6 +9979,11 @@ func (newState *TransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *TransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransitionRequest_SdkV2) { } +func (c TransitionRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransitionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9643,13 +10054,7 @@ func (o *TransitionRequest_SdkV2) SetAvailableActions(ctx context.Context, v []t } type TransitionStageResponse_SdkV2 struct { - ModelVersion types.List `tfsdk:"model_version" tf:"optional,object"` -} - -func (newState *TransitionStageResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionStageResponse_SdkV2) { -} - -func (newState *TransitionStageResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransitionStageResponse_SdkV2) { + ModelVersion types.List `tfsdk:"model_version" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransitionStageResponse. @@ -9726,6 +10131,13 @@ func (newState *UpdateComment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *UpdateComment_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateComment_SdkV2) { } +func (c UpdateComment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "comment")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateComment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9761,13 +10173,7 @@ func (o UpdateComment_SdkV2) Type(ctx context.Context) attr.Type { type UpdateCommentResponse_SdkV2 struct { // Comment details. - Comment types.List `tfsdk:"comment" tf:"optional,object"` -} - -func (newState *UpdateCommentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCommentResponse_SdkV2) { -} - -func (newState *UpdateCommentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCommentResponse_SdkV2) { + Comment types.List `tfsdk:"comment" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCommentResponse. @@ -9836,7 +10242,7 @@ type UpdateExperiment_SdkV2 struct { ExperimentId types.String `tfsdk:"experiment_id" tf:""` // If provided, the experiment's name is changed to the new name. The new // name must be unique. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` } func (newState *UpdateExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExperiment_SdkV2) { @@ -9845,6 +10251,12 @@ func (newState *UpdateExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *UpdateExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExperiment_SdkV2) { } +func (c UpdateExperiment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExperiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9887,6 +10299,11 @@ func (newState *UpdateExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *UpdateExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExperimentResponse_SdkV2) { } +func (c UpdateExperimentResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9916,7 +10333,7 @@ func (o UpdateExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateModelRequest_SdkV2 struct { // If provided, updates the description for this `registered_model`. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Registered model unique name identifier. Name types.String `tfsdk:"name" tf:""` } @@ -9927,6 +10344,12 @@ func (newState *UpdateModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *UpdateModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelRequest_SdkV2) { } +func (c UpdateModelRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9963,12 +10386,6 @@ func (o UpdateModelRequest_SdkV2) Type(ctx context.Context) attr.Type { type UpdateModelResponse_SdkV2 struct { } -func (newState *UpdateModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelResponse_SdkV2) { -} - -func (newState *UpdateModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9998,7 +10415,7 @@ func (o UpdateModelResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateModelVersionRequest_SdkV2 struct { // If provided, updates the description for this `registered_model`. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Name of the registered model Name types.String `tfsdk:"name" tf:""` // Model version number @@ -10011,6 +10428,13 @@ func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest_SdkV2) { } +func (c UpdateModelVersionRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10049,12 +10473,6 @@ func (o UpdateModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { type UpdateModelVersionResponse_SdkV2 struct { } -func (newState *UpdateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionResponse_SdkV2) { -} - -func (newState *UpdateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelVersionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10084,7 +10502,7 @@ func (o UpdateModelVersionResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateRegistryWebhook_SdkV2 struct { // User-specified description for the webhook. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A // new model version was created for the associated model. // @@ -10118,13 +10536,13 @@ type UpdateRegistryWebhook_SdkV2 struct { // // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model // version be archived. - Events types.List `tfsdk:"events" tf:"optional"` + Events types.List `tfsdk:"events" tf:""` - HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"optional,object"` + HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"object"` // Webhook ID Id types.String `tfsdk:"id" tf:""` - JobSpec types.List `tfsdk:"job_spec" tf:"optional,object"` + JobSpec types.List `tfsdk:"job_spec" tf:"object"` // Enable or disable triggering the webhook, or put the webhook into test // mode. The default is `ACTIVE`: * `ACTIVE`: Webhook is triggered when an // associated event happens. @@ -10133,7 +10551,7 @@ type UpdateRegistryWebhook_SdkV2 struct { // // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is // not triggered on a real event. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *UpdateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegistryWebhook_SdkV2) { @@ -10142,6 +10560,14 @@ func (newState *UpdateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *UpdateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRegistryWebhook_SdkV2) { } +func (c UpdateRegistryWebhook_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + HttpUrlSpec_SdkV2{}.ToSchema(cs, append(path, "http_url_spec")...) + cs.SetRequired(append(path, "id")...) + JobSpec_SdkV2{}.ToSchema(cs, append(path, "job_spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRegistryWebhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10273,14 +10699,14 @@ func (o *UpdateRegistryWebhook_SdkV2) SetJobSpec(ctx context.Context, v JobSpec_ type UpdateRun_SdkV2 struct { // Unix timestamp in milliseconds of when the run ended. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // ID of the run to update. Must be provided. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] ID of the run to update.. This field // will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // Updated status of the run. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *UpdateRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRun_SdkV2) { @@ -10289,6 +10715,11 @@ func (newState *UpdateRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Up func (newState *UpdateRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRun_SdkV2) { } +func (c UpdateRun_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10328,7 +10759,7 @@ func (o UpdateRun_SdkV2) Type(ctx context.Context) attr.Type { type UpdateRunResponse_SdkV2 struct { // Updated metadata of the run. - RunInfo types.List `tfsdk:"run_info" tf:"optional,object"` + RunInfo types.List `tfsdk:"run_info" tf:"object"` } func (newState *UpdateRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRunResponse_SdkV2) { @@ -10337,6 +10768,12 @@ func (newState *UpdateRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *UpdateRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRunResponse_SdkV2) { } +func (c UpdateRunResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RunInfo_SdkV2{}.ToSchema(cs, append(path, "run_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10401,12 +10838,6 @@ func (o *UpdateRunResponse_SdkV2) SetRunInfo(ctx context.Context, v RunInfo_SdkV type UpdateWebhookResponse_SdkV2 struct { } -func (newState *UpdateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWebhookResponse_SdkV2) { -} - -func (newState *UpdateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWebhookResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWebhookResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/ml_tf/model.go b/internal/service/ml_tf/model.go index 12c5b7079..f744f3af7 100755 --- a/internal/service/ml_tf/model.go +++ b/internal/service/ml_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -37,11 +38,11 @@ type Activity struct { // // * `SYSTEM_TRANSITION`: For events performed as a side effect, such as // archiving existing model versions in a stage. - ActivityType types.String `tfsdk:"activity_type" tf:"optional"` + ActivityType types.String `tfsdk:"activity_type" tf:""` // User-provided comment associated with the activity. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Source stage of the transition (if the activity is stage transition // related). Valid values are: // @@ -52,16 +53,16 @@ type Activity struct { // * `Production`: Production stage. // // * `Archived`: Archived stage. - FromStage types.String `tfsdk:"from_stage" tf:"optional"` + FromStage types.String `tfsdk:"from_stage" tf:""` // Unique identifier for the object. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Comment made by system, for example explaining an activity of type // `SYSTEM_TRANSITION`. It usually describes a side effect, such as a // version being archived as part of another version's stage transition, and // may not be returned for some activity types. - SystemComment types.String `tfsdk:"system_comment" tf:"optional"` + SystemComment types.String `tfsdk:"system_comment" tf:""` // Target stage of the transition (if the activity is stage transition // related). Valid values are: // @@ -72,9 +73,9 @@ type Activity struct { // * `Production`: Production stage. // // * `Archived`: Archived stage. - ToStage types.String `tfsdk:"to_stage" tf:"optional"` + ToStage types.String `tfsdk:"to_stage" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *Activity) SyncEffectiveFieldsDuringCreateOrUpdate(plan Activity) { @@ -83,6 +84,11 @@ func (newState *Activity) SyncEffectiveFieldsDuringCreateOrUpdate(plan Activity) func (newState *Activity) SyncEffectiveFieldsDuringRead(existingState Activity) { } +func (c Activity) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Activity. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -135,7 +141,7 @@ type ApproveTransitionRequest struct { // stage. ArchiveExistingVersions types.Bool `tfsdk:"archive_existing_versions" tf:""` // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the model. Name types.String `tfsdk:"name" tf:""` // Target stage of the transition. Valid values are: @@ -158,6 +164,15 @@ func (newState *ApproveTransitionRequest) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ApproveTransitionRequest) SyncEffectiveFieldsDuringRead(existingState ApproveTransitionRequest) { } +func (c ApproveTransitionRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "archive_existing_versions")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "stage")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ApproveTransitionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -199,13 +214,7 @@ func (o ApproveTransitionRequest) Type(ctx context.Context) attr.Type { type ApproveTransitionRequestResponse struct { // Activity recorded for the action. - Activity types.Object `tfsdk:"activity" tf:"optional,object"` -} - -func (newState *ApproveTransitionRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApproveTransitionRequestResponse) { -} - -func (newState *ApproveTransitionRequestResponse) SyncEffectiveFieldsDuringRead(existingState ApproveTransitionRequestResponse) { + Activity types.Object `tfsdk:"activity" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ApproveTransitionRequestResponse. @@ -272,17 +281,17 @@ func (o *ApproveTransitionRequestResponse) SetActivity(ctx context.Context, v Ac // Comment details. type CommentObject struct { // Array of actions on the activity allowed for the current viewer. - AvailableActions types.List `tfsdk:"available_actions" tf:"optional"` + AvailableActions types.List `tfsdk:"available_actions" tf:""` // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Comment ID - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *CommentObject) SyncEffectiveFieldsDuringCreateOrUpdate(plan CommentObject) { @@ -291,6 +300,11 @@ func (newState *CommentObject) SyncEffectiveFieldsDuringCreateOrUpdate(plan Comm func (newState *CommentObject) SyncEffectiveFieldsDuringRead(existingState CommentObject) { } +func (c CommentObject) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CommentObject. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -377,6 +391,14 @@ func (newState *CreateComment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Crea func (newState *CreateComment) SyncEffectiveFieldsDuringRead(existingState CreateComment) { } +func (c CreateComment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "comment")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateComment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -414,13 +436,7 @@ func (o CreateComment) Type(ctx context.Context) attr.Type { type CreateCommentResponse struct { // Comment details. - Comment types.Object `tfsdk:"comment" tf:"optional,object"` -} - -func (newState *CreateCommentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCommentResponse) { -} - -func (newState *CreateCommentResponse) SyncEffectiveFieldsDuringRead(existingState CreateCommentResponse) { + Comment types.Object `tfsdk:"comment" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCommentResponse. @@ -487,7 +503,7 @@ func (o *CreateCommentResponse) SetComment(ctx context.Context, v CommentObject) type CreateExperiment struct { // Location where all artifacts for the experiment are stored. If not // provided, the remote server will select an appropriate default. - ArtifactLocation types.String `tfsdk:"artifact_location" tf:"optional"` + ArtifactLocation types.String `tfsdk:"artifact_location" tf:""` // Experiment name. Name types.String `tfsdk:"name" tf:""` // A collection of tags to set on the experiment. Maximum tag size and @@ -495,7 +511,7 @@ type CreateExperiment struct { // backends are guaranteed to support tag keys up to 250 bytes in size and // tag values up to 5000 bytes in size. All storage backends are also // guaranteed to support up to 20 tags per request. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *CreateExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExperiment) { @@ -504,6 +520,13 @@ func (newState *CreateExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *CreateExperiment) SyncEffectiveFieldsDuringRead(existingState CreateExperiment) { } +func (c CreateExperiment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + ExperimentTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExperiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -571,7 +594,7 @@ func (o *CreateExperiment) SetTags(ctx context.Context, v []ExperimentTag) { type CreateExperimentResponse struct { // Unique identifier for the experiment. - ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + ExperimentId types.String `tfsdk:"experiment_id" tf:""` } func (newState *CreateExperimentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExperimentResponse) { @@ -580,6 +603,11 @@ func (newState *CreateExperimentResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateExperimentResponse) SyncEffectiveFieldsDuringRead(existingState CreateExperimentResponse) { } +func (c CreateExperimentResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -613,11 +641,11 @@ func (o CreateExperimentResponse) Type(ctx context.Context) attr.Type { type CreateModelRequest struct { // Optional description for registered model. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Register models under this name Name types.String `tfsdk:"name" tf:""` // Additional metadata for registered model. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *CreateModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelRequest) { @@ -626,6 +654,13 @@ func (newState *CreateModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateModelRequest) SyncEffectiveFieldsDuringRead(existingState CreateModelRequest) { } +func (c CreateModelRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + ModelTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -692,7 +727,7 @@ func (o *CreateModelRequest) SetTags(ctx context.Context, v []ModelTag) { } type CreateModelResponse struct { - RegisteredModel types.Object `tfsdk:"registered_model" tf:"optional,object"` + RegisteredModel types.Object `tfsdk:"registered_model" tf:"object"` } func (newState *CreateModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelResponse) { @@ -701,6 +736,12 @@ func (newState *CreateModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CreateModelResponse) SyncEffectiveFieldsDuringRead(existingState CreateModelResponse) { } +func (c CreateModelResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Model{}.ToSchema(cs, append(path, "registered_model")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -764,19 +805,19 @@ func (o *CreateModelResponse) SetRegisteredModel(ctx context.Context, v Model) { type CreateModelVersionRequest struct { // Optional description for model version. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Register model under this name Name types.String `tfsdk:"name" tf:""` // MLflow run ID for correlation, if `source` was generated by an experiment // run in MLflow tracking server - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // MLflow run link - this is the exact link of the run that generated this // model version, potentially hosted at another instance of MLflow. - RunLink types.String `tfsdk:"run_link" tf:"optional"` + RunLink types.String `tfsdk:"run_link" tf:""` // URI indicating the location of the model artifacts. Source types.String `tfsdk:"source" tf:""` // Additional metadata for model version. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *CreateModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelVersionRequest) { @@ -785,6 +826,14 @@ func (newState *CreateModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *CreateModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState CreateModelVersionRequest) { } +func (c CreateModelVersionRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "source")...) + ModelVersionTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -858,7 +907,7 @@ func (o *CreateModelVersionRequest) SetTags(ctx context.Context, v []ModelVersio type CreateModelVersionResponse struct { // Return new version number generated for this model in registry. - ModelVersion types.Object `tfsdk:"model_version" tf:"optional,object"` + ModelVersion types.Object `tfsdk:"model_version" tf:"object"` } func (newState *CreateModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelVersionResponse) { @@ -867,6 +916,12 @@ func (newState *CreateModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CreateModelVersionResponse) SyncEffectiveFieldsDuringRead(existingState CreateModelVersionResponse) { } +func (c CreateModelVersionResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion{}.ToSchema(cs, append(path, "model_version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelVersionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -930,7 +985,7 @@ func (o *CreateModelVersionResponse) SetModelVersion(ctx context.Context, v Mode type CreateRegistryWebhook struct { // User-specified description for the webhook. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A // new model version was created for the associated model. // @@ -966,11 +1021,11 @@ type CreateRegistryWebhook struct { // version be archived. Events types.List `tfsdk:"events" tf:""` - HttpUrlSpec types.Object `tfsdk:"http_url_spec" tf:"optional,object"` + HttpUrlSpec types.Object `tfsdk:"http_url_spec" tf:"object"` - JobSpec types.Object `tfsdk:"job_spec" tf:"optional,object"` + JobSpec types.Object `tfsdk:"job_spec" tf:"object"` // Name of the model whose events would trigger this webhook. - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // Enable or disable triggering the webhook, or put the webhook into test // mode. The default is `ACTIVE`: * `ACTIVE`: Webhook is triggered when an // associated event happens. @@ -979,7 +1034,7 @@ type CreateRegistryWebhook struct { // // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is // not triggered on a real event. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *CreateRegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegistryWebhook) { @@ -988,6 +1043,14 @@ func (newState *CreateRegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateRegistryWebhook) SyncEffectiveFieldsDuringRead(existingState CreateRegistryWebhook) { } +func (c CreateRegistryWebhook) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "events")...) + HttpUrlSpec{}.ToSchema(cs, append(path, "http_url_spec")...) + JobSpec{}.ToSchema(cs, append(path, "job_spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRegistryWebhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1119,15 +1182,15 @@ func (o *CreateRegistryWebhook) SetJobSpec(ctx context.Context, v JobSpec) { type CreateRun struct { // ID of the associated experiment. - ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + ExperimentId types.String `tfsdk:"experiment_id" tf:""` // Unix timestamp in milliseconds of when the run started. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Additional metadata for run. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // ID of the user executing the run. This field is deprecated as of MLflow // 1.0, and will be removed in a future MLflow release. Use 'mlflow.user' // tag instead. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *CreateRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRun) { @@ -1136,6 +1199,12 @@ func (newState *CreateRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRu func (newState *CreateRun) SyncEffectiveFieldsDuringRead(existingState CreateRun) { } +func (c CreateRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RunTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1205,7 +1274,7 @@ func (o *CreateRun) SetTags(ctx context.Context, v []RunTag) { type CreateRunResponse struct { // The newly created run. - Run types.Object `tfsdk:"run" tf:"optional,object"` + Run types.Object `tfsdk:"run" tf:"object"` } func (newState *CreateRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRunResponse) { @@ -1214,6 +1283,12 @@ func (newState *CreateRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateRunResponse) SyncEffectiveFieldsDuringRead(existingState CreateRunResponse) { } +func (c CreateRunResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Run{}.ToSchema(cs, append(path, "run")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1277,7 +1352,7 @@ func (o *CreateRunResponse) SetRun(ctx context.Context, v Run) { type CreateTransitionRequest struct { // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the model. Name types.String `tfsdk:"name" tf:""` // Target stage of the transition. Valid values are: @@ -1300,6 +1375,14 @@ func (newState *CreateTransitionRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateTransitionRequest) SyncEffectiveFieldsDuringRead(existingState CreateTransitionRequest) { } +func (c CreateTransitionRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "stage")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTransitionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1339,13 +1422,7 @@ func (o CreateTransitionRequest) Type(ctx context.Context) attr.Type { type CreateTransitionRequestResponse struct { // Transition request details. - Request types.Object `tfsdk:"request" tf:"optional,object"` -} - -func (newState *CreateTransitionRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTransitionRequestResponse) { -} - -func (newState *CreateTransitionRequestResponse) SyncEffectiveFieldsDuringRead(existingState CreateTransitionRequestResponse) { + Request types.Object `tfsdk:"request" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTransitionRequestResponse. @@ -1410,13 +1487,7 @@ func (o *CreateTransitionRequestResponse) SetRequest(ctx context.Context, v Tran } type CreateWebhookResponse struct { - Webhook types.Object `tfsdk:"webhook" tf:"optional,object"` -} - -func (newState *CreateWebhookResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWebhookResponse) { -} - -func (newState *CreateWebhookResponse) SyncEffectiveFieldsDuringRead(existingState CreateWebhookResponse) { + Webhook types.Object `tfsdk:"webhook" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWebhookResponse. @@ -1483,24 +1554,24 @@ func (o *CreateWebhookResponse) SetWebhook(ctx context.Context, v RegistryWebhoo type Dataset struct { // Dataset digest, e.g. an md5 hash of the dataset that uniquely identifies // it within datasets of the same name. - Digest types.String `tfsdk:"digest" tf:"optional"` + Digest types.String `tfsdk:"digest" tf:""` // The name of the dataset. E.g. “my.uc.table@2” “nyc-taxi-dataset”, // “fantastic-elk-3” - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The profile of the dataset. Summary statistics for the dataset, such as // the number of rows in a table, the mean / std / mode of each column in a // table, or the number of elements in an array. - Profile types.String `tfsdk:"profile" tf:"optional"` + Profile types.String `tfsdk:"profile" tf:""` // The schema of the dataset. E.g., MLflow ColSpec JSON for a dataframe, // MLflow TensorSpec JSON for an ndarray, or another schema format. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // The type of the dataset source, e.g. ‘databricks-uc-table’, // ‘DBFS’, ‘S3’, ... - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // Source information for the dataset. Note that the source may not exactly // reproduce the dataset if it was transformed / modified before use with // MLflow. - SourceType types.String `tfsdk:"source_type" tf:"optional"` + SourceType types.String `tfsdk:"source_type" tf:""` } func (newState *Dataset) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dataset) { @@ -1509,6 +1580,11 @@ func (newState *Dataset) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dataset) { func (newState *Dataset) SyncEffectiveFieldsDuringRead(existingState Dataset) { } +func (c Dataset) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Dataset. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1552,10 +1628,10 @@ func (o Dataset) Type(ctx context.Context) attr.Type { type DatasetInput struct { // The dataset being used as a Run input. - Dataset types.Object `tfsdk:"dataset" tf:"optional,object"` + Dataset types.Object `tfsdk:"dataset" tf:"object"` // A list of tags for the dataset input, e.g. a “context” tag with value // “training” - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *DatasetInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatasetInput) { @@ -1564,6 +1640,13 @@ func (newState *DatasetInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan Datas func (newState *DatasetInput) SyncEffectiveFieldsDuringRead(existingState DatasetInput) { } +func (c DatasetInput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Dataset{}.ToSchema(cs, append(path, "dataset")...) + InputTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatasetInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1661,12 +1744,6 @@ type DeleteCommentRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteCommentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCommentRequest) { -} - -func (newState *DeleteCommentRequest) SyncEffectiveFieldsDuringRead(existingState DeleteCommentRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCommentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1701,12 +1778,6 @@ func (o DeleteCommentRequest) Type(ctx context.Context) attr.Type { type DeleteCommentResponse struct { } -func (newState *DeleteCommentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCommentResponse) { -} - -func (newState *DeleteCommentResponse) SyncEffectiveFieldsDuringRead(existingState DeleteCommentResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCommentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1745,6 +1816,12 @@ func (newState *DeleteExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan D func (newState *DeleteExperiment) SyncEffectiveFieldsDuringRead(existingState DeleteExperiment) { } +func (c DeleteExperiment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExperiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1785,6 +1862,11 @@ func (newState *DeleteExperimentResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *DeleteExperimentResponse) SyncEffectiveFieldsDuringRead(existingState DeleteExperimentResponse) { } +func (c DeleteExperimentResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1818,12 +1900,6 @@ type DeleteModelRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelRequest) { -} - -func (newState *DeleteModelRequest) SyncEffectiveFieldsDuringRead(existingState DeleteModelRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1858,12 +1934,6 @@ func (o DeleteModelRequest) Type(ctx context.Context) attr.Type { type DeleteModelResponse struct { } -func (newState *DeleteModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelResponse) { -} - -func (newState *DeleteModelResponse) SyncEffectiveFieldsDuringRead(existingState DeleteModelResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1900,12 +1970,6 @@ type DeleteModelTagRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteModelTagRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelTagRequest) { -} - -func (newState *DeleteModelTagRequest) SyncEffectiveFieldsDuringRead(existingState DeleteModelTagRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelTagRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1942,12 +2006,6 @@ func (o DeleteModelTagRequest) Type(ctx context.Context) attr.Type { type DeleteModelTagResponse struct { } -func (newState *DeleteModelTagResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelTagResponse) { -} - -func (newState *DeleteModelTagResponse) SyncEffectiveFieldsDuringRead(existingState DeleteModelTagResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1983,12 +2041,6 @@ type DeleteModelVersionRequest struct { Version types.String `tfsdk:"-"` } -func (newState *DeleteModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionRequest) { -} - -func (newState *DeleteModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2025,12 +2077,6 @@ func (o DeleteModelVersionRequest) Type(ctx context.Context) attr.Type { type DeleteModelVersionResponse struct { } -func (newState *DeleteModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionResponse) { -} - -func (newState *DeleteModelVersionResponse) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2069,12 +2115,6 @@ type DeleteModelVersionTagRequest struct { Version types.String `tfsdk:"-"` } -func (newState *DeleteModelVersionTagRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionTagRequest) { -} - -func (newState *DeleteModelVersionTagRequest) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionTagRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionTagRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2113,12 +2153,6 @@ func (o DeleteModelVersionTagRequest) Type(ctx context.Context) attr.Type { type DeleteModelVersionTagResponse struct { } -func (newState *DeleteModelVersionTagResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionTagResponse) { -} - -func (newState *DeleteModelVersionTagResponse) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionTagResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2157,6 +2191,12 @@ func (newState *DeleteRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRu func (newState *DeleteRun) SyncEffectiveFieldsDuringRead(existingState DeleteRun) { } +func (c DeleteRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2197,6 +2237,11 @@ func (newState *DeleteRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DeleteRunResponse) SyncEffectiveFieldsDuringRead(existingState DeleteRunResponse) { } +func (c DeleteRunResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2229,7 +2274,7 @@ type DeleteRuns struct { ExperimentId types.String `tfsdk:"experiment_id" tf:""` // An optional positive integer indicating the maximum number of runs to // delete. The maximum allowed value for max_runs is 10000. - MaxRuns types.Int64 `tfsdk:"max_runs" tf:"optional"` + MaxRuns types.Int64 `tfsdk:"max_runs" tf:""` // The maximum creation timestamp in milliseconds since the UNIX epoch for // deleting runs. Only runs created prior to or at this timestamp are // deleted. @@ -2242,6 +2287,13 @@ func (newState *DeleteRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteR func (newState *DeleteRuns) SyncEffectiveFieldsDuringRead(existingState DeleteRuns) { } +func (c DeleteRuns) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + cs.SetRequired(append(path, "max_timestamp_millis")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRuns. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2279,7 +2331,7 @@ func (o DeleteRuns) Type(ctx context.Context) attr.Type { type DeleteRunsResponse struct { // The number of runs deleted. - RunsDeleted types.Int64 `tfsdk:"runs_deleted" tf:"optional"` + RunsDeleted types.Int64 `tfsdk:"runs_deleted" tf:""` } func (newState *DeleteRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRunsResponse) { @@ -2288,6 +2340,11 @@ func (newState *DeleteRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DeleteRunsResponse) SyncEffectiveFieldsDuringRead(existingState DeleteRunsResponse) { } +func (c DeleteRunsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2332,6 +2389,13 @@ func (newState *DeleteTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTa func (newState *DeleteTag) SyncEffectiveFieldsDuringRead(existingState DeleteTag) { } +func (c DeleteTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2374,6 +2438,11 @@ func (newState *DeleteTagResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DeleteTagResponse) SyncEffectiveFieldsDuringRead(existingState DeleteTagResponse) { } +func (c DeleteTagResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2425,12 +2494,6 @@ type DeleteTransitionRequestRequest struct { Version types.String `tfsdk:"-"` } -func (newState *DeleteTransitionRequestRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTransitionRequestRequest) { -} - -func (newState *DeleteTransitionRequestRequest) SyncEffectiveFieldsDuringRead(existingState DeleteTransitionRequestRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTransitionRequestRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2473,12 +2536,6 @@ func (o DeleteTransitionRequestRequest) Type(ctx context.Context) attr.Type { type DeleteTransitionRequestResponse struct { } -func (newState *DeleteTransitionRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTransitionRequestResponse) { -} - -func (newState *DeleteTransitionRequestResponse) SyncEffectiveFieldsDuringRead(existingState DeleteTransitionRequestResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTransitionRequestResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2512,12 +2569,6 @@ type DeleteWebhookRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteWebhookRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWebhookRequest) { -} - -func (newState *DeleteWebhookRequest) SyncEffectiveFieldsDuringRead(existingState DeleteWebhookRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWebhookRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2552,12 +2603,6 @@ func (o DeleteWebhookRequest) Type(ctx context.Context) attr.Type { type DeleteWebhookResponse struct { } -func (newState *DeleteWebhookResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWebhookResponse) { -} - -func (newState *DeleteWebhookResponse) SyncEffectiveFieldsDuringRead(existingState DeleteWebhookResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWebhookResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2587,20 +2632,20 @@ func (o DeleteWebhookResponse) Type(ctx context.Context) attr.Type { type Experiment struct { // Location where artifacts for the experiment are stored. - ArtifactLocation types.String `tfsdk:"artifact_location" tf:"optional"` + ArtifactLocation types.String `tfsdk:"artifact_location" tf:""` // Creation time - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Unique identifier for the experiment. - ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + ExperimentId types.String `tfsdk:"experiment_id" tf:""` // Last update time - LastUpdateTime types.Int64 `tfsdk:"last_update_time" tf:"optional"` + LastUpdateTime types.Int64 `tfsdk:"last_update_time" tf:""` // Current life cycle stage of the experiment: "active" or "deleted". // Deleted experiments are not returned by APIs. - LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:"optional"` + LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:""` // Human readable name that identifies the experiment. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Tags: Additional metadata key-value pairs. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *Experiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Experiment) { @@ -2609,6 +2654,12 @@ func (newState *Experiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Experim func (newState *Experiment) SyncEffectiveFieldsDuringRead(existingState Experiment) { } +func (c Experiment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Experiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2684,13 +2735,13 @@ func (o *Experiment) SetTags(ctx context.Context, v []ExperimentTag) { type ExperimentAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ExperimentAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentAccessControlRequest) { @@ -2699,6 +2750,11 @@ func (newState *ExperimentAccessControlRequest) SyncEffectiveFieldsDuringCreateO func (newState *ExperimentAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState ExperimentAccessControlRequest) { } +func (c ExperimentAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2738,15 +2794,15 @@ func (o ExperimentAccessControlRequest) Type(ctx context.Context) attr.Type { type ExperimentAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ExperimentAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentAccessControlResponse) { @@ -2755,6 +2811,12 @@ func (newState *ExperimentAccessControlResponse) SyncEffectiveFieldsDuringCreate func (newState *ExperimentAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState ExperimentAccessControlResponse) { } +func (c ExperimentAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2825,11 +2887,11 @@ func (o *ExperimentAccessControlResponse) SetAllPermissions(ctx context.Context, } type ExperimentPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ExperimentPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermission) { @@ -2838,6 +2900,11 @@ func (newState *ExperimentPermission) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ExperimentPermission) SyncEffectiveFieldsDuringRead(existingState ExperimentPermission) { } +func (c ExperimentPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2904,11 +2971,11 @@ func (o *ExperimentPermission) SetInheritedFromObject(ctx context.Context, v []t } type ExperimentPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ExperimentPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermissions) { @@ -2917,6 +2984,12 @@ func (newState *ExperimentPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ExperimentPermissions) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissions) { } +func (c ExperimentPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2983,9 +3056,9 @@ func (o *ExperimentPermissions) SetAccessControlList(ctx context.Context, v []Ex } type ExperimentPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ExperimentPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermissionsDescription) { @@ -2994,6 +3067,11 @@ func (newState *ExperimentPermissionsDescription) SyncEffectiveFieldsDuringCreat func (newState *ExperimentPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissionsDescription) { } +func (c ExperimentPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3028,7 +3106,7 @@ func (o ExperimentPermissionsDescription) Type(ctx context.Context) attr.Type { } type ExperimentPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The experiment for which to get or manage permissions. ExperimentId types.String `tfsdk:"-"` } @@ -3039,6 +3117,13 @@ func (newState *ExperimentPermissionsRequest) SyncEffectiveFieldsDuringCreateOrU func (newState *ExperimentPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissionsRequest) { } +func (c ExperimentPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "experiment_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3104,9 +3189,9 @@ func (o *ExperimentPermissionsRequest) SetAccessControlList(ctx context.Context, type ExperimentTag struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *ExperimentTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentTag) { @@ -3115,6 +3200,11 @@ func (newState *ExperimentTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan Expe func (newState *ExperimentTag) SyncEffectiveFieldsDuringRead(existingState ExperimentTag) { } +func (c ExperimentTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3150,11 +3240,11 @@ func (o ExperimentTag) Type(ctx context.Context) attr.Type { type FileInfo struct { // Size in bytes. Unset for directories. - FileSize types.Int64 `tfsdk:"file_size" tf:"optional"` + FileSize types.Int64 `tfsdk:"file_size" tf:""` // Whether the path is a directory. - IsDir types.Bool `tfsdk:"is_dir" tf:"optional"` + IsDir types.Bool `tfsdk:"is_dir" tf:""` // Path relative to the root artifact directory run. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *FileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo) { @@ -3163,6 +3253,11 @@ func (newState *FileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo) func (newState *FileInfo) SyncEffectiveFieldsDuringRead(existingState FileInfo) { } +func (c FileInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3204,12 +3299,6 @@ type GetByNameRequest struct { ExperimentName types.String `tfsdk:"-"` } -func (newState *GetByNameRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetByNameRequest) { -} - -func (newState *GetByNameRequest) SyncEffectiveFieldsDuringRead(existingState GetByNameRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetByNameRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3247,12 +3336,6 @@ type GetExperimentPermissionLevelsRequest struct { ExperimentId types.String `tfsdk:"-"` } -func (newState *GetExperimentPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentPermissionLevelsRequest) { -} - -func (newState *GetExperimentPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetExperimentPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3286,7 +3369,7 @@ func (o GetExperimentPermissionLevelsRequest) Type(ctx context.Context) attr.Typ type GetExperimentPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetExperimentPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentPermissionLevelsResponse) { @@ -3295,6 +3378,12 @@ func (newState *GetExperimentPermissionLevelsResponse) SyncEffectiveFieldsDuring func (newState *GetExperimentPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetExperimentPermissionLevelsResponse) { } +func (c GetExperimentPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExperimentPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3362,12 +3451,6 @@ type GetExperimentPermissionsRequest struct { ExperimentId types.String `tfsdk:"-"` } -func (newState *GetExperimentPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentPermissionsRequest) { -} - -func (newState *GetExperimentPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetExperimentPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3405,12 +3488,6 @@ type GetExperimentRequest struct { ExperimentId types.String `tfsdk:"-"` } -func (newState *GetExperimentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentRequest) { -} - -func (newState *GetExperimentRequest) SyncEffectiveFieldsDuringRead(existingState GetExperimentRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3444,7 +3521,7 @@ func (o GetExperimentRequest) Type(ctx context.Context) attr.Type { type GetExperimentResponse struct { // Experiment details. - Experiment types.Object `tfsdk:"experiment" tf:"optional,object"` + Experiment types.Object `tfsdk:"experiment" tf:"object"` } func (newState *GetExperimentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentResponse) { @@ -3453,6 +3530,12 @@ func (newState *GetExperimentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *GetExperimentResponse) SyncEffectiveFieldsDuringRead(existingState GetExperimentResponse) { } +func (c GetExperimentResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Experiment{}.ToSchema(cs, append(path, "experiment")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3531,12 +3614,6 @@ type GetHistoryRequest struct { RunUuid types.String `tfsdk:"-"` } -func (newState *GetHistoryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetHistoryRequest) { -} - -func (newState *GetHistoryRequest) SyncEffectiveFieldsDuringRead(existingState GetHistoryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetHistoryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3580,7 +3657,7 @@ type GetLatestVersionsRequest struct { // Registered model unique name identifier. Name types.String `tfsdk:"name" tf:""` // List of stages. - Stages types.List `tfsdk:"stages" tf:"optional"` + Stages types.List `tfsdk:"stages" tf:""` } func (newState *GetLatestVersionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionsRequest) { @@ -3589,6 +3666,12 @@ func (newState *GetLatestVersionsRequest) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *GetLatestVersionsRequest) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionsRequest) { } +func (c GetLatestVersionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3656,7 +3739,7 @@ type GetLatestVersionsResponse struct { // Latest version models for each requests stage. Only return models with // current `READY` status. If no `stages` provided, returns the latest // version for each stage, including `"None"`. - ModelVersions types.List `tfsdk:"model_versions" tf:"optional"` + ModelVersions types.List `tfsdk:"model_versions" tf:""` } func (newState *GetLatestVersionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionsResponse) { @@ -3665,6 +3748,12 @@ func (newState *GetLatestVersionsResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *GetLatestVersionsResponse) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionsResponse) { } +func (c GetLatestVersionsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion{}.ToSchema(cs, append(path, "model_versions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3728,10 +3817,10 @@ func (o *GetLatestVersionsResponse) SetModelVersions(ctx context.Context, v []Mo type GetMetricHistoryResponse struct { // All logged values for this metric. - Metrics types.List `tfsdk:"metrics" tf:"optional"` + Metrics types.List `tfsdk:"metrics" tf:""` // Token that can be used to retrieve the next page of metric history // results - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetMetricHistoryResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetricHistoryResponse) { @@ -3740,6 +3829,12 @@ func (newState *GetMetricHistoryResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *GetMetricHistoryResponse) SyncEffectiveFieldsDuringRead(existingState GetMetricHistoryResponse) { } +func (c GetMetricHistoryResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Metric{}.ToSchema(cs, append(path, "metrics")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetricHistoryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3809,12 +3904,6 @@ type GetModelRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelRequest) { -} - -func (newState *GetModelRequest) SyncEffectiveFieldsDuringRead(existingState GetModelRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3847,13 +3936,7 @@ func (o GetModelRequest) Type(ctx context.Context) attr.Type { } type GetModelResponse struct { - RegisteredModelDatabricks types.Object `tfsdk:"registered_model_databricks" tf:"optional,object"` -} - -func (newState *GetModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelResponse) { -} - -func (newState *GetModelResponse) SyncEffectiveFieldsDuringRead(existingState GetModelResponse) { + RegisteredModelDatabricks types.Object `tfsdk:"registered_model_databricks" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelResponse. @@ -3925,12 +4008,6 @@ type GetModelVersionDownloadUriRequest struct { Version types.String `tfsdk:"-"` } -func (newState *GetModelVersionDownloadUriRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionDownloadUriRequest) { -} - -func (newState *GetModelVersionDownloadUriRequest) SyncEffectiveFieldsDuringRead(existingState GetModelVersionDownloadUriRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionDownloadUriRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3966,7 +4043,7 @@ func (o GetModelVersionDownloadUriRequest) Type(ctx context.Context) attr.Type { type GetModelVersionDownloadUriResponse struct { // URI corresponding to where artifacts for this model version are stored. - ArtifactUri types.String `tfsdk:"artifact_uri" tf:"optional"` + ArtifactUri types.String `tfsdk:"artifact_uri" tf:""` } func (newState *GetModelVersionDownloadUriResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionDownloadUriResponse) { @@ -3975,6 +4052,11 @@ func (newState *GetModelVersionDownloadUriResponse) SyncEffectiveFieldsDuringCre func (newState *GetModelVersionDownloadUriResponse) SyncEffectiveFieldsDuringRead(existingState GetModelVersionDownloadUriResponse) { } +func (c GetModelVersionDownloadUriResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionDownloadUriResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4014,12 +4096,6 @@ type GetModelVersionRequest struct { Version types.String `tfsdk:"-"` } -func (newState *GetModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionRequest) { -} - -func (newState *GetModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState GetModelVersionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4054,7 +4130,7 @@ func (o GetModelVersionRequest) Type(ctx context.Context) attr.Type { } type GetModelVersionResponse struct { - ModelVersion types.Object `tfsdk:"model_version" tf:"optional,object"` + ModelVersion types.Object `tfsdk:"model_version" tf:"object"` } func (newState *GetModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionResponse) { @@ -4063,6 +4139,12 @@ func (newState *GetModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *GetModelVersionResponse) SyncEffectiveFieldsDuringRead(existingState GetModelVersionResponse) { } +func (c GetModelVersionResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion{}.ToSchema(cs, append(path, "model_version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4130,12 +4212,6 @@ type GetRegisteredModelPermissionLevelsRequest struct { RegisteredModelId types.String `tfsdk:"-"` } -func (newState *GetRegisteredModelPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelPermissionLevelsRequest) { -} - -func (newState *GetRegisteredModelPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4169,7 +4245,7 @@ func (o GetRegisteredModelPermissionLevelsRequest) Type(ctx context.Context) att type GetRegisteredModelPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetRegisteredModelPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelPermissionLevelsResponse) { @@ -4178,6 +4254,12 @@ func (newState *GetRegisteredModelPermissionLevelsResponse) SyncEffectiveFieldsD func (newState *GetRegisteredModelPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelPermissionLevelsResponse) { } +func (c GetRegisteredModelPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4245,12 +4327,6 @@ type GetRegisteredModelPermissionsRequest struct { RegisteredModelId types.String `tfsdk:"-"` } -func (newState *GetRegisteredModelPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelPermissionsRequest) { -} - -func (newState *GetRegisteredModelPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4291,12 +4367,6 @@ type GetRunRequest struct { RunUuid types.String `tfsdk:"-"` } -func (newState *GetRunRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunRequest) { -} - -func (newState *GetRunRequest) SyncEffectiveFieldsDuringRead(existingState GetRunRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4333,7 +4403,7 @@ func (o GetRunRequest) Type(ctx context.Context) attr.Type { type GetRunResponse struct { // Run metadata (name, start time, etc) and data (metrics, params, and // tags). - Run types.Object `tfsdk:"run" tf:"optional,object"` + Run types.Object `tfsdk:"run" tf:"object"` } func (newState *GetRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunResponse) { @@ -4342,6 +4412,12 @@ func (newState *GetRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Get func (newState *GetRunResponse) SyncEffectiveFieldsDuringRead(existingState GetRunResponse) { } +func (c GetRunResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Run{}.ToSchema(cs, append(path, "run")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4408,7 +4484,7 @@ type HttpUrlSpec struct { // by the wehbook. It should be of the form `" "`. // If set to an empty string, no authorization header will be included in // the request. - Authorization types.String `tfsdk:"authorization" tf:"optional"` + Authorization types.String `tfsdk:"authorization" tf:""` // Enable/disable SSL certificate validation. Default is true. For // self-signed certificates, this field must be false AND the destination // server must disable certificate validation as well. For security @@ -4416,11 +4492,11 @@ type HttpUrlSpec struct { // HMAC-encoded portion of the payload and acknowledge the risk associated // with disabling hostname validation whereby it becomes more likely that // requests can be maliciously routed to an unintended host. - EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:"optional"` + EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:""` // Shared secret required for HMAC encoding payload. The HMAC-encoded // payload will be sent in the header as: { "X-Databricks-Signature": // $encoded_payload }. - Secret types.String `tfsdk:"secret" tf:"optional"` + Secret types.String `tfsdk:"secret" tf:""` // External HTTPS URL called on event trigger (by using a POST request). Url types.String `tfsdk:"url" tf:""` } @@ -4431,6 +4507,12 @@ func (newState *HttpUrlSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan HttpUr func (newState *HttpUrlSpec) SyncEffectiveFieldsDuringRead(existingState HttpUrlSpec) { } +func (c HttpUrlSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in HttpUrlSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4476,9 +4558,9 @@ type HttpUrlSpecWithoutSecret struct { // HMAC-encoded portion of the payload and acknowledge the risk associated // with disabling hostname validation whereby it becomes more likely that // requests can be maliciously routed to an unintended host. - EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:"optional"` + EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:""` // External HTTPS URL called on event trigger (by using a POST request). - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *HttpUrlSpecWithoutSecret) SyncEffectiveFieldsDuringCreateOrUpdate(plan HttpUrlSpecWithoutSecret) { @@ -4487,6 +4569,11 @@ func (newState *HttpUrlSpecWithoutSecret) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *HttpUrlSpecWithoutSecret) SyncEffectiveFieldsDuringRead(existingState HttpUrlSpecWithoutSecret) { } +func (c HttpUrlSpecWithoutSecret) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in HttpUrlSpecWithoutSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4522,9 +4609,9 @@ func (o HttpUrlSpecWithoutSecret) Type(ctx context.Context) attr.Type { type InputTag struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *InputTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan InputTag) { @@ -4533,6 +4620,11 @@ func (newState *InputTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan InputTag) func (newState *InputTag) SyncEffectiveFieldsDuringRead(existingState InputTag) { } +func (c InputTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in InputTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4574,7 +4666,7 @@ type JobSpec struct { // URL of the workspace containing the job that this webhook runs. If not // specified, the job’s workspace URL is assumed to be the same as the // workspace where the webhook is created. - WorkspaceUrl types.String `tfsdk:"workspace_url" tf:"optional"` + WorkspaceUrl types.String `tfsdk:"workspace_url" tf:""` } func (newState *JobSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSpec) { @@ -4583,6 +4675,13 @@ func (newState *JobSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSpec) { func (newState *JobSpec) SyncEffectiveFieldsDuringRead(existingState JobSpec) { } +func (c JobSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_token")...) + cs.SetRequired(append(path, "job_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4620,11 +4719,11 @@ func (o JobSpec) Type(ctx context.Context) attr.Type { type JobSpecWithoutSecret struct { // ID of the job that the webhook runs. - JobId types.String `tfsdk:"job_id" tf:"optional"` + JobId types.String `tfsdk:"job_id" tf:""` // URL of the workspace containing the job that this webhook runs. Defaults // to the workspace URL in which the webhook is created. If not specified, // the job’s workspace is assumed to be the same as the webhook’s. - WorkspaceUrl types.String `tfsdk:"workspace_url" tf:"optional"` + WorkspaceUrl types.String `tfsdk:"workspace_url" tf:""` } func (newState *JobSpecWithoutSecret) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSpecWithoutSecret) { @@ -4633,6 +4732,11 @@ func (newState *JobSpecWithoutSecret) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *JobSpecWithoutSecret) SyncEffectiveFieldsDuringRead(existingState JobSpecWithoutSecret) { } +func (c JobSpecWithoutSecret) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSpecWithoutSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4685,12 +4789,6 @@ type ListArtifactsRequest struct { RunUuid types.String `tfsdk:"-"` } -func (newState *ListArtifactsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListArtifactsRequest) { -} - -func (newState *ListArtifactsRequest) SyncEffectiveFieldsDuringRead(existingState ListArtifactsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListArtifactsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4730,11 +4828,11 @@ func (o ListArtifactsRequest) Type(ctx context.Context) attr.Type { type ListArtifactsResponse struct { // File location and metadata for artifacts. - Files types.List `tfsdk:"files" tf:"optional"` + Files types.List `tfsdk:"files" tf:""` // Token that can be used to retrieve the next page of artifact results - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Root artifact directory for the run. - RootUri types.String `tfsdk:"root_uri" tf:"optional"` + RootUri types.String `tfsdk:"root_uri" tf:""` } func (newState *ListArtifactsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListArtifactsResponse) { @@ -4743,6 +4841,12 @@ func (newState *ListArtifactsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListArtifactsResponse) SyncEffectiveFieldsDuringRead(existingState ListArtifactsResponse) { } +func (c ListArtifactsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileInfo{}.ToSchema(cs, append(path, "files")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListArtifactsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4823,12 +4927,6 @@ type ListExperimentsRequest struct { ViewType types.String `tfsdk:"-"` } -func (newState *ListExperimentsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsRequest) { -} - -func (newState *ListExperimentsRequest) SyncEffectiveFieldsDuringRead(existingState ListExperimentsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExperimentsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4867,10 +4965,10 @@ func (o ListExperimentsRequest) Type(ctx context.Context) attr.Type { type ListExperimentsResponse struct { // Paginated Experiments beginning with the first item on the requested // page. - Experiments types.List `tfsdk:"experiments" tf:"optional"` + Experiments types.List `tfsdk:"experiments" tf:""` // Token that can be used to retrieve the next page of experiments. Empty // token means no more experiment is available for retrieval. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListExperimentsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsResponse) { @@ -4879,6 +4977,12 @@ func (newState *ListExperimentsResponse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ListExperimentsResponse) SyncEffectiveFieldsDuringRead(existingState ListExperimentsResponse) { } +func (c ListExperimentsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Experiment{}.ToSchema(cs, append(path, "experiments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExperimentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4950,12 +5054,6 @@ type ListModelsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListModelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelsRequest) { -} - -func (newState *ListModelsRequest) SyncEffectiveFieldsDuringRead(existingState ListModelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4991,9 +5089,9 @@ func (o ListModelsRequest) Type(ctx context.Context) attr.Type { type ListModelsResponse struct { // Pagination token to request next page of models for the same query. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - RegisteredModels types.List `tfsdk:"registered_models" tf:"optional"` + RegisteredModels types.List `tfsdk:"registered_models" tf:""` } func (newState *ListModelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelsResponse) { @@ -5002,6 +5100,12 @@ func (newState *ListModelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListModelsResponse) SyncEffectiveFieldsDuringRead(existingState ListModelsResponse) { } +func (c ListModelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Model{}.ToSchema(cs, append(path, "registered_models")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5067,9 +5171,9 @@ func (o *ListModelsResponse) SetRegisteredModels(ctx context.Context, v []Model) type ListRegistryWebhooks struct { // Token that can be used to retrieve the next page of artifact results - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Array of registry webhooks. - Webhooks types.List `tfsdk:"webhooks" tf:"optional"` + Webhooks types.List `tfsdk:"webhooks" tf:""` } func (newState *ListRegistryWebhooks) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRegistryWebhooks) { @@ -5078,6 +5182,12 @@ func (newState *ListRegistryWebhooks) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ListRegistryWebhooks) SyncEffectiveFieldsDuringRead(existingState ListRegistryWebhooks) { } +func (c ListRegistryWebhooks) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegistryWebhook{}.ToSchema(cs, append(path, "webhooks")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRegistryWebhooks. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5149,12 +5259,6 @@ type ListTransitionRequestsRequest struct { Version types.String `tfsdk:"-"` } -func (newState *ListTransitionRequestsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTransitionRequestsRequest) { -} - -func (newState *ListTransitionRequestsRequest) SyncEffectiveFieldsDuringRead(existingState ListTransitionRequestsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTransitionRequestsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5190,13 +5294,7 @@ func (o ListTransitionRequestsRequest) Type(ctx context.Context) attr.Type { type ListTransitionRequestsResponse struct { // Array of open transition requests. - Requests types.List `tfsdk:"requests" tf:"optional"` -} - -func (newState *ListTransitionRequestsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTransitionRequestsResponse) { -} - -func (newState *ListTransitionRequestsResponse) SyncEffectiveFieldsDuringRead(existingState ListTransitionRequestsResponse) { + Requests types.List `tfsdk:"requests" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTransitionRequestsResponse. @@ -5273,12 +5371,6 @@ type ListWebhooksRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListWebhooksRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWebhooksRequest) { -} - -func (newState *ListWebhooksRequest) SyncEffectiveFieldsDuringRead(existingState ListWebhooksRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWebhooksRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5347,15 +5439,15 @@ func (o *ListWebhooksRequest) SetEvents(ctx context.Context, v []types.String) { type LogBatch struct { // Metrics to log. A single request can contain up to 1000 metrics, and up // to 1000 metrics, params, and tags in total. - Metrics types.List `tfsdk:"metrics" tf:"optional"` + Metrics types.List `tfsdk:"metrics" tf:""` // Params to log. A single request can contain up to 100 params, and up to // 1000 metrics, params, and tags in total. - Params types.List `tfsdk:"params" tf:"optional"` + Params types.List `tfsdk:"params" tf:""` // ID of the run to log under - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // Tags to log. A single request can contain up to 100 tags, and up to 1000 // metrics, params, and tags in total. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *LogBatch) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogBatch) { @@ -5364,6 +5456,14 @@ func (newState *LogBatch) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogBatch) func (newState *LogBatch) SyncEffectiveFieldsDuringRead(existingState LogBatch) { } +func (c LogBatch) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Metric{}.ToSchema(cs, append(path, "metrics")...) + Param{}.ToSchema(cs, append(path, "params")...) + RunTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogBatch. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5498,6 +5598,11 @@ func (newState *LogBatchResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan L func (newState *LogBatchResponse) SyncEffectiveFieldsDuringRead(existingState LogBatchResponse) { } +func (c LogBatchResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogBatchResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5527,9 +5632,9 @@ func (o LogBatchResponse) Type(ctx context.Context) attr.Type { type LogInputs struct { // Dataset inputs - Datasets types.List `tfsdk:"datasets" tf:"optional"` + Datasets types.List `tfsdk:"datasets" tf:""` // ID of the run to log under - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` } func (newState *LogInputs) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogInputs) { @@ -5538,6 +5643,12 @@ func (newState *LogInputs) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogInput func (newState *LogInputs) SyncEffectiveFieldsDuringRead(existingState LogInputs) { } +func (c LogInputs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DatasetInput{}.ToSchema(cs, append(path, "datasets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogInputs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5607,7 +5718,12 @@ type LogInputsResponse struct { func (newState *LogInputsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogInputsResponse) { } -func (newState *LogInputsResponse) SyncEffectiveFieldsDuringRead(existingState LogInputsResponse) { +func (newState *LogInputsResponse) SyncEffectiveFieldsDuringRead(existingState LogInputsResponse) { +} + +func (c LogInputsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogInputsResponse. @@ -5641,12 +5757,12 @@ type LogMetric struct { // Name of the metric. Key types.String `tfsdk:"key" tf:""` // ID of the run under which to log the metric. Must be provided. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] ID of the run under which to log the // metric. This field will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // Step at which to log the metric - Step types.Int64 `tfsdk:"step" tf:"optional"` + Step types.Int64 `tfsdk:"step" tf:""` // Unix timestamp in milliseconds at the time metric was logged. Timestamp types.Int64 `tfsdk:"timestamp" tf:""` // Double value of the metric being logged. @@ -5659,6 +5775,14 @@ func (newState *LogMetric) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogMetri func (newState *LogMetric) SyncEffectiveFieldsDuringRead(existingState LogMetric) { } +func (c LogMetric) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "timestamp")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogMetric. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5709,6 +5833,11 @@ func (newState *LogMetricResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *LogMetricResponse) SyncEffectiveFieldsDuringRead(existingState LogMetricResponse) { } +func (c LogMetricResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogMetricResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5738,9 +5867,9 @@ func (o LogMetricResponse) Type(ctx context.Context) attr.Type { type LogModel struct { // MLmodel file in json format. - ModelJson types.String `tfsdk:"model_json" tf:"optional"` + ModelJson types.String `tfsdk:"model_json" tf:""` // ID of the run to log under - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` } func (newState *LogModel) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogModel) { @@ -5749,6 +5878,11 @@ func (newState *LogModel) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogModel) func (newState *LogModel) SyncEffectiveFieldsDuringRead(existingState LogModel) { } +func (c LogModel) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogModel. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5791,6 +5925,11 @@ func (newState *LogModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan L func (newState *LogModelResponse) SyncEffectiveFieldsDuringRead(existingState LogModelResponse) { } +func (c LogModelResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5822,10 +5961,10 @@ type LogParam struct { // Name of the param. Maximum size is 255 bytes. Key types.String `tfsdk:"key" tf:""` // ID of the run under which to log the param. Must be provided. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] ID of the run under which to log the // param. This field will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // String value of the param being logged. Maximum size is 500 bytes. Value types.String `tfsdk:"value" tf:""` } @@ -5836,6 +5975,13 @@ func (newState *LogParam) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogParam) func (newState *LogParam) SyncEffectiveFieldsDuringRead(existingState LogParam) { } +func (c LogParam) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogParam. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5882,6 +6028,11 @@ func (newState *LogParamResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan L func (newState *LogParamResponse) SyncEffectiveFieldsDuringRead(existingState LogParamResponse) { } +func (c LogParamResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogParamResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5911,13 +6062,13 @@ func (o LogParamResponse) Type(ctx context.Context) attr.Type { type Metric struct { // Key identifying this metric. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Step at which to log the metric. - Step types.Int64 `tfsdk:"step" tf:"optional"` + Step types.Int64 `tfsdk:"step" tf:""` // The timestamp at which this metric was recorded. - Timestamp types.Int64 `tfsdk:"timestamp" tf:"optional"` + Timestamp types.Int64 `tfsdk:"timestamp" tf:""` // Value associated with this metric. - Value types.Float64 `tfsdk:"value" tf:"optional"` + Value types.Float64 `tfsdk:"value" tf:""` } func (newState *Metric) SyncEffectiveFieldsDuringCreateOrUpdate(plan Metric) { @@ -5926,6 +6077,11 @@ func (newState *Metric) SyncEffectiveFieldsDuringCreateOrUpdate(plan Metric) { func (newState *Metric) SyncEffectiveFieldsDuringRead(existingState Metric) { } +func (c Metric) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Metric. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5965,21 +6121,21 @@ func (o Metric) Type(ctx context.Context) attr.Type { type Model struct { // Timestamp recorded when this `registered_model` was created. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Description of this `registered_model`. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Timestamp recorded when metadata for this `registered_model` was last // updated. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Collection of latest model versions for each stage. Only contains models // with current `READY` status. - LatestVersions types.List `tfsdk:"latest_versions" tf:"optional"` + LatestVersions types.List `tfsdk:"latest_versions" tf:""` // Unique name for the model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Tags: Additional metadata key-value pairs for this `registered_model`. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // User that created this `registered_model` - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *Model) SyncEffectiveFieldsDuringCreateOrUpdate(plan Model) { @@ -5988,6 +6144,13 @@ func (newState *Model) SyncEffectiveFieldsDuringCreateOrUpdate(plan Model) { func (newState *Model) SyncEffectiveFieldsDuringRead(existingState Model) { } +func (c Model) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion{}.ToSchema(cs, append(path, "latest_versions")...) + ModelTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Model. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6092,24 +6255,24 @@ func (o *Model) SetTags(ctx context.Context, v []ModelTag) { type ModelDatabricks struct { // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // User-specified description for the object. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Unique identifier for the object. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Array of model versions, each the latest version for its stage. - LatestVersions types.List `tfsdk:"latest_versions" tf:"optional"` + LatestVersions types.List `tfsdk:"latest_versions" tf:""` // Name of the model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Permission level of the requesting user on the object. For what is // allowed at each level, see [MLflow Model permissions](..). - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // Array of tags associated with the model. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *ModelDatabricks) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelDatabricks) { @@ -6118,6 +6281,13 @@ func (newState *ModelDatabricks) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mo func (newState *ModelDatabricks) SyncEffectiveFieldsDuringRead(existingState ModelDatabricks) { } +func (c ModelDatabricks) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion{}.ToSchema(cs, append(path, "latest_versions")...) + ModelTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelDatabricks. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6226,9 +6396,9 @@ func (o *ModelDatabricks) SetTags(ctx context.Context, v []ModelTag) { type ModelTag struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *ModelTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelTag) { @@ -6237,6 +6407,11 @@ func (newState *ModelTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelTag) func (newState *ModelTag) SyncEffectiveFieldsDuringRead(existingState ModelTag) { } +func (c ModelTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6272,34 +6447,34 @@ func (o ModelTag) Type(ctx context.Context) attr.Type { type ModelVersion struct { // Timestamp recorded when this `model_version` was created. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Current stage for this `model_version`. - CurrentStage types.String `tfsdk:"current_stage" tf:"optional"` + CurrentStage types.String `tfsdk:"current_stage" tf:""` // Description of this `model_version`. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Timestamp recorded when metadata for this `model_version` was last // updated. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Unique name of the model - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // MLflow run ID used when creating `model_version`, if `source` was // generated by an experiment run stored in MLflow tracking server. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // Run Link: Direct link to the run that generated this version - RunLink types.String `tfsdk:"run_link" tf:"optional"` + RunLink types.String `tfsdk:"run_link" tf:""` // URI indicating the location of the source model artifacts, used when // creating `model_version` - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // Current status of `model_version` - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // Details on current `status`, if it is pending or failed. - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` // Tags: Additional metadata key-value pairs for this `model_version`. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // User that created this `model_version`. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` // Model's version number. - Version types.String `tfsdk:"version" tf:"optional"` + Version types.String `tfsdk:"version" tf:""` } func (newState *ModelVersion) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersion) { @@ -6308,6 +6483,12 @@ func (newState *ModelVersion) SyncEffectiveFieldsDuringCreateOrUpdate(plan Model func (newState *ModelVersion) SyncEffectiveFieldsDuringRead(existingState ModelVersion) { } +func (c ModelVersion) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersionTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersion. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6395,7 +6576,7 @@ func (o *ModelVersion) SetTags(ctx context.Context, v []ModelVersionTag) { type ModelVersionDatabricks struct { // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Stage of the model version. Valid values are: // // * `None`: The initial stage of a model version. @@ -6405,26 +6586,26 @@ type ModelVersionDatabricks struct { // * `Production`: Production stage. // // * `Archived`: Archived stage. - CurrentStage types.String `tfsdk:"current_stage" tf:"optional"` + CurrentStage types.String `tfsdk:"current_stage" tf:""` // User-specified description for the object. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Name of the model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Permission level of the requesting user on the object. For what is // allowed at each level, see [MLflow Model permissions](..). - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // Unique identifier for the MLflow tracking run associated with the source // model artifacts. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // URL of the run associated with the model artifacts. This field is set at // model version creation time only for model versions whose source run is // from a tracking server that is different from the registry server. - RunLink types.String `tfsdk:"run_link" tf:"optional"` + RunLink types.String `tfsdk:"run_link" tf:""` // URI that indicates the location of the source model artifacts. This is // used when creating the model version. - Source types.String `tfsdk:"source" tf:"optional"` + Source types.String `tfsdk:"source" tf:""` // The status of the model version. Valid values are: * // `PENDING_REGISTRATION`: Request to register a new model version is // pending as server performs background tasks. @@ -6433,15 +6614,15 @@ type ModelVersionDatabricks struct { // failed. // // * `READY`: Model version is ready for use. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // Details on the current status, for example why registration failed. - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` // Array of tags that are associated with the model version. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` // Version of the model. - Version types.String `tfsdk:"version" tf:"optional"` + Version types.String `tfsdk:"version" tf:""` } func (newState *ModelVersionDatabricks) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersionDatabricks) { @@ -6450,6 +6631,12 @@ func (newState *ModelVersionDatabricks) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ModelVersionDatabricks) SyncEffectiveFieldsDuringRead(existingState ModelVersionDatabricks) { } +func (c ModelVersionDatabricks) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersionTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersionDatabricks. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6539,9 +6726,9 @@ func (o *ModelVersionDatabricks) SetTags(ctx context.Context, v []ModelVersionTa type ModelVersionTag struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *ModelVersionTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersionTag) { @@ -6550,6 +6737,11 @@ func (newState *ModelVersionTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mo func (newState *ModelVersionTag) SyncEffectiveFieldsDuringRead(existingState ModelVersionTag) { } +func (c ModelVersionTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersionTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6585,9 +6777,9 @@ func (o ModelVersionTag) Type(ctx context.Context) attr.Type { type Param struct { // Key identifying this param. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Value associated with this param. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *Param) SyncEffectiveFieldsDuringCreateOrUpdate(plan Param) { @@ -6596,6 +6788,11 @@ func (newState *Param) SyncEffectiveFieldsDuringCreateOrUpdate(plan Param) { func (newState *Param) SyncEffectiveFieldsDuringRead(existingState Param) { } +func (c Param) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Param. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6631,13 +6828,13 @@ func (o Param) Type(ctx context.Context) attr.Type { type RegisteredModelAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *RegisteredModelAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelAccessControlRequest) { @@ -6646,6 +6843,11 @@ func (newState *RegisteredModelAccessControlRequest) SyncEffectiveFieldsDuringCr func (newState *RegisteredModelAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState RegisteredModelAccessControlRequest) { } +func (c RegisteredModelAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6685,15 +6887,15 @@ func (o RegisteredModelAccessControlRequest) Type(ctx context.Context) attr.Type type RegisteredModelAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *RegisteredModelAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelAccessControlResponse) { @@ -6702,6 +6904,12 @@ func (newState *RegisteredModelAccessControlResponse) SyncEffectiveFieldsDuringC func (newState *RegisteredModelAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState RegisteredModelAccessControlResponse) { } +func (c RegisteredModelAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6772,11 +6980,11 @@ func (o *RegisteredModelAccessControlResponse) SetAllPermissions(ctx context.Con } type RegisteredModelPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *RegisteredModelPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermission) { @@ -6785,6 +6993,11 @@ func (newState *RegisteredModelPermission) SyncEffectiveFieldsDuringCreateOrUpda func (newState *RegisteredModelPermission) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermission) { } +func (c RegisteredModelPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6851,11 +7064,11 @@ func (o *RegisteredModelPermission) SetInheritedFromObject(ctx context.Context, } type RegisteredModelPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *RegisteredModelPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermissions) { @@ -6864,6 +7077,12 @@ func (newState *RegisteredModelPermissions) SyncEffectiveFieldsDuringCreateOrUpd func (newState *RegisteredModelPermissions) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissions) { } +func (c RegisteredModelPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6930,9 +7149,9 @@ func (o *RegisteredModelPermissions) SetAccessControlList(ctx context.Context, v } type RegisteredModelPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *RegisteredModelPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermissionsDescription) { @@ -6941,6 +7160,11 @@ func (newState *RegisteredModelPermissionsDescription) SyncEffectiveFieldsDuring func (newState *RegisteredModelPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissionsDescription) { } +func (c RegisteredModelPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6975,7 +7199,7 @@ func (o RegisteredModelPermissionsDescription) Type(ctx context.Context) attr.Ty } type RegisteredModelPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The registered model for which to get or manage permissions. RegisteredModelId types.String `tfsdk:"-"` } @@ -6986,6 +7210,13 @@ func (newState *RegisteredModelPermissionsRequest) SyncEffectiveFieldsDuringCrea func (newState *RegisteredModelPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissionsRequest) { } +func (c RegisteredModelPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RegisteredModelAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "registered_model_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7051,9 +7282,9 @@ func (o *RegisteredModelPermissionsRequest) SetAccessControlList(ctx context.Con type RegistryWebhook struct { // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // User-specified description for the webhook. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A // new model version was created for the associated model. // @@ -7087,17 +7318,17 @@ type RegistryWebhook struct { // // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model // version be archived. - Events types.List `tfsdk:"events" tf:"optional"` + Events types.List `tfsdk:"events" tf:""` - HttpUrlSpec types.Object `tfsdk:"http_url_spec" tf:"optional,object"` + HttpUrlSpec types.Object `tfsdk:"http_url_spec" tf:"object"` // Webhook ID - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - JobSpec types.Object `tfsdk:"job_spec" tf:"optional,object"` + JobSpec types.Object `tfsdk:"job_spec" tf:"object"` // Time of the object at last update, as a Unix timestamp in milliseconds. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // Name of the model whose events would trigger this webhook. - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // Enable or disable triggering the webhook, or put the webhook into test // mode. The default is `ACTIVE`: * `ACTIVE`: Webhook is triggered when an // associated event happens. @@ -7106,7 +7337,7 @@ type RegistryWebhook struct { // // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is // not triggered on a real event. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *RegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegistryWebhook) { @@ -7115,6 +7346,13 @@ func (newState *RegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(plan Re func (newState *RegistryWebhook) SyncEffectiveFieldsDuringRead(existingState RegistryWebhook) { } +func (c RegistryWebhook) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + HttpUrlSpecWithoutSecret{}.ToSchema(cs, append(path, "http_url_spec")...) + JobSpecWithoutSecret{}.ToSchema(cs, append(path, "job_spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegistryWebhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7252,7 +7490,7 @@ func (o *RegistryWebhook) SetJobSpec(ctx context.Context, v JobSpecWithoutSecret type RejectTransitionRequest struct { // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the model. Name types.String `tfsdk:"name" tf:""` // Target stage of the transition. Valid values are: @@ -7275,6 +7513,14 @@ func (newState *RejectTransitionRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *RejectTransitionRequest) SyncEffectiveFieldsDuringRead(existingState RejectTransitionRequest) { } +func (c RejectTransitionRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "stage")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RejectTransitionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7314,13 +7560,7 @@ func (o RejectTransitionRequest) Type(ctx context.Context) attr.Type { type RejectTransitionRequestResponse struct { // Activity recorded for the action. - Activity types.Object `tfsdk:"activity" tf:"optional,object"` -} - -func (newState *RejectTransitionRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RejectTransitionRequestResponse) { -} - -func (newState *RejectTransitionRequestResponse) SyncEffectiveFieldsDuringRead(existingState RejectTransitionRequestResponse) { + Activity types.Object `tfsdk:"activity" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in RejectTransitionRequestResponse. @@ -7388,7 +7628,7 @@ type RenameModelRequest struct { // Registered model unique name identifier. Name types.String `tfsdk:"name" tf:""` // If provided, updates the name for this `registered_model`. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` } func (newState *RenameModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RenameModelRequest) { @@ -7397,6 +7637,12 @@ func (newState *RenameModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RenameModelRequest) SyncEffectiveFieldsDuringRead(existingState RenameModelRequest) { } +func (c RenameModelRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RenameModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7431,7 +7677,7 @@ func (o RenameModelRequest) Type(ctx context.Context) attr.Type { } type RenameModelResponse struct { - RegisteredModel types.Object `tfsdk:"registered_model" tf:"optional,object"` + RegisteredModel types.Object `tfsdk:"registered_model" tf:"object"` } func (newState *RenameModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RenameModelResponse) { @@ -7440,6 +7686,12 @@ func (newState *RenameModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *RenameModelResponse) SyncEffectiveFieldsDuringRead(existingState RenameModelResponse) { } +func (c RenameModelResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Model{}.ToSchema(cs, append(path, "registered_model")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RenameModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7512,6 +7764,12 @@ func (newState *RestoreExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RestoreExperiment) SyncEffectiveFieldsDuringRead(existingState RestoreExperiment) { } +func (c RestoreExperiment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreExperiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7552,6 +7810,11 @@ func (newState *RestoreExperimentResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *RestoreExperimentResponse) SyncEffectiveFieldsDuringRead(existingState RestoreExperimentResponse) { } +func (c RestoreExperimentResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7590,6 +7853,12 @@ func (newState *RestoreRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan Restore func (newState *RestoreRun) SyncEffectiveFieldsDuringRead(existingState RestoreRun) { } +func (c RestoreRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "run_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7630,6 +7899,11 @@ func (newState *RestoreRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RestoreRunResponse) SyncEffectiveFieldsDuringRead(existingState RestoreRunResponse) { } +func (c RestoreRunResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7662,7 +7936,7 @@ type RestoreRuns struct { ExperimentId types.String `tfsdk:"experiment_id" tf:""` // An optional positive integer indicating the maximum number of runs to // restore. The maximum allowed value for max_runs is 10000. - MaxRuns types.Int64 `tfsdk:"max_runs" tf:"optional"` + MaxRuns types.Int64 `tfsdk:"max_runs" tf:""` // The minimum deletion timestamp in milliseconds since the UNIX epoch for // restoring runs. Only runs deleted no earlier than this timestamp are // restored. @@ -7675,6 +7949,13 @@ func (newState *RestoreRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan Restor func (newState *RestoreRuns) SyncEffectiveFieldsDuringRead(existingState RestoreRuns) { } +func (c RestoreRuns) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + cs.SetRequired(append(path, "min_timestamp_millis")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRuns. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7712,7 +7993,7 @@ func (o RestoreRuns) Type(ctx context.Context) attr.Type { type RestoreRunsResponse struct { // The number of runs restored. - RunsRestored types.Int64 `tfsdk:"runs_restored" tf:"optional"` + RunsRestored types.Int64 `tfsdk:"runs_restored" tf:""` } func (newState *RestoreRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRunsResponse) { @@ -7721,6 +8002,11 @@ func (newState *RestoreRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *RestoreRunsResponse) SyncEffectiveFieldsDuringRead(existingState RestoreRunsResponse) { } +func (c RestoreRunsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7754,11 +8040,11 @@ func (o RestoreRunsResponse) Type(ctx context.Context) attr.Type { type Run struct { // Run data. - Data types.Object `tfsdk:"data" tf:"optional,object"` + Data types.Object `tfsdk:"data" tf:"object"` // Run metadata. - Info types.Object `tfsdk:"info" tf:"optional,object"` + Info types.Object `tfsdk:"info" tf:"object"` // Run inputs. - Inputs types.Object `tfsdk:"inputs" tf:"optional,object"` + Inputs types.Object `tfsdk:"inputs" tf:"object"` } func (newState *Run) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run) { @@ -7767,6 +8053,14 @@ func (newState *Run) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run) { func (newState *Run) SyncEffectiveFieldsDuringRead(existingState Run) { } +func (c Run) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RunData{}.ToSchema(cs, append(path, "data")...) + RunInfo{}.ToSchema(cs, append(path, "info")...) + RunInputs{}.ToSchema(cs, append(path, "inputs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Run. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7892,11 +8186,11 @@ func (o *Run) SetInputs(ctx context.Context, v RunInputs) { type RunData struct { // Run metrics. - Metrics types.List `tfsdk:"metrics" tf:"optional"` + Metrics types.List `tfsdk:"metrics" tf:""` // Run parameters. - Params types.List `tfsdk:"params" tf:"optional"` + Params types.List `tfsdk:"params" tf:""` // Additional metadata key-value pairs. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *RunData) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunData) { @@ -7905,6 +8199,14 @@ func (newState *RunData) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunData) { func (newState *RunData) SyncEffectiveFieldsDuringRead(existingState RunData) { } +func (c RunData) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Metric{}.ToSchema(cs, append(path, "metrics")...) + Param{}.ToSchema(cs, append(path, "params")...) + RunTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunData. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8033,26 +8335,26 @@ type RunInfo struct { // local path (starting with "/"), or a distributed file system (DFS) path, // like `s3://bucket/directory` or `dbfs:/my/directory`. If not set, the // local `./mlruns` directory is chosen. - ArtifactUri types.String `tfsdk:"artifact_uri" tf:"optional"` + ArtifactUri types.String `tfsdk:"artifact_uri" tf:""` // Unix timestamp of when the run ended in milliseconds. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // The experiment ID. - ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + ExperimentId types.String `tfsdk:"experiment_id" tf:""` // Current life cycle stage of the experiment : OneOf("active", "deleted") - LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:"optional"` + LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:""` // Unique identifier for the run. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] Unique identifier for the run. This // field will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // Unix timestamp of when the run started in milliseconds. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // Current status of the run. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // User who initiated the run. This field is deprecated as of MLflow 1.0, // and will be removed in a future MLflow release. Use 'mlflow.user' tag // instead. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *RunInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunInfo) { @@ -8061,6 +8363,11 @@ func (newState *RunInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunInfo) { func (newState *RunInfo) SyncEffectiveFieldsDuringRead(existingState RunInfo) { } +func (c RunInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8110,7 +8417,7 @@ func (o RunInfo) Type(ctx context.Context) attr.Type { type RunInputs struct { // Run metrics. - DatasetInputs types.List `tfsdk:"dataset_inputs" tf:"optional"` + DatasetInputs types.List `tfsdk:"dataset_inputs" tf:""` } func (newState *RunInputs) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunInputs) { @@ -8119,6 +8426,12 @@ func (newState *RunInputs) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunInput func (newState *RunInputs) SyncEffectiveFieldsDuringRead(existingState RunInputs) { } +func (c RunInputs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DatasetInput{}.ToSchema(cs, append(path, "dataset_inputs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunInputs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8182,9 +8495,9 @@ func (o *RunInputs) SetDatasetInputs(ctx context.Context, v []DatasetInput) { type RunTag struct { // The tag key. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The tag value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *RunTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTag) { @@ -8193,6 +8506,11 @@ func (newState *RunTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTag) { func (newState *RunTag) SyncEffectiveFieldsDuringRead(existingState RunTag) { } +func (c RunTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RunTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8229,19 +8547,19 @@ func (o RunTag) Type(ctx context.Context) attr.Type { type SearchExperiments struct { // String representing a SQL filter condition (e.g. "name ILIKE // 'my-experiment%'") - Filter types.String `tfsdk:"filter" tf:"optional"` + Filter types.String `tfsdk:"filter" tf:""` // Maximum number of experiments desired. Max threshold is 3000. - MaxResults types.Int64 `tfsdk:"max_results" tf:"optional"` + MaxResults types.Int64 `tfsdk:"max_results" tf:""` // List of columns for ordering search results, which can include experiment // name and last updated timestamp with an optional "DESC" or "ASC" // annotation, where "ASC" is the default. Tiebreaks are done by experiment // id DESC. - OrderBy types.List `tfsdk:"order_by" tf:"optional"` + OrderBy types.List `tfsdk:"order_by" tf:""` // Token indicating the page of experiments to fetch - PageToken types.String `tfsdk:"page_token" tf:"optional"` + PageToken types.String `tfsdk:"page_token" tf:""` // Qualifier for type of experiments to be returned. If unspecified, return // only active experiments. - ViewType types.String `tfsdk:"view_type" tf:"optional"` + ViewType types.String `tfsdk:"view_type" tf:""` } func (newState *SearchExperiments) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchExperiments) { @@ -8250,6 +8568,11 @@ func (newState *SearchExperiments) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SearchExperiments) SyncEffectiveFieldsDuringRead(existingState SearchExperiments) { } +func (c SearchExperiments) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchExperiments. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8321,10 +8644,10 @@ func (o *SearchExperiments) SetOrderBy(ctx context.Context, v []types.String) { type SearchExperimentsResponse struct { // Experiments that match the search criteria - Experiments types.List `tfsdk:"experiments" tf:"optional"` + Experiments types.List `tfsdk:"experiments" tf:""` // Token that can be used to retrieve the next page of experiments. An empty // token means that no more experiments are available for retrieval. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *SearchExperimentsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchExperimentsResponse) { @@ -8333,6 +8656,12 @@ func (newState *SearchExperimentsResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *SearchExperimentsResponse) SyncEffectiveFieldsDuringRead(existingState SearchExperimentsResponse) { } +func (c SearchExperimentsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Experiment{}.ToSchema(cs, append(path, "experiments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchExperimentsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8412,12 +8741,6 @@ type SearchModelVersionsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *SearchModelVersionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelVersionsRequest) { -} - -func (newState *SearchModelVersionsRequest) SyncEffectiveFieldsDuringRead(existingState SearchModelVersionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelVersionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8487,10 +8810,10 @@ func (o *SearchModelVersionsRequest) SetOrderBy(ctx context.Context, v []types.S type SearchModelVersionsResponse struct { // Models that match the search criteria - ModelVersions types.List `tfsdk:"model_versions" tf:"optional"` + ModelVersions types.List `tfsdk:"model_versions" tf:""` // Pagination token to request next page of models for the same search // query. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *SearchModelVersionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelVersionsResponse) { @@ -8499,6 +8822,12 @@ func (newState *SearchModelVersionsResponse) SyncEffectiveFieldsDuringCreateOrUp func (newState *SearchModelVersionsResponse) SyncEffectiveFieldsDuringRead(existingState SearchModelVersionsResponse) { } +func (c SearchModelVersionsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ModelVersion{}.ToSchema(cs, append(path, "model_versions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelVersionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8578,12 +8907,6 @@ type SearchModelsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *SearchModelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelsRequest) { -} - -func (newState *SearchModelsRequest) SyncEffectiveFieldsDuringRead(existingState SearchModelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8653,9 +8976,9 @@ func (o *SearchModelsRequest) SetOrderBy(ctx context.Context, v []types.String) type SearchModelsResponse struct { // Pagination token to request the next page of models. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Registered Models that match the search criteria. - RegisteredModels types.List `tfsdk:"registered_models" tf:"optional"` + RegisteredModels types.List `tfsdk:"registered_models" tf:""` } func (newState *SearchModelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelsResponse) { @@ -8664,6 +8987,12 @@ func (newState *SearchModelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SearchModelsResponse) SyncEffectiveFieldsDuringRead(existingState SearchModelsResponse) { } +func (c SearchModelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Model{}.ToSchema(cs, append(path, "registered_models")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8729,7 +9058,7 @@ func (o *SearchModelsResponse) SetRegisteredModels(ctx context.Context, v []Mode type SearchRuns struct { // List of experiment IDs to search over. - ExperimentIds types.List `tfsdk:"experiment_ids" tf:"optional"` + ExperimentIds types.List `tfsdk:"experiment_ids" tf:""` // A filter expression over params, metrics, and tags, that allows returning // a subset of runs. The syntax is a subset of SQL that supports ANDing // together binary operations between a param, metric, or tag and a @@ -8742,21 +9071,21 @@ type SearchRuns struct { // and tags."user-name" = 'Tomas'` // // Supported operators are `=`, `!=`, `>`, `>=`, `<`, and `<=`. - Filter types.String `tfsdk:"filter" tf:"optional"` + Filter types.String `tfsdk:"filter" tf:""` // Maximum number of runs desired. Max threshold is 50000 - MaxResults types.Int64 `tfsdk:"max_results" tf:"optional"` + MaxResults types.Int64 `tfsdk:"max_results" tf:""` // List of columns to be ordered by, including attributes, params, metrics, // and tags with an optional "DESC" or "ASC" annotation, where "ASC" is the // default. Example: ["params.input DESC", "metrics.alpha ASC", // "metrics.rmse"] Tiebreaks are done by start_time DESC followed by run_id // for runs with the same start time (and this is the default ordering // criterion if order_by is not provided). - OrderBy types.List `tfsdk:"order_by" tf:"optional"` + OrderBy types.List `tfsdk:"order_by" tf:""` // Token for the current page of runs. - PageToken types.String `tfsdk:"page_token" tf:"optional"` + PageToken types.String `tfsdk:"page_token" tf:""` // Whether to display only active, only deleted, or all runs. Defaults to // only active runs. - RunViewType types.String `tfsdk:"run_view_type" tf:"optional"` + RunViewType types.String `tfsdk:"run_view_type" tf:""` } func (newState *SearchRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchRuns) { @@ -8765,6 +9094,11 @@ func (newState *SearchRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchR func (newState *SearchRuns) SyncEffectiveFieldsDuringRead(existingState SearchRuns) { } +func (c SearchRuns) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchRuns. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8867,9 +9201,9 @@ func (o *SearchRuns) SetOrderBy(ctx context.Context, v []types.String) { type SearchRunsResponse struct { // Token for the next page of runs. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Runs that match the search criteria. - Runs types.List `tfsdk:"runs" tf:"optional"` + Runs types.List `tfsdk:"runs" tf:""` } func (newState *SearchRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchRunsResponse) { @@ -8878,6 +9212,12 @@ func (newState *SearchRunsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SearchRunsResponse) SyncEffectiveFieldsDuringRead(existingState SearchRunsResponse) { } +func (c SearchRunsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Run{}.ToSchema(cs, append(path, "runs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchRunsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8959,6 +9299,14 @@ func (newState *SetExperimentTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *SetExperimentTag) SyncEffectiveFieldsDuringRead(existingState SetExperimentTag) { } +func (c SetExperimentTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetExperimentTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9003,6 +9351,11 @@ func (newState *SetExperimentTagResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *SetExperimentTagResponse) SyncEffectiveFieldsDuringRead(existingState SetExperimentTagResponse) { } +func (c SetExperimentTagResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetExperimentTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9050,6 +9403,14 @@ func (newState *SetModelTagRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SetModelTagRequest) SyncEffectiveFieldsDuringRead(existingState SetModelTagRequest) { } +func (c SetModelTagRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelTagRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9094,6 +9455,11 @@ func (newState *SetModelTagResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *SetModelTagResponse) SyncEffectiveFieldsDuringRead(existingState SetModelTagResponse) { } +func (c SetModelTagResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9143,6 +9509,15 @@ func (newState *SetModelVersionTagRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *SetModelVersionTagRequest) SyncEffectiveFieldsDuringRead(existingState SetModelVersionTagRequest) { } +func (c SetModelVersionTagRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "value")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelVersionTagRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9189,6 +9564,11 @@ func (newState *SetModelVersionTagResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *SetModelVersionTagResponse) SyncEffectiveFieldsDuringRead(existingState SetModelVersionTagResponse) { } +func (c SetModelVersionTagResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelVersionTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9221,10 +9601,10 @@ type SetTag struct { // backends are guaranteed to support key values up to 250 bytes in size. Key types.String `tfsdk:"key" tf:""` // ID of the run under which to log the tag. Must be provided. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] ID of the run under which to log the // tag. This field will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // String value of the tag being logged. Maximum size depends on storage // backend. All storage backends are guaranteed to support key values up to // 5000 bytes in size. @@ -9237,6 +9617,13 @@ func (newState *SetTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetTag) { func (newState *SetTag) SyncEffectiveFieldsDuringRead(existingState SetTag) { } +func (c SetTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9283,6 +9670,11 @@ func (newState *SetTagResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Set func (newState *SetTagResponse) SyncEffectiveFieldsDuringRead(existingState SetTagResponse) { } +func (c SetTagResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetTagResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9313,9 +9705,9 @@ func (o SetTagResponse) Type(ctx context.Context) attr.Type { // Test webhook response object. type TestRegistryWebhook struct { // Body of the response from the webhook URL - Body types.String `tfsdk:"body" tf:"optional"` + Body types.String `tfsdk:"body" tf:""` // Status code returned by the webhook URL - StatusCode types.Int64 `tfsdk:"status_code" tf:"optional"` + StatusCode types.Int64 `tfsdk:"status_code" tf:""` } func (newState *TestRegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhook) { @@ -9324,6 +9716,11 @@ func (newState *TestRegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *TestRegistryWebhook) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhook) { } +func (c TestRegistryWebhook) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TestRegistryWebhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9361,7 +9758,7 @@ type TestRegistryWebhookRequest struct { // If `event` is specified, the test trigger uses the specified event. If // `event` is not specified, the test trigger uses a randomly chosen event // associated with the webhook. - Event types.String `tfsdk:"event" tf:"optional"` + Event types.String `tfsdk:"event" tf:""` // Webhook ID Id types.String `tfsdk:"id" tf:""` } @@ -9372,6 +9769,12 @@ func (newState *TestRegistryWebhookRequest) SyncEffectiveFieldsDuringCreateOrUpd func (newState *TestRegistryWebhookRequest) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhookRequest) { } +func (c TestRegistryWebhookRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TestRegistryWebhookRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9407,13 +9810,7 @@ func (o TestRegistryWebhookRequest) Type(ctx context.Context) attr.Type { type TestRegistryWebhookResponse struct { // Test webhook response object. - Webhook types.Object `tfsdk:"webhook" tf:"optional,object"` -} - -func (newState *TestRegistryWebhookResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhookResponse) { -} - -func (newState *TestRegistryWebhookResponse) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhookResponse) { + Webhook types.Object `tfsdk:"webhook" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in TestRegistryWebhookResponse. @@ -9482,7 +9879,7 @@ type TransitionModelVersionStageDatabricks struct { // stage. ArchiveExistingVersions types.Bool `tfsdk:"archive_existing_versions" tf:""` // User-provided comment on the action. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the model. Name types.String `tfsdk:"name" tf:""` // Target stage of the transition. Valid values are: @@ -9505,6 +9902,15 @@ func (newState *TransitionModelVersionStageDatabricks) SyncEffectiveFieldsDuring func (newState *TransitionModelVersionStageDatabricks) SyncEffectiveFieldsDuringRead(existingState TransitionModelVersionStageDatabricks) { } +func (c TransitionModelVersionStageDatabricks) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "archive_existing_versions")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "stage")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransitionModelVersionStageDatabricks. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9547,11 +9953,11 @@ func (o TransitionModelVersionStageDatabricks) Type(ctx context.Context) attr.Ty // Transition request details. type TransitionRequest struct { // Array of actions on the activity allowed for the current viewer. - AvailableActions types.List `tfsdk:"available_actions" tf:"optional"` + AvailableActions types.List `tfsdk:"available_actions" tf:""` // User-provided comment associated with the transition request. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Creation time of the object, as a Unix timestamp in milliseconds. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Target stage of the transition (if the activity is stage transition // related). Valid values are: // @@ -9562,9 +9968,9 @@ type TransitionRequest struct { // * `Production`: Production stage. // // * `Archived`: Archived stage. - ToStage types.String `tfsdk:"to_stage" tf:"optional"` + ToStage types.String `tfsdk:"to_stage" tf:""` // The username of the user that created the object. - UserId types.String `tfsdk:"user_id" tf:"optional"` + UserId types.String `tfsdk:"user_id" tf:""` } func (newState *TransitionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionRequest) { @@ -9573,6 +9979,11 @@ func (newState *TransitionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *TransitionRequest) SyncEffectiveFieldsDuringRead(existingState TransitionRequest) { } +func (c TransitionRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransitionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9643,13 +10054,7 @@ func (o *TransitionRequest) SetAvailableActions(ctx context.Context, v []types.S } type TransitionStageResponse struct { - ModelVersion types.Object `tfsdk:"model_version" tf:"optional,object"` -} - -func (newState *TransitionStageResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionStageResponse) { -} - -func (newState *TransitionStageResponse) SyncEffectiveFieldsDuringRead(existingState TransitionStageResponse) { + ModelVersion types.Object `tfsdk:"model_version" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransitionStageResponse. @@ -9726,6 +10131,13 @@ func (newState *UpdateComment) SyncEffectiveFieldsDuringCreateOrUpdate(plan Upda func (newState *UpdateComment) SyncEffectiveFieldsDuringRead(existingState UpdateComment) { } +func (c UpdateComment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "comment")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateComment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9761,13 +10173,7 @@ func (o UpdateComment) Type(ctx context.Context) attr.Type { type UpdateCommentResponse struct { // Comment details. - Comment types.Object `tfsdk:"comment" tf:"optional,object"` -} - -func (newState *UpdateCommentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCommentResponse) { -} - -func (newState *UpdateCommentResponse) SyncEffectiveFieldsDuringRead(existingState UpdateCommentResponse) { + Comment types.Object `tfsdk:"comment" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCommentResponse. @@ -9836,7 +10242,7 @@ type UpdateExperiment struct { ExperimentId types.String `tfsdk:"experiment_id" tf:""` // If provided, the experiment's name is changed to the new name. The new // name must be unique. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` } func (newState *UpdateExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExperiment) { @@ -9845,6 +10251,12 @@ func (newState *UpdateExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan U func (newState *UpdateExperiment) SyncEffectiveFieldsDuringRead(existingState UpdateExperiment) { } +func (c UpdateExperiment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "experiment_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExperiment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9887,6 +10299,11 @@ func (newState *UpdateExperimentResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *UpdateExperimentResponse) SyncEffectiveFieldsDuringRead(existingState UpdateExperimentResponse) { } +func (c UpdateExperimentResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExperimentResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9916,7 +10333,7 @@ func (o UpdateExperimentResponse) Type(ctx context.Context) attr.Type { type UpdateModelRequest struct { // If provided, updates the description for this `registered_model`. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Registered model unique name identifier. Name types.String `tfsdk:"name" tf:""` } @@ -9927,6 +10344,12 @@ func (newState *UpdateModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UpdateModelRequest) SyncEffectiveFieldsDuringRead(existingState UpdateModelRequest) { } +func (c UpdateModelRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9963,12 +10386,6 @@ func (o UpdateModelRequest) Type(ctx context.Context) attr.Type { type UpdateModelResponse struct { } -func (newState *UpdateModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelResponse) { -} - -func (newState *UpdateModelResponse) SyncEffectiveFieldsDuringRead(existingState UpdateModelResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9998,7 +10415,7 @@ func (o UpdateModelResponse) Type(ctx context.Context) attr.Type { type UpdateModelVersionRequest struct { // If provided, updates the description for this `registered_model`. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Name of the registered model Name types.String `tfsdk:"name" tf:""` // Model version number @@ -10011,6 +10428,13 @@ func (newState *UpdateModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *UpdateModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest) { } +func (c UpdateModelVersionRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "version")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelVersionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10049,12 +10473,6 @@ func (o UpdateModelVersionRequest) Type(ctx context.Context) attr.Type { type UpdateModelVersionResponse struct { } -func (newState *UpdateModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionResponse) { -} - -func (newState *UpdateModelVersionResponse) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelVersionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10084,7 +10502,7 @@ func (o UpdateModelVersionResponse) Type(ctx context.Context) attr.Type { type UpdateRegistryWebhook struct { // User-specified description for the webhook. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A // new model version was created for the associated model. // @@ -10118,13 +10536,13 @@ type UpdateRegistryWebhook struct { // // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model // version be archived. - Events types.List `tfsdk:"events" tf:"optional"` + Events types.List `tfsdk:"events" tf:""` - HttpUrlSpec types.Object `tfsdk:"http_url_spec" tf:"optional,object"` + HttpUrlSpec types.Object `tfsdk:"http_url_spec" tf:"object"` // Webhook ID Id types.String `tfsdk:"id" tf:""` - JobSpec types.Object `tfsdk:"job_spec" tf:"optional,object"` + JobSpec types.Object `tfsdk:"job_spec" tf:"object"` // Enable or disable triggering the webhook, or put the webhook into test // mode. The default is `ACTIVE`: * `ACTIVE`: Webhook is triggered when an // associated event happens. @@ -10133,7 +10551,7 @@ type UpdateRegistryWebhook struct { // // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is // not triggered on a real event. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *UpdateRegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegistryWebhook) { @@ -10142,6 +10560,14 @@ func (newState *UpdateRegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *UpdateRegistryWebhook) SyncEffectiveFieldsDuringRead(existingState UpdateRegistryWebhook) { } +func (c UpdateRegistryWebhook) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + HttpUrlSpec{}.ToSchema(cs, append(path, "http_url_spec")...) + cs.SetRequired(append(path, "id")...) + JobSpec{}.ToSchema(cs, append(path, "job_spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRegistryWebhook. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10273,14 +10699,14 @@ func (o *UpdateRegistryWebhook) SetJobSpec(ctx context.Context, v JobSpec) { type UpdateRun struct { // Unix timestamp in milliseconds of when the run ended. - EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + EndTime types.Int64 `tfsdk:"end_time" tf:""` // ID of the run to update. Must be provided. - RunId types.String `tfsdk:"run_id" tf:"optional"` + RunId types.String `tfsdk:"run_id" tf:""` // [Deprecated, use run_id instead] ID of the run to update.. This field // will be removed in a future MLflow version. - RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + RunUuid types.String `tfsdk:"run_uuid" tf:""` // Updated status of the run. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *UpdateRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRun) { @@ -10289,6 +10715,11 @@ func (newState *UpdateRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRu func (newState *UpdateRun) SyncEffectiveFieldsDuringRead(existingState UpdateRun) { } +func (c UpdateRun) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRun. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10328,7 +10759,7 @@ func (o UpdateRun) Type(ctx context.Context) attr.Type { type UpdateRunResponse struct { // Updated metadata of the run. - RunInfo types.Object `tfsdk:"run_info" tf:"optional,object"` + RunInfo types.Object `tfsdk:"run_info" tf:"object"` } func (newState *UpdateRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRunResponse) { @@ -10337,6 +10768,12 @@ func (newState *UpdateRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UpdateRunResponse) SyncEffectiveFieldsDuringRead(existingState UpdateRunResponse) { } +func (c UpdateRunResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RunInfo{}.ToSchema(cs, append(path, "run_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRunResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10401,12 +10838,6 @@ func (o *UpdateRunResponse) SetRunInfo(ctx context.Context, v RunInfo) { type UpdateWebhookResponse struct { } -func (newState *UpdateWebhookResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWebhookResponse) { -} - -func (newState *UpdateWebhookResponse) SyncEffectiveFieldsDuringRead(existingState UpdateWebhookResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWebhookResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/oauth2_tf/legacy_model.go b/internal/service/oauth2_tf/legacy_model.go index a11894aa5..dc44a206c 100755 --- a/internal/service/oauth2_tf/legacy_model.go +++ b/internal/service/oauth2_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -23,18 +24,13 @@ import ( // Create account federation policy type CreateAccountFederationPolicyRequest_SdkV2 struct { - Policy types.List `tfsdk:"policy" tf:"optional,object"` - // The identifier for the federation policy. If unspecified, the id will be - // assigned by Databricks. + Policy types.List `tfsdk:"policy" tf:"object"` + // The identifier for the federation policy. The identifier must contain + // only lowercase alphanumeric characters, numbers, hyphens, and slashes. If + // unspecified, the id will be assigned by Databricks. PolicyId types.String `tfsdk:"-"` } -func (newState *CreateAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAccountFederationPolicyRequest_SdkV2) { -} - -func (newState *CreateAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAccountFederationPolicyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAccountFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -101,16 +97,16 @@ func (o *CreateAccountFederationPolicyRequest_SdkV2) SetPolicy(ctx context.Conte type CreateCustomAppIntegration_SdkV2 struct { // This field indicates whether an OAuth client secret is required to // authenticate this client. - Confidential types.Bool `tfsdk:"confidential" tf:"optional"` + Confidential types.Bool `tfsdk:"confidential" tf:""` // Name of the custom OAuth app - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of OAuth redirect urls - RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + RedirectUrls types.List `tfsdk:"redirect_urls" tf:""` // OAuth scopes granted to the application. Supported scopes: all-apis, sql, // offline_access, openid, profile, email. - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` // Token access policy - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"object"` } func (newState *CreateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomAppIntegration_SdkV2) { @@ -119,6 +115,12 @@ func (newState *CreateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *CreateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCustomAppIntegration_SdkV2) { } +func (c CreateCustomAppIntegration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessPolicy_SdkV2{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCustomAppIntegration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -248,12 +250,12 @@ func (o *CreateCustomAppIntegration_SdkV2) SetTokenAccessPolicy(ctx context.Cont type CreateCustomAppIntegrationOutput_SdkV2 struct { // OAuth client-id generated by the Databricks - ClientId types.String `tfsdk:"client_id" tf:"optional"` + ClientId types.String `tfsdk:"client_id" tf:""` // OAuth client-secret generated by the Databricks. If this is a // confidential OAuth app client-secret will be generated. - ClientSecret types.String `tfsdk:"client_secret" tf:"optional"` + ClientSecret types.String `tfsdk:"client_secret" tf:""` // Unique integration id for the custom OAuth app - IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + IntegrationId types.String `tfsdk:"integration_id" tf:""` } func (newState *CreateCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomAppIntegrationOutput_SdkV2) { @@ -262,6 +264,11 @@ func (newState *CreateCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDurin func (newState *CreateCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCustomAppIntegrationOutput_SdkV2) { } +func (c CreateCustomAppIntegrationOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCustomAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -300,9 +307,9 @@ func (o CreateCustomAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.T type CreatePublishedAppIntegration_SdkV2 struct { // App id of the OAuth published app integration. For example power-bi, // tableau-deskop - AppId types.String `tfsdk:"app_id" tf:"optional"` + AppId types.String `tfsdk:"app_id" tf:""` // Token access policy - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"object"` } func (newState *CreatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePublishedAppIntegration_SdkV2) { @@ -311,6 +318,12 @@ func (newState *CreatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringCr func (newState *CreatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePublishedAppIntegration_SdkV2) { } +func (c CreatePublishedAppIntegration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessPolicy_SdkV2{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePublishedAppIntegration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -376,7 +389,7 @@ func (o *CreatePublishedAppIntegration_SdkV2) SetTokenAccessPolicy(ctx context.C type CreatePublishedAppIntegrationOutput_SdkV2 struct { // Unique integration id for the published OAuth app - IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + IntegrationId types.String `tfsdk:"integration_id" tf:""` } func (newState *CreatePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePublishedAppIntegrationOutput_SdkV2) { @@ -385,6 +398,11 @@ func (newState *CreatePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDu func (newState *CreatePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePublishedAppIntegrationOutput_SdkV2) { } +func (c CreatePublishedAppIntegrationOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePublishedAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -418,20 +436,15 @@ func (o CreatePublishedAppIntegrationOutput_SdkV2) Type(ctx context.Context) att // Create service principal federation policy type CreateServicePrincipalFederationPolicyRequest_SdkV2 struct { - Policy types.List `tfsdk:"policy" tf:"optional,object"` - // The identifier for the federation policy. If unspecified, the id will be - // assigned by Databricks. + Policy types.List `tfsdk:"policy" tf:"object"` + // The identifier for the federation policy. The identifier must contain + // only lowercase alphanumeric characters, numbers, hyphens, and slashes. If + // unspecified, the id will be assigned by Databricks. PolicyId types.String `tfsdk:"-"` // The service principal id for the federation policy. ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *CreateServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalFederationPolicyRequest_SdkV2) { -} - -func (newState *CreateServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalFederationPolicyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServicePrincipalFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -503,12 +516,6 @@ type CreateServicePrincipalSecretRequest_SdkV2 struct { ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *CreateServicePrincipalSecretRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalSecretRequest_SdkV2) { -} - -func (newState *CreateServicePrincipalSecretRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalSecretRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServicePrincipalSecretRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -542,17 +549,17 @@ func (o CreateServicePrincipalSecretRequest_SdkV2) Type(ctx context.Context) att type CreateServicePrincipalSecretResponse_SdkV2 struct { // UTC time when the secret was created - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // ID of the secret - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Secret Value - Secret types.String `tfsdk:"secret" tf:"optional"` + Secret types.String `tfsdk:"secret" tf:""` // Secret Hash - SecretHash types.String `tfsdk:"secret_hash" tf:"optional"` + SecretHash types.String `tfsdk:"secret_hash" tf:""` // Status of the secret - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // UTC time when the secret was updated - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *CreateServicePrincipalSecretResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalSecretResponse_SdkV2) { @@ -561,6 +568,11 @@ func (newState *CreateServicePrincipalSecretResponse_SdkV2) SyncEffectiveFieldsD func (newState *CreateServicePrincipalSecretResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalSecretResponse_SdkV2) { } +func (c CreateServicePrincipalSecretResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServicePrincipalSecretResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -604,9 +616,9 @@ func (o CreateServicePrincipalSecretResponse_SdkV2) Type(ctx context.Context) at type DataPlaneInfo_SdkV2 struct { // Authorization details as a string. - AuthorizationDetails types.String `tfsdk:"authorization_details" tf:"optional"` + AuthorizationDetails types.String `tfsdk:"authorization_details" tf:""` // The URL of the endpoint for this operation in the dataplane. - EndpointUrl types.String `tfsdk:"endpoint_url" tf:"optional"` + EndpointUrl types.String `tfsdk:"endpoint_url" tf:""` } func (newState *DataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPlaneInfo_SdkV2) { @@ -615,6 +627,11 @@ func (newState *DataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *DataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataPlaneInfo_SdkV2) { } +func (c DataPlaneInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataPlaneInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -650,15 +667,10 @@ func (o DataPlaneInfo_SdkV2) Type(ctx context.Context) attr.Type { // Delete account federation policy type DeleteAccountFederationPolicyRequest_SdkV2 struct { + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` } -func (newState *DeleteAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountFederationPolicyRequest_SdkV2) { -} - -func (newState *DeleteAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountFederationPolicyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -699,6 +711,11 @@ func (newState *DeleteCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDurin func (newState *DeleteCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCustomAppIntegrationOutput_SdkV2) { } +func (c DeleteCustomAppIntegrationOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCustomAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -731,12 +748,6 @@ type DeleteCustomAppIntegrationRequest_SdkV2 struct { IntegrationId types.String `tfsdk:"-"` } -func (newState *DeleteCustomAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCustomAppIntegrationRequest_SdkV2) { -} - -func (newState *DeleteCustomAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCustomAppIntegrationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCustomAppIntegrationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -777,6 +788,11 @@ func (newState *DeletePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDu func (newState *DeletePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePublishedAppIntegrationOutput_SdkV2) { } +func (c DeletePublishedAppIntegrationOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePublishedAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -809,12 +825,6 @@ type DeletePublishedAppIntegrationRequest_SdkV2 struct { IntegrationId types.String `tfsdk:"-"` } -func (newState *DeletePublishedAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePublishedAppIntegrationRequest_SdkV2) { -} - -func (newState *DeletePublishedAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePublishedAppIntegrationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePublishedAppIntegrationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -849,12 +859,6 @@ func (o DeletePublishedAppIntegrationRequest_SdkV2) Type(ctx context.Context) at type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -884,17 +888,12 @@ func (o DeleteResponse_SdkV2) Type(ctx context.Context) attr.Type { // Delete service principal federation policy type DeleteServicePrincipalFederationPolicyRequest_SdkV2 struct { + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` // The service principal id for the federation policy. ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *DeleteServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServicePrincipalFederationPolicyRequest_SdkV2) { -} - -func (newState *DeleteServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteServicePrincipalFederationPolicyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServicePrincipalFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -936,12 +935,6 @@ type DeleteServicePrincipalSecretRequest_SdkV2 struct { ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *DeleteServicePrincipalSecretRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServicePrincipalSecretRequest_SdkV2) { -} - -func (newState *DeleteServicePrincipalSecretRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteServicePrincipalSecretRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServicePrincipalSecretRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -977,20 +970,24 @@ func (o DeleteServicePrincipalSecretRequest_SdkV2) Type(ctx context.Context) att type FederationPolicy_SdkV2 struct { // Creation time of the federation policy. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // Description of the federation policy. - Description types.String `tfsdk:"description" tf:"optional"` - // Name of the federation policy. The name must contain only lowercase - // alphanumeric characters, numbers, and hyphens. It must be unique within - // the account. - Name types.String `tfsdk:"name" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` + // Resource name for the federation policy. Example values include + // `accounts//federationPolicies/my-federation-policy` for + // Account Federation Policies, and + // `accounts//servicePrincipals//federationPolicies/my-federation-policy` + // for Service Principal Federation Policies. Typically an output parameter, + // which does not need to be specified in create or update requests. If + // specified in a request, must match the value in the request URL. + Name types.String `tfsdk:"name" tf:""` // Specifies the policy to use for validating OIDC claims in your federated // tokens. - OidcPolicy types.List `tfsdk:"oidc_policy" tf:"optional,object"` + OidcPolicy types.List `tfsdk:"oidc_policy" tf:"object"` // Unique, immutable id of the federation policy. - Uid types.String `tfsdk:"uid" tf:"computed"` + Uid types.String `tfsdk:"uid" tf:""` // Last update time of the federation policy. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *FederationPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FederationPolicy_SdkV2) { @@ -999,6 +996,15 @@ func (newState *FederationPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *FederationPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState FederationPolicy_SdkV2) { } +func (c FederationPolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + OidcFederationPolicy_SdkV2{}.ToSchema(cs, append(path, "oidc_policy")...) + cs.SetComputed(append(path, "uid")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FederationPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1072,15 +1078,10 @@ func (o *FederationPolicy_SdkV2) SetOidcPolicy(ctx context.Context, v OidcFedera // Get account federation policy type GetAccountFederationPolicyRequest_SdkV2 struct { + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` } -func (newState *GetAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountFederationPolicyRequest_SdkV2) { -} - -func (newState *GetAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountFederationPolicyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1114,26 +1115,26 @@ func (o GetAccountFederationPolicyRequest_SdkV2) Type(ctx context.Context) attr. type GetCustomAppIntegrationOutput_SdkV2 struct { // The client id of the custom OAuth app - ClientId types.String `tfsdk:"client_id" tf:"optional"` + ClientId types.String `tfsdk:"client_id" tf:""` // This field indicates whether an OAuth client secret is required to // authenticate this client. - Confidential types.Bool `tfsdk:"confidential" tf:"optional"` + Confidential types.Bool `tfsdk:"confidential" tf:""` - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` - CreatedBy types.Int64 `tfsdk:"created_by" tf:"optional"` + CreatedBy types.Int64 `tfsdk:"created_by" tf:""` - CreatorUsername types.String `tfsdk:"creator_username" tf:"optional"` + CreatorUsername types.String `tfsdk:"creator_username" tf:""` // ID of this custom app - IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + IntegrationId types.String `tfsdk:"integration_id" tf:""` // The display name of the custom OAuth app - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of OAuth redirect urls - RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + RedirectUrls types.List `tfsdk:"redirect_urls" tf:""` - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` // Token access policy - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"object"` } func (newState *GetCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationOutput_SdkV2) { @@ -1142,6 +1143,12 @@ func (newState *GetCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCr func (newState *GetCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCustomAppIntegrationOutput_SdkV2) { } +func (c GetCustomAppIntegrationOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessPolicy_SdkV2{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCustomAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1285,12 +1292,6 @@ type GetCustomAppIntegrationRequest_SdkV2 struct { IntegrationId types.String `tfsdk:"-"` } -func (newState *GetCustomAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationRequest_SdkV2) { -} - -func (newState *GetCustomAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCustomAppIntegrationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCustomAppIntegrationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1324,9 +1325,9 @@ func (o GetCustomAppIntegrationRequest_SdkV2) Type(ctx context.Context) attr.Typ type GetCustomAppIntegrationsOutput_SdkV2 struct { // List of Custom OAuth App Integrations defined for the account. - Apps types.List `tfsdk:"apps" tf:"optional"` + Apps types.List `tfsdk:"apps" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetCustomAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationsOutput_SdkV2) { @@ -1335,6 +1336,12 @@ func (newState *GetCustomAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuringC func (newState *GetCustomAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCustomAppIntegrationsOutput_SdkV2) { } +func (c GetCustomAppIntegrationsOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GetCustomAppIntegrationOutput_SdkV2{}.ToSchema(cs, append(path, "apps")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCustomAppIntegrationsOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1400,17 +1407,17 @@ func (o *GetCustomAppIntegrationsOutput_SdkV2) SetApps(ctx context.Context, v [] type GetPublishedAppIntegrationOutput_SdkV2 struct { // App-id of the published app integration - AppId types.String `tfsdk:"app_id" tf:"optional"` + AppId types.String `tfsdk:"app_id" tf:""` - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` - CreatedBy types.Int64 `tfsdk:"created_by" tf:"optional"` + CreatedBy types.Int64 `tfsdk:"created_by" tf:""` // Unique integration id for the published OAuth app - IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + IntegrationId types.String `tfsdk:"integration_id" tf:""` // Display name of the published OAuth app - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Token access policy - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"object"` } func (newState *GetPublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationOutput_SdkV2) { @@ -1419,6 +1426,12 @@ func (newState *GetPublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDurin func (newState *GetPublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppIntegrationOutput_SdkV2) { } +func (c GetPublishedAppIntegrationOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessPolicy_SdkV2{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1495,12 +1508,6 @@ type GetPublishedAppIntegrationRequest_SdkV2 struct { IntegrationId types.String `tfsdk:"-"` } -func (newState *GetPublishedAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationRequest_SdkV2) { -} - -func (newState *GetPublishedAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppIntegrationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppIntegrationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1534,9 +1541,9 @@ func (o GetPublishedAppIntegrationRequest_SdkV2) Type(ctx context.Context) attr. type GetPublishedAppIntegrationsOutput_SdkV2 struct { // List of Published OAuth App Integrations defined for the account. - Apps types.List `tfsdk:"apps" tf:"optional"` + Apps types.List `tfsdk:"apps" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetPublishedAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationsOutput_SdkV2) { @@ -1545,6 +1552,12 @@ func (newState *GetPublishedAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuri func (newState *GetPublishedAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppIntegrationsOutput_SdkV2) { } +func (c GetPublishedAppIntegrationsOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GetPublishedAppIntegrationOutput_SdkV2{}.ToSchema(cs, append(path, "apps")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppIntegrationsOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1610,10 +1623,10 @@ func (o *GetPublishedAppIntegrationsOutput_SdkV2) SetApps(ctx context.Context, v type GetPublishedAppsOutput_SdkV2 struct { // List of Published OAuth Apps. - Apps types.List `tfsdk:"apps" tf:"optional"` + Apps types.List `tfsdk:"apps" tf:""` // A token that can be used to get the next page of results. If not present, // there are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetPublishedAppsOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppsOutput_SdkV2) { @@ -1622,6 +1635,12 @@ func (newState *GetPublishedAppsOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *GetPublishedAppsOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppsOutput_SdkV2) { } +func (c GetPublishedAppsOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PublishedAppOutput_SdkV2{}.ToSchema(cs, append(path, "apps")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppsOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1687,17 +1706,12 @@ func (o *GetPublishedAppsOutput_SdkV2) SetApps(ctx context.Context, v []Publishe // Get service principal federation policy type GetServicePrincipalFederationPolicyRequest_SdkV2 struct { + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` // The service principal id for the federation policy. ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *GetServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServicePrincipalFederationPolicyRequest_SdkV2) { -} - -func (newState *GetServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServicePrincipalFederationPolicyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServicePrincipalFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1738,12 +1752,6 @@ type ListAccountFederationPoliciesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAccountFederationPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountFederationPoliciesRequest_SdkV2) { -} - -func (newState *ListAccountFederationPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountFederationPoliciesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountFederationPoliciesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1786,12 +1794,6 @@ type ListCustomAppIntegrationsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCustomAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCustomAppIntegrationsRequest_SdkV2) { -} - -func (newState *ListCustomAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCustomAppIntegrationsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCustomAppIntegrationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1828,9 +1830,9 @@ func (o ListCustomAppIntegrationsRequest_SdkV2) Type(ctx context.Context) attr.T } type ListFederationPoliciesResponse_SdkV2 struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Policies types.List `tfsdk:"policies" tf:"optional"` + Policies types.List `tfsdk:"policies" tf:""` } func (newState *ListFederationPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFederationPoliciesResponse_SdkV2) { @@ -1839,6 +1841,12 @@ func (newState *ListFederationPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringC func (newState *ListFederationPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFederationPoliciesResponse_SdkV2) { } +func (c ListFederationPoliciesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FederationPolicy_SdkV2{}.ToSchema(cs, append(path, "policies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFederationPoliciesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1910,12 +1918,6 @@ type ListOAuthPublishedAppsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListOAuthPublishedAppsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListOAuthPublishedAppsRequest_SdkV2) { -} - -func (newState *ListOAuthPublishedAppsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListOAuthPublishedAppsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListOAuthPublishedAppsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1956,12 +1958,6 @@ type ListPublishedAppIntegrationsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListPublishedAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPublishedAppIntegrationsRequest_SdkV2) { -} - -func (newState *ListPublishedAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPublishedAppIntegrationsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPublishedAppIntegrationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2004,12 +2000,6 @@ type ListServicePrincipalFederationPoliciesRequest_SdkV2 struct { ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *ListServicePrincipalFederationPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalFederationPoliciesRequest_SdkV2) { -} - -func (newState *ListServicePrincipalFederationPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalFederationPoliciesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalFederationPoliciesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2061,12 +2051,6 @@ type ListServicePrincipalSecretsRequest_SdkV2 struct { ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *ListServicePrincipalSecretsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalSecretsRequest_SdkV2) { -} - -func (newState *ListServicePrincipalSecretsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalSecretsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalSecretsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2102,9 +2086,9 @@ func (o ListServicePrincipalSecretsRequest_SdkV2) Type(ctx context.Context) attr type ListServicePrincipalSecretsResponse_SdkV2 struct { // A token, which can be sent as `page_token` to retrieve the next page. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // List of the secrets - Secrets types.List `tfsdk:"secrets" tf:"optional"` + Secrets types.List `tfsdk:"secrets" tf:""` } func (newState *ListServicePrincipalSecretsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalSecretsResponse_SdkV2) { @@ -2113,6 +2097,12 @@ func (newState *ListServicePrincipalSecretsResponse_SdkV2) SyncEffectiveFieldsDu func (newState *ListServicePrincipalSecretsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalSecretsResponse_SdkV2) { } +func (c ListServicePrincipalSecretsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SecretInfo_SdkV2{}.ToSchema(cs, append(path, "secrets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalSecretsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2185,23 +2175,23 @@ type OidcFederationPolicy_SdkV2 struct { // the token matches at least one audience in the policy, the token is // considered a match. If audiences is unspecified, defaults to your // Databricks account id. - Audiences types.List `tfsdk:"audiences" tf:"optional"` + Audiences types.List `tfsdk:"audiences" tf:""` // The required token issuer, as specified in the 'iss' claim of federated // tokens. - Issuer types.String `tfsdk:"issuer" tf:"optional"` + Issuer types.String `tfsdk:"issuer" tf:""` // The public keys used to validate the signature of federated tokens, in // JWKS format. If unspecified (recommended), Databricks automatically // fetches the public keys from your issuer’s well known endpoint. // Databricks strongly recommends relying on your issuer’s well known // endpoint for discovering public keys. - JwksJson types.String `tfsdk:"jwks_json" tf:"optional"` + JwksJson types.String `tfsdk:"jwks_json" tf:""` // The required token subject, as specified in the subject claim of // federated tokens. Must be specified for service principal federation // policies. Must not be specified for account federation policies. - Subject types.String `tfsdk:"subject" tf:"optional"` + Subject types.String `tfsdk:"subject" tf:""` // The claim that contains the subject of the token. If unspecified, the // default value is 'sub'. - SubjectClaim types.String `tfsdk:"subject_claim" tf:"optional"` + SubjectClaim types.String `tfsdk:"subject_claim" tf:""` } func (newState *OidcFederationPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OidcFederationPolicy_SdkV2) { @@ -2210,6 +2200,11 @@ func (newState *OidcFederationPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *OidcFederationPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState OidcFederationPolicy_SdkV2) { } +func (c OidcFederationPolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OidcFederationPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2281,21 +2276,21 @@ func (o *OidcFederationPolicy_SdkV2) SetAudiences(ctx context.Context, v []types type PublishedAppOutput_SdkV2 struct { // Unique ID of the published OAuth app. - AppId types.String `tfsdk:"app_id" tf:"optional"` + AppId types.String `tfsdk:"app_id" tf:""` // Client ID of the published OAuth app. It is the client_id in the OAuth // flow - ClientId types.String `tfsdk:"client_id" tf:"optional"` + ClientId types.String `tfsdk:"client_id" tf:""` // Description of the published OAuth app. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Whether the published OAuth app is a confidential client. It is always // false for published OAuth apps. - IsConfidentialClient types.Bool `tfsdk:"is_confidential_client" tf:"optional"` + IsConfidentialClient types.Bool `tfsdk:"is_confidential_client" tf:""` // The display name of the published OAuth app. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Redirect URLs of the published OAuth app. - RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + RedirectUrls types.List `tfsdk:"redirect_urls" tf:""` // Required scopes for the published OAuth app. - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` } func (newState *PublishedAppOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishedAppOutput_SdkV2) { @@ -2304,6 +2299,11 @@ func (newState *PublishedAppOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *PublishedAppOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublishedAppOutput_SdkV2) { } +func (c PublishedAppOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishedAppOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2408,15 +2408,15 @@ func (o *PublishedAppOutput_SdkV2) SetScopes(ctx context.Context, v []types.Stri type SecretInfo_SdkV2 struct { // UTC time when the secret was created - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // ID of the secret - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Secret Hash - SecretHash types.String `tfsdk:"secret_hash" tf:"optional"` + SecretHash types.String `tfsdk:"secret_hash" tf:""` // Status of the secret - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // UTC time when the secret was updated - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *SecretInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretInfo_SdkV2) { @@ -2425,6 +2425,11 @@ func (newState *SecretInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *SecretInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState SecretInfo_SdkV2) { } +func (c SecretInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SecretInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2466,9 +2471,9 @@ func (o SecretInfo_SdkV2) Type(ctx context.Context) attr.Type { type TokenAccessPolicy_SdkV2 struct { // access token time to live in minutes - AccessTokenTtlInMinutes types.Int64 `tfsdk:"access_token_ttl_in_minutes" tf:"optional"` + AccessTokenTtlInMinutes types.Int64 `tfsdk:"access_token_ttl_in_minutes" tf:""` // refresh token time to live in minutes - RefreshTokenTtlInMinutes types.Int64 `tfsdk:"refresh_token_ttl_in_minutes" tf:"optional"` + RefreshTokenTtlInMinutes types.Int64 `tfsdk:"refresh_token_ttl_in_minutes" tf:""` } func (newState *TokenAccessPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenAccessPolicy_SdkV2) { @@ -2477,6 +2482,11 @@ func (newState *TokenAccessPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *TokenAccessPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenAccessPolicy_SdkV2) { } +func (c TokenAccessPolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenAccessPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2512,8 +2522,8 @@ func (o TokenAccessPolicy_SdkV2) Type(ctx context.Context) attr.Type { // Update account federation policy type UpdateAccountFederationPolicyRequest_SdkV2 struct { - Policy types.List `tfsdk:"policy" tf:"optional,object"` - + Policy types.List `tfsdk:"policy" tf:"object"` + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` // Field mask is required to be passed into the PATCH request. Field mask // specifies which fields of the setting payload will be updated. The field @@ -2522,12 +2532,6 @@ type UpdateAccountFederationPolicyRequest_SdkV2 struct { UpdateMask types.String `tfsdk:"-"` } -func (newState *UpdateAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAccountFederationPolicyRequest_SdkV2) { -} - -func (newState *UpdateAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAccountFederationPolicyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAccountFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2597,9 +2601,9 @@ type UpdateCustomAppIntegration_SdkV2 struct { IntegrationId types.String `tfsdk:"-"` // List of OAuth redirect urls to be updated in the custom OAuth app // integration - RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + RedirectUrls types.List `tfsdk:"redirect_urls" tf:""` // Token access policy to be updated in the custom OAuth app integration - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"object"` } func (newState *UpdateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCustomAppIntegration_SdkV2) { @@ -2608,6 +2612,13 @@ func (newState *UpdateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *UpdateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCustomAppIntegration_SdkV2) { } +func (c UpdateCustomAppIntegration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "integration_id")...) + TokenAccessPolicy_SdkV2{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCustomAppIntegration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2711,6 +2722,11 @@ func (newState *UpdateCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDurin func (newState *UpdateCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCustomAppIntegrationOutput_SdkV2) { } +func (c UpdateCustomAppIntegrationOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCustomAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2741,7 +2757,7 @@ func (o UpdateCustomAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.T type UpdatePublishedAppIntegration_SdkV2 struct { IntegrationId types.String `tfsdk:"-"` // Token access policy to be updated in the published OAuth app integration - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"object"` } func (newState *UpdatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePublishedAppIntegration_SdkV2) { @@ -2750,6 +2766,13 @@ func (newState *UpdatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringCr func (newState *UpdatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePublishedAppIntegration_SdkV2) { } +func (c UpdatePublishedAppIntegration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "integration_id")...) + TokenAccessPolicy_SdkV2{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePublishedAppIntegration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2822,6 +2845,11 @@ func (newState *UpdatePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDu func (newState *UpdatePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePublishedAppIntegrationOutput_SdkV2) { } +func (c UpdatePublishedAppIntegrationOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePublishedAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2851,8 +2879,8 @@ func (o UpdatePublishedAppIntegrationOutput_SdkV2) Type(ctx context.Context) att // Update service principal federation policy type UpdateServicePrincipalFederationPolicyRequest_SdkV2 struct { - Policy types.List `tfsdk:"policy" tf:"optional,object"` - + Policy types.List `tfsdk:"policy" tf:"object"` + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` // The service principal id for the federation policy. ServicePrincipalId types.Int64 `tfsdk:"-"` @@ -2863,12 +2891,6 @@ type UpdateServicePrincipalFederationPolicyRequest_SdkV2 struct { UpdateMask types.String `tfsdk:"-"` } -func (newState *UpdateServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateServicePrincipalFederationPolicyRequest_SdkV2) { -} - -func (newState *UpdateServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateServicePrincipalFederationPolicyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateServicePrincipalFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/oauth2_tf/model.go b/internal/service/oauth2_tf/model.go index 6f63b32b0..6c42902ce 100755 --- a/internal/service/oauth2_tf/model.go +++ b/internal/service/oauth2_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -23,18 +24,13 @@ import ( // Create account federation policy type CreateAccountFederationPolicyRequest struct { - Policy types.Object `tfsdk:"policy" tf:"optional,object"` - // The identifier for the federation policy. If unspecified, the id will be - // assigned by Databricks. + Policy types.Object `tfsdk:"policy" tf:"object"` + // The identifier for the federation policy. The identifier must contain + // only lowercase alphanumeric characters, numbers, hyphens, and slashes. If + // unspecified, the id will be assigned by Databricks. PolicyId types.String `tfsdk:"-"` } -func (newState *CreateAccountFederationPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAccountFederationPolicyRequest) { -} - -func (newState *CreateAccountFederationPolicyRequest) SyncEffectiveFieldsDuringRead(existingState CreateAccountFederationPolicyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAccountFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -101,16 +97,16 @@ func (o *CreateAccountFederationPolicyRequest) SetPolicy(ctx context.Context, v type CreateCustomAppIntegration struct { // This field indicates whether an OAuth client secret is required to // authenticate this client. - Confidential types.Bool `tfsdk:"confidential" tf:"optional"` + Confidential types.Bool `tfsdk:"confidential" tf:""` // Name of the custom OAuth app - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of OAuth redirect urls - RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + RedirectUrls types.List `tfsdk:"redirect_urls" tf:""` // OAuth scopes granted to the application. Supported scopes: all-apis, sql, // offline_access, openid, profile, email. - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` // Token access policy - TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"object"` } func (newState *CreateCustomAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomAppIntegration) { @@ -119,6 +115,12 @@ func (newState *CreateCustomAppIntegration) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CreateCustomAppIntegration) SyncEffectiveFieldsDuringRead(existingState CreateCustomAppIntegration) { } +func (c CreateCustomAppIntegration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessPolicy{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCustomAppIntegration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -248,12 +250,12 @@ func (o *CreateCustomAppIntegration) SetTokenAccessPolicy(ctx context.Context, v type CreateCustomAppIntegrationOutput struct { // OAuth client-id generated by the Databricks - ClientId types.String `tfsdk:"client_id" tf:"optional"` + ClientId types.String `tfsdk:"client_id" tf:""` // OAuth client-secret generated by the Databricks. If this is a // confidential OAuth app client-secret will be generated. - ClientSecret types.String `tfsdk:"client_secret" tf:"optional"` + ClientSecret types.String `tfsdk:"client_secret" tf:""` // Unique integration id for the custom OAuth app - IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + IntegrationId types.String `tfsdk:"integration_id" tf:""` } func (newState *CreateCustomAppIntegrationOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomAppIntegrationOutput) { @@ -262,6 +264,11 @@ func (newState *CreateCustomAppIntegrationOutput) SyncEffectiveFieldsDuringCreat func (newState *CreateCustomAppIntegrationOutput) SyncEffectiveFieldsDuringRead(existingState CreateCustomAppIntegrationOutput) { } +func (c CreateCustomAppIntegrationOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCustomAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -300,9 +307,9 @@ func (o CreateCustomAppIntegrationOutput) Type(ctx context.Context) attr.Type { type CreatePublishedAppIntegration struct { // App id of the OAuth published app integration. For example power-bi, // tableau-deskop - AppId types.String `tfsdk:"app_id" tf:"optional"` + AppId types.String `tfsdk:"app_id" tf:""` // Token access policy - TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"object"` } func (newState *CreatePublishedAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePublishedAppIntegration) { @@ -311,6 +318,12 @@ func (newState *CreatePublishedAppIntegration) SyncEffectiveFieldsDuringCreateOr func (newState *CreatePublishedAppIntegration) SyncEffectiveFieldsDuringRead(existingState CreatePublishedAppIntegration) { } +func (c CreatePublishedAppIntegration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessPolicy{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePublishedAppIntegration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -376,7 +389,7 @@ func (o *CreatePublishedAppIntegration) SetTokenAccessPolicy(ctx context.Context type CreatePublishedAppIntegrationOutput struct { // Unique integration id for the published OAuth app - IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + IntegrationId types.String `tfsdk:"integration_id" tf:""` } func (newState *CreatePublishedAppIntegrationOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePublishedAppIntegrationOutput) { @@ -385,6 +398,11 @@ func (newState *CreatePublishedAppIntegrationOutput) SyncEffectiveFieldsDuringCr func (newState *CreatePublishedAppIntegrationOutput) SyncEffectiveFieldsDuringRead(existingState CreatePublishedAppIntegrationOutput) { } +func (c CreatePublishedAppIntegrationOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePublishedAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -418,20 +436,15 @@ func (o CreatePublishedAppIntegrationOutput) Type(ctx context.Context) attr.Type // Create service principal federation policy type CreateServicePrincipalFederationPolicyRequest struct { - Policy types.Object `tfsdk:"policy" tf:"optional,object"` - // The identifier for the federation policy. If unspecified, the id will be - // assigned by Databricks. + Policy types.Object `tfsdk:"policy" tf:"object"` + // The identifier for the federation policy. The identifier must contain + // only lowercase alphanumeric characters, numbers, hyphens, and slashes. If + // unspecified, the id will be assigned by Databricks. PolicyId types.String `tfsdk:"-"` // The service principal id for the federation policy. ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *CreateServicePrincipalFederationPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalFederationPolicyRequest) { -} - -func (newState *CreateServicePrincipalFederationPolicyRequest) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalFederationPolicyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServicePrincipalFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -503,12 +516,6 @@ type CreateServicePrincipalSecretRequest struct { ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *CreateServicePrincipalSecretRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalSecretRequest) { -} - -func (newState *CreateServicePrincipalSecretRequest) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalSecretRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServicePrincipalSecretRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -542,17 +549,17 @@ func (o CreateServicePrincipalSecretRequest) Type(ctx context.Context) attr.Type type CreateServicePrincipalSecretResponse struct { // UTC time when the secret was created - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // ID of the secret - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Secret Value - Secret types.String `tfsdk:"secret" tf:"optional"` + Secret types.String `tfsdk:"secret" tf:""` // Secret Hash - SecretHash types.String `tfsdk:"secret_hash" tf:"optional"` + SecretHash types.String `tfsdk:"secret_hash" tf:""` // Status of the secret - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // UTC time when the secret was updated - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *CreateServicePrincipalSecretResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalSecretResponse) { @@ -561,6 +568,11 @@ func (newState *CreateServicePrincipalSecretResponse) SyncEffectiveFieldsDuringC func (newState *CreateServicePrincipalSecretResponse) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalSecretResponse) { } +func (c CreateServicePrincipalSecretResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServicePrincipalSecretResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -604,9 +616,9 @@ func (o CreateServicePrincipalSecretResponse) Type(ctx context.Context) attr.Typ type DataPlaneInfo struct { // Authorization details as a string. - AuthorizationDetails types.String `tfsdk:"authorization_details" tf:"optional"` + AuthorizationDetails types.String `tfsdk:"authorization_details" tf:""` // The URL of the endpoint for this operation in the dataplane. - EndpointUrl types.String `tfsdk:"endpoint_url" tf:"optional"` + EndpointUrl types.String `tfsdk:"endpoint_url" tf:""` } func (newState *DataPlaneInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPlaneInfo) { @@ -615,6 +627,11 @@ func (newState *DataPlaneInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Data func (newState *DataPlaneInfo) SyncEffectiveFieldsDuringRead(existingState DataPlaneInfo) { } +func (c DataPlaneInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataPlaneInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -650,15 +667,10 @@ func (o DataPlaneInfo) Type(ctx context.Context) attr.Type { // Delete account federation policy type DeleteAccountFederationPolicyRequest struct { + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` } -func (newState *DeleteAccountFederationPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountFederationPolicyRequest) { -} - -func (newState *DeleteAccountFederationPolicyRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAccountFederationPolicyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -699,6 +711,11 @@ func (newState *DeleteCustomAppIntegrationOutput) SyncEffectiveFieldsDuringCreat func (newState *DeleteCustomAppIntegrationOutput) SyncEffectiveFieldsDuringRead(existingState DeleteCustomAppIntegrationOutput) { } +func (c DeleteCustomAppIntegrationOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCustomAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -731,12 +748,6 @@ type DeleteCustomAppIntegrationRequest struct { IntegrationId types.String `tfsdk:"-"` } -func (newState *DeleteCustomAppIntegrationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCustomAppIntegrationRequest) { -} - -func (newState *DeleteCustomAppIntegrationRequest) SyncEffectiveFieldsDuringRead(existingState DeleteCustomAppIntegrationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCustomAppIntegrationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -777,6 +788,11 @@ func (newState *DeletePublishedAppIntegrationOutput) SyncEffectiveFieldsDuringCr func (newState *DeletePublishedAppIntegrationOutput) SyncEffectiveFieldsDuringRead(existingState DeletePublishedAppIntegrationOutput) { } +func (c DeletePublishedAppIntegrationOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePublishedAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -809,12 +825,6 @@ type DeletePublishedAppIntegrationRequest struct { IntegrationId types.String `tfsdk:"-"` } -func (newState *DeletePublishedAppIntegrationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePublishedAppIntegrationRequest) { -} - -func (newState *DeletePublishedAppIntegrationRequest) SyncEffectiveFieldsDuringRead(existingState DeletePublishedAppIntegrationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePublishedAppIntegrationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -849,12 +859,6 @@ func (o DeletePublishedAppIntegrationRequest) Type(ctx context.Context) attr.Typ type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -884,17 +888,12 @@ func (o DeleteResponse) Type(ctx context.Context) attr.Type { // Delete service principal federation policy type DeleteServicePrincipalFederationPolicyRequest struct { + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` // The service principal id for the federation policy. ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *DeleteServicePrincipalFederationPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServicePrincipalFederationPolicyRequest) { -} - -func (newState *DeleteServicePrincipalFederationPolicyRequest) SyncEffectiveFieldsDuringRead(existingState DeleteServicePrincipalFederationPolicyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServicePrincipalFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -936,12 +935,6 @@ type DeleteServicePrincipalSecretRequest struct { ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *DeleteServicePrincipalSecretRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServicePrincipalSecretRequest) { -} - -func (newState *DeleteServicePrincipalSecretRequest) SyncEffectiveFieldsDuringRead(existingState DeleteServicePrincipalSecretRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServicePrincipalSecretRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -977,20 +970,24 @@ func (o DeleteServicePrincipalSecretRequest) Type(ctx context.Context) attr.Type type FederationPolicy struct { // Creation time of the federation policy. - CreateTime types.String `tfsdk:"create_time" tf:"computed"` + CreateTime types.String `tfsdk:"create_time" tf:""` // Description of the federation policy. - Description types.String `tfsdk:"description" tf:"optional"` - // Name of the federation policy. The name must contain only lowercase - // alphanumeric characters, numbers, and hyphens. It must be unique within - // the account. - Name types.String `tfsdk:"name" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` + // Resource name for the federation policy. Example values include + // `accounts//federationPolicies/my-federation-policy` for + // Account Federation Policies, and + // `accounts//servicePrincipals//federationPolicies/my-federation-policy` + // for Service Principal Federation Policies. Typically an output parameter, + // which does not need to be specified in create or update requests. If + // specified in a request, must match the value in the request URL. + Name types.String `tfsdk:"name" tf:""` // Specifies the policy to use for validating OIDC claims in your federated // tokens. - OidcPolicy types.Object `tfsdk:"oidc_policy" tf:"optional,object"` + OidcPolicy types.Object `tfsdk:"oidc_policy" tf:"object"` // Unique, immutable id of the federation policy. - Uid types.String `tfsdk:"uid" tf:"computed"` + Uid types.String `tfsdk:"uid" tf:""` // Last update time of the federation policy. - UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *FederationPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan FederationPolicy) { @@ -999,6 +996,15 @@ func (newState *FederationPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan F func (newState *FederationPolicy) SyncEffectiveFieldsDuringRead(existingState FederationPolicy) { } +func (c FederationPolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "create_time")...) + OidcFederationPolicy{}.ToSchema(cs, append(path, "oidc_policy")...) + cs.SetComputed(append(path, "uid")...) + cs.SetComputed(append(path, "update_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FederationPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1072,15 +1078,10 @@ func (o *FederationPolicy) SetOidcPolicy(ctx context.Context, v OidcFederationPo // Get account federation policy type GetAccountFederationPolicyRequest struct { + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` } -func (newState *GetAccountFederationPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountFederationPolicyRequest) { -} - -func (newState *GetAccountFederationPolicyRequest) SyncEffectiveFieldsDuringRead(existingState GetAccountFederationPolicyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1114,26 +1115,26 @@ func (o GetAccountFederationPolicyRequest) Type(ctx context.Context) attr.Type { type GetCustomAppIntegrationOutput struct { // The client id of the custom OAuth app - ClientId types.String `tfsdk:"client_id" tf:"optional"` + ClientId types.String `tfsdk:"client_id" tf:""` // This field indicates whether an OAuth client secret is required to // authenticate this client. - Confidential types.Bool `tfsdk:"confidential" tf:"optional"` + Confidential types.Bool `tfsdk:"confidential" tf:""` - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` - CreatedBy types.Int64 `tfsdk:"created_by" tf:"optional"` + CreatedBy types.Int64 `tfsdk:"created_by" tf:""` - CreatorUsername types.String `tfsdk:"creator_username" tf:"optional"` + CreatorUsername types.String `tfsdk:"creator_username" tf:""` // ID of this custom app - IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + IntegrationId types.String `tfsdk:"integration_id" tf:""` // The display name of the custom OAuth app - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of OAuth redirect urls - RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + RedirectUrls types.List `tfsdk:"redirect_urls" tf:""` - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` // Token access policy - TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"object"` } func (newState *GetCustomAppIntegrationOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationOutput) { @@ -1142,6 +1143,12 @@ func (newState *GetCustomAppIntegrationOutput) SyncEffectiveFieldsDuringCreateOr func (newState *GetCustomAppIntegrationOutput) SyncEffectiveFieldsDuringRead(existingState GetCustomAppIntegrationOutput) { } +func (c GetCustomAppIntegrationOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessPolicy{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCustomAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1285,12 +1292,6 @@ type GetCustomAppIntegrationRequest struct { IntegrationId types.String `tfsdk:"-"` } -func (newState *GetCustomAppIntegrationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationRequest) { -} - -func (newState *GetCustomAppIntegrationRequest) SyncEffectiveFieldsDuringRead(existingState GetCustomAppIntegrationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCustomAppIntegrationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1324,9 +1325,9 @@ func (o GetCustomAppIntegrationRequest) Type(ctx context.Context) attr.Type { type GetCustomAppIntegrationsOutput struct { // List of Custom OAuth App Integrations defined for the account. - Apps types.List `tfsdk:"apps" tf:"optional"` + Apps types.List `tfsdk:"apps" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetCustomAppIntegrationsOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationsOutput) { @@ -1335,6 +1336,12 @@ func (newState *GetCustomAppIntegrationsOutput) SyncEffectiveFieldsDuringCreateO func (newState *GetCustomAppIntegrationsOutput) SyncEffectiveFieldsDuringRead(existingState GetCustomAppIntegrationsOutput) { } +func (c GetCustomAppIntegrationsOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GetCustomAppIntegrationOutput{}.ToSchema(cs, append(path, "apps")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCustomAppIntegrationsOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1400,17 +1407,17 @@ func (o *GetCustomAppIntegrationsOutput) SetApps(ctx context.Context, v []GetCus type GetPublishedAppIntegrationOutput struct { // App-id of the published app integration - AppId types.String `tfsdk:"app_id" tf:"optional"` + AppId types.String `tfsdk:"app_id" tf:""` - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` - CreatedBy types.Int64 `tfsdk:"created_by" tf:"optional"` + CreatedBy types.Int64 `tfsdk:"created_by" tf:""` // Unique integration id for the published OAuth app - IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + IntegrationId types.String `tfsdk:"integration_id" tf:""` // Display name of the published OAuth app - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Token access policy - TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"object"` } func (newState *GetPublishedAppIntegrationOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationOutput) { @@ -1419,6 +1426,12 @@ func (newState *GetPublishedAppIntegrationOutput) SyncEffectiveFieldsDuringCreat func (newState *GetPublishedAppIntegrationOutput) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppIntegrationOutput) { } +func (c GetPublishedAppIntegrationOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessPolicy{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1495,12 +1508,6 @@ type GetPublishedAppIntegrationRequest struct { IntegrationId types.String `tfsdk:"-"` } -func (newState *GetPublishedAppIntegrationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationRequest) { -} - -func (newState *GetPublishedAppIntegrationRequest) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppIntegrationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppIntegrationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1534,9 +1541,9 @@ func (o GetPublishedAppIntegrationRequest) Type(ctx context.Context) attr.Type { type GetPublishedAppIntegrationsOutput struct { // List of Published OAuth App Integrations defined for the account. - Apps types.List `tfsdk:"apps" tf:"optional"` + Apps types.List `tfsdk:"apps" tf:""` - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetPublishedAppIntegrationsOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationsOutput) { @@ -1545,6 +1552,12 @@ func (newState *GetPublishedAppIntegrationsOutput) SyncEffectiveFieldsDuringCrea func (newState *GetPublishedAppIntegrationsOutput) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppIntegrationsOutput) { } +func (c GetPublishedAppIntegrationsOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GetPublishedAppIntegrationOutput{}.ToSchema(cs, append(path, "apps")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppIntegrationsOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1610,10 +1623,10 @@ func (o *GetPublishedAppIntegrationsOutput) SetApps(ctx context.Context, v []Get type GetPublishedAppsOutput struct { // List of Published OAuth Apps. - Apps types.List `tfsdk:"apps" tf:"optional"` + Apps types.List `tfsdk:"apps" tf:""` // A token that can be used to get the next page of results. If not present, // there are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *GetPublishedAppsOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppsOutput) { @@ -1622,6 +1635,12 @@ func (newState *GetPublishedAppsOutput) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *GetPublishedAppsOutput) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppsOutput) { } +func (c GetPublishedAppsOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PublishedAppOutput{}.ToSchema(cs, append(path, "apps")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppsOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1687,17 +1706,12 @@ func (o *GetPublishedAppsOutput) SetApps(ctx context.Context, v []PublishedAppOu // Get service principal federation policy type GetServicePrincipalFederationPolicyRequest struct { + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` // The service principal id for the federation policy. ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *GetServicePrincipalFederationPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServicePrincipalFederationPolicyRequest) { -} - -func (newState *GetServicePrincipalFederationPolicyRequest) SyncEffectiveFieldsDuringRead(existingState GetServicePrincipalFederationPolicyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServicePrincipalFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1738,12 +1752,6 @@ type ListAccountFederationPoliciesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAccountFederationPoliciesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountFederationPoliciesRequest) { -} - -func (newState *ListAccountFederationPoliciesRequest) SyncEffectiveFieldsDuringRead(existingState ListAccountFederationPoliciesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountFederationPoliciesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1786,12 +1794,6 @@ type ListCustomAppIntegrationsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListCustomAppIntegrationsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCustomAppIntegrationsRequest) { -} - -func (newState *ListCustomAppIntegrationsRequest) SyncEffectiveFieldsDuringRead(existingState ListCustomAppIntegrationsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCustomAppIntegrationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1828,9 +1830,9 @@ func (o ListCustomAppIntegrationsRequest) Type(ctx context.Context) attr.Type { } type ListFederationPoliciesResponse struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Policies types.List `tfsdk:"policies" tf:"optional"` + Policies types.List `tfsdk:"policies" tf:""` } func (newState *ListFederationPoliciesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFederationPoliciesResponse) { @@ -1839,6 +1841,12 @@ func (newState *ListFederationPoliciesResponse) SyncEffectiveFieldsDuringCreateO func (newState *ListFederationPoliciesResponse) SyncEffectiveFieldsDuringRead(existingState ListFederationPoliciesResponse) { } +func (c ListFederationPoliciesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FederationPolicy{}.ToSchema(cs, append(path, "policies")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFederationPoliciesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1910,12 +1918,6 @@ type ListOAuthPublishedAppsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListOAuthPublishedAppsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListOAuthPublishedAppsRequest) { -} - -func (newState *ListOAuthPublishedAppsRequest) SyncEffectiveFieldsDuringRead(existingState ListOAuthPublishedAppsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListOAuthPublishedAppsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1956,12 +1958,6 @@ type ListPublishedAppIntegrationsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListPublishedAppIntegrationsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPublishedAppIntegrationsRequest) { -} - -func (newState *ListPublishedAppIntegrationsRequest) SyncEffectiveFieldsDuringRead(existingState ListPublishedAppIntegrationsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPublishedAppIntegrationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2004,12 +2000,6 @@ type ListServicePrincipalFederationPoliciesRequest struct { ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *ListServicePrincipalFederationPoliciesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalFederationPoliciesRequest) { -} - -func (newState *ListServicePrincipalFederationPoliciesRequest) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalFederationPoliciesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalFederationPoliciesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2061,12 +2051,6 @@ type ListServicePrincipalSecretsRequest struct { ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *ListServicePrincipalSecretsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalSecretsRequest) { -} - -func (newState *ListServicePrincipalSecretsRequest) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalSecretsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalSecretsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2102,9 +2086,9 @@ func (o ListServicePrincipalSecretsRequest) Type(ctx context.Context) attr.Type type ListServicePrincipalSecretsResponse struct { // A token, which can be sent as `page_token` to retrieve the next page. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // List of the secrets - Secrets types.List `tfsdk:"secrets" tf:"optional"` + Secrets types.List `tfsdk:"secrets" tf:""` } func (newState *ListServicePrincipalSecretsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalSecretsResponse) { @@ -2113,6 +2097,12 @@ func (newState *ListServicePrincipalSecretsResponse) SyncEffectiveFieldsDuringCr func (newState *ListServicePrincipalSecretsResponse) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalSecretsResponse) { } +func (c ListServicePrincipalSecretsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SecretInfo{}.ToSchema(cs, append(path, "secrets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalSecretsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2185,23 +2175,23 @@ type OidcFederationPolicy struct { // the token matches at least one audience in the policy, the token is // considered a match. If audiences is unspecified, defaults to your // Databricks account id. - Audiences types.List `tfsdk:"audiences" tf:"optional"` + Audiences types.List `tfsdk:"audiences" tf:""` // The required token issuer, as specified in the 'iss' claim of federated // tokens. - Issuer types.String `tfsdk:"issuer" tf:"optional"` + Issuer types.String `tfsdk:"issuer" tf:""` // The public keys used to validate the signature of federated tokens, in // JWKS format. If unspecified (recommended), Databricks automatically // fetches the public keys from your issuer’s well known endpoint. // Databricks strongly recommends relying on your issuer’s well known // endpoint for discovering public keys. - JwksJson types.String `tfsdk:"jwks_json" tf:"optional"` + JwksJson types.String `tfsdk:"jwks_json" tf:""` // The required token subject, as specified in the subject claim of // federated tokens. Must be specified for service principal federation // policies. Must not be specified for account federation policies. - Subject types.String `tfsdk:"subject" tf:"optional"` + Subject types.String `tfsdk:"subject" tf:""` // The claim that contains the subject of the token. If unspecified, the // default value is 'sub'. - SubjectClaim types.String `tfsdk:"subject_claim" tf:"optional"` + SubjectClaim types.String `tfsdk:"subject_claim" tf:""` } func (newState *OidcFederationPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan OidcFederationPolicy) { @@ -2210,6 +2200,11 @@ func (newState *OidcFederationPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *OidcFederationPolicy) SyncEffectiveFieldsDuringRead(existingState OidcFederationPolicy) { } +func (c OidcFederationPolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OidcFederationPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2281,21 +2276,21 @@ func (o *OidcFederationPolicy) SetAudiences(ctx context.Context, v []types.Strin type PublishedAppOutput struct { // Unique ID of the published OAuth app. - AppId types.String `tfsdk:"app_id" tf:"optional"` + AppId types.String `tfsdk:"app_id" tf:""` // Client ID of the published OAuth app. It is the client_id in the OAuth // flow - ClientId types.String `tfsdk:"client_id" tf:"optional"` + ClientId types.String `tfsdk:"client_id" tf:""` // Description of the published OAuth app. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Whether the published OAuth app is a confidential client. It is always // false for published OAuth apps. - IsConfidentialClient types.Bool `tfsdk:"is_confidential_client" tf:"optional"` + IsConfidentialClient types.Bool `tfsdk:"is_confidential_client" tf:""` // The display name of the published OAuth app. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Redirect URLs of the published OAuth app. - RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + RedirectUrls types.List `tfsdk:"redirect_urls" tf:""` // Required scopes for the published OAuth app. - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` } func (newState *PublishedAppOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishedAppOutput) { @@ -2304,6 +2299,11 @@ func (newState *PublishedAppOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PublishedAppOutput) SyncEffectiveFieldsDuringRead(existingState PublishedAppOutput) { } +func (c PublishedAppOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishedAppOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2408,15 +2408,15 @@ func (o *PublishedAppOutput) SetScopes(ctx context.Context, v []types.String) { type SecretInfo struct { // UTC time when the secret was created - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // ID of the secret - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Secret Hash - SecretHash types.String `tfsdk:"secret_hash" tf:"optional"` + SecretHash types.String `tfsdk:"secret_hash" tf:""` // Status of the secret - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // UTC time when the secret was updated - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *SecretInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretInfo) { @@ -2425,6 +2425,11 @@ func (newState *SecretInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretI func (newState *SecretInfo) SyncEffectiveFieldsDuringRead(existingState SecretInfo) { } +func (c SecretInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SecretInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2466,9 +2471,9 @@ func (o SecretInfo) Type(ctx context.Context) attr.Type { type TokenAccessPolicy struct { // access token time to live in minutes - AccessTokenTtlInMinutes types.Int64 `tfsdk:"access_token_ttl_in_minutes" tf:"optional"` + AccessTokenTtlInMinutes types.Int64 `tfsdk:"access_token_ttl_in_minutes" tf:""` // refresh token time to live in minutes - RefreshTokenTtlInMinutes types.Int64 `tfsdk:"refresh_token_ttl_in_minutes" tf:"optional"` + RefreshTokenTtlInMinutes types.Int64 `tfsdk:"refresh_token_ttl_in_minutes" tf:""` } func (newState *TokenAccessPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenAccessPolicy) { @@ -2477,6 +2482,11 @@ func (newState *TokenAccessPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *TokenAccessPolicy) SyncEffectiveFieldsDuringRead(existingState TokenAccessPolicy) { } +func (c TokenAccessPolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenAccessPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2512,8 +2522,8 @@ func (o TokenAccessPolicy) Type(ctx context.Context) attr.Type { // Update account federation policy type UpdateAccountFederationPolicyRequest struct { - Policy types.Object `tfsdk:"policy" tf:"optional,object"` - + Policy types.Object `tfsdk:"policy" tf:"object"` + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` // Field mask is required to be passed into the PATCH request. Field mask // specifies which fields of the setting payload will be updated. The field @@ -2522,12 +2532,6 @@ type UpdateAccountFederationPolicyRequest struct { UpdateMask types.String `tfsdk:"-"` } -func (newState *UpdateAccountFederationPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAccountFederationPolicyRequest) { -} - -func (newState *UpdateAccountFederationPolicyRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAccountFederationPolicyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAccountFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2597,9 +2601,9 @@ type UpdateCustomAppIntegration struct { IntegrationId types.String `tfsdk:"-"` // List of OAuth redirect urls to be updated in the custom OAuth app // integration - RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + RedirectUrls types.List `tfsdk:"redirect_urls" tf:""` // Token access policy to be updated in the custom OAuth app integration - TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"object"` } func (newState *UpdateCustomAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCustomAppIntegration) { @@ -2608,6 +2612,13 @@ func (newState *UpdateCustomAppIntegration) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UpdateCustomAppIntegration) SyncEffectiveFieldsDuringRead(existingState UpdateCustomAppIntegration) { } +func (c UpdateCustomAppIntegration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "integration_id")...) + TokenAccessPolicy{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCustomAppIntegration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2711,6 +2722,11 @@ func (newState *UpdateCustomAppIntegrationOutput) SyncEffectiveFieldsDuringCreat func (newState *UpdateCustomAppIntegrationOutput) SyncEffectiveFieldsDuringRead(existingState UpdateCustomAppIntegrationOutput) { } +func (c UpdateCustomAppIntegrationOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCustomAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2741,7 +2757,7 @@ func (o UpdateCustomAppIntegrationOutput) Type(ctx context.Context) attr.Type { type UpdatePublishedAppIntegration struct { IntegrationId types.String `tfsdk:"-"` // Token access policy to be updated in the published OAuth app integration - TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"object"` } func (newState *UpdatePublishedAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePublishedAppIntegration) { @@ -2750,6 +2766,13 @@ func (newState *UpdatePublishedAppIntegration) SyncEffectiveFieldsDuringCreateOr func (newState *UpdatePublishedAppIntegration) SyncEffectiveFieldsDuringRead(existingState UpdatePublishedAppIntegration) { } +func (c UpdatePublishedAppIntegration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "integration_id")...) + TokenAccessPolicy{}.ToSchema(cs, append(path, "token_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePublishedAppIntegration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2822,6 +2845,11 @@ func (newState *UpdatePublishedAppIntegrationOutput) SyncEffectiveFieldsDuringCr func (newState *UpdatePublishedAppIntegrationOutput) SyncEffectiveFieldsDuringRead(existingState UpdatePublishedAppIntegrationOutput) { } +func (c UpdatePublishedAppIntegrationOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePublishedAppIntegrationOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2851,8 +2879,8 @@ func (o UpdatePublishedAppIntegrationOutput) Type(ctx context.Context) attr.Type // Update service principal federation policy type UpdateServicePrincipalFederationPolicyRequest struct { - Policy types.Object `tfsdk:"policy" tf:"optional,object"` - + Policy types.Object `tfsdk:"policy" tf:"object"` + // The identifier for the federation policy. PolicyId types.String `tfsdk:"-"` // The service principal id for the federation policy. ServicePrincipalId types.Int64 `tfsdk:"-"` @@ -2863,12 +2891,6 @@ type UpdateServicePrincipalFederationPolicyRequest struct { UpdateMask types.String `tfsdk:"-"` } -func (newState *UpdateServicePrincipalFederationPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateServicePrincipalFederationPolicyRequest) { -} - -func (newState *UpdateServicePrincipalFederationPolicyRequest) SyncEffectiveFieldsDuringRead(existingState UpdateServicePrincipalFederationPolicyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateServicePrincipalFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/pipelines_tf/legacy_model.go b/internal/service/pipelines_tf/legacy_model.go index 35df38afc..da84df080 100755 --- a/internal/service/pipelines_tf/legacy_model.go +++ b/internal/service/pipelines_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/compute_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -25,64 +26,71 @@ import ( type CreatePipeline_SdkV2 struct { // If false, deployment will fail if name conflicts with that of another // pipeline. - AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:"optional"` + AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:""` // Budget policy of this pipeline. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // A catalog in Unity Catalog to publish data from this pipeline to. If // `target` is specified, tables in this pipeline are published to a // `target` schema inside `catalog` (for example, // `catalog`.`target`.`table`). If `target` is not specified, no data is // published to Unity Catalog. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // DLT Release Channel that specifies which version to use. - Channel types.String `tfsdk:"channel" tf:"optional"` + Channel types.String `tfsdk:"channel" tf:""` // Cluster settings for this pipeline deployment. - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // String-String configuration for this pipeline execution. - Configuration types.Map `tfsdk:"configuration" tf:"optional"` + Configuration types.Map `tfsdk:"configuration" tf:""` // Whether the pipeline is continuous or triggered. This replaces `trigger`. - Continuous types.Bool `tfsdk:"continuous" tf:"optional"` + Continuous types.Bool `tfsdk:"continuous" tf:""` // Deployment type of this pipeline. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.List `tfsdk:"deployment" tf:"object"` // Whether the pipeline is in Development mode. Defaults to false. - Development types.Bool `tfsdk:"development" tf:"optional"` + Development types.Bool `tfsdk:"development" tf:""` - DryRun types.Bool `tfsdk:"dry_run" tf:"optional"` + DryRun types.Bool `tfsdk:"dry_run" tf:""` // Pipeline product edition. - Edition types.String `tfsdk:"edition" tf:"optional"` + Edition types.String `tfsdk:"edition" tf:""` // Filters on which Pipeline packages to include in the deployed graph. - Filters types.List `tfsdk:"filters" tf:"optional,object"` + Filters types.List `tfsdk:"filters" tf:"object"` // The definition of a gateway pipeline to support change data capture. - GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"optional,object"` + GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"object"` // Unique identifier for this pipeline. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"optional,object"` + IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"object"` // Libraries or code needed by this deployment. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Friendly identifier for this pipeline. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of notification settings for this pipeline. - Notifications types.List `tfsdk:"notifications" tf:"optional"` + Notifications types.List `tfsdk:"notifications" tf:""` // Whether Photon is enabled for this pipeline. - Photon types.Bool `tfsdk:"photon" tf:"optional"` + Photon types.Bool `tfsdk:"photon" tf:""` // Restart window of this pipeline. - RestartWindow types.List `tfsdk:"restart_window" tf:"optional,object"` + RestartWindow types.List `tfsdk:"restart_window" tf:"object"` + // Write-only setting, available only in Create/Update calls. Specifies the + // user or service principal that the pipeline runs as. If not specified, + // the pipeline runs as the user who created the pipeline. + // + // Only `user_name` or `service_principal_name` can be specified. If both + // are specified, an error is thrown. + RunAs types.List `tfsdk:"run_as" tf:"object"` // The default schema (database) where tables are read from or published to. // The presence of this field implies that the pipeline is in direct // publishing mode. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // Whether serverless compute is enabled for this pipeline. - Serverless types.Bool `tfsdk:"serverless" tf:"optional"` + Serverless types.Bool `tfsdk:"serverless" tf:""` // DBFS root directory for storing checkpoints and tables. - Storage types.String `tfsdk:"storage" tf:"optional"` + Storage types.String `tfsdk:"storage" tf:""` // Target schema (database) to add tables in this pipeline to. If not // specified, no data is published to the Hive metastore or Unity Catalog. // To publish to Unity Catalog, also specify `catalog`. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` // Which pipeline trigger to use. Deprecated: Use `continuous` instead. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.List `tfsdk:"trigger" tf:"object"` } func (newState *CreatePipeline_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePipeline_SdkV2) { @@ -91,6 +99,21 @@ func (newState *CreatePipeline_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CreatePipeline_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePipeline_SdkV2) { } +func (c CreatePipeline_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineCluster_SdkV2{}.ToSchema(cs, append(path, "clusters")...) + PipelineDeployment_SdkV2{}.ToSchema(cs, append(path, "deployment")...) + Filters_SdkV2{}.ToSchema(cs, append(path, "filters")...) + IngestionGatewayPipelineDefinition_SdkV2{}.ToSchema(cs, append(path, "gateway_definition")...) + IngestionPipelineDefinition_SdkV2{}.ToSchema(cs, append(path, "ingestion_definition")...) + PipelineLibrary_SdkV2{}.ToSchema(cs, append(path, "libraries")...) + Notifications_SdkV2{}.ToSchema(cs, append(path, "notifications")...) + RestartWindow_SdkV2{}.ToSchema(cs, append(path, "restart_window")...) + RunAs_SdkV2{}.ToSchema(cs, append(path, "run_as")...) + PipelineTrigger_SdkV2{}.ToSchema(cs, append(path, "trigger")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePipeline. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -109,6 +132,7 @@ func (a CreatePipeline_SdkV2) GetComplexFieldTypes(ctx context.Context) map[stri "libraries": reflect.TypeOf(PipelineLibrary_SdkV2{}), "notifications": reflect.TypeOf(Notifications_SdkV2{}), "restart_window": reflect.TypeOf(RestartWindow_SdkV2{}), + "run_as": reflect.TypeOf(RunAs_SdkV2{}), "trigger": reflect.TypeOf(PipelineTrigger_SdkV2{}), } } @@ -140,6 +164,7 @@ func (o CreatePipeline_SdkV2) ToObjectValue(ctx context.Context) basetypes.Objec "notifications": o.Notifications, "photon": o.Photon, "restart_window": o.RestartWindow, + "run_as": o.RunAs, "schema": o.Schema, "serverless": o.Serverless, "storage": o.Storage, @@ -190,6 +215,9 @@ func (o CreatePipeline_SdkV2) Type(ctx context.Context) attr.Type { "restart_window": basetypes.ListType{ ElemType: RestartWindow_SdkV2{}.Type(ctx), }, + "run_as": basetypes.ListType{ + ElemType: RunAs_SdkV2{}.Type(ctx), + }, "schema": types.StringType, "serverless": types.BoolType, "storage": types.StringType, @@ -435,6 +463,32 @@ func (o *CreatePipeline_SdkV2) SetRestartWindow(ctx context.Context, v RestartWi o.RestartWindow = types.ListValueMust(t, vs) } +// GetRunAs returns the value of the RunAs field in CreatePipeline_SdkV2 as +// a RunAs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetRunAs(ctx context.Context) (RunAs_SdkV2, bool) { + var e RunAs_SdkV2 + if o.RunAs.IsNull() || o.RunAs.IsUnknown() { + return e, false + } + var v []RunAs_SdkV2 + d := o.RunAs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunAs sets the value of the RunAs field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetRunAs(ctx context.Context, v RunAs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_as"] + o.RunAs = types.ListValueMust(t, vs) +} + // GetTrigger returns the value of the Trigger field in CreatePipeline_SdkV2 as // a PipelineTrigger_SdkV2 value. // If the field is unknown or null, the boolean return value is false. @@ -463,10 +517,10 @@ func (o *CreatePipeline_SdkV2) SetTrigger(ctx context.Context, v PipelineTrigger type CreatePipelineResponse_SdkV2 struct { // Only returned when dry_run is true. - EffectiveSettings types.List `tfsdk:"effective_settings" tf:"optional,object"` + EffectiveSettings types.List `tfsdk:"effective_settings" tf:"object"` // The unique identifier for the newly created pipeline. Only returned when // dry_run is false. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` } func (newState *CreatePipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePipelineResponse_SdkV2) { @@ -475,6 +529,12 @@ func (newState *CreatePipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CreatePipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePipelineResponse_SdkV2) { } +func (c CreatePipelineResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineSpec_SdkV2{}.ToSchema(cs, append(path, "effective_settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -539,9 +599,9 @@ func (o *CreatePipelineResponse_SdkV2) SetEffectiveSettings(ctx context.Context, } type CronTrigger_SdkV2 struct { - QuartzCronSchedule types.String `tfsdk:"quartz_cron_schedule" tf:"optional"` + QuartzCronSchedule types.String `tfsdk:"quartz_cron_schedule" tf:""` - TimezoneId types.String `tfsdk:"timezone_id" tf:"optional"` + TimezoneId types.String `tfsdk:"timezone_id" tf:""` } func (newState *CronTrigger_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CronTrigger_SdkV2) { @@ -550,6 +610,11 @@ func (newState *CronTrigger_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CronTrigger_SdkV2) SyncEffectiveFieldsDuringRead(existingState CronTrigger_SdkV2) { } +func (c CronTrigger_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CronTrigger. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -585,9 +650,9 @@ func (o CronTrigger_SdkV2) Type(ctx context.Context) attr.Type { type DataPlaneId_SdkV2 struct { // The instance name of the data plane emitting an event. - Instance types.String `tfsdk:"instance" tf:"optional"` + Instance types.String `tfsdk:"instance" tf:""` // A sequence number, unique and increasing within the data plane instance. - SeqNo types.Int64 `tfsdk:"seq_no" tf:"optional"` + SeqNo types.Int64 `tfsdk:"seq_no" tf:""` } func (newState *DataPlaneId_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPlaneId_SdkV2) { @@ -596,6 +661,11 @@ func (newState *DataPlaneId_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DataPlaneId_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataPlaneId_SdkV2) { } +func (c DataPlaneId_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataPlaneId. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -634,12 +704,6 @@ type DeletePipelineRequest_SdkV2 struct { PipelineId types.String `tfsdk:"-"` } -func (newState *DeletePipelineRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePipelineRequest_SdkV2) { -} - -func (newState *DeletePipelineRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePipelineRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePipelineRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -680,6 +744,11 @@ func (newState *DeletePipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *DeletePipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePipelineResponse_SdkV2) { } +func (c DeletePipelineResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -710,68 +779,75 @@ func (o DeletePipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { type EditPipeline_SdkV2 struct { // If false, deployment will fail if name has changed and conflicts the name // of another pipeline. - AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:"optional"` + AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:""` // Budget policy of this pipeline. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // A catalog in Unity Catalog to publish data from this pipeline to. If // `target` is specified, tables in this pipeline are published to a // `target` schema inside `catalog` (for example, // `catalog`.`target`.`table`). If `target` is not specified, no data is // published to Unity Catalog. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // DLT Release Channel that specifies which version to use. - Channel types.String `tfsdk:"channel" tf:"optional"` + Channel types.String `tfsdk:"channel" tf:""` // Cluster settings for this pipeline deployment. - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // String-String configuration for this pipeline execution. - Configuration types.Map `tfsdk:"configuration" tf:"optional"` + Configuration types.Map `tfsdk:"configuration" tf:""` // Whether the pipeline is continuous or triggered. This replaces `trigger`. - Continuous types.Bool `tfsdk:"continuous" tf:"optional"` + Continuous types.Bool `tfsdk:"continuous" tf:""` // Deployment type of this pipeline. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.List `tfsdk:"deployment" tf:"object"` // Whether the pipeline is in Development mode. Defaults to false. - Development types.Bool `tfsdk:"development" tf:"optional"` + Development types.Bool `tfsdk:"development" tf:""` // Pipeline product edition. - Edition types.String `tfsdk:"edition" tf:"optional"` + Edition types.String `tfsdk:"edition" tf:""` // If present, the last-modified time of the pipeline settings before the // edit. If the settings were modified after that time, then the request // will fail with a conflict. - ExpectedLastModified types.Int64 `tfsdk:"expected_last_modified" tf:"optional"` + ExpectedLastModified types.Int64 `tfsdk:"expected_last_modified" tf:""` // Filters on which Pipeline packages to include in the deployed graph. - Filters types.List `tfsdk:"filters" tf:"optional,object"` + Filters types.List `tfsdk:"filters" tf:"object"` // The definition of a gateway pipeline to support change data capture. - GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"optional,object"` + GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"object"` // Unique identifier for this pipeline. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"optional,object"` + IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"object"` // Libraries or code needed by this deployment. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Friendly identifier for this pipeline. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of notification settings for this pipeline. - Notifications types.List `tfsdk:"notifications" tf:"optional"` + Notifications types.List `tfsdk:"notifications" tf:""` // Whether Photon is enabled for this pipeline. - Photon types.Bool `tfsdk:"photon" tf:"optional"` + Photon types.Bool `tfsdk:"photon" tf:""` // Unique identifier for this pipeline. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // Restart window of this pipeline. - RestartWindow types.List `tfsdk:"restart_window" tf:"optional,object"` + RestartWindow types.List `tfsdk:"restart_window" tf:"object"` + // Write-only setting, available only in Create/Update calls. Specifies the + // user or service principal that the pipeline runs as. If not specified, + // the pipeline runs as the user who created the pipeline. + // + // Only `user_name` or `service_principal_name` can be specified. If both + // are specified, an error is thrown. + RunAs types.List `tfsdk:"run_as" tf:"object"` // The default schema (database) where tables are read from or published to. // The presence of this field implies that the pipeline is in direct // publishing mode. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // Whether serverless compute is enabled for this pipeline. - Serverless types.Bool `tfsdk:"serverless" tf:"optional"` + Serverless types.Bool `tfsdk:"serverless" tf:""` // DBFS root directory for storing checkpoints and tables. - Storage types.String `tfsdk:"storage" tf:"optional"` + Storage types.String `tfsdk:"storage" tf:""` // Target schema (database) to add tables in this pipeline to. If not // specified, no data is published to the Hive metastore or Unity Catalog. // To publish to Unity Catalog, also specify `catalog`. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` // Which pipeline trigger to use. Deprecated: Use `continuous` instead. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.List `tfsdk:"trigger" tf:"object"` } func (newState *EditPipeline_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPipeline_SdkV2) { @@ -780,6 +856,21 @@ func (newState *EditPipeline_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EditPipeline_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPipeline_SdkV2) { } +func (c EditPipeline_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineCluster_SdkV2{}.ToSchema(cs, append(path, "clusters")...) + PipelineDeployment_SdkV2{}.ToSchema(cs, append(path, "deployment")...) + Filters_SdkV2{}.ToSchema(cs, append(path, "filters")...) + IngestionGatewayPipelineDefinition_SdkV2{}.ToSchema(cs, append(path, "gateway_definition")...) + IngestionPipelineDefinition_SdkV2{}.ToSchema(cs, append(path, "ingestion_definition")...) + PipelineLibrary_SdkV2{}.ToSchema(cs, append(path, "libraries")...) + Notifications_SdkV2{}.ToSchema(cs, append(path, "notifications")...) + RestartWindow_SdkV2{}.ToSchema(cs, append(path, "restart_window")...) + RunAs_SdkV2{}.ToSchema(cs, append(path, "run_as")...) + PipelineTrigger_SdkV2{}.ToSchema(cs, append(path, "trigger")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPipeline. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -798,6 +889,7 @@ func (a EditPipeline_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string "libraries": reflect.TypeOf(PipelineLibrary_SdkV2{}), "notifications": reflect.TypeOf(Notifications_SdkV2{}), "restart_window": reflect.TypeOf(RestartWindow_SdkV2{}), + "run_as": reflect.TypeOf(RunAs_SdkV2{}), "trigger": reflect.TypeOf(PipelineTrigger_SdkV2{}), } } @@ -830,6 +922,7 @@ func (o EditPipeline_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectV "photon": o.Photon, "pipeline_id": o.PipelineId, "restart_window": o.RestartWindow, + "run_as": o.RunAs, "schema": o.Schema, "serverless": o.Serverless, "storage": o.Storage, @@ -881,6 +974,9 @@ func (o EditPipeline_SdkV2) Type(ctx context.Context) attr.Type { "restart_window": basetypes.ListType{ ElemType: RestartWindow_SdkV2{}.Type(ctx), }, + "run_as": basetypes.ListType{ + ElemType: RunAs_SdkV2{}.Type(ctx), + }, "schema": types.StringType, "serverless": types.BoolType, "storage": types.StringType, @@ -1126,6 +1222,32 @@ func (o *EditPipeline_SdkV2) SetRestartWindow(ctx context.Context, v RestartWind o.RestartWindow = types.ListValueMust(t, vs) } +// GetRunAs returns the value of the RunAs field in EditPipeline_SdkV2 as +// a RunAs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetRunAs(ctx context.Context) (RunAs_SdkV2, bool) { + var e RunAs_SdkV2 + if o.RunAs.IsNull() || o.RunAs.IsUnknown() { + return e, false + } + var v []RunAs_SdkV2 + d := o.RunAs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunAs sets the value of the RunAs field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetRunAs(ctx context.Context, v RunAs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_as"] + o.RunAs = types.ListValueMust(t, vs) +} + // GetTrigger returns the value of the Trigger field in EditPipeline_SdkV2 as // a PipelineTrigger_SdkV2 value. // If the field is unknown or null, the boolean return value is false. @@ -1161,6 +1283,11 @@ func (newState *EditPipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *EditPipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPipelineResponse_SdkV2) { } +func (c EditPipelineResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1190,9 +1317,9 @@ func (o EditPipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { type ErrorDetail_SdkV2 struct { // The exception thrown for this error, with its chain of cause. - Exceptions types.List `tfsdk:"exceptions" tf:"optional"` + Exceptions types.List `tfsdk:"exceptions" tf:""` // Whether this error is considered fatal, that is, unrecoverable. - Fatal types.Bool `tfsdk:"fatal" tf:"optional"` + Fatal types.Bool `tfsdk:"fatal" tf:""` } func (newState *ErrorDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ErrorDetail_SdkV2) { @@ -1201,6 +1328,12 @@ func (newState *ErrorDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ErrorDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState ErrorDetail_SdkV2) { } +func (c ErrorDetail_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SerializedException_SdkV2{}.ToSchema(cs, append(path, "exceptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ErrorDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1266,7 +1399,7 @@ func (o *ErrorDetail_SdkV2) SetExceptions(ctx context.Context, v []SerializedExc type FileLibrary_SdkV2 struct { // The absolute path of the file. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *FileLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileLibrary_SdkV2) { @@ -1275,6 +1408,11 @@ func (newState *FileLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *FileLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileLibrary_SdkV2) { } +func (c FileLibrary_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1308,9 +1446,9 @@ func (o FileLibrary_SdkV2) Type(ctx context.Context) attr.Type { type Filters_SdkV2 struct { // Paths to exclude. - Exclude types.List `tfsdk:"exclude" tf:"optional"` + Exclude types.List `tfsdk:"exclude" tf:""` // Paths to include. - Include types.List `tfsdk:"include" tf:"optional"` + Include types.List `tfsdk:"include" tf:""` } func (newState *Filters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Filters_SdkV2) { @@ -1319,6 +1457,11 @@ func (newState *Filters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Filt func (newState *Filters_SdkV2) SyncEffectiveFieldsDuringRead(existingState Filters_SdkV2) { } +func (c Filters_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Filters. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1417,12 +1560,6 @@ type GetPipelinePermissionLevelsRequest_SdkV2 struct { PipelineId types.String `tfsdk:"-"` } -func (newState *GetPipelinePermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelinePermissionLevelsRequest_SdkV2) { -} - -func (newState *GetPipelinePermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelinePermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelinePermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1456,7 +1593,7 @@ func (o GetPipelinePermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr type GetPipelinePermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetPipelinePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelinePermissionLevelsResponse_SdkV2) { @@ -1465,6 +1602,12 @@ func (newState *GetPipelinePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDu func (newState *GetPipelinePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelinePermissionLevelsResponse_SdkV2) { } +func (c GetPipelinePermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelinePermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelinePermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1532,12 +1675,6 @@ type GetPipelinePermissionsRequest_SdkV2 struct { PipelineId types.String `tfsdk:"-"` } -func (newState *GetPipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelinePermissionsRequest_SdkV2) { -} - -func (newState *GetPipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelinePermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelinePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1574,12 +1711,6 @@ type GetPipelineRequest_SdkV2 struct { PipelineId types.String `tfsdk:"-"` } -func (newState *GetPipelineRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelineRequest_SdkV2) { -} - -func (newState *GetPipelineRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelineRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelineRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1613,31 +1744,31 @@ func (o GetPipelineRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetPipelineResponse_SdkV2 struct { // An optional message detailing the cause of the pipeline state. - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` // The ID of the cluster that the pipeline is running on. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The username of the pipeline creator. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Serverless budget policy ID of this pipeline. - EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:"optional"` + EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:""` // The health of a pipeline. - Health types.String `tfsdk:"health" tf:"optional"` + Health types.String `tfsdk:"health" tf:""` // The last time the pipeline settings were modified or created. - LastModified types.Int64 `tfsdk:"last_modified" tf:"optional"` + LastModified types.Int64 `tfsdk:"last_modified" tf:""` // Status of the latest updates for the pipeline. Ordered with the newest // update first. - LatestUpdates types.List `tfsdk:"latest_updates" tf:"optional"` + LatestUpdates types.List `tfsdk:"latest_updates" tf:""` // A human friendly identifier for the pipeline, taken from the `spec`. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The ID of the pipeline. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // Username of the user that the pipeline will run on behalf of. - RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` + RunAsUserName types.String `tfsdk:"run_as_user_name" tf:""` // The pipeline specification. This field is not returned when called by // `ListPipelines`. - Spec types.List `tfsdk:"spec" tf:"optional,object"` + Spec types.List `tfsdk:"spec" tf:"object"` // The pipeline state. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *GetPipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelineResponse_SdkV2) { @@ -1646,6 +1777,13 @@ func (newState *GetPipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *GetPipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelineResponse_SdkV2) { } +func (c GetPipelineResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateStateInfo_SdkV2{}.ToSchema(cs, append(path, "latest_updates")...) + PipelineSpec_SdkV2{}.ToSchema(cs, append(path, "spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1766,12 +1904,6 @@ type GetUpdateRequest_SdkV2 struct { UpdateId types.String `tfsdk:"-"` } -func (newState *GetUpdateRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUpdateRequest_SdkV2) { -} - -func (newState *GetUpdateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetUpdateRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetUpdateRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1807,7 +1939,7 @@ func (o GetUpdateRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetUpdateResponse_SdkV2 struct { // The current update info. - Update types.List `tfsdk:"update" tf:"optional,object"` + Update types.List `tfsdk:"update" tf:"object"` } func (newState *GetUpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUpdateResponse_SdkV2) { @@ -1816,6 +1948,12 @@ func (newState *GetUpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *GetUpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetUpdateResponse_SdkV2) { } +func (c GetUpdateResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateInfo_SdkV2{}.ToSchema(cs, append(path, "update")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetUpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1879,11 +2017,11 @@ func (o *GetUpdateResponse_SdkV2) SetUpdate(ctx context.Context, v UpdateInfo_Sd type IngestionConfig_SdkV2 struct { // Select a specific source report. - Report types.List `tfsdk:"report" tf:"optional,object"` + Report types.List `tfsdk:"report" tf:"object"` // Select all tables from a specific source schema. - Schema types.List `tfsdk:"schema" tf:"optional,object"` + Schema types.List `tfsdk:"schema" tf:"object"` // Select a specific source table. - Table types.List `tfsdk:"table" tf:"optional,object"` + Table types.List `tfsdk:"table" tf:"object"` } func (newState *IngestionConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionConfig_SdkV2) { @@ -1892,6 +2030,14 @@ func (newState *IngestionConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *IngestionConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState IngestionConfig_SdkV2) { } +func (c IngestionConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ReportSpec_SdkV2{}.ToSchema(cs, append(path, "report")...) + SchemaSpec_SdkV2{}.ToSchema(cs, append(path, "schema")...) + TableSpec_SdkV2{}.ToSchema(cs, append(path, "table")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IngestionConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2019,21 +2165,21 @@ type IngestionGatewayPipelineDefinition_SdkV2 struct { // [Deprecated, use connection_name instead] Immutable. The Unity Catalog // connection that this gateway pipeline uses to communicate with the // source. - ConnectionId types.String `tfsdk:"connection_id" tf:"optional"` + ConnectionId types.String `tfsdk:"connection_id" tf:""` // Immutable. The Unity Catalog connection that this gateway pipeline uses // to communicate with the source. - ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + ConnectionName types.String `tfsdk:"connection_name" tf:""` // Required, Immutable. The name of the catalog for the gateway pipeline's // storage location. - GatewayStorageCatalog types.String `tfsdk:"gateway_storage_catalog" tf:"optional"` + GatewayStorageCatalog types.String `tfsdk:"gateway_storage_catalog" tf:""` // Optional. The Unity Catalog-compatible name for the gateway storage // location. This is the destination to use for the data that is extracted // by the gateway. Delta Live Tables system will automatically create the // storage location under the catalog and schema. - GatewayStorageName types.String `tfsdk:"gateway_storage_name" tf:"optional"` + GatewayStorageName types.String `tfsdk:"gateway_storage_name" tf:""` // Required, Immutable. The name of the schema for the gateway pipelines's // storage location. - GatewayStorageSchema types.String `tfsdk:"gateway_storage_schema" tf:"optional"` + GatewayStorageSchema types.String `tfsdk:"gateway_storage_schema" tf:""` } func (newState *IngestionGatewayPipelineDefinition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionGatewayPipelineDefinition_SdkV2) { @@ -2042,6 +2188,11 @@ func (newState *IngestionGatewayPipelineDefinition_SdkV2) SyncEffectiveFieldsDur func (newState *IngestionGatewayPipelineDefinition_SdkV2) SyncEffectiveFieldsDuringRead(existingState IngestionGatewayPipelineDefinition_SdkV2) { } +func (c IngestionGatewayPipelineDefinition_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IngestionGatewayPipelineDefinition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2085,17 +2236,17 @@ type IngestionPipelineDefinition_SdkV2 struct { // Immutable. The Unity Catalog connection that this ingestion pipeline uses // to communicate with the source. This is used with connectors for // applications like Salesforce, Workday, and so on. - ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + ConnectionName types.String `tfsdk:"connection_name" tf:""` // Immutable. Identifier for the gateway that is used by this ingestion // pipeline to communicate with the source database. This is used with // connectors to databases like SQL Server. - IngestionGatewayId types.String `tfsdk:"ingestion_gateway_id" tf:"optional"` + IngestionGatewayId types.String `tfsdk:"ingestion_gateway_id" tf:""` // Required. Settings specifying tables to replicate and the destination for // the replicated tables. - Objects types.List `tfsdk:"objects" tf:"optional"` + Objects types.List `tfsdk:"objects" tf:""` // Configuration settings to control the ingestion of tables. These settings // are applied to all tables in the pipeline. - TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.List `tfsdk:"table_configuration" tf:"object"` } func (newState *IngestionPipelineDefinition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionPipelineDefinition_SdkV2) { @@ -2104,6 +2255,13 @@ func (newState *IngestionPipelineDefinition_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *IngestionPipelineDefinition_SdkV2) SyncEffectiveFieldsDuringRead(existingState IngestionPipelineDefinition_SdkV2) { } +func (c IngestionPipelineDefinition_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IngestionConfig_SdkV2{}.ToSchema(cs, append(path, "objects")...) + TableSpecificConfig_SdkV2{}.ToSchema(cs, append(path, "table_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IngestionPipelineDefinition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2227,12 +2385,6 @@ type ListPipelineEventsRequest_SdkV2 struct { PipelineId types.String `tfsdk:"-"` } -func (newState *ListPipelineEventsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelineEventsRequest_SdkV2) { -} - -func (newState *ListPipelineEventsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPipelineEventsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelineEventsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2304,11 +2456,11 @@ func (o *ListPipelineEventsRequest_SdkV2) SetOrderBy(ctx context.Context, v []ty type ListPipelineEventsResponse_SdkV2 struct { // The list of events matching the request criteria. - Events types.List `tfsdk:"events" tf:"optional"` + Events types.List `tfsdk:"events" tf:""` // If present, a token to fetch the next page of events. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // If present, a token to fetch the previous page of events. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListPipelineEventsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelineEventsResponse_SdkV2) { @@ -2317,6 +2469,12 @@ func (newState *ListPipelineEventsResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ListPipelineEventsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPipelineEventsResponse_SdkV2) { } +func (c ListPipelineEventsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineEvent_SdkV2{}.ToSchema(cs, append(path, "events")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelineEventsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2407,12 +2565,6 @@ type ListPipelinesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListPipelinesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelinesRequest_SdkV2) { -} - -func (newState *ListPipelinesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPipelinesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelinesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2482,9 +2634,9 @@ func (o *ListPipelinesRequest_SdkV2) SetOrderBy(ctx context.Context, v []types.S type ListPipelinesResponse_SdkV2 struct { // If present, a token to fetch the next page of events. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // The list of events matching the request criteria. - Statuses types.List `tfsdk:"statuses" tf:"optional"` + Statuses types.List `tfsdk:"statuses" tf:""` } func (newState *ListPipelinesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelinesResponse_SdkV2) { @@ -2493,6 +2645,12 @@ func (newState *ListPipelinesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListPipelinesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPipelinesResponse_SdkV2) { } +func (c ListPipelinesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineStateInfo_SdkV2{}.ToSchema(cs, append(path, "statuses")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelinesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2568,12 +2726,6 @@ type ListUpdatesRequest_SdkV2 struct { UntilUpdateId types.String `tfsdk:"-"` } -func (newState *ListUpdatesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUpdatesRequest_SdkV2) { -} - -func (newState *ListUpdatesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListUpdatesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUpdatesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2614,12 +2766,12 @@ func (o ListUpdatesRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListUpdatesResponse_SdkV2 struct { // If present, then there are more results, and this a token to be used in a // subsequent request to fetch the next page. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // If present, then this token can be used in a subsequent request to fetch // the previous page. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` - Updates types.List `tfsdk:"updates" tf:"optional"` + Updates types.List `tfsdk:"updates" tf:""` } func (newState *ListUpdatesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUpdatesResponse_SdkV2) { @@ -2628,6 +2780,12 @@ func (newState *ListUpdatesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ListUpdatesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListUpdatesResponse_SdkV2) { } +func (c ListUpdatesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateInfo_SdkV2{}.ToSchema(cs, append(path, "updates")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUpdatesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2702,6 +2860,11 @@ func (newState *ManualTrigger_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ManualTrigger_SdkV2) SyncEffectiveFieldsDuringRead(existingState ManualTrigger_SdkV2) { } +func (c ManualTrigger_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ManualTrigger. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2731,7 +2894,7 @@ func (o ManualTrigger_SdkV2) Type(ctx context.Context) attr.Type { type NotebookLibrary_SdkV2 struct { // The absolute path of the notebook. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *NotebookLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotebookLibrary_SdkV2) { @@ -2740,6 +2903,11 @@ func (newState *NotebookLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *NotebookLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState NotebookLibrary_SdkV2) { } +func (c NotebookLibrary_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NotebookLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2779,9 +2947,9 @@ type Notifications_SdkV2 struct { // `on-update-failure`: Each time a pipeline update fails. * // `on-update-fatal-failure`: A pipeline update fails with a non-retryable // (fatal) error. * `on-flow-failure`: A single data flow fails. - Alerts types.List `tfsdk:"alerts" tf:"optional"` + Alerts types.List `tfsdk:"alerts" tf:""` // A list of email addresses notified when a configured alert is triggered. - EmailRecipients types.List `tfsdk:"email_recipients" tf:"optional"` + EmailRecipients types.List `tfsdk:"email_recipients" tf:""` } func (newState *Notifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Notifications_SdkV2) { @@ -2790,6 +2958,11 @@ func (newState *Notifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *Notifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState Notifications_SdkV2) { } +func (c Notifications_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Notifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2884,40 +3057,40 @@ func (o *Notifications_SdkV2) SetEmailRecipients(ctx context.Context, v []types. type Origin_SdkV2 struct { // The id of a batch. Unique within a flow. - BatchId types.Int64 `tfsdk:"batch_id" tf:"optional"` + BatchId types.Int64 `tfsdk:"batch_id" tf:""` // The cloud provider, e.g., AWS or Azure. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // The id of the cluster where an execution happens. Unique within a region. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The name of a dataset. Unique within a pipeline. - DatasetName types.String `tfsdk:"dataset_name" tf:"optional"` + DatasetName types.String `tfsdk:"dataset_name" tf:""` // The id of the flow. Globally unique. Incremental queries will generally // reuse the same id while complete queries will have a new id per update. - FlowId types.String `tfsdk:"flow_id" tf:"optional"` + FlowId types.String `tfsdk:"flow_id" tf:""` // The name of the flow. Not unique. - FlowName types.String `tfsdk:"flow_name" tf:"optional"` + FlowName types.String `tfsdk:"flow_name" tf:""` // The optional host name where the event was triggered - Host types.String `tfsdk:"host" tf:"optional"` + Host types.String `tfsdk:"host" tf:""` // The id of a maintenance run. Globally unique. - MaintenanceId types.String `tfsdk:"maintenance_id" tf:"optional"` + MaintenanceId types.String `tfsdk:"maintenance_id" tf:""` // Materialization name. - MaterializationName types.String `tfsdk:"materialization_name" tf:"optional"` + MaterializationName types.String `tfsdk:"materialization_name" tf:""` // The org id of the user. Unique within a cloud. - OrgId types.Int64 `tfsdk:"org_id" tf:"optional"` + OrgId types.Int64 `tfsdk:"org_id" tf:""` // The id of the pipeline. Globally unique. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // The name of the pipeline. Not unique. - PipelineName types.String `tfsdk:"pipeline_name" tf:"optional"` + PipelineName types.String `tfsdk:"pipeline_name" tf:""` // The cloud region. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The id of the request that caused an update. - RequestId types.String `tfsdk:"request_id" tf:"optional"` + RequestId types.String `tfsdk:"request_id" tf:""` // The id of a (delta) table. Globally unique. - TableId types.String `tfsdk:"table_id" tf:"optional"` + TableId types.String `tfsdk:"table_id" tf:""` // The Unity Catalog id of the MV or ST being updated. - UcResourceId types.String `tfsdk:"uc_resource_id" tf:"optional"` + UcResourceId types.String `tfsdk:"uc_resource_id" tf:""` // The id of an execution. Globally unique. - UpdateId types.String `tfsdk:"update_id" tf:"optional"` + UpdateId types.String `tfsdk:"update_id" tf:""` } func (newState *Origin_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Origin_SdkV2) { @@ -2926,6 +3099,11 @@ func (newState *Origin_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Origi func (newState *Origin_SdkV2) SyncEffectiveFieldsDuringRead(existingState Origin_SdkV2) { } +func (c Origin_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Origin. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2991,13 +3169,13 @@ func (o Origin_SdkV2) Type(ctx context.Context) attr.Type { type PipelineAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PipelineAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineAccessControlRequest_SdkV2) { @@ -3006,6 +3184,11 @@ func (newState *PipelineAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCre func (newState *PipelineAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineAccessControlRequest_SdkV2) { } +func (c PipelineAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3045,15 +3228,15 @@ func (o PipelineAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type type PipelineAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PipelineAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineAccessControlResponse_SdkV2) { @@ -3062,6 +3245,12 @@ func (newState *PipelineAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCr func (newState *PipelineAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineAccessControlResponse_SdkV2) { } +func (c PipelineAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelinePermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3134,24 +3323,24 @@ func (o *PipelineAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Cont type PipelineCluster_SdkV2 struct { // Note: This field won't be persisted. Only API users will check this // field. - ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:""` // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.List `tfsdk:"autoscale" tf:"object"` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Only dbfs destinations are supported. Only one destination // can be specified for one cluster. If the conf is given, the logs will be // delivered to the destination every `5 mins`. The destination of driver // logs is `$destination/$clusterId/driver`, while the destination of // executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"object"` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -3160,37 +3349,37 @@ type PipelineCluster_SdkV2 struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Whether to enable local disk encryption for the cluster. - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // A label for the cluster specification, either `default` to configure the // default cluster, or `maintenance` to configure the maintenance cluster. // This field is optional. The default value is `default`. - Label types.String `tfsdk:"label" tf:"optional"` + Label types.String `tfsdk:"label" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -3201,13 +3390,13 @@ type PipelineCluster_SdkV2 struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. See :method:clusters/create for more // details. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -3221,11 +3410,11 @@ type PipelineCluster_SdkV2 struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` } func (newState *PipelineCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineCluster_SdkV2) { @@ -3234,6 +3423,16 @@ func (newState *PipelineCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PipelineCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineCluster_SdkV2) { } +func (c PipelineCluster_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineClusterAutoscale_SdkV2{}.ToSchema(cs, append(path, "autoscale")...) + compute_tf.AwsAttributes_SdkV2{}.ToSchema(cs, append(path, "aws_attributes")...) + compute_tf.AzureAttributes_SdkV2{}.ToSchema(cs, append(path, "azure_attributes")...) + compute_tf.ClusterLogConf_SdkV2{}.ToSchema(cs, append(path, "cluster_log_conf")...) + compute_tf.GcpAttributes_SdkV2{}.ToSchema(cs, append(path, "gcp_attributes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3605,7 +3804,7 @@ type PipelineClusterAutoscale_SdkV2 struct { // minimal impact to the data processing latency of your pipelines. Enhanced // Autoscaling is available for `updates` clusters only. The legacy // autoscaling feature is used for `maintenance` clusters. - Mode types.String `tfsdk:"mode" tf:"optional"` + Mode types.String `tfsdk:"mode" tf:""` } func (newState *PipelineClusterAutoscale_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineClusterAutoscale_SdkV2) { @@ -3614,6 +3813,13 @@ func (newState *PipelineClusterAutoscale_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *PipelineClusterAutoscale_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineClusterAutoscale_SdkV2) { } +func (c PipelineClusterAutoscale_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "max_workers")...) + cs.SetRequired(append(path, "min_workers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineClusterAutoscale. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3651,9 +3857,9 @@ func (o PipelineClusterAutoscale_SdkV2) Type(ctx context.Context) attr.Type { type PipelineDeployment_SdkV2 struct { // The deployment method that manages the pipeline. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // The path to the file containing metadata about the deployment. - MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:"optional"` + MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:""` } func (newState *PipelineDeployment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineDeployment_SdkV2) { @@ -3662,6 +3868,11 @@ func (newState *PipelineDeployment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *PipelineDeployment_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineDeployment_SdkV2) { } +func (c PipelineDeployment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineDeployment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3697,23 +3908,23 @@ func (o PipelineDeployment_SdkV2) Type(ctx context.Context) attr.Type { type PipelineEvent_SdkV2 struct { // Information about an error captured by the event. - Error types.List `tfsdk:"error" tf:"optional,object"` + Error types.List `tfsdk:"error" tf:"object"` // The event type. Should always correspond to the details - EventType types.String `tfsdk:"event_type" tf:"optional"` + EventType types.String `tfsdk:"event_type" tf:""` // A time-based, globally unique id. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The severity level of the event. - Level types.String `tfsdk:"level" tf:"optional"` + Level types.String `tfsdk:"level" tf:""` // Maturity level for event_type. - MaturityLevel types.String `tfsdk:"maturity_level" tf:"optional"` + MaturityLevel types.String `tfsdk:"maturity_level" tf:""` // The display message associated with the event. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Describes where the event originates from. - Origin types.List `tfsdk:"origin" tf:"optional,object"` + Origin types.List `tfsdk:"origin" tf:"object"` // A sequencing object to identify and order events. - Sequence types.List `tfsdk:"sequence" tf:"optional,object"` + Sequence types.List `tfsdk:"sequence" tf:"object"` // The time of the event. - Timestamp types.String `tfsdk:"timestamp" tf:"optional"` + Timestamp types.String `tfsdk:"timestamp" tf:""` } func (newState *PipelineEvent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineEvent_SdkV2) { @@ -3722,6 +3933,14 @@ func (newState *PipelineEvent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *PipelineEvent_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineEvent_SdkV2) { } +func (c PipelineEvent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ErrorDetail_SdkV2{}.ToSchema(cs, append(path, "error")...) + Origin_SdkV2{}.ToSchema(cs, append(path, "origin")...) + Sequencing_SdkV2{}.ToSchema(cs, append(path, "sequence")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineEvent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3860,16 +4079,16 @@ func (o *PipelineEvent_SdkV2) SetSequence(ctx context.Context, v Sequencing_SdkV type PipelineLibrary_SdkV2 struct { // The path to a file that defines a pipeline and is stored in the // Databricks Repos. - File types.List `tfsdk:"file" tf:"optional,object"` + File types.List `tfsdk:"file" tf:"object"` // URI of the jar to be installed. Currently only DBFS is supported. - Jar types.String `tfsdk:"jar" tf:"optional"` + Jar types.String `tfsdk:"jar" tf:""` // Specification of a maven library to be installed. - Maven types.List `tfsdk:"maven" tf:"optional,object"` + Maven types.List `tfsdk:"maven" tf:"object"` // The path to a notebook that defines a pipeline and is stored in the // Databricks workspace. - Notebook types.List `tfsdk:"notebook" tf:"optional,object"` + Notebook types.List `tfsdk:"notebook" tf:"object"` // URI of the whl to be installed. - Whl types.String `tfsdk:"whl" tf:"optional"` + Whl types.String `tfsdk:"whl" tf:""` } func (newState *PipelineLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineLibrary_SdkV2) { @@ -3878,6 +4097,14 @@ func (newState *PipelineLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PipelineLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineLibrary_SdkV2) { } +func (c PipelineLibrary_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileLibrary_SdkV2{}.ToSchema(cs, append(path, "file")...) + compute_tf.MavenLibrary_SdkV2{}.ToSchema(cs, append(path, "maven")...) + NotebookLibrary_SdkV2{}.ToSchema(cs, append(path, "notebook")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4006,11 +4233,11 @@ func (o *PipelineLibrary_SdkV2) SetNotebook(ctx context.Context, v NotebookLibra } type PipelinePermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PipelinePermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermission_SdkV2) { @@ -4019,6 +4246,11 @@ func (newState *PipelinePermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *PipelinePermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelinePermission_SdkV2) { } +func (c PipelinePermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4085,11 +4317,11 @@ func (o *PipelinePermission_SdkV2) SetInheritedFromObject(ctx context.Context, v } type PipelinePermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *PipelinePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermissions_SdkV2) { @@ -4098,6 +4330,12 @@ func (newState *PipelinePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *PipelinePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelinePermissions_SdkV2) { } +func (c PipelinePermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4164,9 +4402,9 @@ func (o *PipelinePermissions_SdkV2) SetAccessControlList(ctx context.Context, v } type PipelinePermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PipelinePermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermissionsDescription_SdkV2) { @@ -4175,6 +4413,11 @@ func (newState *PipelinePermissionsDescription_SdkV2) SyncEffectiveFieldsDuringC func (newState *PipelinePermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelinePermissionsDescription_SdkV2) { } +func (c PipelinePermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4209,7 +4452,7 @@ func (o PipelinePermissionsDescription_SdkV2) Type(ctx context.Context) attr.Typ } type PipelinePermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The pipeline for which to get or manage permissions. PipelineId types.String `tfsdk:"-"` } @@ -4220,6 +4463,13 @@ func (newState *PipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *PipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelinePermissionsRequest_SdkV2) { } +func (c PipelinePermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "pipeline_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4285,60 +4535,60 @@ func (o *PipelinePermissionsRequest_SdkV2) SetAccessControlList(ctx context.Cont type PipelineSpec_SdkV2 struct { // Budget policy of this pipeline. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // A catalog in Unity Catalog to publish data from this pipeline to. If // `target` is specified, tables in this pipeline are published to a // `target` schema inside `catalog` (for example, // `catalog`.`target`.`table`). If `target` is not specified, no data is // published to Unity Catalog. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // DLT Release Channel that specifies which version to use. - Channel types.String `tfsdk:"channel" tf:"optional"` + Channel types.String `tfsdk:"channel" tf:""` // Cluster settings for this pipeline deployment. - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // String-String configuration for this pipeline execution. - Configuration types.Map `tfsdk:"configuration" tf:"optional"` + Configuration types.Map `tfsdk:"configuration" tf:""` // Whether the pipeline is continuous or triggered. This replaces `trigger`. - Continuous types.Bool `tfsdk:"continuous" tf:"optional"` + Continuous types.Bool `tfsdk:"continuous" tf:""` // Deployment type of this pipeline. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.List `tfsdk:"deployment" tf:"object"` // Whether the pipeline is in Development mode. Defaults to false. - Development types.Bool `tfsdk:"development" tf:"optional"` + Development types.Bool `tfsdk:"development" tf:""` // Pipeline product edition. - Edition types.String `tfsdk:"edition" tf:"optional"` + Edition types.String `tfsdk:"edition" tf:""` // Filters on which Pipeline packages to include in the deployed graph. - Filters types.List `tfsdk:"filters" tf:"optional,object"` + Filters types.List `tfsdk:"filters" tf:"object"` // The definition of a gateway pipeline to support change data capture. - GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"optional,object"` + GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"object"` // Unique identifier for this pipeline. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"optional,object"` + IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"object"` // Libraries or code needed by this deployment. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Friendly identifier for this pipeline. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of notification settings for this pipeline. - Notifications types.List `tfsdk:"notifications" tf:"optional"` + Notifications types.List `tfsdk:"notifications" tf:""` // Whether Photon is enabled for this pipeline. - Photon types.Bool `tfsdk:"photon" tf:"optional"` + Photon types.Bool `tfsdk:"photon" tf:""` // Restart window of this pipeline. - RestartWindow types.List `tfsdk:"restart_window" tf:"optional,object"` + RestartWindow types.List `tfsdk:"restart_window" tf:"object"` // The default schema (database) where tables are read from or published to. // The presence of this field implies that the pipeline is in direct // publishing mode. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // Whether serverless compute is enabled for this pipeline. - Serverless types.Bool `tfsdk:"serverless" tf:"optional"` + Serverless types.Bool `tfsdk:"serverless" tf:""` // DBFS root directory for storing checkpoints and tables. - Storage types.String `tfsdk:"storage" tf:"optional"` + Storage types.String `tfsdk:"storage" tf:""` // Target schema (database) to add tables in this pipeline to. If not // specified, no data is published to the Hive metastore or Unity Catalog. // To publish to Unity Catalog, also specify `catalog`. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` // Which pipeline trigger to use. Deprecated: Use `continuous` instead. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.List `tfsdk:"trigger" tf:"object"` } func (newState *PipelineSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineSpec_SdkV2) { @@ -4347,6 +4597,20 @@ func (newState *PipelineSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PipelineSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineSpec_SdkV2) { } +func (c PipelineSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineCluster_SdkV2{}.ToSchema(cs, append(path, "clusters")...) + PipelineDeployment_SdkV2{}.ToSchema(cs, append(path, "deployment")...) + Filters_SdkV2{}.ToSchema(cs, append(path, "filters")...) + IngestionGatewayPipelineDefinition_SdkV2{}.ToSchema(cs, append(path, "gateway_definition")...) + IngestionPipelineDefinition_SdkV2{}.ToSchema(cs, append(path, "ingestion_definition")...) + PipelineLibrary_SdkV2{}.ToSchema(cs, append(path, "libraries")...) + Notifications_SdkV2{}.ToSchema(cs, append(path, "notifications")...) + RestartWindow_SdkV2{}.ToSchema(cs, append(path, "restart_window")...) + PipelineTrigger_SdkV2{}.ToSchema(cs, append(path, "trigger")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4715,23 +4979,23 @@ func (o *PipelineSpec_SdkV2) SetTrigger(ctx context.Context, v PipelineTrigger_S type PipelineStateInfo_SdkV2 struct { // The unique identifier of the cluster running the pipeline. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The username of the pipeline creator. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // The health of a pipeline. - Health types.String `tfsdk:"health" tf:"optional"` + Health types.String `tfsdk:"health" tf:""` // Status of the latest updates for the pipeline. Ordered with the newest // update first. - LatestUpdates types.List `tfsdk:"latest_updates" tf:"optional"` + LatestUpdates types.List `tfsdk:"latest_updates" tf:""` // The user-friendly name of the pipeline. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The unique identifier of the pipeline. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // The username that the pipeline runs as. This is a read only value derived // from the pipeline owner. - RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` + RunAsUserName types.String `tfsdk:"run_as_user_name" tf:""` // The pipeline state. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *PipelineStateInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineStateInfo_SdkV2) { @@ -4740,6 +5004,12 @@ func (newState *PipelineStateInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *PipelineStateInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineStateInfo_SdkV2) { } +func (c PipelineStateInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateStateInfo_SdkV2{}.ToSchema(cs, append(path, "latest_updates")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineStateInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4816,9 +5086,9 @@ func (o *PipelineStateInfo_SdkV2) SetLatestUpdates(ctx context.Context, v []Upda } type PipelineTrigger_SdkV2 struct { - Cron types.List `tfsdk:"cron" tf:"optional,object"` + Cron types.List `tfsdk:"cron" tf:"object"` - Manual types.List `tfsdk:"manual" tf:"optional,object"` + Manual types.List `tfsdk:"manual" tf:"object"` } func (newState *PipelineTrigger_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineTrigger_SdkV2) { @@ -4827,6 +5097,13 @@ func (newState *PipelineTrigger_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PipelineTrigger_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineTrigger_SdkV2) { } +func (c PipelineTrigger_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CronTrigger_SdkV2{}.ToSchema(cs, append(path, "cron")...) + ManualTrigger_SdkV2{}.ToSchema(cs, append(path, "manual")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineTrigger. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4921,18 +5198,18 @@ func (o *PipelineTrigger_SdkV2) SetManual(ctx context.Context, v ManualTrigger_S type ReportSpec_SdkV2 struct { // Required. Destination catalog to store table. - DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` + DestinationCatalog types.String `tfsdk:"destination_catalog" tf:""` // Required. Destination schema to store table. - DestinationSchema types.String `tfsdk:"destination_schema" tf:"optional"` + DestinationSchema types.String `tfsdk:"destination_schema" tf:""` // Required. Destination table name. The pipeline fails if a table with that // name already exists. - DestinationTable types.String `tfsdk:"destination_table" tf:"optional"` + DestinationTable types.String `tfsdk:"destination_table" tf:""` // Required. Report URL in the source system. - SourceUrl types.String `tfsdk:"source_url" tf:"optional"` + SourceUrl types.String `tfsdk:"source_url" tf:""` // Configuration settings to control the ingestion of tables. These settings // override the table_configuration defined in the // IngestionPipelineDefinition object. - TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.List `tfsdk:"table_configuration" tf:"object"` } func (newState *ReportSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReportSpec_SdkV2) { @@ -4941,6 +5218,12 @@ func (newState *ReportSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan R func (newState *ReportSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReportSpec_SdkV2) { } +func (c ReportSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableSpecificConfig_SdkV2{}.ToSchema(cs, append(path, "table_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReportSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5014,7 +5297,7 @@ type RestartWindow_SdkV2 struct { // Days of week in which the restart is allowed to happen (within a // five-hour window starting at start_hour). If not specified all days of // the week will be used. - DaysOfWeek types.List `tfsdk:"days_of_week" tf:"optional"` + DaysOfWeek types.List `tfsdk:"days_of_week" tf:""` // An integer between 0 and 23 denoting the start hour for the restart // window in the 24-hour day. Continuous pipeline restart is triggered only // within a five-hour window starting at this hour. @@ -5022,7 +5305,7 @@ type RestartWindow_SdkV2 struct { // Time zone id of restart window. See // https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html // for details. If not specified, UTC will be used. - TimeZoneId types.String `tfsdk:"time_zone_id" tf:"optional"` + TimeZoneId types.String `tfsdk:"time_zone_id" tf:""` } func (newState *RestartWindow_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestartWindow_SdkV2) { @@ -5031,6 +5314,12 @@ func (newState *RestartWindow_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *RestartWindow_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestartWindow_SdkV2) { } +func (c RestartWindow_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "start_hour")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestartWindow. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5096,22 +5385,81 @@ func (o *RestartWindow_SdkV2) SetDaysOfWeek(ctx context.Context, v []types.Strin o.DaysOfWeek = types.ListValueMust(t, vs) } +// Write-only setting, available only in Create/Update calls. Specifies the user +// or service principal that the pipeline runs as. If not specified, the +// pipeline runs as the user who created the pipeline. +// +// Only `user_name` or `service_principal_name` can be specified. If both are +// specified, an error is thrown. +type RunAs_SdkV2 struct { + // Application ID of an active service principal. Setting this field + // requires the `servicePrincipal/user` role. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` + // The email of an active workspace user. Users can only set this field to + // their own email. + UserName types.String `tfsdk:"user_name" tf:""` +} + +func (newState *RunAs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunAs_SdkV2) { +} + +func (newState *RunAs_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunAs_SdkV2) { +} + +func (c RunAs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunAs. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunAs_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, RunAs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunAs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunAs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + type SchemaSpec_SdkV2 struct { // Required. Destination catalog to store tables. - DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` + DestinationCatalog types.String `tfsdk:"destination_catalog" tf:""` // Required. Destination schema to store tables in. Tables with the same // name as the source tables are created in this destination schema. The // pipeline fails If a table with the same name already exists. - DestinationSchema types.String `tfsdk:"destination_schema" tf:"optional"` + DestinationSchema types.String `tfsdk:"destination_schema" tf:""` // The source catalog name. Might be optional depending on the type of // source. - SourceCatalog types.String `tfsdk:"source_catalog" tf:"optional"` + SourceCatalog types.String `tfsdk:"source_catalog" tf:""` // Required. Schema name in the source database. - SourceSchema types.String `tfsdk:"source_schema" tf:"optional"` + SourceSchema types.String `tfsdk:"source_schema" tf:""` // Configuration settings to control the ingestion of tables. These settings // are applied to all tables in this schema and override the // table_configuration defined in the IngestionPipelineDefinition object. - TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.List `tfsdk:"table_configuration" tf:"object"` } func (newState *SchemaSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SchemaSpec_SdkV2) { @@ -5120,6 +5468,12 @@ func (newState *SchemaSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *SchemaSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState SchemaSpec_SdkV2) { } +func (c SchemaSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableSpecificConfig_SdkV2{}.ToSchema(cs, append(path, "table_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SchemaSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5191,9 +5545,9 @@ func (o *SchemaSpec_SdkV2) SetTableConfiguration(ctx context.Context, v TableSpe type Sequencing_SdkV2 struct { // A sequence number, unique and increasing within the control plane. - ControlPlaneSeqNo types.Int64 `tfsdk:"control_plane_seq_no" tf:"optional"` + ControlPlaneSeqNo types.Int64 `tfsdk:"control_plane_seq_no" tf:""` // the ID assigned by the data plane. - DataPlaneId types.List `tfsdk:"data_plane_id" tf:"optional,object"` + DataPlaneId types.List `tfsdk:"data_plane_id" tf:"object"` } func (newState *Sequencing_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sequencing_SdkV2) { @@ -5202,6 +5556,12 @@ func (newState *Sequencing_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *Sequencing_SdkV2) SyncEffectiveFieldsDuringRead(existingState Sequencing_SdkV2) { } +func (c Sequencing_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DataPlaneId_SdkV2{}.ToSchema(cs, append(path, "data_plane_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Sequencing. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5267,11 +5627,11 @@ func (o *Sequencing_SdkV2) SetDataPlaneId(ctx context.Context, v DataPlaneId_Sdk type SerializedException_SdkV2 struct { // Runtime class of the exception - ClassName types.String `tfsdk:"class_name" tf:"optional"` + ClassName types.String `tfsdk:"class_name" tf:""` // Exception message - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Stack trace consisting of a list of stack frames - Stack types.List `tfsdk:"stack" tf:"optional"` + Stack types.List `tfsdk:"stack" tf:""` } func (newState *SerializedException_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SerializedException_SdkV2) { @@ -5280,6 +5640,12 @@ func (newState *SerializedException_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *SerializedException_SdkV2) SyncEffectiveFieldsDuringRead(existingState SerializedException_SdkV2) { } +func (c SerializedException_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StackFrame_SdkV2{}.ToSchema(cs, append(path, "stack")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SerializedException. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5347,13 +5713,13 @@ func (o *SerializedException_SdkV2) SetStack(ctx context.Context, v []StackFrame type StackFrame_SdkV2 struct { // Class from which the method call originated - DeclaringClass types.String `tfsdk:"declaring_class" tf:"optional"` + DeclaringClass types.String `tfsdk:"declaring_class" tf:""` // File where the method is defined - FileName types.String `tfsdk:"file_name" tf:"optional"` + FileName types.String `tfsdk:"file_name" tf:""` // Line from which the method was called - LineNumber types.Int64 `tfsdk:"line_number" tf:"optional"` + LineNumber types.Int64 `tfsdk:"line_number" tf:""` // Name of the method which was called - MethodName types.String `tfsdk:"method_name" tf:"optional"` + MethodName types.String `tfsdk:"method_name" tf:""` } func (newState *StackFrame_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StackFrame_SdkV2) { @@ -5362,6 +5728,11 @@ func (newState *StackFrame_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *StackFrame_SdkV2) SyncEffectiveFieldsDuringRead(existingState StackFrame_SdkV2) { } +func (c StackFrame_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StackFrame. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5400,24 +5771,24 @@ func (o StackFrame_SdkV2) Type(ctx context.Context) attr.Type { } type StartUpdate_SdkV2 struct { - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` // If true, this update will reset all tables before running. - FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + FullRefresh types.Bool `tfsdk:"full_refresh" tf:""` // A list of tables to update with fullRefresh. If both refresh_selection // and full_refresh_selection are empty, this is a full graph update. Full // Refresh on a table means that the states of the table will be reset // before the refresh. - FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:"optional"` + FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:""` PipelineId types.String `tfsdk:"-"` // A list of tables to update without fullRefresh. If both refresh_selection // and full_refresh_selection are empty, this is a full graph update. Full // Refresh on a table means that the states of the table will be reset // before the refresh. - RefreshSelection types.List `tfsdk:"refresh_selection" tf:"optional"` + RefreshSelection types.List `tfsdk:"refresh_selection" tf:""` // If true, this update only validates the correctness of pipeline source // code but does not materialize or publish any datasets. - ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` + ValidateOnly types.Bool `tfsdk:"validate_only" tf:""` } func (newState *StartUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartUpdate_SdkV2) { @@ -5426,6 +5797,12 @@ func (newState *StartUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *StartUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartUpdate_SdkV2) { } +func (c StartUpdate_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "pipeline_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartUpdate. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5527,7 +5904,7 @@ func (o *StartUpdate_SdkV2) SetRefreshSelection(ctx context.Context, v []types.S } type StartUpdateResponse_SdkV2 struct { - UpdateId types.String `tfsdk:"update_id" tf:"optional"` + UpdateId types.String `tfsdk:"update_id" tf:""` } func (newState *StartUpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartUpdateResponse_SdkV2) { @@ -5536,6 +5913,11 @@ func (newState *StartUpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *StartUpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartUpdateResponse_SdkV2) { } +func (c StartUpdateResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartUpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5576,6 +5958,11 @@ func (newState *StopPipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *StopPipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopPipelineResponse_SdkV2) { } +func (c StopPipelineResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopPipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5608,12 +5995,6 @@ type StopRequest_SdkV2 struct { PipelineId types.String `tfsdk:"-"` } -func (newState *StopRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopRequest_SdkV2) { -} - -func (newState *StopRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5647,23 +6028,23 @@ func (o StopRequest_SdkV2) Type(ctx context.Context) attr.Type { type TableSpec_SdkV2 struct { // Required. Destination catalog to store table. - DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` + DestinationCatalog types.String `tfsdk:"destination_catalog" tf:""` // Required. Destination schema to store table. - DestinationSchema types.String `tfsdk:"destination_schema" tf:"optional"` + DestinationSchema types.String `tfsdk:"destination_schema" tf:""` // Optional. Destination table name. The pipeline fails if a table with that // name already exists. If not set, the source table name is used. - DestinationTable types.String `tfsdk:"destination_table" tf:"optional"` + DestinationTable types.String `tfsdk:"destination_table" tf:""` // Source catalog name. Might be optional depending on the type of source. - SourceCatalog types.String `tfsdk:"source_catalog" tf:"optional"` + SourceCatalog types.String `tfsdk:"source_catalog" tf:""` // Schema name in the source database. Might be optional depending on the // type of source. - SourceSchema types.String `tfsdk:"source_schema" tf:"optional"` + SourceSchema types.String `tfsdk:"source_schema" tf:""` // Required. Table name in the source database. - SourceTable types.String `tfsdk:"source_table" tf:"optional"` + SourceTable types.String `tfsdk:"source_table" tf:""` // Configuration settings to control the ingestion of tables. These settings // override the table_configuration defined in the // IngestionPipelineDefinition object and the SchemaSpec. - TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.List `tfsdk:"table_configuration" tf:"object"` } func (newState *TableSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSpec_SdkV2) { @@ -5672,6 +6053,12 @@ func (newState *TableSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ta func (newState *TableSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableSpec_SdkV2) { } +func (c TableSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableSpecificConfig_SdkV2{}.ToSchema(cs, append(path, "table_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5747,16 +6134,16 @@ func (o *TableSpec_SdkV2) SetTableConfiguration(ctx context.Context, v TableSpec type TableSpecificConfig_SdkV2 struct { // The primary key of the table used to apply changes. - PrimaryKeys types.List `tfsdk:"primary_keys" tf:"optional"` + PrimaryKeys types.List `tfsdk:"primary_keys" tf:""` // If true, formula fields defined in the table are included in the // ingestion. This setting is only valid for the Salesforce connector - SalesforceIncludeFormulaFields types.Bool `tfsdk:"salesforce_include_formula_fields" tf:"optional"` + SalesforceIncludeFormulaFields types.Bool `tfsdk:"salesforce_include_formula_fields" tf:""` // The SCD type to use to ingest the table. - ScdType types.String `tfsdk:"scd_type" tf:"optional"` + ScdType types.String `tfsdk:"scd_type" tf:""` // The column names specifying the logical order of events in the source // data. Delta Live Tables uses this sequencing to handle change events that // arrive out of order. - SequenceBy types.List `tfsdk:"sequence_by" tf:"optional"` + SequenceBy types.List `tfsdk:"sequence_by" tf:""` } func (newState *TableSpecificConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSpecificConfig_SdkV2) { @@ -5765,6 +6152,11 @@ func (newState *TableSpecificConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *TableSpecificConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableSpecificConfig_SdkV2) { } +func (c TableSpecificConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableSpecificConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5863,35 +6255,35 @@ func (o *TableSpecificConfig_SdkV2) SetSequenceBy(ctx context.Context, v []types type UpdateInfo_SdkV2 struct { // What triggered this update. - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` // The ID of the cluster that the update is running on. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The pipeline configuration with system defaults applied where unspecified // by the user. Not returned by ListUpdates. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.List `tfsdk:"config" tf:"object"` // The time when this update was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // If true, this update will reset all tables before running. - FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + FullRefresh types.Bool `tfsdk:"full_refresh" tf:""` // A list of tables to update with fullRefresh. If both refresh_selection // and full_refresh_selection are empty, this is a full graph update. Full // Refresh on a table means that the states of the table will be reset // before the refresh. - FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:"optional"` + FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:""` // The ID of the pipeline. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // A list of tables to update without fullRefresh. If both refresh_selection // and full_refresh_selection are empty, this is a full graph update. Full // Refresh on a table means that the states of the table will be reset // before the refresh. - RefreshSelection types.List `tfsdk:"refresh_selection" tf:"optional"` + RefreshSelection types.List `tfsdk:"refresh_selection" tf:""` // The update state. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // The ID of this update. - UpdateId types.String `tfsdk:"update_id" tf:"optional"` + UpdateId types.String `tfsdk:"update_id" tf:""` // If true, this update only validates the correctness of pipeline source // code but does not materialize or publish any datasets. - ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` + ValidateOnly types.Bool `tfsdk:"validate_only" tf:""` } func (newState *UpdateInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInfo_SdkV2) { @@ -5900,6 +6292,12 @@ func (newState *UpdateInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan U func (newState *UpdateInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateInfo_SdkV2) { } +func (c UpdateInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineSpec_SdkV2{}.ToSchema(cs, append(path, "config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6040,11 +6438,11 @@ func (o *UpdateInfo_SdkV2) SetRefreshSelection(ctx context.Context, v []types.St } type UpdateStateInfo_SdkV2 struct { - CreationTime types.String `tfsdk:"creation_time" tf:"optional"` + CreationTime types.String `tfsdk:"creation_time" tf:""` - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` - UpdateId types.String `tfsdk:"update_id" tf:"optional"` + UpdateId types.String `tfsdk:"update_id" tf:""` } func (newState *UpdateStateInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateStateInfo_SdkV2) { @@ -6053,6 +6451,11 @@ func (newState *UpdateStateInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *UpdateStateInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateStateInfo_SdkV2) { } +func (c UpdateStateInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateStateInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/pipelines_tf/model.go b/internal/service/pipelines_tf/model.go index 780d60e4f..9f0a6731b 100755 --- a/internal/service/pipelines_tf/model.go +++ b/internal/service/pipelines_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/compute_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -25,64 +26,71 @@ import ( type CreatePipeline struct { // If false, deployment will fail if name conflicts with that of another // pipeline. - AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:"optional"` + AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:""` // Budget policy of this pipeline. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // A catalog in Unity Catalog to publish data from this pipeline to. If // `target` is specified, tables in this pipeline are published to a // `target` schema inside `catalog` (for example, // `catalog`.`target`.`table`). If `target` is not specified, no data is // published to Unity Catalog. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // DLT Release Channel that specifies which version to use. - Channel types.String `tfsdk:"channel" tf:"optional"` + Channel types.String `tfsdk:"channel" tf:""` // Cluster settings for this pipeline deployment. - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // String-String configuration for this pipeline execution. - Configuration types.Map `tfsdk:"configuration" tf:"optional"` + Configuration types.Map `tfsdk:"configuration" tf:""` // Whether the pipeline is continuous or triggered. This replaces `trigger`. - Continuous types.Bool `tfsdk:"continuous" tf:"optional"` + Continuous types.Bool `tfsdk:"continuous" tf:""` // Deployment type of this pipeline. - Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"object"` // Whether the pipeline is in Development mode. Defaults to false. - Development types.Bool `tfsdk:"development" tf:"optional"` + Development types.Bool `tfsdk:"development" tf:""` - DryRun types.Bool `tfsdk:"dry_run" tf:"optional"` + DryRun types.Bool `tfsdk:"dry_run" tf:""` // Pipeline product edition. - Edition types.String `tfsdk:"edition" tf:"optional"` + Edition types.String `tfsdk:"edition" tf:""` // Filters on which Pipeline packages to include in the deployed graph. - Filters types.Object `tfsdk:"filters" tf:"optional,object"` + Filters types.Object `tfsdk:"filters" tf:"object"` // The definition of a gateway pipeline to support change data capture. - GatewayDefinition types.Object `tfsdk:"gateway_definition" tf:"optional,object"` + GatewayDefinition types.Object `tfsdk:"gateway_definition" tf:"object"` // Unique identifier for this pipeline. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition types.Object `tfsdk:"ingestion_definition" tf:"optional,object"` + IngestionDefinition types.Object `tfsdk:"ingestion_definition" tf:"object"` // Libraries or code needed by this deployment. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Friendly identifier for this pipeline. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of notification settings for this pipeline. - Notifications types.List `tfsdk:"notifications" tf:"optional"` + Notifications types.List `tfsdk:"notifications" tf:""` // Whether Photon is enabled for this pipeline. - Photon types.Bool `tfsdk:"photon" tf:"optional"` + Photon types.Bool `tfsdk:"photon" tf:""` // Restart window of this pipeline. - RestartWindow types.Object `tfsdk:"restart_window" tf:"optional,object"` + RestartWindow types.Object `tfsdk:"restart_window" tf:"object"` + // Write-only setting, available only in Create/Update calls. Specifies the + // user or service principal that the pipeline runs as. If not specified, + // the pipeline runs as the user who created the pipeline. + // + // Only `user_name` or `service_principal_name` can be specified. If both + // are specified, an error is thrown. + RunAs types.Object `tfsdk:"run_as" tf:"object"` // The default schema (database) where tables are read from or published to. // The presence of this field implies that the pipeline is in direct // publishing mode. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // Whether serverless compute is enabled for this pipeline. - Serverless types.Bool `tfsdk:"serverless" tf:"optional"` + Serverless types.Bool `tfsdk:"serverless" tf:""` // DBFS root directory for storing checkpoints and tables. - Storage types.String `tfsdk:"storage" tf:"optional"` + Storage types.String `tfsdk:"storage" tf:""` // Target schema (database) to add tables in this pipeline to. If not // specified, no data is published to the Hive metastore or Unity Catalog. // To publish to Unity Catalog, also specify `catalog`. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` // Which pipeline trigger to use. Deprecated: Use `continuous` instead. - Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"object"` } func (newState *CreatePipeline) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePipeline) { @@ -91,6 +99,21 @@ func (newState *CreatePipeline) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cre func (newState *CreatePipeline) SyncEffectiveFieldsDuringRead(existingState CreatePipeline) { } +func (c CreatePipeline) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineCluster{}.ToSchema(cs, append(path, "clusters")...) + PipelineDeployment{}.ToSchema(cs, append(path, "deployment")...) + Filters{}.ToSchema(cs, append(path, "filters")...) + IngestionGatewayPipelineDefinition{}.ToSchema(cs, append(path, "gateway_definition")...) + IngestionPipelineDefinition{}.ToSchema(cs, append(path, "ingestion_definition")...) + PipelineLibrary{}.ToSchema(cs, append(path, "libraries")...) + Notifications{}.ToSchema(cs, append(path, "notifications")...) + RestartWindow{}.ToSchema(cs, append(path, "restart_window")...) + RunAs{}.ToSchema(cs, append(path, "run_as")...) + PipelineTrigger{}.ToSchema(cs, append(path, "trigger")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePipeline. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -109,6 +132,7 @@ func (a CreatePipeline) GetComplexFieldTypes(ctx context.Context) map[string]ref "libraries": reflect.TypeOf(PipelineLibrary{}), "notifications": reflect.TypeOf(Notifications{}), "restart_window": reflect.TypeOf(RestartWindow{}), + "run_as": reflect.TypeOf(RunAs{}), "trigger": reflect.TypeOf(PipelineTrigger{}), } } @@ -140,6 +164,7 @@ func (o CreatePipeline) ToObjectValue(ctx context.Context) basetypes.ObjectValue "notifications": o.Notifications, "photon": o.Photon, "restart_window": o.RestartWindow, + "run_as": o.RunAs, "schema": o.Schema, "serverless": o.Serverless, "storage": o.Storage, @@ -180,6 +205,7 @@ func (o CreatePipeline) Type(ctx context.Context) attr.Type { }, "photon": types.BoolType, "restart_window": RestartWindow{}.Type(ctx), + "run_as": RunAs{}.Type(ctx), "schema": types.StringType, "serverless": types.BoolType, "storage": types.StringType, @@ -433,6 +459,34 @@ func (o *CreatePipeline) SetRestartWindow(ctx context.Context, v RestartWindow) o.RestartWindow = vs } +// GetRunAs returns the value of the RunAs field in CreatePipeline as +// a RunAs value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline) GetRunAs(ctx context.Context) (RunAs, bool) { + var e RunAs + if o.RunAs.IsNull() || o.RunAs.IsUnknown() { + return e, false + } + var v []RunAs + d := o.RunAs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunAs sets the value of the RunAs field in CreatePipeline. +func (o *CreatePipeline) SetRunAs(ctx context.Context, v RunAs) { + vs := v.ToObjectValue(ctx) + o.RunAs = vs +} + // GetTrigger returns the value of the Trigger field in CreatePipeline as // a PipelineTrigger value. // If the field is unknown or null, the boolean return value is false. @@ -463,10 +517,10 @@ func (o *CreatePipeline) SetTrigger(ctx context.Context, v PipelineTrigger) { type CreatePipelineResponse struct { // Only returned when dry_run is true. - EffectiveSettings types.Object `tfsdk:"effective_settings" tf:"optional,object"` + EffectiveSettings types.Object `tfsdk:"effective_settings" tf:"object"` // The unique identifier for the newly created pipeline. Only returned when // dry_run is false. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` } func (newState *CreatePipelineResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePipelineResponse) { @@ -475,6 +529,12 @@ func (newState *CreatePipelineResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreatePipelineResponse) SyncEffectiveFieldsDuringRead(existingState CreatePipelineResponse) { } +func (c CreatePipelineResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineSpec{}.ToSchema(cs, append(path, "effective_settings")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -539,9 +599,9 @@ func (o *CreatePipelineResponse) SetEffectiveSettings(ctx context.Context, v Pip } type CronTrigger struct { - QuartzCronSchedule types.String `tfsdk:"quartz_cron_schedule" tf:"optional"` + QuartzCronSchedule types.String `tfsdk:"quartz_cron_schedule" tf:""` - TimezoneId types.String `tfsdk:"timezone_id" tf:"optional"` + TimezoneId types.String `tfsdk:"timezone_id" tf:""` } func (newState *CronTrigger) SyncEffectiveFieldsDuringCreateOrUpdate(plan CronTrigger) { @@ -550,6 +610,11 @@ func (newState *CronTrigger) SyncEffectiveFieldsDuringCreateOrUpdate(plan CronTr func (newState *CronTrigger) SyncEffectiveFieldsDuringRead(existingState CronTrigger) { } +func (c CronTrigger) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CronTrigger. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -585,9 +650,9 @@ func (o CronTrigger) Type(ctx context.Context) attr.Type { type DataPlaneId struct { // The instance name of the data plane emitting an event. - Instance types.String `tfsdk:"instance" tf:"optional"` + Instance types.String `tfsdk:"instance" tf:""` // A sequence number, unique and increasing within the data plane instance. - SeqNo types.Int64 `tfsdk:"seq_no" tf:"optional"` + SeqNo types.Int64 `tfsdk:"seq_no" tf:""` } func (newState *DataPlaneId) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPlaneId) { @@ -596,6 +661,11 @@ func (newState *DataPlaneId) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPl func (newState *DataPlaneId) SyncEffectiveFieldsDuringRead(existingState DataPlaneId) { } +func (c DataPlaneId) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataPlaneId. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -634,12 +704,6 @@ type DeletePipelineRequest struct { PipelineId types.String `tfsdk:"-"` } -func (newState *DeletePipelineRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePipelineRequest) { -} - -func (newState *DeletePipelineRequest) SyncEffectiveFieldsDuringRead(existingState DeletePipelineRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePipelineRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -680,6 +744,11 @@ func (newState *DeletePipelineResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *DeletePipelineResponse) SyncEffectiveFieldsDuringRead(existingState DeletePipelineResponse) { } +func (c DeletePipelineResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -710,68 +779,75 @@ func (o DeletePipelineResponse) Type(ctx context.Context) attr.Type { type EditPipeline struct { // If false, deployment will fail if name has changed and conflicts the name // of another pipeline. - AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:"optional"` + AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:""` // Budget policy of this pipeline. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // A catalog in Unity Catalog to publish data from this pipeline to. If // `target` is specified, tables in this pipeline are published to a // `target` schema inside `catalog` (for example, // `catalog`.`target`.`table`). If `target` is not specified, no data is // published to Unity Catalog. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // DLT Release Channel that specifies which version to use. - Channel types.String `tfsdk:"channel" tf:"optional"` + Channel types.String `tfsdk:"channel" tf:""` // Cluster settings for this pipeline deployment. - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // String-String configuration for this pipeline execution. - Configuration types.Map `tfsdk:"configuration" tf:"optional"` + Configuration types.Map `tfsdk:"configuration" tf:""` // Whether the pipeline is continuous or triggered. This replaces `trigger`. - Continuous types.Bool `tfsdk:"continuous" tf:"optional"` + Continuous types.Bool `tfsdk:"continuous" tf:""` // Deployment type of this pipeline. - Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"object"` // Whether the pipeline is in Development mode. Defaults to false. - Development types.Bool `tfsdk:"development" tf:"optional"` + Development types.Bool `tfsdk:"development" tf:""` // Pipeline product edition. - Edition types.String `tfsdk:"edition" tf:"optional"` + Edition types.String `tfsdk:"edition" tf:""` // If present, the last-modified time of the pipeline settings before the // edit. If the settings were modified after that time, then the request // will fail with a conflict. - ExpectedLastModified types.Int64 `tfsdk:"expected_last_modified" tf:"optional"` + ExpectedLastModified types.Int64 `tfsdk:"expected_last_modified" tf:""` // Filters on which Pipeline packages to include in the deployed graph. - Filters types.Object `tfsdk:"filters" tf:"optional,object"` + Filters types.Object `tfsdk:"filters" tf:"object"` // The definition of a gateway pipeline to support change data capture. - GatewayDefinition types.Object `tfsdk:"gateway_definition" tf:"optional,object"` + GatewayDefinition types.Object `tfsdk:"gateway_definition" tf:"object"` // Unique identifier for this pipeline. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition types.Object `tfsdk:"ingestion_definition" tf:"optional,object"` + IngestionDefinition types.Object `tfsdk:"ingestion_definition" tf:"object"` // Libraries or code needed by this deployment. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Friendly identifier for this pipeline. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of notification settings for this pipeline. - Notifications types.List `tfsdk:"notifications" tf:"optional"` + Notifications types.List `tfsdk:"notifications" tf:""` // Whether Photon is enabled for this pipeline. - Photon types.Bool `tfsdk:"photon" tf:"optional"` + Photon types.Bool `tfsdk:"photon" tf:""` // Unique identifier for this pipeline. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // Restart window of this pipeline. - RestartWindow types.Object `tfsdk:"restart_window" tf:"optional,object"` + RestartWindow types.Object `tfsdk:"restart_window" tf:"object"` + // Write-only setting, available only in Create/Update calls. Specifies the + // user or service principal that the pipeline runs as. If not specified, + // the pipeline runs as the user who created the pipeline. + // + // Only `user_name` or `service_principal_name` can be specified. If both + // are specified, an error is thrown. + RunAs types.Object `tfsdk:"run_as" tf:"object"` // The default schema (database) where tables are read from or published to. // The presence of this field implies that the pipeline is in direct // publishing mode. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // Whether serverless compute is enabled for this pipeline. - Serverless types.Bool `tfsdk:"serverless" tf:"optional"` + Serverless types.Bool `tfsdk:"serverless" tf:""` // DBFS root directory for storing checkpoints and tables. - Storage types.String `tfsdk:"storage" tf:"optional"` + Storage types.String `tfsdk:"storage" tf:""` // Target schema (database) to add tables in this pipeline to. If not // specified, no data is published to the Hive metastore or Unity Catalog. // To publish to Unity Catalog, also specify `catalog`. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` // Which pipeline trigger to use. Deprecated: Use `continuous` instead. - Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"object"` } func (newState *EditPipeline) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPipeline) { @@ -780,6 +856,21 @@ func (newState *EditPipeline) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditP func (newState *EditPipeline) SyncEffectiveFieldsDuringRead(existingState EditPipeline) { } +func (c EditPipeline) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineCluster{}.ToSchema(cs, append(path, "clusters")...) + PipelineDeployment{}.ToSchema(cs, append(path, "deployment")...) + Filters{}.ToSchema(cs, append(path, "filters")...) + IngestionGatewayPipelineDefinition{}.ToSchema(cs, append(path, "gateway_definition")...) + IngestionPipelineDefinition{}.ToSchema(cs, append(path, "ingestion_definition")...) + PipelineLibrary{}.ToSchema(cs, append(path, "libraries")...) + Notifications{}.ToSchema(cs, append(path, "notifications")...) + RestartWindow{}.ToSchema(cs, append(path, "restart_window")...) + RunAs{}.ToSchema(cs, append(path, "run_as")...) + PipelineTrigger{}.ToSchema(cs, append(path, "trigger")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPipeline. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -798,6 +889,7 @@ func (a EditPipeline) GetComplexFieldTypes(ctx context.Context) map[string]refle "libraries": reflect.TypeOf(PipelineLibrary{}), "notifications": reflect.TypeOf(Notifications{}), "restart_window": reflect.TypeOf(RestartWindow{}), + "run_as": reflect.TypeOf(RunAs{}), "trigger": reflect.TypeOf(PipelineTrigger{}), } } @@ -830,6 +922,7 @@ func (o EditPipeline) ToObjectValue(ctx context.Context) basetypes.ObjectValue { "photon": o.Photon, "pipeline_id": o.PipelineId, "restart_window": o.RestartWindow, + "run_as": o.RunAs, "schema": o.Schema, "serverless": o.Serverless, "storage": o.Storage, @@ -871,6 +964,7 @@ func (o EditPipeline) Type(ctx context.Context) attr.Type { "photon": types.BoolType, "pipeline_id": types.StringType, "restart_window": RestartWindow{}.Type(ctx), + "run_as": RunAs{}.Type(ctx), "schema": types.StringType, "serverless": types.BoolType, "storage": types.StringType, @@ -1124,6 +1218,34 @@ func (o *EditPipeline) SetRestartWindow(ctx context.Context, v RestartWindow) { o.RestartWindow = vs } +// GetRunAs returns the value of the RunAs field in EditPipeline as +// a RunAs value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline) GetRunAs(ctx context.Context) (RunAs, bool) { + var e RunAs + if o.RunAs.IsNull() || o.RunAs.IsUnknown() { + return e, false + } + var v []RunAs + d := o.RunAs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunAs sets the value of the RunAs field in EditPipeline. +func (o *EditPipeline) SetRunAs(ctx context.Context, v RunAs) { + vs := v.ToObjectValue(ctx) + o.RunAs = vs +} + // GetTrigger returns the value of the Trigger field in EditPipeline as // a PipelineTrigger value. // If the field is unknown or null, the boolean return value is false. @@ -1161,6 +1283,11 @@ func (newState *EditPipelineResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *EditPipelineResponse) SyncEffectiveFieldsDuringRead(existingState EditPipelineResponse) { } +func (c EditPipelineResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1190,9 +1317,9 @@ func (o EditPipelineResponse) Type(ctx context.Context) attr.Type { type ErrorDetail struct { // The exception thrown for this error, with its chain of cause. - Exceptions types.List `tfsdk:"exceptions" tf:"optional"` + Exceptions types.List `tfsdk:"exceptions" tf:""` // Whether this error is considered fatal, that is, unrecoverable. - Fatal types.Bool `tfsdk:"fatal" tf:"optional"` + Fatal types.Bool `tfsdk:"fatal" tf:""` } func (newState *ErrorDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan ErrorDetail) { @@ -1201,6 +1328,12 @@ func (newState *ErrorDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan ErrorD func (newState *ErrorDetail) SyncEffectiveFieldsDuringRead(existingState ErrorDetail) { } +func (c ErrorDetail) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SerializedException{}.ToSchema(cs, append(path, "exceptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ErrorDetail. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1266,7 +1399,7 @@ func (o *ErrorDetail) SetExceptions(ctx context.Context, v []SerializedException type FileLibrary struct { // The absolute path of the file. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *FileLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileLibrary) { @@ -1275,6 +1408,11 @@ func (newState *FileLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileLi func (newState *FileLibrary) SyncEffectiveFieldsDuringRead(existingState FileLibrary) { } +func (c FileLibrary) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FileLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1308,9 +1446,9 @@ func (o FileLibrary) Type(ctx context.Context) attr.Type { type Filters struct { // Paths to exclude. - Exclude types.List `tfsdk:"exclude" tf:"optional"` + Exclude types.List `tfsdk:"exclude" tf:""` // Paths to include. - Include types.List `tfsdk:"include" tf:"optional"` + Include types.List `tfsdk:"include" tf:""` } func (newState *Filters) SyncEffectiveFieldsDuringCreateOrUpdate(plan Filters) { @@ -1319,6 +1457,11 @@ func (newState *Filters) SyncEffectiveFieldsDuringCreateOrUpdate(plan Filters) { func (newState *Filters) SyncEffectiveFieldsDuringRead(existingState Filters) { } +func (c Filters) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Filters. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1417,12 +1560,6 @@ type GetPipelinePermissionLevelsRequest struct { PipelineId types.String `tfsdk:"-"` } -func (newState *GetPipelinePermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelinePermissionLevelsRequest) { -} - -func (newState *GetPipelinePermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetPipelinePermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelinePermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1456,7 +1593,7 @@ func (o GetPipelinePermissionLevelsRequest) Type(ctx context.Context) attr.Type type GetPipelinePermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetPipelinePermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelinePermissionLevelsResponse) { @@ -1465,6 +1602,12 @@ func (newState *GetPipelinePermissionLevelsResponse) SyncEffectiveFieldsDuringCr func (newState *GetPipelinePermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetPipelinePermissionLevelsResponse) { } +func (c GetPipelinePermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelinePermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelinePermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1532,12 +1675,6 @@ type GetPipelinePermissionsRequest struct { PipelineId types.String `tfsdk:"-"` } -func (newState *GetPipelinePermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelinePermissionsRequest) { -} - -func (newState *GetPipelinePermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetPipelinePermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelinePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1574,12 +1711,6 @@ type GetPipelineRequest struct { PipelineId types.String `tfsdk:"-"` } -func (newState *GetPipelineRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelineRequest) { -} - -func (newState *GetPipelineRequest) SyncEffectiveFieldsDuringRead(existingState GetPipelineRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelineRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1613,31 +1744,31 @@ func (o GetPipelineRequest) Type(ctx context.Context) attr.Type { type GetPipelineResponse struct { // An optional message detailing the cause of the pipeline state. - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` // The ID of the cluster that the pipeline is running on. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The username of the pipeline creator. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // Serverless budget policy ID of this pipeline. - EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:"optional"` + EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:""` // The health of a pipeline. - Health types.String `tfsdk:"health" tf:"optional"` + Health types.String `tfsdk:"health" tf:""` // The last time the pipeline settings were modified or created. - LastModified types.Int64 `tfsdk:"last_modified" tf:"optional"` + LastModified types.Int64 `tfsdk:"last_modified" tf:""` // Status of the latest updates for the pipeline. Ordered with the newest // update first. - LatestUpdates types.List `tfsdk:"latest_updates" tf:"optional"` + LatestUpdates types.List `tfsdk:"latest_updates" tf:""` // A human friendly identifier for the pipeline, taken from the `spec`. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The ID of the pipeline. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // Username of the user that the pipeline will run on behalf of. - RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` + RunAsUserName types.String `tfsdk:"run_as_user_name" tf:""` // The pipeline specification. This field is not returned when called by // `ListPipelines`. - Spec types.Object `tfsdk:"spec" tf:"optional,object"` + Spec types.Object `tfsdk:"spec" tf:"object"` // The pipeline state. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *GetPipelineResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelineResponse) { @@ -1646,6 +1777,13 @@ func (newState *GetPipelineResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *GetPipelineResponse) SyncEffectiveFieldsDuringRead(existingState GetPipelineResponse) { } +func (c GetPipelineResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateStateInfo{}.ToSchema(cs, append(path, "latest_updates")...) + PipelineSpec{}.ToSchema(cs, append(path, "spec")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1766,12 +1904,6 @@ type GetUpdateRequest struct { UpdateId types.String `tfsdk:"-"` } -func (newState *GetUpdateRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUpdateRequest) { -} - -func (newState *GetUpdateRequest) SyncEffectiveFieldsDuringRead(existingState GetUpdateRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetUpdateRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1807,7 +1939,7 @@ func (o GetUpdateRequest) Type(ctx context.Context) attr.Type { type GetUpdateResponse struct { // The current update info. - Update types.Object `tfsdk:"update" tf:"optional,object"` + Update types.Object `tfsdk:"update" tf:"object"` } func (newState *GetUpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUpdateResponse) { @@ -1816,6 +1948,12 @@ func (newState *GetUpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *GetUpdateResponse) SyncEffectiveFieldsDuringRead(existingState GetUpdateResponse) { } +func (c GetUpdateResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateInfo{}.ToSchema(cs, append(path, "update")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetUpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1879,11 +2017,11 @@ func (o *GetUpdateResponse) SetUpdate(ctx context.Context, v UpdateInfo) { type IngestionConfig struct { // Select a specific source report. - Report types.Object `tfsdk:"report" tf:"optional,object"` + Report types.Object `tfsdk:"report" tf:"object"` // Select all tables from a specific source schema. - Schema types.Object `tfsdk:"schema" tf:"optional,object"` + Schema types.Object `tfsdk:"schema" tf:"object"` // Select a specific source table. - Table types.Object `tfsdk:"table" tf:"optional,object"` + Table types.Object `tfsdk:"table" tf:"object"` } func (newState *IngestionConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionConfig) { @@ -1892,6 +2030,14 @@ func (newState *IngestionConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan In func (newState *IngestionConfig) SyncEffectiveFieldsDuringRead(existingState IngestionConfig) { } +func (c IngestionConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ReportSpec{}.ToSchema(cs, append(path, "report")...) + SchemaSpec{}.ToSchema(cs, append(path, "schema")...) + TableSpec{}.ToSchema(cs, append(path, "table")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IngestionConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2019,21 +2165,21 @@ type IngestionGatewayPipelineDefinition struct { // [Deprecated, use connection_name instead] Immutable. The Unity Catalog // connection that this gateway pipeline uses to communicate with the // source. - ConnectionId types.String `tfsdk:"connection_id" tf:"optional"` + ConnectionId types.String `tfsdk:"connection_id" tf:""` // Immutable. The Unity Catalog connection that this gateway pipeline uses // to communicate with the source. - ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + ConnectionName types.String `tfsdk:"connection_name" tf:""` // Required, Immutable. The name of the catalog for the gateway pipeline's // storage location. - GatewayStorageCatalog types.String `tfsdk:"gateway_storage_catalog" tf:"optional"` + GatewayStorageCatalog types.String `tfsdk:"gateway_storage_catalog" tf:""` // Optional. The Unity Catalog-compatible name for the gateway storage // location. This is the destination to use for the data that is extracted // by the gateway. Delta Live Tables system will automatically create the // storage location under the catalog and schema. - GatewayStorageName types.String `tfsdk:"gateway_storage_name" tf:"optional"` + GatewayStorageName types.String `tfsdk:"gateway_storage_name" tf:""` // Required, Immutable. The name of the schema for the gateway pipelines's // storage location. - GatewayStorageSchema types.String `tfsdk:"gateway_storage_schema" tf:"optional"` + GatewayStorageSchema types.String `tfsdk:"gateway_storage_schema" tf:""` } func (newState *IngestionGatewayPipelineDefinition) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionGatewayPipelineDefinition) { @@ -2042,6 +2188,11 @@ func (newState *IngestionGatewayPipelineDefinition) SyncEffectiveFieldsDuringCre func (newState *IngestionGatewayPipelineDefinition) SyncEffectiveFieldsDuringRead(existingState IngestionGatewayPipelineDefinition) { } +func (c IngestionGatewayPipelineDefinition) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IngestionGatewayPipelineDefinition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2085,17 +2236,17 @@ type IngestionPipelineDefinition struct { // Immutable. The Unity Catalog connection that this ingestion pipeline uses // to communicate with the source. This is used with connectors for // applications like Salesforce, Workday, and so on. - ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + ConnectionName types.String `tfsdk:"connection_name" tf:""` // Immutable. Identifier for the gateway that is used by this ingestion // pipeline to communicate with the source database. This is used with // connectors to databases like SQL Server. - IngestionGatewayId types.String `tfsdk:"ingestion_gateway_id" tf:"optional"` + IngestionGatewayId types.String `tfsdk:"ingestion_gateway_id" tf:""` // Required. Settings specifying tables to replicate and the destination for // the replicated tables. - Objects types.List `tfsdk:"objects" tf:"optional"` + Objects types.List `tfsdk:"objects" tf:""` // Configuration settings to control the ingestion of tables. These settings // are applied to all tables in the pipeline. - TableConfiguration types.Object `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.Object `tfsdk:"table_configuration" tf:"object"` } func (newState *IngestionPipelineDefinition) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionPipelineDefinition) { @@ -2104,6 +2255,13 @@ func (newState *IngestionPipelineDefinition) SyncEffectiveFieldsDuringCreateOrUp func (newState *IngestionPipelineDefinition) SyncEffectiveFieldsDuringRead(existingState IngestionPipelineDefinition) { } +func (c IngestionPipelineDefinition) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IngestionConfig{}.ToSchema(cs, append(path, "objects")...) + TableSpecificConfig{}.ToSchema(cs, append(path, "table_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IngestionPipelineDefinition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2227,12 +2385,6 @@ type ListPipelineEventsRequest struct { PipelineId types.String `tfsdk:"-"` } -func (newState *ListPipelineEventsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelineEventsRequest) { -} - -func (newState *ListPipelineEventsRequest) SyncEffectiveFieldsDuringRead(existingState ListPipelineEventsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelineEventsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2304,11 +2456,11 @@ func (o *ListPipelineEventsRequest) SetOrderBy(ctx context.Context, v []types.St type ListPipelineEventsResponse struct { // The list of events matching the request criteria. - Events types.List `tfsdk:"events" tf:"optional"` + Events types.List `tfsdk:"events" tf:""` // If present, a token to fetch the next page of events. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // If present, a token to fetch the previous page of events. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` } func (newState *ListPipelineEventsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelineEventsResponse) { @@ -2317,6 +2469,12 @@ func (newState *ListPipelineEventsResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListPipelineEventsResponse) SyncEffectiveFieldsDuringRead(existingState ListPipelineEventsResponse) { } +func (c ListPipelineEventsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineEvent{}.ToSchema(cs, append(path, "events")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelineEventsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2407,12 +2565,6 @@ type ListPipelinesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListPipelinesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelinesRequest) { -} - -func (newState *ListPipelinesRequest) SyncEffectiveFieldsDuringRead(existingState ListPipelinesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelinesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2482,9 +2634,9 @@ func (o *ListPipelinesRequest) SetOrderBy(ctx context.Context, v []types.String) type ListPipelinesResponse struct { // If present, a token to fetch the next page of events. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // The list of events matching the request criteria. - Statuses types.List `tfsdk:"statuses" tf:"optional"` + Statuses types.List `tfsdk:"statuses" tf:""` } func (newState *ListPipelinesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelinesResponse) { @@ -2493,6 +2645,12 @@ func (newState *ListPipelinesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListPipelinesResponse) SyncEffectiveFieldsDuringRead(existingState ListPipelinesResponse) { } +func (c ListPipelinesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineStateInfo{}.ToSchema(cs, append(path, "statuses")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelinesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2568,12 +2726,6 @@ type ListUpdatesRequest struct { UntilUpdateId types.String `tfsdk:"-"` } -func (newState *ListUpdatesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUpdatesRequest) { -} - -func (newState *ListUpdatesRequest) SyncEffectiveFieldsDuringRead(existingState ListUpdatesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUpdatesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2614,12 +2766,12 @@ func (o ListUpdatesRequest) Type(ctx context.Context) attr.Type { type ListUpdatesResponse struct { // If present, then there are more results, and this a token to be used in a // subsequent request to fetch the next page. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // If present, then this token can be used in a subsequent request to fetch // the previous page. - PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + PrevPageToken types.String `tfsdk:"prev_page_token" tf:""` - Updates types.List `tfsdk:"updates" tf:"optional"` + Updates types.List `tfsdk:"updates" tf:""` } func (newState *ListUpdatesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUpdatesResponse) { @@ -2628,6 +2780,12 @@ func (newState *ListUpdatesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ListUpdatesResponse) SyncEffectiveFieldsDuringRead(existingState ListUpdatesResponse) { } +func (c ListUpdatesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateInfo{}.ToSchema(cs, append(path, "updates")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUpdatesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2702,6 +2860,11 @@ func (newState *ManualTrigger) SyncEffectiveFieldsDuringCreateOrUpdate(plan Manu func (newState *ManualTrigger) SyncEffectiveFieldsDuringRead(existingState ManualTrigger) { } +func (c ManualTrigger) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ManualTrigger. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2731,7 +2894,7 @@ func (o ManualTrigger) Type(ctx context.Context) attr.Type { type NotebookLibrary struct { // The absolute path of the notebook. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` } func (newState *NotebookLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotebookLibrary) { @@ -2740,6 +2903,11 @@ func (newState *NotebookLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan No func (newState *NotebookLibrary) SyncEffectiveFieldsDuringRead(existingState NotebookLibrary) { } +func (c NotebookLibrary) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NotebookLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2779,9 +2947,9 @@ type Notifications struct { // `on-update-failure`: Each time a pipeline update fails. * // `on-update-fatal-failure`: A pipeline update fails with a non-retryable // (fatal) error. * `on-flow-failure`: A single data flow fails. - Alerts types.List `tfsdk:"alerts" tf:"optional"` + Alerts types.List `tfsdk:"alerts" tf:""` // A list of email addresses notified when a configured alert is triggered. - EmailRecipients types.List `tfsdk:"email_recipients" tf:"optional"` + EmailRecipients types.List `tfsdk:"email_recipients" tf:""` } func (newState *Notifications) SyncEffectiveFieldsDuringCreateOrUpdate(plan Notifications) { @@ -2790,6 +2958,11 @@ func (newState *Notifications) SyncEffectiveFieldsDuringCreateOrUpdate(plan Noti func (newState *Notifications) SyncEffectiveFieldsDuringRead(existingState Notifications) { } +func (c Notifications) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Notifications. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2884,40 +3057,40 @@ func (o *Notifications) SetEmailRecipients(ctx context.Context, v []types.String type Origin struct { // The id of a batch. Unique within a flow. - BatchId types.Int64 `tfsdk:"batch_id" tf:"optional"` + BatchId types.Int64 `tfsdk:"batch_id" tf:""` // The cloud provider, e.g., AWS or Azure. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // The id of the cluster where an execution happens. Unique within a region. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The name of a dataset. Unique within a pipeline. - DatasetName types.String `tfsdk:"dataset_name" tf:"optional"` + DatasetName types.String `tfsdk:"dataset_name" tf:""` // The id of the flow. Globally unique. Incremental queries will generally // reuse the same id while complete queries will have a new id per update. - FlowId types.String `tfsdk:"flow_id" tf:"optional"` + FlowId types.String `tfsdk:"flow_id" tf:""` // The name of the flow. Not unique. - FlowName types.String `tfsdk:"flow_name" tf:"optional"` + FlowName types.String `tfsdk:"flow_name" tf:""` // The optional host name where the event was triggered - Host types.String `tfsdk:"host" tf:"optional"` + Host types.String `tfsdk:"host" tf:""` // The id of a maintenance run. Globally unique. - MaintenanceId types.String `tfsdk:"maintenance_id" tf:"optional"` + MaintenanceId types.String `tfsdk:"maintenance_id" tf:""` // Materialization name. - MaterializationName types.String `tfsdk:"materialization_name" tf:"optional"` + MaterializationName types.String `tfsdk:"materialization_name" tf:""` // The org id of the user. Unique within a cloud. - OrgId types.Int64 `tfsdk:"org_id" tf:"optional"` + OrgId types.Int64 `tfsdk:"org_id" tf:""` // The id of the pipeline. Globally unique. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // The name of the pipeline. Not unique. - PipelineName types.String `tfsdk:"pipeline_name" tf:"optional"` + PipelineName types.String `tfsdk:"pipeline_name" tf:""` // The cloud region. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The id of the request that caused an update. - RequestId types.String `tfsdk:"request_id" tf:"optional"` + RequestId types.String `tfsdk:"request_id" tf:""` // The id of a (delta) table. Globally unique. - TableId types.String `tfsdk:"table_id" tf:"optional"` + TableId types.String `tfsdk:"table_id" tf:""` // The Unity Catalog id of the MV or ST being updated. - UcResourceId types.String `tfsdk:"uc_resource_id" tf:"optional"` + UcResourceId types.String `tfsdk:"uc_resource_id" tf:""` // The id of an execution. Globally unique. - UpdateId types.String `tfsdk:"update_id" tf:"optional"` + UpdateId types.String `tfsdk:"update_id" tf:""` } func (newState *Origin) SyncEffectiveFieldsDuringCreateOrUpdate(plan Origin) { @@ -2926,6 +3099,11 @@ func (newState *Origin) SyncEffectiveFieldsDuringCreateOrUpdate(plan Origin) { func (newState *Origin) SyncEffectiveFieldsDuringRead(existingState Origin) { } +func (c Origin) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Origin. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2991,13 +3169,13 @@ func (o Origin) Type(ctx context.Context) attr.Type { type PipelineAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PipelineAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineAccessControlRequest) { @@ -3006,6 +3184,11 @@ func (newState *PipelineAccessControlRequest) SyncEffectiveFieldsDuringCreateOrU func (newState *PipelineAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState PipelineAccessControlRequest) { } +func (c PipelineAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3045,15 +3228,15 @@ func (o PipelineAccessControlRequest) Type(ctx context.Context) attr.Type { type PipelineAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *PipelineAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineAccessControlResponse) { @@ -3062,6 +3245,12 @@ func (newState *PipelineAccessControlResponse) SyncEffectiveFieldsDuringCreateOr func (newState *PipelineAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState PipelineAccessControlResponse) { } +func (c PipelineAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelinePermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3134,24 +3323,24 @@ func (o *PipelineAccessControlResponse) SetAllPermissions(ctx context.Context, v type PipelineCluster struct { // Note: This field won't be persisted. Only API users will check this // field. - ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:""` // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"object"` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"object"` // The configuration for delivering spark logs to a long-term storage // destination. Only dbfs destinations are supported. Only one destination // can be specified for one cluster. If the conf is given, the logs will be // delivered to the destination every `5 mins`. The destination of driver // logs is `$destination/$clusterId/driver`, while the destination of // executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"object"` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -3160,37 +3349,37 @@ type PipelineCluster struct { // // - Clusters can only reuse cloud resources if the resources' tags are a // subset of the cluster tags - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. - DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:""` // The node type of the Spark driver. Note that this field is optional; if // unset, the driver node type will be set as the same value as // `node_type_id` defined above. - DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:""` // Whether to enable local disk encryption for the cluster. - EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:""` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent // to `//init_scripts`. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + InitScripts types.List `tfsdk:"init_scripts" tf:""` // The optional ID of the instance pool to which the cluster belongs. - InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` // A label for the cluster specification, either `default` to configure the // default cluster, or `maintenance` to configure the maintenance cluster. // This field is optional. The default value is `default`. - Label types.String `tfsdk:"label" tf:"optional"` + Label types.String `tfsdk:"label" tf:""` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A // list of available node types can be retrieved by using the // :method:clusters/listNodeTypes API call. - NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -3201,13 +3390,13 @@ type PipelineCluster struct { // field will immediately be updated to reflect the target size of 10 // workers, whereas the workers listed in `spark_info` will gradually // increase from 5 to 10 as the new nodes are provisioned. - NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + NumWorkers types.Int64 `tfsdk:"num_workers" tf:""` // The ID of the cluster policy used to create the cluster if applicable. - PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + PolicyId types.String `tfsdk:"policy_id" tf:""` // An object containing a set of optional, user-specified Spark // configuration key-value pairs. See :method:clusters/create for more // details. - SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + SparkConf types.Map `tfsdk:"spark_conf" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs. Please note that key-value pair of the form // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the @@ -3221,11 +3410,11 @@ type PipelineCluster struct { // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:""` // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. - SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:""` } func (newState *PipelineCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineCluster) { @@ -3234,6 +3423,16 @@ func (newState *PipelineCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pi func (newState *PipelineCluster) SyncEffectiveFieldsDuringRead(existingState PipelineCluster) { } +func (c PipelineCluster) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineClusterAutoscale{}.ToSchema(cs, append(path, "autoscale")...) + compute_tf.AwsAttributes{}.ToSchema(cs, append(path, "aws_attributes")...) + compute_tf.AzureAttributes{}.ToSchema(cs, append(path, "azure_attributes")...) + compute_tf.ClusterLogConf{}.ToSchema(cs, append(path, "cluster_log_conf")...) + compute_tf.GcpAttributes{}.ToSchema(cs, append(path, "gcp_attributes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineCluster. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3605,7 +3804,7 @@ type PipelineClusterAutoscale struct { // minimal impact to the data processing latency of your pipelines. Enhanced // Autoscaling is available for `updates` clusters only. The legacy // autoscaling feature is used for `maintenance` clusters. - Mode types.String `tfsdk:"mode" tf:"optional"` + Mode types.String `tfsdk:"mode" tf:""` } func (newState *PipelineClusterAutoscale) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineClusterAutoscale) { @@ -3614,6 +3813,13 @@ func (newState *PipelineClusterAutoscale) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *PipelineClusterAutoscale) SyncEffectiveFieldsDuringRead(existingState PipelineClusterAutoscale) { } +func (c PipelineClusterAutoscale) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "max_workers")...) + cs.SetRequired(append(path, "min_workers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineClusterAutoscale. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3651,9 +3857,9 @@ func (o PipelineClusterAutoscale) Type(ctx context.Context) attr.Type { type PipelineDeployment struct { // The deployment method that manages the pipeline. - Kind types.String `tfsdk:"kind" tf:"optional"` + Kind types.String `tfsdk:"kind" tf:""` // The path to the file containing metadata about the deployment. - MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:"optional"` + MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:""` } func (newState *PipelineDeployment) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineDeployment) { @@ -3662,6 +3868,11 @@ func (newState *PipelineDeployment) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PipelineDeployment) SyncEffectiveFieldsDuringRead(existingState PipelineDeployment) { } +func (c PipelineDeployment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineDeployment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3697,23 +3908,23 @@ func (o PipelineDeployment) Type(ctx context.Context) attr.Type { type PipelineEvent struct { // Information about an error captured by the event. - Error types.Object `tfsdk:"error" tf:"optional,object"` + Error types.Object `tfsdk:"error" tf:"object"` // The event type. Should always correspond to the details - EventType types.String `tfsdk:"event_type" tf:"optional"` + EventType types.String `tfsdk:"event_type" tf:""` // A time-based, globally unique id. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The severity level of the event. - Level types.String `tfsdk:"level" tf:"optional"` + Level types.String `tfsdk:"level" tf:""` // Maturity level for event_type. - MaturityLevel types.String `tfsdk:"maturity_level" tf:"optional"` + MaturityLevel types.String `tfsdk:"maturity_level" tf:""` // The display message associated with the event. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Describes where the event originates from. - Origin types.Object `tfsdk:"origin" tf:"optional,object"` + Origin types.Object `tfsdk:"origin" tf:"object"` // A sequencing object to identify and order events. - Sequence types.Object `tfsdk:"sequence" tf:"optional,object"` + Sequence types.Object `tfsdk:"sequence" tf:"object"` // The time of the event. - Timestamp types.String `tfsdk:"timestamp" tf:"optional"` + Timestamp types.String `tfsdk:"timestamp" tf:""` } func (newState *PipelineEvent) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineEvent) { @@ -3722,6 +3933,14 @@ func (newState *PipelineEvent) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pipe func (newState *PipelineEvent) SyncEffectiveFieldsDuringRead(existingState PipelineEvent) { } +func (c PipelineEvent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ErrorDetail{}.ToSchema(cs, append(path, "error")...) + Origin{}.ToSchema(cs, append(path, "origin")...) + Sequencing{}.ToSchema(cs, append(path, "sequence")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineEvent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3860,16 +4079,16 @@ func (o *PipelineEvent) SetSequence(ctx context.Context, v Sequencing) { type PipelineLibrary struct { // The path to a file that defines a pipeline and is stored in the // Databricks Repos. - File types.Object `tfsdk:"file" tf:"optional,object"` + File types.Object `tfsdk:"file" tf:"object"` // URI of the jar to be installed. Currently only DBFS is supported. - Jar types.String `tfsdk:"jar" tf:"optional"` + Jar types.String `tfsdk:"jar" tf:""` // Specification of a maven library to be installed. - Maven types.Object `tfsdk:"maven" tf:"optional,object"` + Maven types.Object `tfsdk:"maven" tf:"object"` // The path to a notebook that defines a pipeline and is stored in the // Databricks workspace. - Notebook types.Object `tfsdk:"notebook" tf:"optional,object"` + Notebook types.Object `tfsdk:"notebook" tf:"object"` // URI of the whl to be installed. - Whl types.String `tfsdk:"whl" tf:"optional"` + Whl types.String `tfsdk:"whl" tf:""` } func (newState *PipelineLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineLibrary) { @@ -3878,6 +4097,14 @@ func (newState *PipelineLibrary) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pi func (newState *PipelineLibrary) SyncEffectiveFieldsDuringRead(existingState PipelineLibrary) { } +func (c PipelineLibrary) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + FileLibrary{}.ToSchema(cs, append(path, "file")...) + compute_tf.MavenLibrary{}.ToSchema(cs, append(path, "maven")...) + NotebookLibrary{}.ToSchema(cs, append(path, "notebook")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineLibrary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4006,11 +4233,11 @@ func (o *PipelineLibrary) SetNotebook(ctx context.Context, v NotebookLibrary) { } type PipelinePermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PipelinePermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermission) { @@ -4019,6 +4246,11 @@ func (newState *PipelinePermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PipelinePermission) SyncEffectiveFieldsDuringRead(existingState PipelinePermission) { } +func (c PipelinePermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4085,11 +4317,11 @@ func (o *PipelinePermission) SetInheritedFromObject(ctx context.Context, v []typ } type PipelinePermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *PipelinePermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermissions) { @@ -4098,6 +4330,12 @@ func (newState *PipelinePermissions) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *PipelinePermissions) SyncEffectiveFieldsDuringRead(existingState PipelinePermissions) { } +func (c PipelinePermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4164,9 +4402,9 @@ func (o *PipelinePermissions) SetAccessControlList(ctx context.Context, v []Pipe } type PipelinePermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *PipelinePermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermissionsDescription) { @@ -4175,6 +4413,11 @@ func (newState *PipelinePermissionsDescription) SyncEffectiveFieldsDuringCreateO func (newState *PipelinePermissionsDescription) SyncEffectiveFieldsDuringRead(existingState PipelinePermissionsDescription) { } +func (c PipelinePermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4209,7 +4452,7 @@ func (o PipelinePermissionsDescription) Type(ctx context.Context) attr.Type { } type PipelinePermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The pipeline for which to get or manage permissions. PipelineId types.String `tfsdk:"-"` } @@ -4220,6 +4463,13 @@ func (newState *PipelinePermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpd func (newState *PipelinePermissionsRequest) SyncEffectiveFieldsDuringRead(existingState PipelinePermissionsRequest) { } +func (c PipelinePermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "pipeline_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4285,60 +4535,60 @@ func (o *PipelinePermissionsRequest) SetAccessControlList(ctx context.Context, v type PipelineSpec struct { // Budget policy of this pipeline. - BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:""` // A catalog in Unity Catalog to publish data from this pipeline to. If // `target` is specified, tables in this pipeline are published to a // `target` schema inside `catalog` (for example, // `catalog`.`target`.`table`). If `target` is not specified, no data is // published to Unity Catalog. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // DLT Release Channel that specifies which version to use. - Channel types.String `tfsdk:"channel" tf:"optional"` + Channel types.String `tfsdk:"channel" tf:""` // Cluster settings for this pipeline deployment. - Clusters types.List `tfsdk:"clusters" tf:"optional"` + Clusters types.List `tfsdk:"clusters" tf:""` // String-String configuration for this pipeline execution. - Configuration types.Map `tfsdk:"configuration" tf:"optional"` + Configuration types.Map `tfsdk:"configuration" tf:""` // Whether the pipeline is continuous or triggered. This replaces `trigger`. - Continuous types.Bool `tfsdk:"continuous" tf:"optional"` + Continuous types.Bool `tfsdk:"continuous" tf:""` // Deployment type of this pipeline. - Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"object"` // Whether the pipeline is in Development mode. Defaults to false. - Development types.Bool `tfsdk:"development" tf:"optional"` + Development types.Bool `tfsdk:"development" tf:""` // Pipeline product edition. - Edition types.String `tfsdk:"edition" tf:"optional"` + Edition types.String `tfsdk:"edition" tf:""` // Filters on which Pipeline packages to include in the deployed graph. - Filters types.Object `tfsdk:"filters" tf:"optional,object"` + Filters types.Object `tfsdk:"filters" tf:"object"` // The definition of a gateway pipeline to support change data capture. - GatewayDefinition types.Object `tfsdk:"gateway_definition" tf:"optional,object"` + GatewayDefinition types.Object `tfsdk:"gateway_definition" tf:"object"` // Unique identifier for this pipeline. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition types.Object `tfsdk:"ingestion_definition" tf:"optional,object"` + IngestionDefinition types.Object `tfsdk:"ingestion_definition" tf:"object"` // Libraries or code needed by this deployment. - Libraries types.List `tfsdk:"libraries" tf:"optional"` + Libraries types.List `tfsdk:"libraries" tf:""` // Friendly identifier for this pipeline. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // List of notification settings for this pipeline. - Notifications types.List `tfsdk:"notifications" tf:"optional"` + Notifications types.List `tfsdk:"notifications" tf:""` // Whether Photon is enabled for this pipeline. - Photon types.Bool `tfsdk:"photon" tf:"optional"` + Photon types.Bool `tfsdk:"photon" tf:""` // Restart window of this pipeline. - RestartWindow types.Object `tfsdk:"restart_window" tf:"optional,object"` + RestartWindow types.Object `tfsdk:"restart_window" tf:"object"` // The default schema (database) where tables are read from or published to. // The presence of this field implies that the pipeline is in direct // publishing mode. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // Whether serverless compute is enabled for this pipeline. - Serverless types.Bool `tfsdk:"serverless" tf:"optional"` + Serverless types.Bool `tfsdk:"serverless" tf:""` // DBFS root directory for storing checkpoints and tables. - Storage types.String `tfsdk:"storage" tf:"optional"` + Storage types.String `tfsdk:"storage" tf:""` // Target schema (database) to add tables in this pipeline to. If not // specified, no data is published to the Hive metastore or Unity Catalog. // To publish to Unity Catalog, also specify `catalog`. - Target types.String `tfsdk:"target" tf:"optional"` + Target types.String `tfsdk:"target" tf:""` // Which pipeline trigger to use. Deprecated: Use `continuous` instead. - Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"object"` } func (newState *PipelineSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineSpec) { @@ -4347,6 +4597,20 @@ func (newState *PipelineSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pipel func (newState *PipelineSpec) SyncEffectiveFieldsDuringRead(existingState PipelineSpec) { } +func (c PipelineSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineCluster{}.ToSchema(cs, append(path, "clusters")...) + PipelineDeployment{}.ToSchema(cs, append(path, "deployment")...) + Filters{}.ToSchema(cs, append(path, "filters")...) + IngestionGatewayPipelineDefinition{}.ToSchema(cs, append(path, "gateway_definition")...) + IngestionPipelineDefinition{}.ToSchema(cs, append(path, "ingestion_definition")...) + PipelineLibrary{}.ToSchema(cs, append(path, "libraries")...) + Notifications{}.ToSchema(cs, append(path, "notifications")...) + RestartWindow{}.ToSchema(cs, append(path, "restart_window")...) + PipelineTrigger{}.ToSchema(cs, append(path, "trigger")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4715,23 +4979,23 @@ func (o *PipelineSpec) SetTrigger(ctx context.Context, v PipelineTrigger) { type PipelineStateInfo struct { // The unique identifier of the cluster running the pipeline. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The username of the pipeline creator. - CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + CreatorUserName types.String `tfsdk:"creator_user_name" tf:""` // The health of a pipeline. - Health types.String `tfsdk:"health" tf:"optional"` + Health types.String `tfsdk:"health" tf:""` // Status of the latest updates for the pipeline. Ordered with the newest // update first. - LatestUpdates types.List `tfsdk:"latest_updates" tf:"optional"` + LatestUpdates types.List `tfsdk:"latest_updates" tf:""` // The user-friendly name of the pipeline. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The unique identifier of the pipeline. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // The username that the pipeline runs as. This is a read only value derived // from the pipeline owner. - RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` + RunAsUserName types.String `tfsdk:"run_as_user_name" tf:""` // The pipeline state. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *PipelineStateInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineStateInfo) { @@ -4740,6 +5004,12 @@ func (newState *PipelineStateInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PipelineStateInfo) SyncEffectiveFieldsDuringRead(existingState PipelineStateInfo) { } +func (c PipelineStateInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateStateInfo{}.ToSchema(cs, append(path, "latest_updates")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineStateInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4816,9 +5086,9 @@ func (o *PipelineStateInfo) SetLatestUpdates(ctx context.Context, v []UpdateStat } type PipelineTrigger struct { - Cron types.Object `tfsdk:"cron" tf:"optional,object"` + Cron types.Object `tfsdk:"cron" tf:"object"` - Manual types.Object `tfsdk:"manual" tf:"optional,object"` + Manual types.Object `tfsdk:"manual" tf:"object"` } func (newState *PipelineTrigger) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineTrigger) { @@ -4827,6 +5097,13 @@ func (newState *PipelineTrigger) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pi func (newState *PipelineTrigger) SyncEffectiveFieldsDuringRead(existingState PipelineTrigger) { } +func (c PipelineTrigger) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CronTrigger{}.ToSchema(cs, append(path, "cron")...) + ManualTrigger{}.ToSchema(cs, append(path, "manual")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineTrigger. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4921,18 +5198,18 @@ func (o *PipelineTrigger) SetManual(ctx context.Context, v ManualTrigger) { type ReportSpec struct { // Required. Destination catalog to store table. - DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` + DestinationCatalog types.String `tfsdk:"destination_catalog" tf:""` // Required. Destination schema to store table. - DestinationSchema types.String `tfsdk:"destination_schema" tf:"optional"` + DestinationSchema types.String `tfsdk:"destination_schema" tf:""` // Required. Destination table name. The pipeline fails if a table with that // name already exists. - DestinationTable types.String `tfsdk:"destination_table" tf:"optional"` + DestinationTable types.String `tfsdk:"destination_table" tf:""` // Required. Report URL in the source system. - SourceUrl types.String `tfsdk:"source_url" tf:"optional"` + SourceUrl types.String `tfsdk:"source_url" tf:""` // Configuration settings to control the ingestion of tables. These settings // override the table_configuration defined in the // IngestionPipelineDefinition object. - TableConfiguration types.Object `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.Object `tfsdk:"table_configuration" tf:"object"` } func (newState *ReportSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReportSpec) { @@ -4941,6 +5218,12 @@ func (newState *ReportSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReportS func (newState *ReportSpec) SyncEffectiveFieldsDuringRead(existingState ReportSpec) { } +func (c ReportSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableSpecificConfig{}.ToSchema(cs, append(path, "table_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReportSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5014,7 +5297,7 @@ type RestartWindow struct { // Days of week in which the restart is allowed to happen (within a // five-hour window starting at start_hour). If not specified all days of // the week will be used. - DaysOfWeek types.List `tfsdk:"days_of_week" tf:"optional"` + DaysOfWeek types.List `tfsdk:"days_of_week" tf:""` // An integer between 0 and 23 denoting the start hour for the restart // window in the 24-hour day. Continuous pipeline restart is triggered only // within a five-hour window starting at this hour. @@ -5022,7 +5305,7 @@ type RestartWindow struct { // Time zone id of restart window. See // https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html // for details. If not specified, UTC will be used. - TimeZoneId types.String `tfsdk:"time_zone_id" tf:"optional"` + TimeZoneId types.String `tfsdk:"time_zone_id" tf:""` } func (newState *RestartWindow) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestartWindow) { @@ -5031,6 +5314,12 @@ func (newState *RestartWindow) SyncEffectiveFieldsDuringCreateOrUpdate(plan Rest func (newState *RestartWindow) SyncEffectiveFieldsDuringRead(existingState RestartWindow) { } +func (c RestartWindow) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "start_hour")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestartWindow. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5096,22 +5385,81 @@ func (o *RestartWindow) SetDaysOfWeek(ctx context.Context, v []types.String) { o.DaysOfWeek = types.ListValueMust(t, vs) } +// Write-only setting, available only in Create/Update calls. Specifies the user +// or service principal that the pipeline runs as. If not specified, the +// pipeline runs as the user who created the pipeline. +// +// Only `user_name` or `service_principal_name` can be specified. If both are +// specified, an error is thrown. +type RunAs struct { + // Application ID of an active service principal. Setting this field + // requires the `servicePrincipal/user` role. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` + // The email of an active workspace user. Users can only set this field to + // their own email. + UserName types.String `tfsdk:"user_name" tf:""` +} + +func (newState *RunAs) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunAs) { +} + +func (newState *RunAs) SyncEffectiveFieldsDuringRead(existingState RunAs) { +} + +func (c RunAs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunAs. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunAs) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, RunAs +// only implements ToObjectValue() and Type(). +func (o RunAs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunAs) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + type SchemaSpec struct { // Required. Destination catalog to store tables. - DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` + DestinationCatalog types.String `tfsdk:"destination_catalog" tf:""` // Required. Destination schema to store tables in. Tables with the same // name as the source tables are created in this destination schema. The // pipeline fails If a table with the same name already exists. - DestinationSchema types.String `tfsdk:"destination_schema" tf:"optional"` + DestinationSchema types.String `tfsdk:"destination_schema" tf:""` // The source catalog name. Might be optional depending on the type of // source. - SourceCatalog types.String `tfsdk:"source_catalog" tf:"optional"` + SourceCatalog types.String `tfsdk:"source_catalog" tf:""` // Required. Schema name in the source database. - SourceSchema types.String `tfsdk:"source_schema" tf:"optional"` + SourceSchema types.String `tfsdk:"source_schema" tf:""` // Configuration settings to control the ingestion of tables. These settings // are applied to all tables in this schema and override the // table_configuration defined in the IngestionPipelineDefinition object. - TableConfiguration types.Object `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.Object `tfsdk:"table_configuration" tf:"object"` } func (newState *SchemaSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan SchemaSpec) { @@ -5120,6 +5468,12 @@ func (newState *SchemaSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan SchemaS func (newState *SchemaSpec) SyncEffectiveFieldsDuringRead(existingState SchemaSpec) { } +func (c SchemaSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableSpecificConfig{}.ToSchema(cs, append(path, "table_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SchemaSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5191,9 +5545,9 @@ func (o *SchemaSpec) SetTableConfiguration(ctx context.Context, v TableSpecificC type Sequencing struct { // A sequence number, unique and increasing within the control plane. - ControlPlaneSeqNo types.Int64 `tfsdk:"control_plane_seq_no" tf:"optional"` + ControlPlaneSeqNo types.Int64 `tfsdk:"control_plane_seq_no" tf:""` // the ID assigned by the data plane. - DataPlaneId types.Object `tfsdk:"data_plane_id" tf:"optional,object"` + DataPlaneId types.Object `tfsdk:"data_plane_id" tf:"object"` } func (newState *Sequencing) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sequencing) { @@ -5202,6 +5556,12 @@ func (newState *Sequencing) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sequenc func (newState *Sequencing) SyncEffectiveFieldsDuringRead(existingState Sequencing) { } +func (c Sequencing) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DataPlaneId{}.ToSchema(cs, append(path, "data_plane_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Sequencing. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5267,11 +5627,11 @@ func (o *Sequencing) SetDataPlaneId(ctx context.Context, v DataPlaneId) { type SerializedException struct { // Runtime class of the exception - ClassName types.String `tfsdk:"class_name" tf:"optional"` + ClassName types.String `tfsdk:"class_name" tf:""` // Exception message - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Stack trace consisting of a list of stack frames - Stack types.List `tfsdk:"stack" tf:"optional"` + Stack types.List `tfsdk:"stack" tf:""` } func (newState *SerializedException) SyncEffectiveFieldsDuringCreateOrUpdate(plan SerializedException) { @@ -5280,6 +5640,12 @@ func (newState *SerializedException) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *SerializedException) SyncEffectiveFieldsDuringRead(existingState SerializedException) { } +func (c SerializedException) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StackFrame{}.ToSchema(cs, append(path, "stack")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SerializedException. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5347,13 +5713,13 @@ func (o *SerializedException) SetStack(ctx context.Context, v []StackFrame) { type StackFrame struct { // Class from which the method call originated - DeclaringClass types.String `tfsdk:"declaring_class" tf:"optional"` + DeclaringClass types.String `tfsdk:"declaring_class" tf:""` // File where the method is defined - FileName types.String `tfsdk:"file_name" tf:"optional"` + FileName types.String `tfsdk:"file_name" tf:""` // Line from which the method was called - LineNumber types.Int64 `tfsdk:"line_number" tf:"optional"` + LineNumber types.Int64 `tfsdk:"line_number" tf:""` // Name of the method which was called - MethodName types.String `tfsdk:"method_name" tf:"optional"` + MethodName types.String `tfsdk:"method_name" tf:""` } func (newState *StackFrame) SyncEffectiveFieldsDuringCreateOrUpdate(plan StackFrame) { @@ -5362,6 +5728,11 @@ func (newState *StackFrame) SyncEffectiveFieldsDuringCreateOrUpdate(plan StackFr func (newState *StackFrame) SyncEffectiveFieldsDuringRead(existingState StackFrame) { } +func (c StackFrame) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StackFrame. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5400,24 +5771,24 @@ func (o StackFrame) Type(ctx context.Context) attr.Type { } type StartUpdate struct { - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` // If true, this update will reset all tables before running. - FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + FullRefresh types.Bool `tfsdk:"full_refresh" tf:""` // A list of tables to update with fullRefresh. If both refresh_selection // and full_refresh_selection are empty, this is a full graph update. Full // Refresh on a table means that the states of the table will be reset // before the refresh. - FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:"optional"` + FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:""` PipelineId types.String `tfsdk:"-"` // A list of tables to update without fullRefresh. If both refresh_selection // and full_refresh_selection are empty, this is a full graph update. Full // Refresh on a table means that the states of the table will be reset // before the refresh. - RefreshSelection types.List `tfsdk:"refresh_selection" tf:"optional"` + RefreshSelection types.List `tfsdk:"refresh_selection" tf:""` // If true, this update only validates the correctness of pipeline source // code but does not materialize or publish any datasets. - ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` + ValidateOnly types.Bool `tfsdk:"validate_only" tf:""` } func (newState *StartUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartUpdate) { @@ -5426,6 +5797,12 @@ func (newState *StartUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartU func (newState *StartUpdate) SyncEffectiveFieldsDuringRead(existingState StartUpdate) { } +func (c StartUpdate) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "pipeline_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartUpdate. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5527,7 +5904,7 @@ func (o *StartUpdate) SetRefreshSelection(ctx context.Context, v []types.String) } type StartUpdateResponse struct { - UpdateId types.String `tfsdk:"update_id" tf:"optional"` + UpdateId types.String `tfsdk:"update_id" tf:""` } func (newState *StartUpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartUpdateResponse) { @@ -5536,6 +5913,11 @@ func (newState *StartUpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *StartUpdateResponse) SyncEffectiveFieldsDuringRead(existingState StartUpdateResponse) { } +func (c StartUpdateResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartUpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5576,6 +5958,11 @@ func (newState *StopPipelineResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *StopPipelineResponse) SyncEffectiveFieldsDuringRead(existingState StopPipelineResponse) { } +func (c StopPipelineResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopPipelineResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5608,12 +5995,6 @@ type StopRequest struct { PipelineId types.String `tfsdk:"-"` } -func (newState *StopRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopRequest) { -} - -func (newState *StopRequest) SyncEffectiveFieldsDuringRead(existingState StopRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5647,23 +6028,23 @@ func (o StopRequest) Type(ctx context.Context) attr.Type { type TableSpec struct { // Required. Destination catalog to store table. - DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` + DestinationCatalog types.String `tfsdk:"destination_catalog" tf:""` // Required. Destination schema to store table. - DestinationSchema types.String `tfsdk:"destination_schema" tf:"optional"` + DestinationSchema types.String `tfsdk:"destination_schema" tf:""` // Optional. Destination table name. The pipeline fails if a table with that // name already exists. If not set, the source table name is used. - DestinationTable types.String `tfsdk:"destination_table" tf:"optional"` + DestinationTable types.String `tfsdk:"destination_table" tf:""` // Source catalog name. Might be optional depending on the type of source. - SourceCatalog types.String `tfsdk:"source_catalog" tf:"optional"` + SourceCatalog types.String `tfsdk:"source_catalog" tf:""` // Schema name in the source database. Might be optional depending on the // type of source. - SourceSchema types.String `tfsdk:"source_schema" tf:"optional"` + SourceSchema types.String `tfsdk:"source_schema" tf:""` // Required. Table name in the source database. - SourceTable types.String `tfsdk:"source_table" tf:"optional"` + SourceTable types.String `tfsdk:"source_table" tf:""` // Configuration settings to control the ingestion of tables. These settings // override the table_configuration defined in the // IngestionPipelineDefinition object and the SchemaSpec. - TableConfiguration types.Object `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.Object `tfsdk:"table_configuration" tf:"object"` } func (newState *TableSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSpec) { @@ -5672,6 +6053,12 @@ func (newState *TableSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSpe func (newState *TableSpec) SyncEffectiveFieldsDuringRead(existingState TableSpec) { } +func (c TableSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TableSpecificConfig{}.ToSchema(cs, append(path, "table_configuration")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5747,16 +6134,16 @@ func (o *TableSpec) SetTableConfiguration(ctx context.Context, v TableSpecificCo type TableSpecificConfig struct { // The primary key of the table used to apply changes. - PrimaryKeys types.List `tfsdk:"primary_keys" tf:"optional"` + PrimaryKeys types.List `tfsdk:"primary_keys" tf:""` // If true, formula fields defined in the table are included in the // ingestion. This setting is only valid for the Salesforce connector - SalesforceIncludeFormulaFields types.Bool `tfsdk:"salesforce_include_formula_fields" tf:"optional"` + SalesforceIncludeFormulaFields types.Bool `tfsdk:"salesforce_include_formula_fields" tf:""` // The SCD type to use to ingest the table. - ScdType types.String `tfsdk:"scd_type" tf:"optional"` + ScdType types.String `tfsdk:"scd_type" tf:""` // The column names specifying the logical order of events in the source // data. Delta Live Tables uses this sequencing to handle change events that // arrive out of order. - SequenceBy types.List `tfsdk:"sequence_by" tf:"optional"` + SequenceBy types.List `tfsdk:"sequence_by" tf:""` } func (newState *TableSpecificConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSpecificConfig) { @@ -5765,6 +6152,11 @@ func (newState *TableSpecificConfig) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *TableSpecificConfig) SyncEffectiveFieldsDuringRead(existingState TableSpecificConfig) { } +func (c TableSpecificConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TableSpecificConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5863,35 +6255,35 @@ func (o *TableSpecificConfig) SetSequenceBy(ctx context.Context, v []types.Strin type UpdateInfo struct { // What triggered this update. - Cause types.String `tfsdk:"cause" tf:"optional"` + Cause types.String `tfsdk:"cause" tf:""` // The ID of the cluster that the update is running on. - ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + ClusterId types.String `tfsdk:"cluster_id" tf:""` // The pipeline configuration with system defaults applied where unspecified // by the user. Not returned by ListUpdates. - Config types.Object `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"object"` // The time when this update was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // If true, this update will reset all tables before running. - FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + FullRefresh types.Bool `tfsdk:"full_refresh" tf:""` // A list of tables to update with fullRefresh. If both refresh_selection // and full_refresh_selection are empty, this is a full graph update. Full // Refresh on a table means that the states of the table will be reset // before the refresh. - FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:"optional"` + FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:""` // The ID of the pipeline. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // A list of tables to update without fullRefresh. If both refresh_selection // and full_refresh_selection are empty, this is a full graph update. Full // Refresh on a table means that the states of the table will be reset // before the refresh. - RefreshSelection types.List `tfsdk:"refresh_selection" tf:"optional"` + RefreshSelection types.List `tfsdk:"refresh_selection" tf:""` // The update state. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // The ID of this update. - UpdateId types.String `tfsdk:"update_id" tf:"optional"` + UpdateId types.String `tfsdk:"update_id" tf:""` // If true, this update only validates the correctness of pipeline source // code but does not materialize or publish any datasets. - ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` + ValidateOnly types.Bool `tfsdk:"validate_only" tf:""` } func (newState *UpdateInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInfo) { @@ -5900,6 +6292,12 @@ func (newState *UpdateInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateI func (newState *UpdateInfo) SyncEffectiveFieldsDuringRead(existingState UpdateInfo) { } +func (c UpdateInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PipelineSpec{}.ToSchema(cs, append(path, "config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6040,11 +6438,11 @@ func (o *UpdateInfo) SetRefreshSelection(ctx context.Context, v []types.String) } type UpdateStateInfo struct { - CreationTime types.String `tfsdk:"creation_time" tf:"optional"` + CreationTime types.String `tfsdk:"creation_time" tf:""` - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` - UpdateId types.String `tfsdk:"update_id" tf:"optional"` + UpdateId types.String `tfsdk:"update_id" tf:""` } func (newState *UpdateStateInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateStateInfo) { @@ -6053,6 +6451,11 @@ func (newState *UpdateStateInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Up func (newState *UpdateStateInfo) SyncEffectiveFieldsDuringRead(existingState UpdateStateInfo) { } +func (c UpdateStateInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateStateInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/provisioning_tf/legacy_model.go b/internal/service/provisioning_tf/legacy_model.go index 0acd5d338..2fb6c1732 100755 --- a/internal/service/provisioning_tf/legacy_model.go +++ b/internal/service/provisioning_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -22,7 +23,7 @@ import ( ) type AwsCredentials_SdkV2 struct { - StsRole types.List `tfsdk:"sts_role" tf:"optional,object"` + StsRole types.List `tfsdk:"sts_role" tf:"object"` } func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsCredentials_SdkV2) { @@ -31,6 +32,12 @@ func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsCredentials_SdkV2) { } +func (c AwsCredentials_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StsRole_SdkV2{}.ToSchema(cs, append(path, "sts_role")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsCredentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -94,7 +101,7 @@ func (o *AwsCredentials_SdkV2) SetStsRole(ctx context.Context, v StsRole_SdkV2) type AwsKeyInfo_SdkV2 struct { // The AWS KMS key alias. - KeyAlias types.String `tfsdk:"key_alias" tf:"optional"` + KeyAlias types.String `tfsdk:"key_alias" tf:""` // The AWS KMS key's Amazon Resource Name (ARN). KeyArn types.String `tfsdk:"key_arn" tf:""` // The AWS KMS key region. @@ -103,7 +110,7 @@ type AwsKeyInfo_SdkV2 struct { // If this is set to `true` or omitted, the key is also used to encrypt // cluster EBS volumes. If you do not want to use this key for encrypting // EBS volumes, set to `false`. - ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:"optional"` + ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:""` } func (newState *AwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsKeyInfo_SdkV2) { @@ -112,6 +119,13 @@ func (newState *AwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan A func (newState *AwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsKeyInfo_SdkV2) { } +func (c AwsKeyInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key_arn")...) + cs.SetRequired(append(path, "key_region")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsKeyInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -151,9 +165,9 @@ func (o AwsKeyInfo_SdkV2) Type(ctx context.Context) attr.Type { type AzureWorkspaceInfo_SdkV2 struct { // Azure Resource Group name - ResourceGroup types.String `tfsdk:"resource_group" tf:"optional"` + ResourceGroup types.String `tfsdk:"resource_group" tf:""` // Azure Subscription ID - SubscriptionId types.String `tfsdk:"subscription_id" tf:"optional"` + SubscriptionId types.String `tfsdk:"subscription_id" tf:""` } func (newState *AzureWorkspaceInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureWorkspaceInfo_SdkV2) { @@ -162,6 +176,11 @@ func (newState *AzureWorkspaceInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *AzureWorkspaceInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureWorkspaceInfo_SdkV2) { } +func (c AzureWorkspaceInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureWorkspaceInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -198,7 +217,7 @@ func (o AzureWorkspaceInfo_SdkV2) Type(ctx context.Context) attr.Type { // The general workspace configurations that are specific to cloud providers. type CloudResourceContainer_SdkV2 struct { // The general workspace configurations that are specific to Google Cloud. - Gcp types.List `tfsdk:"gcp" tf:"optional,object"` + Gcp types.List `tfsdk:"gcp" tf:"object"` } func (newState *CloudResourceContainer_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloudResourceContainer_SdkV2) { @@ -207,6 +226,12 @@ func (newState *CloudResourceContainer_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CloudResourceContainer_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloudResourceContainer_SdkV2) { } +func (c CloudResourceContainer_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CustomerFacingGcpCloudResourceContainer_SdkV2{}.ToSchema(cs, append(path, "gcp")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloudResourceContainer. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -270,7 +295,7 @@ func (o *CloudResourceContainer_SdkV2) SetGcp(ctx context.Context, v CustomerFac type CreateAwsKeyInfo_SdkV2 struct { // The AWS KMS key alias. - KeyAlias types.String `tfsdk:"key_alias" tf:"optional"` + KeyAlias types.String `tfsdk:"key_alias" tf:""` // The AWS KMS key's Amazon Resource Name (ARN). Note that the key's AWS // region is inferred from the ARN. KeyArn types.String `tfsdk:"key_arn" tf:""` @@ -278,7 +303,7 @@ type CreateAwsKeyInfo_SdkV2 struct { // If this is set to `true` or omitted, the key is also used to encrypt // cluster EBS volumes. To not use this key also for encrypting EBS volumes, // set this to `false`. - ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:"optional"` + ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:""` } func (newState *CreateAwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAwsKeyInfo_SdkV2) { @@ -287,6 +312,12 @@ func (newState *CreateAwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateAwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAwsKeyInfo_SdkV2) { } +func (c CreateAwsKeyInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAwsKeyInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -323,7 +354,7 @@ func (o CreateAwsKeyInfo_SdkV2) Type(ctx context.Context) attr.Type { } type CreateCredentialAwsCredentials_SdkV2 struct { - StsRole types.List `tfsdk:"sts_role" tf:"optional,object"` + StsRole types.List `tfsdk:"sts_role" tf:"object"` } func (newState *CreateCredentialAwsCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialAwsCredentials_SdkV2) { @@ -332,6 +363,12 @@ func (newState *CreateCredentialAwsCredentials_SdkV2) SyncEffectiveFieldsDuringC func (newState *CreateCredentialAwsCredentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialAwsCredentials_SdkV2) { } +func (c CreateCredentialAwsCredentials_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateCredentialStsRole_SdkV2{}.ToSchema(cs, append(path, "sts_role")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialAwsCredentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -405,6 +442,14 @@ func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest_SdkV2) { } +func (c CreateCredentialRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "aws_credentials")...) + CreateCredentialAwsCredentials_SdkV2{}.ToSchema(cs, append(path, "aws_credentials")...) + cs.SetRequired(append(path, "credentials_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -470,7 +515,7 @@ func (o *CreateCredentialRequest_SdkV2) SetAwsCredentials(ctx context.Context, v type CreateCredentialStsRole_SdkV2 struct { // The Amazon Resource Name (ARN) of the cross account role. - RoleArn types.String `tfsdk:"role_arn" tf:"optional"` + RoleArn types.String `tfsdk:"role_arn" tf:""` } func (newState *CreateCredentialStsRole_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialStsRole_SdkV2) { @@ -479,6 +524,11 @@ func (newState *CreateCredentialStsRole_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *CreateCredentialStsRole_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialStsRole_SdkV2) { } +func (c CreateCredentialStsRole_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialStsRole. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -511,9 +561,9 @@ func (o CreateCredentialStsRole_SdkV2) Type(ctx context.Context) attr.Type { } type CreateCustomerManagedKeyRequest_SdkV2 struct { - AwsKeyInfo types.List `tfsdk:"aws_key_info" tf:"optional,object"` + AwsKeyInfo types.List `tfsdk:"aws_key_info" tf:"object"` - GcpKeyInfo types.List `tfsdk:"gcp_key_info" tf:"optional,object"` + GcpKeyInfo types.List `tfsdk:"gcp_key_info" tf:"object"` // The cases that the key can be used for. UseCases types.List `tfsdk:"use_cases" tf:""` } @@ -524,6 +574,14 @@ func (newState *CreateCustomerManagedKeyRequest_SdkV2) SyncEffectiveFieldsDuring func (newState *CreateCustomerManagedKeyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCustomerManagedKeyRequest_SdkV2) { } +func (c CreateCustomerManagedKeyRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateAwsKeyInfo_SdkV2{}.ToSchema(cs, append(path, "aws_key_info")...) + CreateGcpKeyInfo_SdkV2{}.ToSchema(cs, append(path, "gcp_key_info")...) + cs.SetRequired(append(path, "use_cases")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCustomerManagedKeyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -658,6 +716,12 @@ func (newState *CreateGcpKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateGcpKeyInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateGcpKeyInfo_SdkV2) { } +func (c CreateGcpKeyInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "kms_key_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateGcpKeyInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -692,23 +756,23 @@ func (o CreateGcpKeyInfo_SdkV2) Type(ctx context.Context) attr.Type { type CreateNetworkRequest_SdkV2 struct { // The Google Cloud specific information for this network (for example, the // VPC ID, subnet ID, and secondary IP ranges). - GcpNetworkInfo types.List `tfsdk:"gcp_network_info" tf:"optional,object"` + GcpNetworkInfo types.List `tfsdk:"gcp_network_info" tf:"object"` // The human-readable name of the network configuration. NetworkName types.String `tfsdk:"network_name" tf:""` // IDs of one to five security groups associated with this network. Security // group IDs **cannot** be used in multiple network configurations. - SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:"optional"` + SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:""` // IDs of at least two subnets associated with this network. Subnet IDs // **cannot** be used in multiple network configurations. - SubnetIds types.List `tfsdk:"subnet_ids" tf:"optional"` + SubnetIds types.List `tfsdk:"subnet_ids" tf:""` // If specified, contains the VPC endpoints used to allow cluster // communication from this VPC over [AWS PrivateLink]. // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ - VpcEndpoints types.List `tfsdk:"vpc_endpoints" tf:"optional,object"` + VpcEndpoints types.List `tfsdk:"vpc_endpoints" tf:"object"` // The ID of the VPC associated with this network. VPC IDs can be used in // multiple network configurations. - VpcId types.String `tfsdk:"vpc_id" tf:"optional"` + VpcId types.String `tfsdk:"vpc_id" tf:""` } func (newState *CreateNetworkRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNetworkRequest_SdkV2) { @@ -717,6 +781,14 @@ func (newState *CreateNetworkRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CreateNetworkRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateNetworkRequest_SdkV2) { } +func (c CreateNetworkRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GcpNetworkInfo_SdkV2{}.ToSchema(cs, append(path, "gcp_network_info")...) + cs.SetRequired(append(path, "network_name")...) + NetworkVpcEndpoints_SdkV2{}.ToSchema(cs, append(path, "vpc_endpoints")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateNetworkRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -888,6 +960,14 @@ func (newState *CreateStorageConfigurationRequest_SdkV2) SyncEffectiveFieldsDuri func (newState *CreateStorageConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateStorageConfigurationRequest_SdkV2) { } +func (c CreateStorageConfigurationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "root_bucket_info")...) + RootBucketInfo_SdkV2{}.ToSchema(cs, append(path, "root_bucket_info")...) + cs.SetRequired(append(path, "storage_configuration_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateStorageConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -953,12 +1033,12 @@ func (o *CreateStorageConfigurationRequest_SdkV2) SetRootBucketInfo(ctx context. type CreateVpcEndpointRequest_SdkV2 struct { // The ID of the VPC endpoint object in AWS. - AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:"optional"` + AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:""` // The Google Cloud specific information for this Private Service Connect // endpoint. - GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` + GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info" tf:"object"` // The AWS region in which this VPC endpoint object exists. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The human-readable name of the storage configuration. VpcEndpointName types.String `tfsdk:"vpc_endpoint_name" tf:""` } @@ -969,6 +1049,13 @@ func (newState *CreateVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *CreateVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVpcEndpointRequest_SdkV2) { } +func (c CreateVpcEndpointRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GcpVpcEndpointInfo_SdkV2{}.ToSchema(cs, append(path, "gcp_vpc_endpoint_info")...) + cs.SetRequired(append(path, "vpc_endpoint_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVpcEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1038,20 +1125,20 @@ func (o *CreateVpcEndpointRequest_SdkV2) SetGcpVpcEndpointInfo(ctx context.Conte type CreateWorkspaceRequest_SdkV2 struct { // The AWS region of the workspace's data plane. - AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` + AwsRegion types.String `tfsdk:"aws_region" tf:""` // The cloud provider which the workspace uses. For Google Cloud workspaces, // always set this field to `gcp`. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // The general workspace configurations that are specific to cloud // providers. - CloudResourceContainer types.List `tfsdk:"cloud_resource_container" tf:"optional,object"` + CloudResourceContainer types.List `tfsdk:"cloud_resource_container" tf:"object"` // ID of the workspace's credential configuration object. - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The custom tags key-value pairing that is attached to this workspace. The // key-value pair is a string of utf-8 characters. The value can be an empty // string, with maximum length of 255 characters. The key can be of maximum // length of 127 characters, and cannot be empty. - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // The deployment name defines part of the subdomain for the workspace. The // workspace URL for the web application and REST APIs is // `.cloud.databricks.com`. For example, if the @@ -1081,7 +1168,7 @@ type CreateWorkspaceRequest_SdkV2 struct { // // If a new workspace omits this property, the server generates a unique // deployment name for you with the pattern `dbc-xxxxxxxx-xxxx`. - DeploymentName types.String `tfsdk:"deployment_name" tf:"optional"` + DeploymentName types.String `tfsdk:"deployment_name" tf:""` // The network settings for the workspace. The configurations are only for // Databricks-managed VPCs. It is ignored if you specify a customer-managed // VPC in the `network_id` field.", All the IP range configurations must be @@ -1105,27 +1192,27 @@ type CreateWorkspaceRequest_SdkV2 struct { // for a new workspace]. // // [calculate subnet sizes for a new workspace]: https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/network-sizing.html - GcpManagedNetworkConfig types.List `tfsdk:"gcp_managed_network_config" tf:"optional,object"` + GcpManagedNetworkConfig types.List `tfsdk:"gcp_managed_network_config" tf:"object"` // The configurations for the GKE cluster of a Databricks workspace. - GkeConfig types.List `tfsdk:"gke_config" tf:"optional,object"` + GkeConfig types.List `tfsdk:"gke_config" tf:"object"` // Whether no public IP is enabled for the workspace. - IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:"optional"` + IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:""` // The Google Cloud region of the workspace data plane in your Google // account. For example, `us-east4`. - Location types.String `tfsdk:"location" tf:"optional"` + Location types.String `tfsdk:"location" tf:""` // The ID of the workspace's managed services encryption key configuration // object. This is used to help protect and control access to the // workspace's notebooks, secrets, Databricks SQL queries, and query // history. The provided key configuration object property `use_cases` must // contain `MANAGED_SERVICES`. - ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:"optional"` + ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:""` - NetworkId types.String `tfsdk:"network_id" tf:"optional"` + NetworkId types.String `tfsdk:"network_id" tf:""` // The pricing tier of the workspace. For pricing tier information, see [AWS // Pricing]. // // [AWS Pricing]: https://databricks.com/product/aws-pricing - PricingTier types.String `tfsdk:"pricing_tier" tf:"optional"` + PricingTier types.String `tfsdk:"pricing_tier" tf:""` // ID of the workspace's private access settings object. Only used for // PrivateLink. This ID must be specified for customers using [AWS // PrivateLink] for either front-end (user-to-workspace connection), @@ -1137,14 +1224,14 @@ type CreateWorkspaceRequest_SdkV2 struct { // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ // [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html - PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:""` // The ID of the workspace's storage configuration object. - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // The ID of the workspace's storage encryption key configuration object. // This is used to encrypt the workspace's root S3 bucket (root DBFS and // system data) and, optionally, cluster EBS volumes. The provided key // configuration object property `use_cases` must contain `STORAGE`. - StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:"optional"` + StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:""` // The workspace's human-readable name. WorkspaceName types.String `tfsdk:"workspace_name" tf:""` } @@ -1155,6 +1242,15 @@ func (newState *CreateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CreateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWorkspaceRequest_SdkV2) { } +func (c CreateWorkspaceRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CloudResourceContainer_SdkV2{}.ToSchema(cs, append(path, "cloud_resource_container")...) + GcpManagedNetworkConfig_SdkV2{}.ToSchema(cs, append(path, "gcp_managed_network_config")...) + GkeConfig_SdkV2{}.ToSchema(cs, append(path, "gke_config")...) + cs.SetRequired(append(path, "workspace_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1337,15 +1433,15 @@ func (o *CreateWorkspaceRequest_SdkV2) SetGkeConfig(ctx context.Context, v GkeCo type Credential_SdkV2 struct { // The Databricks account ID that hosts the credential. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` - AwsCredentials types.List `tfsdk:"aws_credentials" tf:"optional,object"` + AwsCredentials types.List `tfsdk:"aws_credentials" tf:"object"` // Time in epoch milliseconds when the credential was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Databricks credential configuration ID. - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The human-readable name of the credential configuration object. - CredentialsName types.String `tfsdk:"credentials_name" tf:"optional"` + CredentialsName types.String `tfsdk:"credentials_name" tf:""` } func (newState *Credential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Credential_SdkV2) { @@ -1354,6 +1450,13 @@ func (newState *Credential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *Credential_SdkV2) SyncEffectiveFieldsDuringRead(existingState Credential_SdkV2) { } +func (c Credential_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsCredentials_SdkV2{}.ToSchema(cs, append(path, "aws_credentials")...) + cs.SetComputed(append(path, "creation_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Credential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1427,7 +1530,7 @@ func (o *Credential_SdkV2) SetAwsCredentials(ctx context.Context, v AwsCredentia type CustomerFacingGcpCloudResourceContainer_SdkV2 struct { // The Google Cloud project ID, which the workspace uses to instantiate // cloud resources for your workspace. - ProjectId types.String `tfsdk:"project_id" tf:"optional"` + ProjectId types.String `tfsdk:"project_id" tf:""` } func (newState *CustomerFacingGcpCloudResourceContainer_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CustomerFacingGcpCloudResourceContainer_SdkV2) { @@ -1436,6 +1539,11 @@ func (newState *CustomerFacingGcpCloudResourceContainer_SdkV2) SyncEffectiveFiel func (newState *CustomerFacingGcpCloudResourceContainer_SdkV2) SyncEffectiveFieldsDuringRead(existingState CustomerFacingGcpCloudResourceContainer_SdkV2) { } +func (c CustomerFacingGcpCloudResourceContainer_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CustomerFacingGcpCloudResourceContainer. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1469,17 +1577,17 @@ func (o CustomerFacingGcpCloudResourceContainer_SdkV2) Type(ctx context.Context) type CustomerManagedKey_SdkV2 struct { // The Databricks account ID that holds the customer-managed key. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` - AwsKeyInfo types.List `tfsdk:"aws_key_info" tf:"optional,object"` + AwsKeyInfo types.List `tfsdk:"aws_key_info" tf:"object"` // Time in epoch milliseconds when the customer key was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // ID of the encryption key configuration object. - CustomerManagedKeyId types.String `tfsdk:"customer_managed_key_id" tf:"optional"` + CustomerManagedKeyId types.String `tfsdk:"customer_managed_key_id" tf:""` - GcpKeyInfo types.List `tfsdk:"gcp_key_info" tf:"optional,object"` + GcpKeyInfo types.List `tfsdk:"gcp_key_info" tf:"object"` // The cases that the key can be used for. - UseCases types.List `tfsdk:"use_cases" tf:"optional"` + UseCases types.List `tfsdk:"use_cases" tf:""` } func (newState *CustomerManagedKey_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CustomerManagedKey_SdkV2) { @@ -1488,6 +1596,14 @@ func (newState *CustomerManagedKey_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CustomerManagedKey_SdkV2) SyncEffectiveFieldsDuringRead(existingState CustomerManagedKey_SdkV2) { } +func (c CustomerManagedKey_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsKeyInfo_SdkV2{}.ToSchema(cs, append(path, "aws_key_info")...) + cs.SetComputed(append(path, "creation_time")...) + GcpKeyInfo_SdkV2{}.ToSchema(cs, append(path, "gcp_key_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CustomerManagedKey. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1623,12 +1739,6 @@ type DeleteCredentialRequest_SdkV2 struct { CredentialsId types.String `tfsdk:"-"` } -func (newState *DeleteCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialRequest_SdkV2) { -} - -func (newState *DeleteCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1666,12 +1776,6 @@ type DeleteEncryptionKeyRequest_SdkV2 struct { CustomerManagedKeyId types.String `tfsdk:"-"` } -func (newState *DeleteEncryptionKeyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteEncryptionKeyRequest_SdkV2) { -} - -func (newState *DeleteEncryptionKeyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteEncryptionKeyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteEncryptionKeyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1709,12 +1813,6 @@ type DeleteNetworkRequest_SdkV2 struct { NetworkId types.String `tfsdk:"-"` } -func (newState *DeleteNetworkRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNetworkRequest_SdkV2) { -} - -func (newState *DeleteNetworkRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteNetworkRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1752,12 +1850,6 @@ type DeletePrivateAccesRequest_SdkV2 struct { PrivateAccessSettingsId types.String `tfsdk:"-"` } -func (newState *DeletePrivateAccesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePrivateAccesRequest_SdkV2) { -} - -func (newState *DeletePrivateAccesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePrivateAccesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePrivateAccesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1792,12 +1884,6 @@ func (o DeletePrivateAccesRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1831,12 +1917,6 @@ type DeleteStorageRequest_SdkV2 struct { StorageConfigurationId types.String `tfsdk:"-"` } -func (newState *DeleteStorageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteStorageRequest_SdkV2) { -} - -func (newState *DeleteStorageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteStorageRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteStorageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1874,12 +1954,6 @@ type DeleteVpcEndpointRequest_SdkV2 struct { VpcEndpointId types.String `tfsdk:"-"` } -func (newState *DeleteVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteVpcEndpointRequest_SdkV2) { -} - -func (newState *DeleteVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteVpcEndpointRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteVpcEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1917,12 +1991,6 @@ type DeleteWorkspaceRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *DeleteWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWorkspaceRequest_SdkV2) { -} - -func (newState *DeleteWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWorkspaceRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1956,11 +2024,11 @@ func (o DeleteWorkspaceRequest_SdkV2) Type(ctx context.Context) attr.Type { type ExternalCustomerInfo_SdkV2 struct { // Email of the authoritative user. - AuthoritativeUserEmail types.String `tfsdk:"authoritative_user_email" tf:"optional"` + AuthoritativeUserEmail types.String `tfsdk:"authoritative_user_email" tf:""` // The authoritative user full name. - AuthoritativeUserFullName types.String `tfsdk:"authoritative_user_full_name" tf:"optional"` + AuthoritativeUserFullName types.String `tfsdk:"authoritative_user_full_name" tf:""` // The legal entity name for the external workspace - CustomerName types.String `tfsdk:"customer_name" tf:"optional"` + CustomerName types.String `tfsdk:"customer_name" tf:""` } func (newState *ExternalCustomerInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalCustomerInfo_SdkV2) { @@ -1969,6 +2037,11 @@ func (newState *ExternalCustomerInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ExternalCustomerInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalCustomerInfo_SdkV2) { } +func (c ExternalCustomerInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalCustomerInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2015,6 +2088,12 @@ func (newState *GcpKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan G func (newState *GcpKeyInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpKeyInfo_SdkV2) { } +func (c GcpKeyInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "kms_key_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpKeyInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2072,13 +2151,13 @@ func (o GcpKeyInfo_SdkV2) Type(ctx context.Context) attr.Type { type GcpManagedNetworkConfig_SdkV2 struct { // The IP range from which to allocate GKE cluster pods. No bigger than `/9` // and no smaller than `/21`. - GkeClusterPodIpRange types.String `tfsdk:"gke_cluster_pod_ip_range" tf:"optional"` + GkeClusterPodIpRange types.String `tfsdk:"gke_cluster_pod_ip_range" tf:""` // The IP range from which to allocate GKE cluster services. No bigger than // `/16` and no smaller than `/27`. - GkeClusterServiceIpRange types.String `tfsdk:"gke_cluster_service_ip_range" tf:"optional"` + GkeClusterServiceIpRange types.String `tfsdk:"gke_cluster_service_ip_range" tf:""` // The IP range from which to allocate GKE cluster nodes. No bigger than // `/9` and no smaller than `/29`. - SubnetCidr types.String `tfsdk:"subnet_cidr" tf:"optional"` + SubnetCidr types.String `tfsdk:"subnet_cidr" tf:""` } func (newState *GcpManagedNetworkConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpManagedNetworkConfig_SdkV2) { @@ -2087,6 +2166,11 @@ func (newState *GcpManagedNetworkConfig_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *GcpManagedNetworkConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpManagedNetworkConfig_SdkV2) { } +func (c GcpManagedNetworkConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpManagedNetworkConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2151,6 +2235,17 @@ func (newState *GcpNetworkInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *GcpNetworkInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpNetworkInfo_SdkV2) { } +func (c GcpNetworkInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "network_project_id")...) + cs.SetRequired(append(path, "pod_ip_range_name")...) + cs.SetRequired(append(path, "service_ip_range_name")...) + cs.SetRequired(append(path, "subnet_id")...) + cs.SetRequired(append(path, "subnet_region")...) + cs.SetRequired(append(path, "vpc_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpNetworkInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2201,11 +2296,11 @@ type GcpVpcEndpointInfo_SdkV2 struct { // resides. ProjectId types.String `tfsdk:"project_id" tf:""` // The unique ID of this PSC connection. - PscConnectionId types.String `tfsdk:"psc_connection_id" tf:"optional"` + PscConnectionId types.String `tfsdk:"psc_connection_id" tf:""` // The name of the PSC endpoint in the Google Cloud project. PscEndpointName types.String `tfsdk:"psc_endpoint_name" tf:""` // The service attachment this PSC connection connects to. - ServiceAttachmentId types.String `tfsdk:"service_attachment_id" tf:"optional"` + ServiceAttachmentId types.String `tfsdk:"service_attachment_id" tf:""` } func (newState *GcpVpcEndpointInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpVpcEndpointInfo_SdkV2) { @@ -2214,6 +2309,14 @@ func (newState *GcpVpcEndpointInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *GcpVpcEndpointInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpVpcEndpointInfo_SdkV2) { } +func (c GcpVpcEndpointInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "endpoint_region")...) + cs.SetRequired(append(path, "project_id")...) + cs.SetRequired(append(path, "psc_endpoint_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpVpcEndpointInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2259,12 +2362,6 @@ type GetCredentialRequest_SdkV2 struct { CredentialsId types.String `tfsdk:"-"` } -func (newState *GetCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialRequest_SdkV2) { -} - -func (newState *GetCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCredentialRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2302,12 +2399,6 @@ type GetEncryptionKeyRequest_SdkV2 struct { CustomerManagedKeyId types.String `tfsdk:"-"` } -func (newState *GetEncryptionKeyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEncryptionKeyRequest_SdkV2) { -} - -func (newState *GetEncryptionKeyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEncryptionKeyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEncryptionKeyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2345,12 +2436,6 @@ type GetNetworkRequest_SdkV2 struct { NetworkId types.String `tfsdk:"-"` } -func (newState *GetNetworkRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetNetworkRequest_SdkV2) { -} - -func (newState *GetNetworkRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetNetworkRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetNetworkRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2388,12 +2473,6 @@ type GetPrivateAccesRequest_SdkV2 struct { PrivateAccessSettingsId types.String `tfsdk:"-"` } -func (newState *GetPrivateAccesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPrivateAccesRequest_SdkV2) { -} - -func (newState *GetPrivateAccesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPrivateAccesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPrivateAccesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2431,12 +2510,6 @@ type GetStorageRequest_SdkV2 struct { StorageConfigurationId types.String `tfsdk:"-"` } -func (newState *GetStorageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStorageRequest_SdkV2) { -} - -func (newState *GetStorageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStorageRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStorageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2474,12 +2547,6 @@ type GetVpcEndpointRequest_SdkV2 struct { VpcEndpointId types.String `tfsdk:"-"` } -func (newState *GetVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetVpcEndpointRequest_SdkV2) { -} - -func (newState *GetVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetVpcEndpointRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetVpcEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2517,12 +2584,6 @@ type GetWorkspaceRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *GetWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceRequest_SdkV2) { -} - -func (newState *GetWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2564,12 +2625,12 @@ type GkeConfig_SdkV2 struct { // // Set to `PUBLIC_NODE_PUBLIC_MASTER` for a public GKE cluster. The nodes of // a public GKE cluster have public IP addresses. - ConnectivityType types.String `tfsdk:"connectivity_type" tf:"optional"` + ConnectivityType types.String `tfsdk:"connectivity_type" tf:""` // The IP range from which to allocate GKE cluster master resources. This // field will be ignored if GKE private cluster is not enabled. // // It must be exactly as big as `/28`. - MasterIpRange types.String `tfsdk:"master_ip_range" tf:"optional"` + MasterIpRange types.String `tfsdk:"master_ip_range" tf:""` } func (newState *GkeConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GkeConfig_SdkV2) { @@ -2578,6 +2639,11 @@ func (newState *GkeConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Gk func (newState *GkeConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState GkeConfig_SdkV2) { } +func (c GkeConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GkeConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2613,38 +2679,38 @@ func (o GkeConfig_SdkV2) Type(ctx context.Context) attr.Type { type Network_SdkV2 struct { // The Databricks account ID associated with this network configuration. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Time in epoch milliseconds when the network was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Array of error messages about the network configuration. - ErrorMessages types.List `tfsdk:"error_messages" tf:"computed"` + ErrorMessages types.List `tfsdk:"error_messages" tf:""` // The Google Cloud specific information for this network (for example, the // VPC ID, subnet ID, and secondary IP ranges). - GcpNetworkInfo types.List `tfsdk:"gcp_network_info" tf:"optional,object"` + GcpNetworkInfo types.List `tfsdk:"gcp_network_info" tf:"object"` // The Databricks network configuration ID. - NetworkId types.String `tfsdk:"network_id" tf:"optional"` + NetworkId types.String `tfsdk:"network_id" tf:""` // The human-readable name of the network configuration. - NetworkName types.String `tfsdk:"network_name" tf:"optional"` + NetworkName types.String `tfsdk:"network_name" tf:""` - SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:"optional"` + SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:""` - SubnetIds types.List `tfsdk:"subnet_ids" tf:"optional"` + SubnetIds types.List `tfsdk:"subnet_ids" tf:""` // If specified, contains the VPC endpoints used to allow cluster // communication from this VPC over [AWS PrivateLink]. // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ - VpcEndpoints types.List `tfsdk:"vpc_endpoints" tf:"optional,object"` + VpcEndpoints types.List `tfsdk:"vpc_endpoints" tf:"object"` // The ID of the VPC associated with this network configuration. VPC IDs can // be used in multiple networks. - VpcId types.String `tfsdk:"vpc_id" tf:"optional"` + VpcId types.String `tfsdk:"vpc_id" tf:""` // The status of this network configuration object in terms of its use in a // workspace: * `UNATTACHED`: Unattached. * `VALID`: Valid. * `BROKEN`: // Broken. * `WARNED`: Warned. - VpcStatus types.String `tfsdk:"vpc_status" tf:"computed"` + VpcStatus types.String `tfsdk:"vpc_status" tf:""` // Array of warning messages about the network configuration. - WarningMessages types.List `tfsdk:"warning_messages" tf:"computed"` + WarningMessages types.List `tfsdk:"warning_messages" tf:""` // Workspace ID associated with this network configuration. - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` } func (newState *Network_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Network_SdkV2) { @@ -2653,6 +2719,19 @@ func (newState *Network_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Netw func (newState *Network_SdkV2) SyncEffectiveFieldsDuringRead(existingState Network_SdkV2) { } +func (c Network_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "creation_time")...) + cs.SetComputed(append(path, "error_messages")...) + NetworkHealth_SdkV2{}.ToSchema(cs, append(path, "error_messages")...) + GcpNetworkInfo_SdkV2{}.ToSchema(cs, append(path, "gcp_network_info")...) + NetworkVpcEndpoints_SdkV2{}.ToSchema(cs, append(path, "vpc_endpoints")...) + cs.SetComputed(append(path, "vpc_status")...) + cs.SetComputed(append(path, "warning_messages")...) + NetworkWarning_SdkV2{}.ToSchema(cs, append(path, "warning_messages")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Network. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2885,10 +2964,10 @@ func (o *Network_SdkV2) SetWarningMessages(ctx context.Context, v []NetworkWarni type NetworkHealth_SdkV2 struct { // Details of the error. - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` // The AWS resource associated with this error: credentials, VPC, subnet, // security group, or network ACL. - ErrorType types.String `tfsdk:"error_type" tf:"optional"` + ErrorType types.String `tfsdk:"error_type" tf:""` } func (newState *NetworkHealth_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkHealth_SdkV2) { @@ -2897,6 +2976,11 @@ func (newState *NetworkHealth_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *NetworkHealth_SdkV2) SyncEffectiveFieldsDuringRead(existingState NetworkHealth_SdkV2) { } +func (c NetworkHealth_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkHealth. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2949,6 +3033,13 @@ func (newState *NetworkVpcEndpoints_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *NetworkVpcEndpoints_SdkV2) SyncEffectiveFieldsDuringRead(existingState NetworkVpcEndpoints_SdkV2) { } +func (c NetworkVpcEndpoints_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dataplane_relay")...) + cs.SetRequired(append(path, "rest_api")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkVpcEndpoints. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3043,10 +3134,10 @@ func (o *NetworkVpcEndpoints_SdkV2) SetRestApi(ctx context.Context, v []types.St type NetworkWarning_SdkV2 struct { // Details of the warning. - WarningMessage types.String `tfsdk:"warning_message" tf:"optional"` + WarningMessage types.String `tfsdk:"warning_message" tf:""` // The AWS resource associated with this warning: a subnet or a security // group. - WarningType types.String `tfsdk:"warning_type" tf:"optional"` + WarningType types.String `tfsdk:"warning_type" tf:""` } func (newState *NetworkWarning_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkWarning_SdkV2) { @@ -3055,6 +3146,11 @@ func (newState *NetworkWarning_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *NetworkWarning_SdkV2) SyncEffectiveFieldsDuringRead(existingState NetworkWarning_SdkV2) { } +func (c NetworkWarning_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkWarning. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3090,29 +3186,29 @@ func (o NetworkWarning_SdkV2) Type(ctx context.Context) attr.Type { type PrivateAccessSettings_SdkV2 struct { // The Databricks account ID that hosts the credential. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // An array of Databricks VPC endpoint IDs. - AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:"optional"` + AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:""` // The private access level controls which VPC endpoints can connect to the // UI or API of any workspace that attaches this private access settings // object. * `ACCOUNT` level access (the default) allows only VPC endpoints // that are registered in your Databricks account connect to your workspace. // * `ENDPOINT` level access allows only specified VPC endpoints connect to // your workspace. For details, see `allowed_vpc_endpoint_ids`. - PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:"optional"` + PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:""` // Databricks private access settings ID. - PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:""` // The human-readable name of the private access settings object. - PrivateAccessSettingsName types.String `tfsdk:"private_access_settings_name" tf:"optional"` + PrivateAccessSettingsName types.String `tfsdk:"private_access_settings_name" tf:""` // Determines if the workspace can be accessed over public internet. For // fully private workspaces, you can optionally specify `false`, but only if // you implement both the front-end and the back-end PrivateLink // connections. Otherwise, specify `true`, which means that public access is // enabled. - PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:"optional"` + PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:""` // The cloud region for workspaces attached to this private access settings // object. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *PrivateAccessSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrivateAccessSettings_SdkV2) { @@ -3121,6 +3217,11 @@ func (newState *PrivateAccessSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *PrivateAccessSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrivateAccessSettings_SdkV2) { } +func (c PrivateAccessSettings_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrivateAccessSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3197,12 +3298,6 @@ func (o *PrivateAccessSettings_SdkV2) SetAllowedVpcEndpointIds(ctx context.Conte type ReplaceResponse_SdkV2 struct { } -func (newState *ReplaceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReplaceResponse_SdkV2) { -} - -func (newState *ReplaceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReplaceResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3233,7 +3328,7 @@ func (o ReplaceResponse_SdkV2) Type(ctx context.Context) attr.Type { // Root S3 bucket information. type RootBucketInfo_SdkV2 struct { // The name of the S3 bucket. - BucketName types.String `tfsdk:"bucket_name" tf:"optional"` + BucketName types.String `tfsdk:"bucket_name" tf:""` } func (newState *RootBucketInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RootBucketInfo_SdkV2) { @@ -3242,6 +3337,11 @@ func (newState *RootBucketInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *RootBucketInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RootBucketInfo_SdkV2) { } +func (c RootBucketInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RootBucketInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3275,15 +3375,15 @@ func (o RootBucketInfo_SdkV2) Type(ctx context.Context) attr.Type { type StorageConfiguration_SdkV2 struct { // The Databricks account ID that hosts the credential. - AccountId types.String `tfsdk:"account_id" tf:"computed"` + AccountId types.String `tfsdk:"account_id" tf:""` // Time in epoch milliseconds when the storage configuration was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Root S3 bucket information. - RootBucketInfo types.List `tfsdk:"root_bucket_info" tf:"optional,object"` + RootBucketInfo types.List `tfsdk:"root_bucket_info" tf:"object"` // Databricks storage configuration ID. - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // The human-readable name of the storage configuration. - StorageConfigurationName types.String `tfsdk:"storage_configuration_name" tf:"optional"` + StorageConfigurationName types.String `tfsdk:"storage_configuration_name" tf:""` } func (newState *StorageConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StorageConfiguration_SdkV2) { @@ -3292,6 +3392,14 @@ func (newState *StorageConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *StorageConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState StorageConfiguration_SdkV2) { } +func (c StorageConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "account_id")...) + cs.SetComputed(append(path, "creation_time")...) + RootBucketInfo_SdkV2{}.ToSchema(cs, append(path, "root_bucket_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StorageConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3364,9 +3472,9 @@ func (o *StorageConfiguration_SdkV2) SetRootBucketInfo(ctx context.Context, v Ro type StsRole_SdkV2 struct { // The external ID that needs to be trusted by the cross-account role. This // is always your Databricks account ID. - ExternalId types.String `tfsdk:"external_id" tf:"optional"` + ExternalId types.String `tfsdk:"external_id" tf:""` // The Amazon Resource Name (ARN) of the cross account role. - RoleArn types.String `tfsdk:"role_arn" tf:"optional"` + RoleArn types.String `tfsdk:"role_arn" tf:""` } func (newState *StsRole_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StsRole_SdkV2) { @@ -3375,6 +3483,11 @@ func (newState *StsRole_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StsR func (newState *StsRole_SdkV2) SyncEffectiveFieldsDuringRead(existingState StsRole_SdkV2) { } +func (c StsRole_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StsRole. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3411,12 +3524,6 @@ func (o StsRole_SdkV2) Type(ctx context.Context) attr.Type { type UpdateResponse_SdkV2 struct { } -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { -} - -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3447,34 +3554,34 @@ func (o UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateWorkspaceRequest_SdkV2 struct { // The AWS region of the workspace's data plane (for example, `us-west-2`). // This parameter is available only for updating failed workspaces. - AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` + AwsRegion types.String `tfsdk:"aws_region" tf:""` // ID of the workspace's credential configuration object. This parameter is // available for updating both failed and running workspaces. - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The custom tags key-value pairing that is attached to this workspace. The // key-value pair is a string of utf-8 characters. The value can be an empty // string, with maximum length of 255 characters. The key can be of maximum // length of 127 characters, and cannot be empty. - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // The ID of the workspace's managed services encryption key configuration // object. This parameter is available only for updating failed workspaces. - ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:"optional"` + ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:""` - NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:"optional"` + NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:""` // The ID of the workspace's network configuration object. Used only if you // already use a customer-managed VPC. For failed workspaces only, you can // switch from a Databricks-managed VPC to a customer-managed VPC by // updating the workspace to add a network configuration ID. - NetworkId types.String `tfsdk:"network_id" tf:"optional"` + NetworkId types.String `tfsdk:"network_id" tf:""` // The ID of the workspace's private access settings configuration object. // This parameter is available only for updating failed workspaces. - PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:""` // The ID of the workspace's storage configuration object. This parameter is // available only for updating failed workspaces. - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // The ID of the key configuration object for workspace storage. This // parameter is available for updating both failed and running workspaces. - StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:"optional"` + StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:""` // Workspace ID. WorkspaceId types.Int64 `tfsdk:"-"` } @@ -3485,6 +3592,12 @@ func (newState *UpdateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *UpdateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceRequest_SdkV2) { } +func (c UpdateWorkspaceRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3579,14 +3692,14 @@ type UpsertPrivateAccessSettingsRequest_SdkV2 struct { // public internet, see [IP access lists]. // // [IP access lists]: https://docs.databricks.com/security/network/ip-access-list.html - AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:"optional"` + AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:""` // The private access level controls which VPC endpoints can connect to the // UI or API of any workspace that attaches this private access settings // object. * `ACCOUNT` level access (the default) allows only VPC endpoints // that are registered in your Databricks account connect to your workspace. // * `ENDPOINT` level access allows only specified VPC endpoints connect to // your workspace. For details, see `allowed_vpc_endpoint_ids`. - PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:"optional"` + PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:""` // Databricks Account API private access settings ID. PrivateAccessSettingsId types.String `tfsdk:"-"` // The human-readable name of the private access settings object. @@ -3596,7 +3709,7 @@ type UpsertPrivateAccessSettingsRequest_SdkV2 struct { // you implement both the front-end and the back-end PrivateLink // connections. Otherwise, specify `true`, which means that public access is // enabled. - PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:"optional"` + PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:""` // The cloud region for workspaces associated with this private access // settings object. Region types.String `tfsdk:"region" tf:""` @@ -3608,6 +3721,14 @@ func (newState *UpsertPrivateAccessSettingsRequest_SdkV2) SyncEffectiveFieldsDur func (newState *UpsertPrivateAccessSettingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertPrivateAccessSettingsRequest_SdkV2) { } +func (c UpsertPrivateAccessSettingsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "private_access_settings_id")...) + cs.SetRequired(append(path, "private_access_settings_name")...) + cs.SetRequired(append(path, "region")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertPrivateAccessSettingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3681,40 +3802,40 @@ func (o *UpsertPrivateAccessSettingsRequest_SdkV2) SetAllowedVpcEndpointIds(ctx type VpcEndpoint_SdkV2 struct { // The Databricks account ID that hosts the VPC endpoint configuration. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // The AWS Account in which the VPC endpoint object exists. - AwsAccountId types.String `tfsdk:"aws_account_id" tf:"optional"` + AwsAccountId types.String `tfsdk:"aws_account_id" tf:""` // The ID of the Databricks [endpoint service] that this VPC endpoint is // connected to. For a list of endpoint service IDs for each supported AWS // region, see the [Databricks PrivateLink documentation]. // // [Databricks PrivateLink documentation]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html // [endpoint service]: https://docs.aws.amazon.com/vpc/latest/privatelink/endpoint-service.html - AwsEndpointServiceId types.String `tfsdk:"aws_endpoint_service_id" tf:"optional"` + AwsEndpointServiceId types.String `tfsdk:"aws_endpoint_service_id" tf:""` // The ID of the VPC endpoint object in AWS. - AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:"optional"` + AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:""` // The Google Cloud specific information for this Private Service Connect // endpoint. - GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` + GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info" tf:"object"` // The AWS region in which this VPC endpoint object exists. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The current state (such as `available` or `rejected`) of the VPC // endpoint. Derived from AWS. For the full set of values, see [AWS // DescribeVpcEndpoint documentation]. // // [AWS DescribeVpcEndpoint documentation]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // This enumeration represents the type of Databricks VPC [endpoint service] // that was used when creating this VPC endpoint. // // [endpoint service]: https://docs.aws.amazon.com/vpc/latest/privatelink/endpoint-service.html - UseCase types.String `tfsdk:"use_case" tf:"optional"` + UseCase types.String `tfsdk:"use_case" tf:""` // Databricks VPC endpoint ID. This is the Databricks-specific name of the // VPC endpoint. Do not confuse this with the `aws_vpc_endpoint_id`, which // is the ID within AWS of the VPC endpoint. - VpcEndpointId types.String `tfsdk:"vpc_endpoint_id" tf:"optional"` + VpcEndpointId types.String `tfsdk:"vpc_endpoint_id" tf:""` // The human-readable name of the storage configuration. - VpcEndpointName types.String `tfsdk:"vpc_endpoint_name" tf:"optional"` + VpcEndpointName types.String `tfsdk:"vpc_endpoint_name" tf:""` } func (newState *VpcEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan VpcEndpoint_SdkV2) { @@ -3723,6 +3844,12 @@ func (newState *VpcEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *VpcEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState VpcEndpoint_SdkV2) { } +func (c VpcEndpoint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GcpVpcEndpointInfo_SdkV2{}.ToSchema(cs, append(path, "gcp_vpc_endpoint_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VpcEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3804,36 +3931,36 @@ func (o *VpcEndpoint_SdkV2) SetGcpVpcEndpointInfo(ctx context.Context, v GcpVpcE type Workspace_SdkV2 struct { // Databricks account ID. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // The AWS region of the workspace data plane (for example, `us-west-2`). - AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` + AwsRegion types.String `tfsdk:"aws_region" tf:""` - AzureWorkspaceInfo types.List `tfsdk:"azure_workspace_info" tf:"optional,object"` + AzureWorkspaceInfo types.List `tfsdk:"azure_workspace_info" tf:"object"` // The cloud name. This field always has the value `gcp`. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // The general workspace configurations that are specific to cloud // providers. - CloudResourceContainer types.List `tfsdk:"cloud_resource_container" tf:"optional,object"` + CloudResourceContainer types.List `tfsdk:"cloud_resource_container" tf:"object"` // Time in epoch milliseconds when the workspace was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // ID of the workspace's credential configuration object. - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The custom tags key-value pairing that is attached to this workspace. The // key-value pair is a string of utf-8 characters. The value can be an empty // string, with maximum length of 255 characters. The key can be of maximum // length of 127 characters, and cannot be empty. - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // The deployment name defines part of the subdomain for the workspace. The // workspace URL for web application and REST APIs is // `.cloud.databricks.com`. // // This value must be unique across all non-deleted deployments across all // AWS regions. - DeploymentName types.String `tfsdk:"deployment_name" tf:"optional"` + DeploymentName types.String `tfsdk:"deployment_name" tf:""` // If this workspace is for a external customer, then external_customer_info // is populated. If this workspace is not for a external customer, then // external_customer_info is empty. - ExternalCustomerInfo types.List `tfsdk:"external_customer_info" tf:"optional,object"` + ExternalCustomerInfo types.List `tfsdk:"external_customer_info" tf:"object"` // The network settings for the workspace. The configurations are only for // Databricks-managed VPCs. It is ignored if you specify a customer-managed // VPC in the `network_id` field.", All the IP range configurations must be @@ -3857,24 +3984,24 @@ type Workspace_SdkV2 struct { // for a new workspace]. // // [calculate subnet sizes for a new workspace]: https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/network-sizing.html - GcpManagedNetworkConfig types.List `tfsdk:"gcp_managed_network_config" tf:"optional,object"` + GcpManagedNetworkConfig types.List `tfsdk:"gcp_managed_network_config" tf:"object"` // The configurations for the GKE cluster of a Databricks workspace. - GkeConfig types.List `tfsdk:"gke_config" tf:"optional,object"` + GkeConfig types.List `tfsdk:"gke_config" tf:"object"` // Whether no public IP is enabled for the workspace. - IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:"optional"` + IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:""` // The Google Cloud region of the workspace data plane in your Google // account (for example, `us-east4`). - Location types.String `tfsdk:"location" tf:"optional"` + Location types.String `tfsdk:"location" tf:""` // ID of the key configuration for encrypting managed services. - ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:"optional"` + ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:""` // The network configuration ID that is attached to the workspace. This // field is available only if the network is a customer-managed network. - NetworkId types.String `tfsdk:"network_id" tf:"optional"` + NetworkId types.String `tfsdk:"network_id" tf:""` // The pricing tier of the workspace. For pricing tier information, see [AWS // Pricing]. // // [AWS Pricing]: https://databricks.com/product/aws-pricing - PricingTier types.String `tfsdk:"pricing_tier" tf:"optional"` + PricingTier types.String `tfsdk:"pricing_tier" tf:""` // ID of the workspace's private access settings object. Only used for // PrivateLink. You must specify this ID if you are using [AWS PrivateLink] // for either front-end (user-to-workspace connection), back-end (data plane @@ -3885,21 +4012,21 @@ type Workspace_SdkV2 struct { // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ // [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html - PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:""` // ID of the workspace's storage configuration object. - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // ID of the key configuration for encrypting workspace storage. - StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:"optional"` + StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:""` // A unique integer ID for the workspace - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` // The human-readable name of the workspace. - WorkspaceName types.String `tfsdk:"workspace_name" tf:"optional"` + WorkspaceName types.String `tfsdk:"workspace_name" tf:""` // The status of the workspace. For workspace creation, usually it is set to // `PROVISIONING` initially. Continue to check the status until the status // is `RUNNING`. - WorkspaceStatus types.String `tfsdk:"workspace_status" tf:"computed"` + WorkspaceStatus types.String `tfsdk:"workspace_status" tf:""` // Message describing the current workspace status. - WorkspaceStatusMessage types.String `tfsdk:"workspace_status_message" tf:"computed"` + WorkspaceStatusMessage types.String `tfsdk:"workspace_status_message" tf:""` } func (newState *Workspace_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Workspace_SdkV2) { @@ -3908,6 +4035,19 @@ func (newState *Workspace_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Wo func (newState *Workspace_SdkV2) SyncEffectiveFieldsDuringRead(existingState Workspace_SdkV2) { } +func (c Workspace_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AzureWorkspaceInfo_SdkV2{}.ToSchema(cs, append(path, "azure_workspace_info")...) + CloudResourceContainer_SdkV2{}.ToSchema(cs, append(path, "cloud_resource_container")...) + cs.SetComputed(append(path, "creation_time")...) + ExternalCustomerInfo_SdkV2{}.ToSchema(cs, append(path, "external_customer_info")...) + GcpManagedNetworkConfig_SdkV2{}.ToSchema(cs, append(path, "gcp_managed_network_config")...) + GkeConfig_SdkV2{}.ToSchema(cs, append(path, "gke_config")...) + cs.SetComputed(append(path, "workspace_status")...) + cs.SetComputed(append(path, "workspace_status_message")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Workspace. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/provisioning_tf/model.go b/internal/service/provisioning_tf/model.go index 2f59ce068..1ce1856b6 100755 --- a/internal/service/provisioning_tf/model.go +++ b/internal/service/provisioning_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -22,7 +23,7 @@ import ( ) type AwsCredentials struct { - StsRole types.Object `tfsdk:"sts_role" tf:"optional,object"` + StsRole types.Object `tfsdk:"sts_role" tf:"object"` } func (newState *AwsCredentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsCredentials) { @@ -31,6 +32,12 @@ func (newState *AwsCredentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan Aws func (newState *AwsCredentials) SyncEffectiveFieldsDuringRead(existingState AwsCredentials) { } +func (c AwsCredentials) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StsRole{}.ToSchema(cs, append(path, "sts_role")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsCredentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -94,7 +101,7 @@ func (o *AwsCredentials) SetStsRole(ctx context.Context, v StsRole) { type AwsKeyInfo struct { // The AWS KMS key alias. - KeyAlias types.String `tfsdk:"key_alias" tf:"optional"` + KeyAlias types.String `tfsdk:"key_alias" tf:""` // The AWS KMS key's Amazon Resource Name (ARN). KeyArn types.String `tfsdk:"key_arn" tf:""` // The AWS KMS key region. @@ -103,7 +110,7 @@ type AwsKeyInfo struct { // If this is set to `true` or omitted, the key is also used to encrypt // cluster EBS volumes. If you do not want to use this key for encrypting // EBS volumes, set to `false`. - ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:"optional"` + ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:""` } func (newState *AwsKeyInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsKeyInfo) { @@ -112,6 +119,13 @@ func (newState *AwsKeyInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsKeyI func (newState *AwsKeyInfo) SyncEffectiveFieldsDuringRead(existingState AwsKeyInfo) { } +func (c AwsKeyInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key_arn")...) + cs.SetRequired(append(path, "key_region")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsKeyInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -151,9 +165,9 @@ func (o AwsKeyInfo) Type(ctx context.Context) attr.Type { type AzureWorkspaceInfo struct { // Azure Resource Group name - ResourceGroup types.String `tfsdk:"resource_group" tf:"optional"` + ResourceGroup types.String `tfsdk:"resource_group" tf:""` // Azure Subscription ID - SubscriptionId types.String `tfsdk:"subscription_id" tf:"optional"` + SubscriptionId types.String `tfsdk:"subscription_id" tf:""` } func (newState *AzureWorkspaceInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureWorkspaceInfo) { @@ -162,6 +176,11 @@ func (newState *AzureWorkspaceInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AzureWorkspaceInfo) SyncEffectiveFieldsDuringRead(existingState AzureWorkspaceInfo) { } +func (c AzureWorkspaceInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureWorkspaceInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -198,7 +217,7 @@ func (o AzureWorkspaceInfo) Type(ctx context.Context) attr.Type { // The general workspace configurations that are specific to cloud providers. type CloudResourceContainer struct { // The general workspace configurations that are specific to Google Cloud. - Gcp types.Object `tfsdk:"gcp" tf:"optional,object"` + Gcp types.Object `tfsdk:"gcp" tf:"object"` } func (newState *CloudResourceContainer) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloudResourceContainer) { @@ -207,6 +226,12 @@ func (newState *CloudResourceContainer) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CloudResourceContainer) SyncEffectiveFieldsDuringRead(existingState CloudResourceContainer) { } +func (c CloudResourceContainer) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CustomerFacingGcpCloudResourceContainer{}.ToSchema(cs, append(path, "gcp")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CloudResourceContainer. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -270,7 +295,7 @@ func (o *CloudResourceContainer) SetGcp(ctx context.Context, v CustomerFacingGcp type CreateAwsKeyInfo struct { // The AWS KMS key alias. - KeyAlias types.String `tfsdk:"key_alias" tf:"optional"` + KeyAlias types.String `tfsdk:"key_alias" tf:""` // The AWS KMS key's Amazon Resource Name (ARN). Note that the key's AWS // region is inferred from the ARN. KeyArn types.String `tfsdk:"key_arn" tf:""` @@ -278,7 +303,7 @@ type CreateAwsKeyInfo struct { // If this is set to `true` or omitted, the key is also used to encrypt // cluster EBS volumes. To not use this key also for encrypting EBS volumes, // set this to `false`. - ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:"optional"` + ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:""` } func (newState *CreateAwsKeyInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAwsKeyInfo) { @@ -287,6 +312,12 @@ func (newState *CreateAwsKeyInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *CreateAwsKeyInfo) SyncEffectiveFieldsDuringRead(existingState CreateAwsKeyInfo) { } +func (c CreateAwsKeyInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key_arn")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAwsKeyInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -323,7 +354,7 @@ func (o CreateAwsKeyInfo) Type(ctx context.Context) attr.Type { } type CreateCredentialAwsCredentials struct { - StsRole types.Object `tfsdk:"sts_role" tf:"optional,object"` + StsRole types.Object `tfsdk:"sts_role" tf:"object"` } func (newState *CreateCredentialAwsCredentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialAwsCredentials) { @@ -332,6 +363,12 @@ func (newState *CreateCredentialAwsCredentials) SyncEffectiveFieldsDuringCreateO func (newState *CreateCredentialAwsCredentials) SyncEffectiveFieldsDuringRead(existingState CreateCredentialAwsCredentials) { } +func (c CreateCredentialAwsCredentials) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateCredentialStsRole{}.ToSchema(cs, append(path, "sts_role")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialAwsCredentials. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -405,6 +442,14 @@ func (newState *CreateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateCredentialRequest) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest) { } +func (c CreateCredentialRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "aws_credentials")...) + CreateCredentialAwsCredentials{}.ToSchema(cs, append(path, "aws_credentials")...) + cs.SetRequired(append(path, "credentials_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -470,7 +515,7 @@ func (o *CreateCredentialRequest) SetAwsCredentials(ctx context.Context, v Creat type CreateCredentialStsRole struct { // The Amazon Resource Name (ARN) of the cross account role. - RoleArn types.String `tfsdk:"role_arn" tf:"optional"` + RoleArn types.String `tfsdk:"role_arn" tf:""` } func (newState *CreateCredentialStsRole) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialStsRole) { @@ -479,6 +524,11 @@ func (newState *CreateCredentialStsRole) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateCredentialStsRole) SyncEffectiveFieldsDuringRead(existingState CreateCredentialStsRole) { } +func (c CreateCredentialStsRole) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialStsRole. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -511,9 +561,9 @@ func (o CreateCredentialStsRole) Type(ctx context.Context) attr.Type { } type CreateCustomerManagedKeyRequest struct { - AwsKeyInfo types.Object `tfsdk:"aws_key_info" tf:"optional,object"` + AwsKeyInfo types.Object `tfsdk:"aws_key_info" tf:"object"` - GcpKeyInfo types.Object `tfsdk:"gcp_key_info" tf:"optional,object"` + GcpKeyInfo types.Object `tfsdk:"gcp_key_info" tf:"object"` // The cases that the key can be used for. UseCases types.List `tfsdk:"use_cases" tf:""` } @@ -524,6 +574,14 @@ func (newState *CreateCustomerManagedKeyRequest) SyncEffectiveFieldsDuringCreate func (newState *CreateCustomerManagedKeyRequest) SyncEffectiveFieldsDuringRead(existingState CreateCustomerManagedKeyRequest) { } +func (c CreateCustomerManagedKeyRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateAwsKeyInfo{}.ToSchema(cs, append(path, "aws_key_info")...) + CreateGcpKeyInfo{}.ToSchema(cs, append(path, "gcp_key_info")...) + cs.SetRequired(append(path, "use_cases")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCustomerManagedKeyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -658,6 +716,12 @@ func (newState *CreateGcpKeyInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *CreateGcpKeyInfo) SyncEffectiveFieldsDuringRead(existingState CreateGcpKeyInfo) { } +func (c CreateGcpKeyInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "kms_key_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateGcpKeyInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -692,23 +756,23 @@ func (o CreateGcpKeyInfo) Type(ctx context.Context) attr.Type { type CreateNetworkRequest struct { // The Google Cloud specific information for this network (for example, the // VPC ID, subnet ID, and secondary IP ranges). - GcpNetworkInfo types.Object `tfsdk:"gcp_network_info" tf:"optional,object"` + GcpNetworkInfo types.Object `tfsdk:"gcp_network_info" tf:"object"` // The human-readable name of the network configuration. NetworkName types.String `tfsdk:"network_name" tf:""` // IDs of one to five security groups associated with this network. Security // group IDs **cannot** be used in multiple network configurations. - SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:"optional"` + SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:""` // IDs of at least two subnets associated with this network. Subnet IDs // **cannot** be used in multiple network configurations. - SubnetIds types.List `tfsdk:"subnet_ids" tf:"optional"` + SubnetIds types.List `tfsdk:"subnet_ids" tf:""` // If specified, contains the VPC endpoints used to allow cluster // communication from this VPC over [AWS PrivateLink]. // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ - VpcEndpoints types.Object `tfsdk:"vpc_endpoints" tf:"optional,object"` + VpcEndpoints types.Object `tfsdk:"vpc_endpoints" tf:"object"` // The ID of the VPC associated with this network. VPC IDs can be used in // multiple network configurations. - VpcId types.String `tfsdk:"vpc_id" tf:"optional"` + VpcId types.String `tfsdk:"vpc_id" tf:""` } func (newState *CreateNetworkRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNetworkRequest) { @@ -717,6 +781,14 @@ func (newState *CreateNetworkRequest) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CreateNetworkRequest) SyncEffectiveFieldsDuringRead(existingState CreateNetworkRequest) { } +func (c CreateNetworkRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GcpNetworkInfo{}.ToSchema(cs, append(path, "gcp_network_info")...) + cs.SetRequired(append(path, "network_name")...) + NetworkVpcEndpoints{}.ToSchema(cs, append(path, "vpc_endpoints")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateNetworkRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -888,6 +960,14 @@ func (newState *CreateStorageConfigurationRequest) SyncEffectiveFieldsDuringCrea func (newState *CreateStorageConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState CreateStorageConfigurationRequest) { } +func (c CreateStorageConfigurationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "root_bucket_info")...) + RootBucketInfo{}.ToSchema(cs, append(path, "root_bucket_info")...) + cs.SetRequired(append(path, "storage_configuration_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateStorageConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -953,12 +1033,12 @@ func (o *CreateStorageConfigurationRequest) SetRootBucketInfo(ctx context.Contex type CreateVpcEndpointRequest struct { // The ID of the VPC endpoint object in AWS. - AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:"optional"` + AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:""` // The Google Cloud specific information for this Private Service Connect // endpoint. - GcpVpcEndpointInfo types.Object `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` + GcpVpcEndpointInfo types.Object `tfsdk:"gcp_vpc_endpoint_info" tf:"object"` // The AWS region in which this VPC endpoint object exists. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The human-readable name of the storage configuration. VpcEndpointName types.String `tfsdk:"vpc_endpoint_name" tf:""` } @@ -969,6 +1049,13 @@ func (newState *CreateVpcEndpointRequest) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateVpcEndpointRequest) SyncEffectiveFieldsDuringRead(existingState CreateVpcEndpointRequest) { } +func (c CreateVpcEndpointRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GcpVpcEndpointInfo{}.ToSchema(cs, append(path, "gcp_vpc_endpoint_info")...) + cs.SetRequired(append(path, "vpc_endpoint_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVpcEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1038,20 +1125,20 @@ func (o *CreateVpcEndpointRequest) SetGcpVpcEndpointInfo(ctx context.Context, v type CreateWorkspaceRequest struct { // The AWS region of the workspace's data plane. - AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` + AwsRegion types.String `tfsdk:"aws_region" tf:""` // The cloud provider which the workspace uses. For Google Cloud workspaces, // always set this field to `gcp`. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // The general workspace configurations that are specific to cloud // providers. - CloudResourceContainer types.Object `tfsdk:"cloud_resource_container" tf:"optional,object"` + CloudResourceContainer types.Object `tfsdk:"cloud_resource_container" tf:"object"` // ID of the workspace's credential configuration object. - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The custom tags key-value pairing that is attached to this workspace. The // key-value pair is a string of utf-8 characters. The value can be an empty // string, with maximum length of 255 characters. The key can be of maximum // length of 127 characters, and cannot be empty. - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // The deployment name defines part of the subdomain for the workspace. The // workspace URL for the web application and REST APIs is // `.cloud.databricks.com`. For example, if the @@ -1081,7 +1168,7 @@ type CreateWorkspaceRequest struct { // // If a new workspace omits this property, the server generates a unique // deployment name for you with the pattern `dbc-xxxxxxxx-xxxx`. - DeploymentName types.String `tfsdk:"deployment_name" tf:"optional"` + DeploymentName types.String `tfsdk:"deployment_name" tf:""` // The network settings for the workspace. The configurations are only for // Databricks-managed VPCs. It is ignored if you specify a customer-managed // VPC in the `network_id` field.", All the IP range configurations must be @@ -1105,27 +1192,27 @@ type CreateWorkspaceRequest struct { // for a new workspace]. // // [calculate subnet sizes for a new workspace]: https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/network-sizing.html - GcpManagedNetworkConfig types.Object `tfsdk:"gcp_managed_network_config" tf:"optional,object"` + GcpManagedNetworkConfig types.Object `tfsdk:"gcp_managed_network_config" tf:"object"` // The configurations for the GKE cluster of a Databricks workspace. - GkeConfig types.Object `tfsdk:"gke_config" tf:"optional,object"` + GkeConfig types.Object `tfsdk:"gke_config" tf:"object"` // Whether no public IP is enabled for the workspace. - IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:"optional"` + IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:""` // The Google Cloud region of the workspace data plane in your Google // account. For example, `us-east4`. - Location types.String `tfsdk:"location" tf:"optional"` + Location types.String `tfsdk:"location" tf:""` // The ID of the workspace's managed services encryption key configuration // object. This is used to help protect and control access to the // workspace's notebooks, secrets, Databricks SQL queries, and query // history. The provided key configuration object property `use_cases` must // contain `MANAGED_SERVICES`. - ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:"optional"` + ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:""` - NetworkId types.String `tfsdk:"network_id" tf:"optional"` + NetworkId types.String `tfsdk:"network_id" tf:""` // The pricing tier of the workspace. For pricing tier information, see [AWS // Pricing]. // // [AWS Pricing]: https://databricks.com/product/aws-pricing - PricingTier types.String `tfsdk:"pricing_tier" tf:"optional"` + PricingTier types.String `tfsdk:"pricing_tier" tf:""` // ID of the workspace's private access settings object. Only used for // PrivateLink. This ID must be specified for customers using [AWS // PrivateLink] for either front-end (user-to-workspace connection), @@ -1137,14 +1224,14 @@ type CreateWorkspaceRequest struct { // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ // [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html - PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:""` // The ID of the workspace's storage configuration object. - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // The ID of the workspace's storage encryption key configuration object. // This is used to encrypt the workspace's root S3 bucket (root DBFS and // system data) and, optionally, cluster EBS volumes. The provided key // configuration object property `use_cases` must contain `STORAGE`. - StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:"optional"` + StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:""` // The workspace's human-readable name. WorkspaceName types.String `tfsdk:"workspace_name" tf:""` } @@ -1155,6 +1242,15 @@ func (newState *CreateWorkspaceRequest) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateWorkspaceRequest) SyncEffectiveFieldsDuringRead(existingState CreateWorkspaceRequest) { } +func (c CreateWorkspaceRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CloudResourceContainer{}.ToSchema(cs, append(path, "cloud_resource_container")...) + GcpManagedNetworkConfig{}.ToSchema(cs, append(path, "gcp_managed_network_config")...) + GkeConfig{}.ToSchema(cs, append(path, "gke_config")...) + cs.SetRequired(append(path, "workspace_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1337,15 +1433,15 @@ func (o *CreateWorkspaceRequest) SetGkeConfig(ctx context.Context, v GkeConfig) type Credential struct { // The Databricks account ID that hosts the credential. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` - AwsCredentials types.Object `tfsdk:"aws_credentials" tf:"optional,object"` + AwsCredentials types.Object `tfsdk:"aws_credentials" tf:"object"` // Time in epoch milliseconds when the credential was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Databricks credential configuration ID. - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The human-readable name of the credential configuration object. - CredentialsName types.String `tfsdk:"credentials_name" tf:"optional"` + CredentialsName types.String `tfsdk:"credentials_name" tf:""` } func (newState *Credential) SyncEffectiveFieldsDuringCreateOrUpdate(plan Credential) { @@ -1354,6 +1450,13 @@ func (newState *Credential) SyncEffectiveFieldsDuringCreateOrUpdate(plan Credent func (newState *Credential) SyncEffectiveFieldsDuringRead(existingState Credential) { } +func (c Credential) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsCredentials{}.ToSchema(cs, append(path, "aws_credentials")...) + cs.SetComputed(append(path, "creation_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Credential. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1427,7 +1530,7 @@ func (o *Credential) SetAwsCredentials(ctx context.Context, v AwsCredentials) { type CustomerFacingGcpCloudResourceContainer struct { // The Google Cloud project ID, which the workspace uses to instantiate // cloud resources for your workspace. - ProjectId types.String `tfsdk:"project_id" tf:"optional"` + ProjectId types.String `tfsdk:"project_id" tf:""` } func (newState *CustomerFacingGcpCloudResourceContainer) SyncEffectiveFieldsDuringCreateOrUpdate(plan CustomerFacingGcpCloudResourceContainer) { @@ -1436,6 +1539,11 @@ func (newState *CustomerFacingGcpCloudResourceContainer) SyncEffectiveFieldsDuri func (newState *CustomerFacingGcpCloudResourceContainer) SyncEffectiveFieldsDuringRead(existingState CustomerFacingGcpCloudResourceContainer) { } +func (c CustomerFacingGcpCloudResourceContainer) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CustomerFacingGcpCloudResourceContainer. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1469,17 +1577,17 @@ func (o CustomerFacingGcpCloudResourceContainer) Type(ctx context.Context) attr. type CustomerManagedKey struct { // The Databricks account ID that holds the customer-managed key. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` - AwsKeyInfo types.Object `tfsdk:"aws_key_info" tf:"optional,object"` + AwsKeyInfo types.Object `tfsdk:"aws_key_info" tf:"object"` // Time in epoch milliseconds when the customer key was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // ID of the encryption key configuration object. - CustomerManagedKeyId types.String `tfsdk:"customer_managed_key_id" tf:"optional"` + CustomerManagedKeyId types.String `tfsdk:"customer_managed_key_id" tf:""` - GcpKeyInfo types.Object `tfsdk:"gcp_key_info" tf:"optional,object"` + GcpKeyInfo types.Object `tfsdk:"gcp_key_info" tf:"object"` // The cases that the key can be used for. - UseCases types.List `tfsdk:"use_cases" tf:"optional"` + UseCases types.List `tfsdk:"use_cases" tf:""` } func (newState *CustomerManagedKey) SyncEffectiveFieldsDuringCreateOrUpdate(plan CustomerManagedKey) { @@ -1488,6 +1596,14 @@ func (newState *CustomerManagedKey) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CustomerManagedKey) SyncEffectiveFieldsDuringRead(existingState CustomerManagedKey) { } +func (c CustomerManagedKey) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AwsKeyInfo{}.ToSchema(cs, append(path, "aws_key_info")...) + cs.SetComputed(append(path, "creation_time")...) + GcpKeyInfo{}.ToSchema(cs, append(path, "gcp_key_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CustomerManagedKey. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1623,12 +1739,6 @@ type DeleteCredentialRequest struct { CredentialsId types.String `tfsdk:"-"` } -func (newState *DeleteCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialRequest) { -} - -func (newState *DeleteCredentialRequest) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1666,12 +1776,6 @@ type DeleteEncryptionKeyRequest struct { CustomerManagedKeyId types.String `tfsdk:"-"` } -func (newState *DeleteEncryptionKeyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteEncryptionKeyRequest) { -} - -func (newState *DeleteEncryptionKeyRequest) SyncEffectiveFieldsDuringRead(existingState DeleteEncryptionKeyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteEncryptionKeyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1709,12 +1813,6 @@ type DeleteNetworkRequest struct { NetworkId types.String `tfsdk:"-"` } -func (newState *DeleteNetworkRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNetworkRequest) { -} - -func (newState *DeleteNetworkRequest) SyncEffectiveFieldsDuringRead(existingState DeleteNetworkRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1752,12 +1850,6 @@ type DeletePrivateAccesRequest struct { PrivateAccessSettingsId types.String `tfsdk:"-"` } -func (newState *DeletePrivateAccesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePrivateAccesRequest) { -} - -func (newState *DeletePrivateAccesRequest) SyncEffectiveFieldsDuringRead(existingState DeletePrivateAccesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePrivateAccesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1792,12 +1884,6 @@ func (o DeletePrivateAccesRequest) Type(ctx context.Context) attr.Type { type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1831,12 +1917,6 @@ type DeleteStorageRequest struct { StorageConfigurationId types.String `tfsdk:"-"` } -func (newState *DeleteStorageRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteStorageRequest) { -} - -func (newState *DeleteStorageRequest) SyncEffectiveFieldsDuringRead(existingState DeleteStorageRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteStorageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1874,12 +1954,6 @@ type DeleteVpcEndpointRequest struct { VpcEndpointId types.String `tfsdk:"-"` } -func (newState *DeleteVpcEndpointRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteVpcEndpointRequest) { -} - -func (newState *DeleteVpcEndpointRequest) SyncEffectiveFieldsDuringRead(existingState DeleteVpcEndpointRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteVpcEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1917,12 +1991,6 @@ type DeleteWorkspaceRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *DeleteWorkspaceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWorkspaceRequest) { -} - -func (newState *DeleteWorkspaceRequest) SyncEffectiveFieldsDuringRead(existingState DeleteWorkspaceRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1956,11 +2024,11 @@ func (o DeleteWorkspaceRequest) Type(ctx context.Context) attr.Type { type ExternalCustomerInfo struct { // Email of the authoritative user. - AuthoritativeUserEmail types.String `tfsdk:"authoritative_user_email" tf:"optional"` + AuthoritativeUserEmail types.String `tfsdk:"authoritative_user_email" tf:""` // The authoritative user full name. - AuthoritativeUserFullName types.String `tfsdk:"authoritative_user_full_name" tf:"optional"` + AuthoritativeUserFullName types.String `tfsdk:"authoritative_user_full_name" tf:""` // The legal entity name for the external workspace - CustomerName types.String `tfsdk:"customer_name" tf:"optional"` + CustomerName types.String `tfsdk:"customer_name" tf:""` } func (newState *ExternalCustomerInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalCustomerInfo) { @@ -1969,6 +2037,11 @@ func (newState *ExternalCustomerInfo) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ExternalCustomerInfo) SyncEffectiveFieldsDuringRead(existingState ExternalCustomerInfo) { } +func (c ExternalCustomerInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalCustomerInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2015,6 +2088,12 @@ func (newState *GcpKeyInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpKeyI func (newState *GcpKeyInfo) SyncEffectiveFieldsDuringRead(existingState GcpKeyInfo) { } +func (c GcpKeyInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "kms_key_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpKeyInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2072,13 +2151,13 @@ func (o GcpKeyInfo) Type(ctx context.Context) attr.Type { type GcpManagedNetworkConfig struct { // The IP range from which to allocate GKE cluster pods. No bigger than `/9` // and no smaller than `/21`. - GkeClusterPodIpRange types.String `tfsdk:"gke_cluster_pod_ip_range" tf:"optional"` + GkeClusterPodIpRange types.String `tfsdk:"gke_cluster_pod_ip_range" tf:""` // The IP range from which to allocate GKE cluster services. No bigger than // `/16` and no smaller than `/27`. - GkeClusterServiceIpRange types.String `tfsdk:"gke_cluster_service_ip_range" tf:"optional"` + GkeClusterServiceIpRange types.String `tfsdk:"gke_cluster_service_ip_range" tf:""` // The IP range from which to allocate GKE cluster nodes. No bigger than // `/9` and no smaller than `/29`. - SubnetCidr types.String `tfsdk:"subnet_cidr" tf:"optional"` + SubnetCidr types.String `tfsdk:"subnet_cidr" tf:""` } func (newState *GcpManagedNetworkConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpManagedNetworkConfig) { @@ -2087,6 +2166,11 @@ func (newState *GcpManagedNetworkConfig) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *GcpManagedNetworkConfig) SyncEffectiveFieldsDuringRead(existingState GcpManagedNetworkConfig) { } +func (c GcpManagedNetworkConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpManagedNetworkConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2151,6 +2235,17 @@ func (newState *GcpNetworkInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Gcp func (newState *GcpNetworkInfo) SyncEffectiveFieldsDuringRead(existingState GcpNetworkInfo) { } +func (c GcpNetworkInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "network_project_id")...) + cs.SetRequired(append(path, "pod_ip_range_name")...) + cs.SetRequired(append(path, "service_ip_range_name")...) + cs.SetRequired(append(path, "subnet_id")...) + cs.SetRequired(append(path, "subnet_region")...) + cs.SetRequired(append(path, "vpc_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpNetworkInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2201,11 +2296,11 @@ type GcpVpcEndpointInfo struct { // resides. ProjectId types.String `tfsdk:"project_id" tf:""` // The unique ID of this PSC connection. - PscConnectionId types.String `tfsdk:"psc_connection_id" tf:"optional"` + PscConnectionId types.String `tfsdk:"psc_connection_id" tf:""` // The name of the PSC endpoint in the Google Cloud project. PscEndpointName types.String `tfsdk:"psc_endpoint_name" tf:""` // The service attachment this PSC connection connects to. - ServiceAttachmentId types.String `tfsdk:"service_attachment_id" tf:"optional"` + ServiceAttachmentId types.String `tfsdk:"service_attachment_id" tf:""` } func (newState *GcpVpcEndpointInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpVpcEndpointInfo) { @@ -2214,6 +2309,14 @@ func (newState *GcpVpcEndpointInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *GcpVpcEndpointInfo) SyncEffectiveFieldsDuringRead(existingState GcpVpcEndpointInfo) { } +func (c GcpVpcEndpointInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "endpoint_region")...) + cs.SetRequired(append(path, "project_id")...) + cs.SetRequired(append(path, "psc_endpoint_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpVpcEndpointInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2259,12 +2362,6 @@ type GetCredentialRequest struct { CredentialsId types.String `tfsdk:"-"` } -func (newState *GetCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialRequest) { -} - -func (newState *GetCredentialRequest) SyncEffectiveFieldsDuringRead(existingState GetCredentialRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2302,12 +2399,6 @@ type GetEncryptionKeyRequest struct { CustomerManagedKeyId types.String `tfsdk:"-"` } -func (newState *GetEncryptionKeyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEncryptionKeyRequest) { -} - -func (newState *GetEncryptionKeyRequest) SyncEffectiveFieldsDuringRead(existingState GetEncryptionKeyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEncryptionKeyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2345,12 +2436,6 @@ type GetNetworkRequest struct { NetworkId types.String `tfsdk:"-"` } -func (newState *GetNetworkRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetNetworkRequest) { -} - -func (newState *GetNetworkRequest) SyncEffectiveFieldsDuringRead(existingState GetNetworkRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetNetworkRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2388,12 +2473,6 @@ type GetPrivateAccesRequest struct { PrivateAccessSettingsId types.String `tfsdk:"-"` } -func (newState *GetPrivateAccesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPrivateAccesRequest) { -} - -func (newState *GetPrivateAccesRequest) SyncEffectiveFieldsDuringRead(existingState GetPrivateAccesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPrivateAccesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2431,12 +2510,6 @@ type GetStorageRequest struct { StorageConfigurationId types.String `tfsdk:"-"` } -func (newState *GetStorageRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStorageRequest) { -} - -func (newState *GetStorageRequest) SyncEffectiveFieldsDuringRead(existingState GetStorageRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStorageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2474,12 +2547,6 @@ type GetVpcEndpointRequest struct { VpcEndpointId types.String `tfsdk:"-"` } -func (newState *GetVpcEndpointRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetVpcEndpointRequest) { -} - -func (newState *GetVpcEndpointRequest) SyncEffectiveFieldsDuringRead(existingState GetVpcEndpointRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetVpcEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2517,12 +2584,6 @@ type GetWorkspaceRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *GetWorkspaceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceRequest) { -} - -func (newState *GetWorkspaceRequest) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2564,12 +2625,12 @@ type GkeConfig struct { // // Set to `PUBLIC_NODE_PUBLIC_MASTER` for a public GKE cluster. The nodes of // a public GKE cluster have public IP addresses. - ConnectivityType types.String `tfsdk:"connectivity_type" tf:"optional"` + ConnectivityType types.String `tfsdk:"connectivity_type" tf:""` // The IP range from which to allocate GKE cluster master resources. This // field will be ignored if GKE private cluster is not enabled. // // It must be exactly as big as `/28`. - MasterIpRange types.String `tfsdk:"master_ip_range" tf:"optional"` + MasterIpRange types.String `tfsdk:"master_ip_range" tf:""` } func (newState *GkeConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan GkeConfig) { @@ -2578,6 +2639,11 @@ func (newState *GkeConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan GkeConfi func (newState *GkeConfig) SyncEffectiveFieldsDuringRead(existingState GkeConfig) { } +func (c GkeConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GkeConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2613,38 +2679,38 @@ func (o GkeConfig) Type(ctx context.Context) attr.Type { type Network struct { // The Databricks account ID associated with this network configuration. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Time in epoch milliseconds when the network was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Array of error messages about the network configuration. - ErrorMessages types.List `tfsdk:"error_messages" tf:"computed"` + ErrorMessages types.List `tfsdk:"error_messages" tf:""` // The Google Cloud specific information for this network (for example, the // VPC ID, subnet ID, and secondary IP ranges). - GcpNetworkInfo types.Object `tfsdk:"gcp_network_info" tf:"optional,object"` + GcpNetworkInfo types.Object `tfsdk:"gcp_network_info" tf:"object"` // The Databricks network configuration ID. - NetworkId types.String `tfsdk:"network_id" tf:"optional"` + NetworkId types.String `tfsdk:"network_id" tf:""` // The human-readable name of the network configuration. - NetworkName types.String `tfsdk:"network_name" tf:"optional"` + NetworkName types.String `tfsdk:"network_name" tf:""` - SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:"optional"` + SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:""` - SubnetIds types.List `tfsdk:"subnet_ids" tf:"optional"` + SubnetIds types.List `tfsdk:"subnet_ids" tf:""` // If specified, contains the VPC endpoints used to allow cluster // communication from this VPC over [AWS PrivateLink]. // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ - VpcEndpoints types.Object `tfsdk:"vpc_endpoints" tf:"optional,object"` + VpcEndpoints types.Object `tfsdk:"vpc_endpoints" tf:"object"` // The ID of the VPC associated with this network configuration. VPC IDs can // be used in multiple networks. - VpcId types.String `tfsdk:"vpc_id" tf:"optional"` + VpcId types.String `tfsdk:"vpc_id" tf:""` // The status of this network configuration object in terms of its use in a // workspace: * `UNATTACHED`: Unattached. * `VALID`: Valid. * `BROKEN`: // Broken. * `WARNED`: Warned. - VpcStatus types.String `tfsdk:"vpc_status" tf:"computed"` + VpcStatus types.String `tfsdk:"vpc_status" tf:""` // Array of warning messages about the network configuration. - WarningMessages types.List `tfsdk:"warning_messages" tf:"computed"` + WarningMessages types.List `tfsdk:"warning_messages" tf:""` // Workspace ID associated with this network configuration. - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` } func (newState *Network) SyncEffectiveFieldsDuringCreateOrUpdate(plan Network) { @@ -2653,6 +2719,19 @@ func (newState *Network) SyncEffectiveFieldsDuringCreateOrUpdate(plan Network) { func (newState *Network) SyncEffectiveFieldsDuringRead(existingState Network) { } +func (c Network) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "creation_time")...) + cs.SetComputed(append(path, "error_messages")...) + NetworkHealth{}.ToSchema(cs, append(path, "error_messages")...) + GcpNetworkInfo{}.ToSchema(cs, append(path, "gcp_network_info")...) + NetworkVpcEndpoints{}.ToSchema(cs, append(path, "vpc_endpoints")...) + cs.SetComputed(append(path, "vpc_status")...) + cs.SetComputed(append(path, "warning_messages")...) + NetworkWarning{}.ToSchema(cs, append(path, "warning_messages")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Network. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2885,10 +2964,10 @@ func (o *Network) SetWarningMessages(ctx context.Context, v []NetworkWarning) { type NetworkHealth struct { // Details of the error. - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` // The AWS resource associated with this error: credentials, VPC, subnet, // security group, or network ACL. - ErrorType types.String `tfsdk:"error_type" tf:"optional"` + ErrorType types.String `tfsdk:"error_type" tf:""` } func (newState *NetworkHealth) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkHealth) { @@ -2897,6 +2976,11 @@ func (newState *NetworkHealth) SyncEffectiveFieldsDuringCreateOrUpdate(plan Netw func (newState *NetworkHealth) SyncEffectiveFieldsDuringRead(existingState NetworkHealth) { } +func (c NetworkHealth) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkHealth. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2949,6 +3033,13 @@ func (newState *NetworkVpcEndpoints) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *NetworkVpcEndpoints) SyncEffectiveFieldsDuringRead(existingState NetworkVpcEndpoints) { } +func (c NetworkVpcEndpoints) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dataplane_relay")...) + cs.SetRequired(append(path, "rest_api")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkVpcEndpoints. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3043,10 +3134,10 @@ func (o *NetworkVpcEndpoints) SetRestApi(ctx context.Context, v []types.String) type NetworkWarning struct { // Details of the warning. - WarningMessage types.String `tfsdk:"warning_message" tf:"optional"` + WarningMessage types.String `tfsdk:"warning_message" tf:""` // The AWS resource associated with this warning: a subnet or a security // group. - WarningType types.String `tfsdk:"warning_type" tf:"optional"` + WarningType types.String `tfsdk:"warning_type" tf:""` } func (newState *NetworkWarning) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkWarning) { @@ -3055,6 +3146,11 @@ func (newState *NetworkWarning) SyncEffectiveFieldsDuringCreateOrUpdate(plan Net func (newState *NetworkWarning) SyncEffectiveFieldsDuringRead(existingState NetworkWarning) { } +func (c NetworkWarning) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkWarning. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3090,29 +3186,29 @@ func (o NetworkWarning) Type(ctx context.Context) attr.Type { type PrivateAccessSettings struct { // The Databricks account ID that hosts the credential. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // An array of Databricks VPC endpoint IDs. - AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:"optional"` + AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:""` // The private access level controls which VPC endpoints can connect to the // UI or API of any workspace that attaches this private access settings // object. * `ACCOUNT` level access (the default) allows only VPC endpoints // that are registered in your Databricks account connect to your workspace. // * `ENDPOINT` level access allows only specified VPC endpoints connect to // your workspace. For details, see `allowed_vpc_endpoint_ids`. - PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:"optional"` + PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:""` // Databricks private access settings ID. - PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:""` // The human-readable name of the private access settings object. - PrivateAccessSettingsName types.String `tfsdk:"private_access_settings_name" tf:"optional"` + PrivateAccessSettingsName types.String `tfsdk:"private_access_settings_name" tf:""` // Determines if the workspace can be accessed over public internet. For // fully private workspaces, you can optionally specify `false`, but only if // you implement both the front-end and the back-end PrivateLink // connections. Otherwise, specify `true`, which means that public access is // enabled. - PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:"optional"` + PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:""` // The cloud region for workspaces attached to this private access settings // object. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *PrivateAccessSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrivateAccessSettings) { @@ -3121,6 +3217,11 @@ func (newState *PrivateAccessSettings) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PrivateAccessSettings) SyncEffectiveFieldsDuringRead(existingState PrivateAccessSettings) { } +func (c PrivateAccessSettings) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrivateAccessSettings. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3197,12 +3298,6 @@ func (o *PrivateAccessSettings) SetAllowedVpcEndpointIds(ctx context.Context, v type ReplaceResponse struct { } -func (newState *ReplaceResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReplaceResponse) { -} - -func (newState *ReplaceResponse) SyncEffectiveFieldsDuringRead(existingState ReplaceResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3233,7 +3328,7 @@ func (o ReplaceResponse) Type(ctx context.Context) attr.Type { // Root S3 bucket information. type RootBucketInfo struct { // The name of the S3 bucket. - BucketName types.String `tfsdk:"bucket_name" tf:"optional"` + BucketName types.String `tfsdk:"bucket_name" tf:""` } func (newState *RootBucketInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RootBucketInfo) { @@ -3242,6 +3337,11 @@ func (newState *RootBucketInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Roo func (newState *RootBucketInfo) SyncEffectiveFieldsDuringRead(existingState RootBucketInfo) { } +func (c RootBucketInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RootBucketInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3275,15 +3375,15 @@ func (o RootBucketInfo) Type(ctx context.Context) attr.Type { type StorageConfiguration struct { // The Databricks account ID that hosts the credential. - AccountId types.String `tfsdk:"account_id" tf:"computed"` + AccountId types.String `tfsdk:"account_id" tf:""` // Time in epoch milliseconds when the storage configuration was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Root S3 bucket information. - RootBucketInfo types.Object `tfsdk:"root_bucket_info" tf:"optional,object"` + RootBucketInfo types.Object `tfsdk:"root_bucket_info" tf:"object"` // Databricks storage configuration ID. - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // The human-readable name of the storage configuration. - StorageConfigurationName types.String `tfsdk:"storage_configuration_name" tf:"optional"` + StorageConfigurationName types.String `tfsdk:"storage_configuration_name" tf:""` } func (newState *StorageConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan StorageConfiguration) { @@ -3292,6 +3392,14 @@ func (newState *StorageConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *StorageConfiguration) SyncEffectiveFieldsDuringRead(existingState StorageConfiguration) { } +func (c StorageConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "account_id")...) + cs.SetComputed(append(path, "creation_time")...) + RootBucketInfo{}.ToSchema(cs, append(path, "root_bucket_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StorageConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3364,9 +3472,9 @@ func (o *StorageConfiguration) SetRootBucketInfo(ctx context.Context, v RootBuck type StsRole struct { // The external ID that needs to be trusted by the cross-account role. This // is always your Databricks account ID. - ExternalId types.String `tfsdk:"external_id" tf:"optional"` + ExternalId types.String `tfsdk:"external_id" tf:""` // The Amazon Resource Name (ARN) of the cross account role. - RoleArn types.String `tfsdk:"role_arn" tf:"optional"` + RoleArn types.String `tfsdk:"role_arn" tf:""` } func (newState *StsRole) SyncEffectiveFieldsDuringCreateOrUpdate(plan StsRole) { @@ -3375,6 +3483,11 @@ func (newState *StsRole) SyncEffectiveFieldsDuringCreateOrUpdate(plan StsRole) { func (newState *StsRole) SyncEffectiveFieldsDuringRead(existingState StsRole) { } +func (c StsRole) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StsRole. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3411,12 +3524,6 @@ func (o StsRole) Type(ctx context.Context) attr.Type { type UpdateResponse struct { } -func (newState *UpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse) { -} - -func (newState *UpdateResponse) SyncEffectiveFieldsDuringRead(existingState UpdateResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3447,34 +3554,34 @@ func (o UpdateResponse) Type(ctx context.Context) attr.Type { type UpdateWorkspaceRequest struct { // The AWS region of the workspace's data plane (for example, `us-west-2`). // This parameter is available only for updating failed workspaces. - AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` + AwsRegion types.String `tfsdk:"aws_region" tf:""` // ID of the workspace's credential configuration object. This parameter is // available for updating both failed and running workspaces. - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The custom tags key-value pairing that is attached to this workspace. The // key-value pair is a string of utf-8 characters. The value can be an empty // string, with maximum length of 255 characters. The key can be of maximum // length of 127 characters, and cannot be empty. - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // The ID of the workspace's managed services encryption key configuration // object. This parameter is available only for updating failed workspaces. - ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:"optional"` + ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:""` - NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:"optional"` + NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:""` // The ID of the workspace's network configuration object. Used only if you // already use a customer-managed VPC. For failed workspaces only, you can // switch from a Databricks-managed VPC to a customer-managed VPC by // updating the workspace to add a network configuration ID. - NetworkId types.String `tfsdk:"network_id" tf:"optional"` + NetworkId types.String `tfsdk:"network_id" tf:""` // The ID of the workspace's private access settings configuration object. // This parameter is available only for updating failed workspaces. - PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:""` // The ID of the workspace's storage configuration object. This parameter is // available only for updating failed workspaces. - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // The ID of the key configuration object for workspace storage. This // parameter is available for updating both failed and running workspaces. - StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:"optional"` + StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:""` // Workspace ID. WorkspaceId types.Int64 `tfsdk:"-"` } @@ -3485,6 +3592,12 @@ func (newState *UpdateWorkspaceRequest) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *UpdateWorkspaceRequest) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceRequest) { } +func (c UpdateWorkspaceRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "workspace_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3579,14 +3692,14 @@ type UpsertPrivateAccessSettingsRequest struct { // public internet, see [IP access lists]. // // [IP access lists]: https://docs.databricks.com/security/network/ip-access-list.html - AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:"optional"` + AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:""` // The private access level controls which VPC endpoints can connect to the // UI or API of any workspace that attaches this private access settings // object. * `ACCOUNT` level access (the default) allows only VPC endpoints // that are registered in your Databricks account connect to your workspace. // * `ENDPOINT` level access allows only specified VPC endpoints connect to // your workspace. For details, see `allowed_vpc_endpoint_ids`. - PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:"optional"` + PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:""` // Databricks Account API private access settings ID. PrivateAccessSettingsId types.String `tfsdk:"-"` // The human-readable name of the private access settings object. @@ -3596,7 +3709,7 @@ type UpsertPrivateAccessSettingsRequest struct { // you implement both the front-end and the back-end PrivateLink // connections. Otherwise, specify `true`, which means that public access is // enabled. - PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:"optional"` + PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:""` // The cloud region for workspaces associated with this private access // settings object. Region types.String `tfsdk:"region" tf:""` @@ -3608,6 +3721,14 @@ func (newState *UpsertPrivateAccessSettingsRequest) SyncEffectiveFieldsDuringCre func (newState *UpsertPrivateAccessSettingsRequest) SyncEffectiveFieldsDuringRead(existingState UpsertPrivateAccessSettingsRequest) { } +func (c UpsertPrivateAccessSettingsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "private_access_settings_id")...) + cs.SetRequired(append(path, "private_access_settings_name")...) + cs.SetRequired(append(path, "region")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertPrivateAccessSettingsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3681,40 +3802,40 @@ func (o *UpsertPrivateAccessSettingsRequest) SetAllowedVpcEndpointIds(ctx contex type VpcEndpoint struct { // The Databricks account ID that hosts the VPC endpoint configuration. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // The AWS Account in which the VPC endpoint object exists. - AwsAccountId types.String `tfsdk:"aws_account_id" tf:"optional"` + AwsAccountId types.String `tfsdk:"aws_account_id" tf:""` // The ID of the Databricks [endpoint service] that this VPC endpoint is // connected to. For a list of endpoint service IDs for each supported AWS // region, see the [Databricks PrivateLink documentation]. // // [Databricks PrivateLink documentation]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html // [endpoint service]: https://docs.aws.amazon.com/vpc/latest/privatelink/endpoint-service.html - AwsEndpointServiceId types.String `tfsdk:"aws_endpoint_service_id" tf:"optional"` + AwsEndpointServiceId types.String `tfsdk:"aws_endpoint_service_id" tf:""` // The ID of the VPC endpoint object in AWS. - AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:"optional"` + AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:""` // The Google Cloud specific information for this Private Service Connect // endpoint. - GcpVpcEndpointInfo types.Object `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` + GcpVpcEndpointInfo types.Object `tfsdk:"gcp_vpc_endpoint_info" tf:"object"` // The AWS region in which this VPC endpoint object exists. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The current state (such as `available` or `rejected`) of the VPC // endpoint. Derived from AWS. For the full set of values, see [AWS // DescribeVpcEndpoint documentation]. // // [AWS DescribeVpcEndpoint documentation]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // This enumeration represents the type of Databricks VPC [endpoint service] // that was used when creating this VPC endpoint. // // [endpoint service]: https://docs.aws.amazon.com/vpc/latest/privatelink/endpoint-service.html - UseCase types.String `tfsdk:"use_case" tf:"optional"` + UseCase types.String `tfsdk:"use_case" tf:""` // Databricks VPC endpoint ID. This is the Databricks-specific name of the // VPC endpoint. Do not confuse this with the `aws_vpc_endpoint_id`, which // is the ID within AWS of the VPC endpoint. - VpcEndpointId types.String `tfsdk:"vpc_endpoint_id" tf:"optional"` + VpcEndpointId types.String `tfsdk:"vpc_endpoint_id" tf:""` // The human-readable name of the storage configuration. - VpcEndpointName types.String `tfsdk:"vpc_endpoint_name" tf:"optional"` + VpcEndpointName types.String `tfsdk:"vpc_endpoint_name" tf:""` } func (newState *VpcEndpoint) SyncEffectiveFieldsDuringCreateOrUpdate(plan VpcEndpoint) { @@ -3723,6 +3844,12 @@ func (newState *VpcEndpoint) SyncEffectiveFieldsDuringCreateOrUpdate(plan VpcEnd func (newState *VpcEndpoint) SyncEffectiveFieldsDuringRead(existingState VpcEndpoint) { } +func (c VpcEndpoint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + GcpVpcEndpointInfo{}.ToSchema(cs, append(path, "gcp_vpc_endpoint_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VpcEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3804,36 +3931,36 @@ func (o *VpcEndpoint) SetGcpVpcEndpointInfo(ctx context.Context, v GcpVpcEndpoin type Workspace struct { // Databricks account ID. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // The AWS region of the workspace data plane (for example, `us-west-2`). - AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` + AwsRegion types.String `tfsdk:"aws_region" tf:""` - AzureWorkspaceInfo types.Object `tfsdk:"azure_workspace_info" tf:"optional,object"` + AzureWorkspaceInfo types.Object `tfsdk:"azure_workspace_info" tf:"object"` // The cloud name. This field always has the value `gcp`. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // The general workspace configurations that are specific to cloud // providers. - CloudResourceContainer types.Object `tfsdk:"cloud_resource_container" tf:"optional,object"` + CloudResourceContainer types.Object `tfsdk:"cloud_resource_container" tf:"object"` // Time in epoch milliseconds when the workspace was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // ID of the workspace's credential configuration object. - CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + CredentialsId types.String `tfsdk:"credentials_id" tf:""` // The custom tags key-value pairing that is attached to this workspace. The // key-value pair is a string of utf-8 characters. The value can be an empty // string, with maximum length of 255 characters. The key can be of maximum // length of 127 characters, and cannot be empty. - CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.Map `tfsdk:"custom_tags" tf:""` // The deployment name defines part of the subdomain for the workspace. The // workspace URL for web application and REST APIs is // `.cloud.databricks.com`. // // This value must be unique across all non-deleted deployments across all // AWS regions. - DeploymentName types.String `tfsdk:"deployment_name" tf:"optional"` + DeploymentName types.String `tfsdk:"deployment_name" tf:""` // If this workspace is for a external customer, then external_customer_info // is populated. If this workspace is not for a external customer, then // external_customer_info is empty. - ExternalCustomerInfo types.Object `tfsdk:"external_customer_info" tf:"optional,object"` + ExternalCustomerInfo types.Object `tfsdk:"external_customer_info" tf:"object"` // The network settings for the workspace. The configurations are only for // Databricks-managed VPCs. It is ignored if you specify a customer-managed // VPC in the `network_id` field.", All the IP range configurations must be @@ -3857,24 +3984,24 @@ type Workspace struct { // for a new workspace]. // // [calculate subnet sizes for a new workspace]: https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/network-sizing.html - GcpManagedNetworkConfig types.Object `tfsdk:"gcp_managed_network_config" tf:"optional,object"` + GcpManagedNetworkConfig types.Object `tfsdk:"gcp_managed_network_config" tf:"object"` // The configurations for the GKE cluster of a Databricks workspace. - GkeConfig types.Object `tfsdk:"gke_config" tf:"optional,object"` + GkeConfig types.Object `tfsdk:"gke_config" tf:"object"` // Whether no public IP is enabled for the workspace. - IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:"optional"` + IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:""` // The Google Cloud region of the workspace data plane in your Google // account (for example, `us-east4`). - Location types.String `tfsdk:"location" tf:"optional"` + Location types.String `tfsdk:"location" tf:""` // ID of the key configuration for encrypting managed services. - ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:"optional"` + ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:""` // The network configuration ID that is attached to the workspace. This // field is available only if the network is a customer-managed network. - NetworkId types.String `tfsdk:"network_id" tf:"optional"` + NetworkId types.String `tfsdk:"network_id" tf:""` // The pricing tier of the workspace. For pricing tier information, see [AWS // Pricing]. // // [AWS Pricing]: https://databricks.com/product/aws-pricing - PricingTier types.String `tfsdk:"pricing_tier" tf:"optional"` + PricingTier types.String `tfsdk:"pricing_tier" tf:""` // ID of the workspace's private access settings object. Only used for // PrivateLink. You must specify this ID if you are using [AWS PrivateLink] // for either front-end (user-to-workspace connection), back-end (data plane @@ -3885,21 +4012,21 @@ type Workspace struct { // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ // [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html - PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:""` // ID of the workspace's storage configuration object. - StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` // ID of the key configuration for encrypting workspace storage. - StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:"optional"` + StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:""` // A unique integer ID for the workspace - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` // The human-readable name of the workspace. - WorkspaceName types.String `tfsdk:"workspace_name" tf:"optional"` + WorkspaceName types.String `tfsdk:"workspace_name" tf:""` // The status of the workspace. For workspace creation, usually it is set to // `PROVISIONING` initially. Continue to check the status until the status // is `RUNNING`. - WorkspaceStatus types.String `tfsdk:"workspace_status" tf:"computed"` + WorkspaceStatus types.String `tfsdk:"workspace_status" tf:""` // Message describing the current workspace status. - WorkspaceStatusMessage types.String `tfsdk:"workspace_status_message" tf:"computed"` + WorkspaceStatusMessage types.String `tfsdk:"workspace_status_message" tf:""` } func (newState *Workspace) SyncEffectiveFieldsDuringCreateOrUpdate(plan Workspace) { @@ -3908,6 +4035,19 @@ func (newState *Workspace) SyncEffectiveFieldsDuringCreateOrUpdate(plan Workspac func (newState *Workspace) SyncEffectiveFieldsDuringRead(existingState Workspace) { } +func (c Workspace) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AzureWorkspaceInfo{}.ToSchema(cs, append(path, "azure_workspace_info")...) + CloudResourceContainer{}.ToSchema(cs, append(path, "cloud_resource_container")...) + cs.SetComputed(append(path, "creation_time")...) + ExternalCustomerInfo{}.ToSchema(cs, append(path, "external_customer_info")...) + GcpManagedNetworkConfig{}.ToSchema(cs, append(path, "gcp_managed_network_config")...) + GkeConfig{}.ToSchema(cs, append(path, "gke_config")...) + cs.SetComputed(append(path, "workspace_status")...) + cs.SetComputed(append(path, "workspace_status_message")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Workspace. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/serving_tf/legacy_model.go b/internal/service/serving_tf/legacy_model.go index faa0dbe8e..9e26933b3 100755 --- a/internal/service/serving_tf/legacy_model.go +++ b/internal/service/serving_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/oauth2_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -27,12 +28,12 @@ type Ai21LabsConfig_SdkV2 struct { // prefer to paste your API key directly, see `ai21labs_api_key_plaintext`. // You must provide an API key using one of the following fields: // `ai21labs_api_key` or `ai21labs_api_key_plaintext`. - Ai21labsApiKey types.String `tfsdk:"ai21labs_api_key" tf:"optional"` + Ai21labsApiKey types.String `tfsdk:"ai21labs_api_key" tf:""` // An AI21 Labs API key provided as a plaintext string. If you prefer to // reference your key using Databricks Secrets, see `ai21labs_api_key`. You // must provide an API key using one of the following fields: // `ai21labs_api_key` or `ai21labs_api_key_plaintext`. - Ai21labsApiKeyPlaintext types.String `tfsdk:"ai21labs_api_key_plaintext" tf:"optional"` + Ai21labsApiKeyPlaintext types.String `tfsdk:"ai21labs_api_key_plaintext" tf:""` } func (newState *Ai21LabsConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ai21LabsConfig_SdkV2) { @@ -41,6 +42,11 @@ func (newState *Ai21LabsConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *Ai21LabsConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState Ai21LabsConfig_SdkV2) { } +func (c Ai21LabsConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Ai21LabsConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -77,17 +83,17 @@ func (o Ai21LabsConfig_SdkV2) Type(ctx context.Context) attr.Type { type AiGatewayConfig_SdkV2 struct { // Configuration for AI Guardrails to prevent unwanted data and unsafe data // in requests and responses. - Guardrails types.List `tfsdk:"guardrails" tf:"optional,object"` + Guardrails types.List `tfsdk:"guardrails" tf:"object"` // Configuration for payload logging using inference tables. Use these // tables to monitor and audit data being sent to and received from model // APIs and to improve model quality. - InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"optional,object"` + InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"object"` // Configuration for rate limits which can be set to limit endpoint traffic. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + RateLimits types.List `tfsdk:"rate_limits" tf:""` // Configuration to enable usage tracking using system tables. These tables // allow you to monitor operational usage on endpoints and their associated // costs. - UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"optional,object"` + UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"object"` } func (newState *AiGatewayConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayConfig_SdkV2) { @@ -96,6 +102,15 @@ func (newState *AiGatewayConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *AiGatewayConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayConfig_SdkV2) { } +func (c AiGatewayConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayGuardrails_SdkV2{}.ToSchema(cs, append(path, "guardrails")...) + AiGatewayInferenceTableConfig_SdkV2{}.ToSchema(cs, append(path, "inference_table_config")...) + AiGatewayRateLimit_SdkV2{}.ToSchema(cs, append(path, "rate_limits")...) + AiGatewayUsageTrackingConfig_SdkV2{}.ToSchema(cs, append(path, "usage_tracking_config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -253,14 +268,14 @@ func (o *AiGatewayConfig_SdkV2) SetUsageTrackingConfig(ctx context.Context, v Ai type AiGatewayGuardrailParameters_SdkV2 struct { // List of invalid keywords. AI guardrail uses keyword or string matching to // decide if the keyword exists in the request or response content. - InvalidKeywords types.List `tfsdk:"invalid_keywords" tf:"optional"` + InvalidKeywords types.List `tfsdk:"invalid_keywords" tf:""` // Configuration for guardrail PII filter. - Pii types.List `tfsdk:"pii" tf:"optional,object"` + Pii types.List `tfsdk:"pii" tf:"object"` // Indicates whether the safety filter is enabled. - Safety types.Bool `tfsdk:"safety" tf:"optional"` + Safety types.Bool `tfsdk:"safety" tf:""` // The list of allowed topics. Given a chat request, this guardrail flags // the request if its topic is not in the allowed topics. - ValidTopics types.List `tfsdk:"valid_topics" tf:"optional"` + ValidTopics types.List `tfsdk:"valid_topics" tf:""` } func (newState *AiGatewayGuardrailParameters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayGuardrailParameters_SdkV2) { @@ -269,6 +284,12 @@ func (newState *AiGatewayGuardrailParameters_SdkV2) SyncEffectiveFieldsDuringCre func (newState *AiGatewayGuardrailParameters_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayGuardrailParameters_SdkV2) { } +func (c AiGatewayGuardrailParameters_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayGuardrailPiiBehavior_SdkV2{}.ToSchema(cs, append(path, "pii")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayGuardrailParameters. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -410,6 +431,12 @@ func (newState *AiGatewayGuardrailPiiBehavior_SdkV2) SyncEffectiveFieldsDuringCr func (newState *AiGatewayGuardrailPiiBehavior_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayGuardrailPiiBehavior_SdkV2) { } +func (c AiGatewayGuardrailPiiBehavior_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "behavior")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayGuardrailPiiBehavior. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -443,9 +470,9 @@ func (o AiGatewayGuardrailPiiBehavior_SdkV2) Type(ctx context.Context) attr.Type type AiGatewayGuardrails_SdkV2 struct { // Configuration for input guardrail filters. - Input types.List `tfsdk:"input" tf:"optional,object"` + Input types.List `tfsdk:"input" tf:"object"` // Configuration for output guardrail filters. - Output types.List `tfsdk:"output" tf:"optional,object"` + Output types.List `tfsdk:"output" tf:"object"` } func (newState *AiGatewayGuardrails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayGuardrails_SdkV2) { @@ -454,6 +481,13 @@ func (newState *AiGatewayGuardrails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *AiGatewayGuardrails_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayGuardrails_SdkV2) { } +func (c AiGatewayGuardrails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayGuardrailParameters_SdkV2{}.ToSchema(cs, append(path, "input")...) + AiGatewayGuardrailParameters_SdkV2{}.ToSchema(cs, append(path, "output")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayGuardrails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -550,16 +584,16 @@ type AiGatewayInferenceTableConfig_SdkV2 struct { // The name of the catalog in Unity Catalog. Required when enabling // inference tables. NOTE: On update, you have to disable inference table // first in order to change the catalog name. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // Indicates whether the inference table is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the schema in Unity Catalog. Required when enabling inference // tables. NOTE: On update, you have to disable inference table first in // order to change the schema name. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // The prefix of the table in Unity Catalog. NOTE: On update, you have to // disable inference table first in order to change the prefix name. - TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` + TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:""` } func (newState *AiGatewayInferenceTableConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayInferenceTableConfig_SdkV2) { @@ -568,6 +602,11 @@ func (newState *AiGatewayInferenceTableConfig_SdkV2) SyncEffectiveFieldsDuringCr func (newState *AiGatewayInferenceTableConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayInferenceTableConfig_SdkV2) { } +func (c AiGatewayInferenceTableConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayInferenceTableConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -611,7 +650,7 @@ type AiGatewayRateLimit_SdkV2 struct { Calls types.Int64 `tfsdk:"calls" tf:""` // Key field for a rate limit. Currently, only 'user' and 'endpoint' are // supported, with 'endpoint' being the default if not specified. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Renewal period field for a rate limit. Currently, only 'minute' is // supported. RenewalPeriod types.String `tfsdk:"renewal_period" tf:""` @@ -623,6 +662,13 @@ func (newState *AiGatewayRateLimit_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *AiGatewayRateLimit_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayRateLimit_SdkV2) { } +func (c AiGatewayRateLimit_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "calls")...) + cs.SetRequired(append(path, "renewal_period")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayRateLimit. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -660,7 +706,7 @@ func (o AiGatewayRateLimit_SdkV2) Type(ctx context.Context) attr.Type { type AiGatewayUsageTrackingConfig_SdkV2 struct { // Whether to enable usage tracking. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` } func (newState *AiGatewayUsageTrackingConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayUsageTrackingConfig_SdkV2) { @@ -669,6 +715,11 @@ func (newState *AiGatewayUsageTrackingConfig_SdkV2) SyncEffectiveFieldsDuringCre func (newState *AiGatewayUsageTrackingConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayUsageTrackingConfig_SdkV2) { } +func (c AiGatewayUsageTrackingConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayUsageTrackingConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -706,13 +757,13 @@ type AmazonBedrockConfig_SdkV2 struct { // your API key directly, see `aws_access_key_id`. You must provide an API // key using one of the following fields: `aws_access_key_id` or // `aws_access_key_id_plaintext`. - AwsAccessKeyId types.String `tfsdk:"aws_access_key_id" tf:"optional"` + AwsAccessKeyId types.String `tfsdk:"aws_access_key_id" tf:""` // An AWS access key ID with permissions to interact with Bedrock services // provided as a plaintext string. If you prefer to reference your key using // Databricks Secrets, see `aws_access_key_id`. You must provide an API key // using one of the following fields: `aws_access_key_id` or // `aws_access_key_id_plaintext`. - AwsAccessKeyIdPlaintext types.String `tfsdk:"aws_access_key_id_plaintext" tf:"optional"` + AwsAccessKeyIdPlaintext types.String `tfsdk:"aws_access_key_id_plaintext" tf:""` // The AWS region to use. Bedrock has to be enabled there. AwsRegion types.String `tfsdk:"aws_region" tf:""` // The Databricks secret key reference for an AWS secret access key paired @@ -721,14 +772,14 @@ type AmazonBedrockConfig_SdkV2 struct { // `aws_secret_access_key_plaintext`. You must provide an API key using one // of the following fields: `aws_secret_access_key` or // `aws_secret_access_key_plaintext`. - AwsSecretAccessKey types.String `tfsdk:"aws_secret_access_key" tf:"optional"` + AwsSecretAccessKey types.String `tfsdk:"aws_secret_access_key" tf:""` // An AWS secret access key paired with the access key ID, with permissions // to interact with Bedrock services provided as a plaintext string. If you // prefer to reference your key using Databricks Secrets, see // `aws_secret_access_key`. You must provide an API key using one of the // following fields: `aws_secret_access_key` or // `aws_secret_access_key_plaintext`. - AwsSecretAccessKeyPlaintext types.String `tfsdk:"aws_secret_access_key_plaintext" tf:"optional"` + AwsSecretAccessKeyPlaintext types.String `tfsdk:"aws_secret_access_key_plaintext" tf:""` // The underlying provider in Amazon Bedrock. Supported values (case // insensitive) include: Anthropic, Cohere, AI21Labs, Amazon. BedrockProvider types.String `tfsdk:"bedrock_provider" tf:""` @@ -740,6 +791,13 @@ func (newState *AmazonBedrockConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *AmazonBedrockConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AmazonBedrockConfig_SdkV2) { } +func (c AmazonBedrockConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "aws_region")...) + cs.SetRequired(append(path, "bedrock_provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AmazonBedrockConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -786,12 +844,12 @@ type AnthropicConfig_SdkV2 struct { // prefer to paste your API key directly, see `anthropic_api_key_plaintext`. // You must provide an API key using one of the following fields: // `anthropic_api_key` or `anthropic_api_key_plaintext`. - AnthropicApiKey types.String `tfsdk:"anthropic_api_key" tf:"optional"` + AnthropicApiKey types.String `tfsdk:"anthropic_api_key" tf:""` // The Anthropic API key provided as a plaintext string. If you prefer to // reference your key using Databricks Secrets, see `anthropic_api_key`. You // must provide an API key using one of the following fields: // `anthropic_api_key` or `anthropic_api_key_plaintext`. - AnthropicApiKeyPlaintext types.String `tfsdk:"anthropic_api_key_plaintext" tf:"optional"` + AnthropicApiKeyPlaintext types.String `tfsdk:"anthropic_api_key_plaintext" tf:""` } func (newState *AnthropicConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AnthropicConfig_SdkV2) { @@ -800,6 +858,11 @@ func (newState *AnthropicConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *AnthropicConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AnthropicConfig_SdkV2) { } +func (c AnthropicConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AnthropicConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -836,15 +899,15 @@ func (o AnthropicConfig_SdkV2) Type(ctx context.Context) attr.Type { type AutoCaptureConfigInput_SdkV2 struct { // The name of the catalog in Unity Catalog. NOTE: On update, you cannot // change the catalog name if the inference table is already enabled. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // Indicates whether the inference table is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the schema in Unity Catalog. NOTE: On update, you cannot // change the schema name if the inference table is already enabled. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // The prefix of the table in Unity Catalog. NOTE: On update, you cannot // change the prefix name if the inference table is already enabled. - TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` + TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:""` } func (newState *AutoCaptureConfigInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureConfigInput_SdkV2) { @@ -853,6 +916,11 @@ func (newState *AutoCaptureConfigInput_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *AutoCaptureConfigInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutoCaptureConfigInput_SdkV2) { } +func (c AutoCaptureConfigInput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoCaptureConfigInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -892,15 +960,15 @@ func (o AutoCaptureConfigInput_SdkV2) Type(ctx context.Context) attr.Type { type AutoCaptureConfigOutput_SdkV2 struct { // The name of the catalog in Unity Catalog. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // Indicates whether the inference table is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the schema in Unity Catalog. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` - State types.List `tfsdk:"state" tf:"optional,object"` + State types.List `tfsdk:"state" tf:"object"` // The prefix of the table in Unity Catalog. - TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` + TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:""` } func (newState *AutoCaptureConfigOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureConfigOutput_SdkV2) { @@ -909,6 +977,12 @@ func (newState *AutoCaptureConfigOutput_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *AutoCaptureConfigOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutoCaptureConfigOutput_SdkV2) { } +func (c AutoCaptureConfigOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoCaptureState_SdkV2{}.ToSchema(cs, append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoCaptureConfigOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -979,7 +1053,7 @@ func (o *AutoCaptureConfigOutput_SdkV2) SetState(ctx context.Context, v AutoCapt } type AutoCaptureState_SdkV2 struct { - PayloadTable types.List `tfsdk:"payload_table" tf:"optional,object"` + PayloadTable types.List `tfsdk:"payload_table" tf:"object"` } func (newState *AutoCaptureState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureState_SdkV2) { @@ -988,6 +1062,12 @@ func (newState *AutoCaptureState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *AutoCaptureState_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutoCaptureState_SdkV2) { } +func (c AutoCaptureState_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PayloadTable_SdkV2{}.ToSchema(cs, append(path, "payload_table")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoCaptureState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1059,12 +1139,6 @@ type BuildLogsRequest_SdkV2 struct { ServedModelName types.String `tfsdk:"-"` } -func (newState *BuildLogsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BuildLogsRequest_SdkV2) { -} - -func (newState *BuildLogsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState BuildLogsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in BuildLogsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1109,6 +1183,12 @@ func (newState *BuildLogsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *BuildLogsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState BuildLogsResponse_SdkV2) { } +func (c BuildLogsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "logs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BuildLogsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1142,9 +1222,9 @@ func (o BuildLogsResponse_SdkV2) Type(ctx context.Context) attr.Type { type ChatMessage_SdkV2 struct { // The content of the message. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // The role of the message. One of [system, user, assistant]. - Role types.String `tfsdk:"role" tf:"optional"` + Role types.String `tfsdk:"role" tf:""` } func (newState *ChatMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChatMessage_SdkV2) { @@ -1153,6 +1233,11 @@ func (newState *ChatMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ChatMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState ChatMessage_SdkV2) { } +func (c ChatMessage_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ChatMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1189,17 +1274,17 @@ func (o ChatMessage_SdkV2) Type(ctx context.Context) attr.Type { type CohereConfig_SdkV2 struct { // This is an optional field to provide a customized base URL for the Cohere // API. If left unspecified, the standard Cohere base URL is used. - CohereApiBase types.String `tfsdk:"cohere_api_base" tf:"optional"` + CohereApiBase types.String `tfsdk:"cohere_api_base" tf:""` // The Databricks secret key reference for a Cohere API key. If you prefer // to paste your API key directly, see `cohere_api_key_plaintext`. You must // provide an API key using one of the following fields: `cohere_api_key` or // `cohere_api_key_plaintext`. - CohereApiKey types.String `tfsdk:"cohere_api_key" tf:"optional"` + CohereApiKey types.String `tfsdk:"cohere_api_key" tf:""` // The Cohere API key provided as a plaintext string. If you prefer to // reference your key using Databricks Secrets, see `cohere_api_key`. You // must provide an API key using one of the following fields: // `cohere_api_key` or `cohere_api_key_plaintext`. - CohereApiKeyPlaintext types.String `tfsdk:"cohere_api_key_plaintext" tf:"optional"` + CohereApiKeyPlaintext types.String `tfsdk:"cohere_api_key_plaintext" tf:""` } func (newState *CohereConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CohereConfig_SdkV2) { @@ -1208,6 +1293,11 @@ func (newState *CohereConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CohereConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState CohereConfig_SdkV2) { } +func (c CohereConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CohereConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1246,7 +1336,7 @@ func (o CohereConfig_SdkV2) Type(ctx context.Context) attr.Type { type CreateServingEndpoint_SdkV2 struct { // The AI Gateway configuration for the serving endpoint. NOTE: only // external model endpoints are supported as of now. - AiGateway types.List `tfsdk:"ai_gateway" tf:"optional,object"` + AiGateway types.List `tfsdk:"ai_gateway" tf:"object"` // The core config of the serving endpoint. Config types.List `tfsdk:"config" tf:"object"` // The name of the serving endpoint. This field is required and must be @@ -1255,12 +1345,12 @@ type CreateServingEndpoint_SdkV2 struct { Name types.String `tfsdk:"name" tf:""` // Rate limits to be applied to the serving endpoint. NOTE: this field is // deprecated, please use AI Gateway to manage rate limits. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + RateLimits types.List `tfsdk:"rate_limits" tf:""` // Enable route optimization for the serving endpoint. - RouteOptimized types.Bool `tfsdk:"route_optimized" tf:"optional"` + RouteOptimized types.Bool `tfsdk:"route_optimized" tf:""` // Tags to be attached to the serving endpoint and automatically propagated // to billing logs. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *CreateServingEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServingEndpoint_SdkV2) { @@ -1269,6 +1359,17 @@ func (newState *CreateServingEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateServingEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateServingEndpoint_SdkV2) { } +func (c CreateServingEndpoint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayConfig_SdkV2{}.ToSchema(cs, append(path, "ai_gateway")...) + cs.SetRequired(append(path, "config")...) + EndpointCoreConfigInput_SdkV2{}.ToSchema(cs, append(path, "config")...) + cs.SetRequired(append(path, "name")...) + RateLimit_SdkV2{}.ToSchema(cs, append(path, "rate_limits")...) + EndpointTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServingEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1434,14 +1535,14 @@ type DatabricksModelServingConfig_SdkV2 struct { // to paste your API key directly, see `databricks_api_token_plaintext`. You // must provide an API key using one of the following fields: // `databricks_api_token` or `databricks_api_token_plaintext`. - DatabricksApiToken types.String `tfsdk:"databricks_api_token" tf:"optional"` + DatabricksApiToken types.String `tfsdk:"databricks_api_token" tf:""` // The Databricks API token that corresponds to a user or service principal // with Can Query access to the model serving endpoint pointed to by this // external model provided as a plaintext string. If you prefer to reference // your key using Databricks Secrets, see `databricks_api_token`. You must // provide an API key using one of the following fields: // `databricks_api_token` or `databricks_api_token_plaintext`. - DatabricksApiTokenPlaintext types.String `tfsdk:"databricks_api_token_plaintext" tf:"optional"` + DatabricksApiTokenPlaintext types.String `tfsdk:"databricks_api_token_plaintext" tf:""` // The URL of the Databricks workspace containing the model serving endpoint // pointed to by this external model. DatabricksWorkspaceUrl types.String `tfsdk:"databricks_workspace_url" tf:""` @@ -1453,6 +1554,12 @@ func (newState *DatabricksModelServingConfig_SdkV2) SyncEffectiveFieldsDuringCre func (newState *DatabricksModelServingConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabricksModelServingConfig_SdkV2) { } +func (c DatabricksModelServingConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "databricks_workspace_url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksModelServingConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1489,11 +1596,11 @@ func (o DatabricksModelServingConfig_SdkV2) Type(ctx context.Context) attr.Type } type DataframeSplitInput_SdkV2 struct { - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` - Data types.List `tfsdk:"data" tf:"optional"` + Data types.List `tfsdk:"data" tf:""` - Index types.List `tfsdk:"index" tf:"optional"` + Index types.List `tfsdk:"index" tf:""` } func (newState *DataframeSplitInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataframeSplitInput_SdkV2) { @@ -1502,6 +1609,11 @@ func (newState *DataframeSplitInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *DataframeSplitInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataframeSplitInput_SdkV2) { } +func (c DataframeSplitInput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataframeSplitInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1628,12 +1740,6 @@ func (o *DataframeSplitInput_SdkV2) SetIndex(ctx context.Context, v []types.Int6 type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1667,12 +1773,6 @@ type DeleteServingEndpointRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteServingEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServingEndpointRequest_SdkV2) { -} - -func (newState *DeleteServingEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteServingEndpointRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServingEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1705,11 +1805,11 @@ func (o DeleteServingEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type } type EmbeddingsV1ResponseEmbeddingElement_SdkV2 struct { - Embedding types.List `tfsdk:"embedding" tf:"optional"` + Embedding types.List `tfsdk:"embedding" tf:""` // The index of the embedding in the response. - Index types.Int64 `tfsdk:"index" tf:"optional"` + Index types.Int64 `tfsdk:"index" tf:""` // This will always be 'embedding'. - Object types.String `tfsdk:"object" tf:"optional"` + Object types.String `tfsdk:"object" tf:""` } func (newState *EmbeddingsV1ResponseEmbeddingElement_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmbeddingsV1ResponseEmbeddingElement_SdkV2) { @@ -1718,6 +1818,11 @@ func (newState *EmbeddingsV1ResponseEmbeddingElement_SdkV2) SyncEffectiveFieldsD func (newState *EmbeddingsV1ResponseEmbeddingElement_SdkV2) SyncEffectiveFieldsDuringRead(existingState EmbeddingsV1ResponseEmbeddingElement_SdkV2) { } +func (c EmbeddingsV1ResponseEmbeddingElement_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EmbeddingsV1ResponseEmbeddingElement. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1786,18 +1891,18 @@ func (o *EmbeddingsV1ResponseEmbeddingElement_SdkV2) SetEmbedding(ctx context.Co type EndpointCoreConfigInput_SdkV2 struct { // Configuration for Inference Tables which automatically logs requests and // responses to Unity Catalog. - AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"optional,object"` + AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"object"` // The name of the serving endpoint to update. This field is required. Name types.String `tfsdk:"-"` // A list of served entities for the endpoint to serve. A serving endpoint // can have up to 15 served entities. - ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + ServedEntities types.List `tfsdk:"served_entities" tf:""` // (Deprecated, use served_entities instead) A list of served models for the // endpoint to serve. A serving endpoint can have up to 15 served models. - ServedModels types.List `tfsdk:"served_models" tf:"optional"` + ServedModels types.List `tfsdk:"served_models" tf:""` // The traffic config defining how invocations to the serving endpoint // should be routed. - TrafficConfig types.List `tfsdk:"traffic_config" tf:"optional,object"` + TrafficConfig types.List `tfsdk:"traffic_config" tf:"object"` } func (newState *EndpointCoreConfigInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigInput_SdkV2) { @@ -1806,6 +1911,16 @@ func (newState *EndpointCoreConfigInput_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *EndpointCoreConfigInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointCoreConfigInput_SdkV2) { } +func (c EndpointCoreConfigInput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoCaptureConfigInput_SdkV2{}.ToSchema(cs, append(path, "auto_capture_config")...) + cs.SetRequired(append(path, "name")...) + ServedEntityInput_SdkV2{}.ToSchema(cs, append(path, "served_entities")...) + ServedModelInput_SdkV2{}.ToSchema(cs, append(path, "served_models")...) + TrafficConfig_SdkV2{}.ToSchema(cs, append(path, "traffic_config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointCoreConfigInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1965,16 +2080,16 @@ func (o *EndpointCoreConfigInput_SdkV2) SetTrafficConfig(ctx context.Context, v type EndpointCoreConfigOutput_SdkV2 struct { // Configuration for Inference Tables which automatically logs requests and // responses to Unity Catalog. - AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"optional,object"` + AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"object"` // The config version that the serving endpoint is currently serving. - ConfigVersion types.Int64 `tfsdk:"config_version" tf:"optional"` + ConfigVersion types.Int64 `tfsdk:"config_version" tf:""` // The list of served entities under the serving endpoint config. - ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + ServedEntities types.List `tfsdk:"served_entities" tf:""` // (Deprecated, use served_entities instead) The list of served models under // the serving endpoint config. - ServedModels types.List `tfsdk:"served_models" tf:"optional"` + ServedModels types.List `tfsdk:"served_models" tf:""` // The traffic configuration associated with the serving endpoint config. - TrafficConfig types.List `tfsdk:"traffic_config" tf:"optional,object"` + TrafficConfig types.List `tfsdk:"traffic_config" tf:"object"` } func (newState *EndpointCoreConfigOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigOutput_SdkV2) { @@ -1983,6 +2098,15 @@ func (newState *EndpointCoreConfigOutput_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *EndpointCoreConfigOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointCoreConfigOutput_SdkV2) { } +func (c EndpointCoreConfigOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoCaptureConfigOutput_SdkV2{}.ToSchema(cs, append(path, "auto_capture_config")...) + ServedEntityOutput_SdkV2{}.ToSchema(cs, append(path, "served_entities")...) + ServedModelOutput_SdkV2{}.ToSchema(cs, append(path, "served_models")...) + TrafficConfig_SdkV2{}.ToSchema(cs, append(path, "traffic_config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointCoreConfigOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2141,10 +2265,10 @@ func (o *EndpointCoreConfigOutput_SdkV2) SetTrafficConfig(ctx context.Context, v type EndpointCoreConfigSummary_SdkV2 struct { // The list of served entities under the serving endpoint config. - ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + ServedEntities types.List `tfsdk:"served_entities" tf:""` // (Deprecated, use served_entities instead) The list of served models under // the serving endpoint config. - ServedModels types.List `tfsdk:"served_models" tf:"optional"` + ServedModels types.List `tfsdk:"served_models" tf:""` } func (newState *EndpointCoreConfigSummary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigSummary_SdkV2) { @@ -2153,6 +2277,13 @@ func (newState *EndpointCoreConfigSummary_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *EndpointCoreConfigSummary_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointCoreConfigSummary_SdkV2) { } +func (c EndpointCoreConfigSummary_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServedEntitySpec_SdkV2{}.ToSchema(cs, append(path, "served_entities")...) + ServedModelSpec_SdkV2{}.ToSchema(cs, append(path, "served_models")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointCoreConfigSummary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2248,20 +2379,20 @@ func (o *EndpointCoreConfigSummary_SdkV2) SetServedModels(ctx context.Context, v type EndpointPendingConfig_SdkV2 struct { // Configuration for Inference Tables which automatically logs requests and // responses to Unity Catalog. - AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"optional,object"` + AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"object"` // The config version that the serving endpoint is currently serving. - ConfigVersion types.Int64 `tfsdk:"config_version" tf:"optional"` + ConfigVersion types.Int64 `tfsdk:"config_version" tf:""` // The list of served entities belonging to the last issued update to the // serving endpoint. - ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + ServedEntities types.List `tfsdk:"served_entities" tf:""` // (Deprecated, use served_entities instead) The list of served models // belonging to the last issued update to the serving endpoint. - ServedModels types.List `tfsdk:"served_models" tf:"optional"` + ServedModels types.List `tfsdk:"served_models" tf:""` // The timestamp when the update to the pending config started. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // The traffic config defining how invocations to the serving endpoint // should be routed. - TrafficConfig types.List `tfsdk:"traffic_config" tf:"optional,object"` + TrafficConfig types.List `tfsdk:"traffic_config" tf:"object"` } func (newState *EndpointPendingConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointPendingConfig_SdkV2) { @@ -2270,6 +2401,15 @@ func (newState *EndpointPendingConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *EndpointPendingConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointPendingConfig_SdkV2) { } +func (c EndpointPendingConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoCaptureConfigOutput_SdkV2{}.ToSchema(cs, append(path, "auto_capture_config")...) + ServedEntityOutput_SdkV2{}.ToSchema(cs, append(path, "served_entities")...) + ServedModelOutput_SdkV2{}.ToSchema(cs, append(path, "served_models")...) + TrafficConfig_SdkV2{}.ToSchema(cs, append(path, "traffic_config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointPendingConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2434,12 +2574,12 @@ type EndpointState_SdkV2 struct { // update in progress. Note that if the endpoint's config_update state value // is IN_PROGRESS, another update can not be made until the update completes // or fails." - ConfigUpdate types.String `tfsdk:"config_update" tf:"optional"` + ConfigUpdate types.String `tfsdk:"config_update" tf:""` // The state of an endpoint, indicating whether or not the endpoint is // queryable. An endpoint is READY if all of the served entities in its // active configuration are ready. If any of the actively served entities // are in a non-ready state, the endpoint state will be NOT_READY. - Ready types.String `tfsdk:"ready" tf:"optional"` + Ready types.String `tfsdk:"ready" tf:""` } func (newState *EndpointState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointState_SdkV2) { @@ -2448,6 +2588,11 @@ func (newState *EndpointState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *EndpointState_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointState_SdkV2) { } +func (c EndpointState_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2485,7 +2630,7 @@ type EndpointTag_SdkV2 struct { // Key field for a serving endpoint tag. Key types.String `tfsdk:"key" tf:""` // Optional value field for a serving endpoint tag. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *EndpointTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointTag_SdkV2) { @@ -2494,6 +2639,12 @@ func (newState *EndpointTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EndpointTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointTag_SdkV2) { } +func (c EndpointTag_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2534,12 +2685,6 @@ type ExportMetricsRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *ExportMetricsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportMetricsRequest_SdkV2) { -} - -func (newState *ExportMetricsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportMetricsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportMetricsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2575,12 +2720,6 @@ type ExportMetricsResponse_SdkV2 struct { Contents types.Object `tfsdk:"-"` } -func (newState *ExportMetricsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportMetricsResponse_SdkV2) { -} - -func (newState *ExportMetricsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportMetricsResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportMetricsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2614,25 +2753,25 @@ func (o ExportMetricsResponse_SdkV2) Type(ctx context.Context) attr.Type { type ExternalModel_SdkV2 struct { // AI21Labs Config. Only required if the provider is 'ai21labs'. - Ai21labsConfig types.List `tfsdk:"ai21labs_config" tf:"optional,object"` + Ai21labsConfig types.List `tfsdk:"ai21labs_config" tf:"object"` // Amazon Bedrock Config. Only required if the provider is 'amazon-bedrock'. - AmazonBedrockConfig types.List `tfsdk:"amazon_bedrock_config" tf:"optional,object"` + AmazonBedrockConfig types.List `tfsdk:"amazon_bedrock_config" tf:"object"` // Anthropic Config. Only required if the provider is 'anthropic'. - AnthropicConfig types.List `tfsdk:"anthropic_config" tf:"optional,object"` + AnthropicConfig types.List `tfsdk:"anthropic_config" tf:"object"` // Cohere Config. Only required if the provider is 'cohere'. - CohereConfig types.List `tfsdk:"cohere_config" tf:"optional,object"` + CohereConfig types.List `tfsdk:"cohere_config" tf:"object"` // Databricks Model Serving Config. Only required if the provider is // 'databricks-model-serving'. - DatabricksModelServingConfig types.List `tfsdk:"databricks_model_serving_config" tf:"optional,object"` + DatabricksModelServingConfig types.List `tfsdk:"databricks_model_serving_config" tf:"object"` // Google Cloud Vertex AI Config. Only required if the provider is // 'google-cloud-vertex-ai'. - GoogleCloudVertexAiConfig types.List `tfsdk:"google_cloud_vertex_ai_config" tf:"optional,object"` + GoogleCloudVertexAiConfig types.List `tfsdk:"google_cloud_vertex_ai_config" tf:"object"` // The name of the external model. Name types.String `tfsdk:"name" tf:""` // OpenAI Config. Only required if the provider is 'openai'. - OpenaiConfig types.List `tfsdk:"openai_config" tf:"optional,object"` + OpenaiConfig types.List `tfsdk:"openai_config" tf:"object"` // PaLM Config. Only required if the provider is 'palm'. - PalmConfig types.List `tfsdk:"palm_config" tf:"optional,object"` + PalmConfig types.List `tfsdk:"palm_config" tf:"object"` // The name of the provider for the external model. Currently, the supported // providers are 'ai21labs', 'anthropic', 'amazon-bedrock', 'cohere', // 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and @@ -2648,6 +2787,22 @@ func (newState *ExternalModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ExternalModel_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalModel_SdkV2) { } +func (c ExternalModel_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Ai21LabsConfig_SdkV2{}.ToSchema(cs, append(path, "ai21labs_config")...) + AmazonBedrockConfig_SdkV2{}.ToSchema(cs, append(path, "amazon_bedrock_config")...) + AnthropicConfig_SdkV2{}.ToSchema(cs, append(path, "anthropic_config")...) + CohereConfig_SdkV2{}.ToSchema(cs, append(path, "cohere_config")...) + DatabricksModelServingConfig_SdkV2{}.ToSchema(cs, append(path, "databricks_model_serving_config")...) + GoogleCloudVertexAiConfig_SdkV2{}.ToSchema(cs, append(path, "google_cloud_vertex_ai_config")...) + cs.SetRequired(append(path, "name")...) + OpenAiConfig_SdkV2{}.ToSchema(cs, append(path, "openai_config")...) + PaLmConfig_SdkV2{}.ToSchema(cs, append(path, "palm_config")...) + cs.SetRequired(append(path, "provider")...) + cs.SetRequired(append(path, "task")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalModel. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2934,11 +3089,11 @@ func (o *ExternalModel_SdkV2) SetPalmConfig(ctx context.Context, v PaLmConfig_Sd type ExternalModelUsageElement_SdkV2 struct { // The number of tokens in the chat/completions response. - CompletionTokens types.Int64 `tfsdk:"completion_tokens" tf:"optional"` + CompletionTokens types.Int64 `tfsdk:"completion_tokens" tf:""` // The number of tokens in the prompt. - PromptTokens types.Int64 `tfsdk:"prompt_tokens" tf:"optional"` + PromptTokens types.Int64 `tfsdk:"prompt_tokens" tf:""` // The total number of tokens in the prompt and response. - TotalTokens types.Int64 `tfsdk:"total_tokens" tf:"optional"` + TotalTokens types.Int64 `tfsdk:"total_tokens" tf:""` } func (newState *ExternalModelUsageElement_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalModelUsageElement_SdkV2) { @@ -2947,6 +3102,11 @@ func (newState *ExternalModelUsageElement_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ExternalModelUsageElement_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalModelUsageElement_SdkV2) { } +func (c ExternalModelUsageElement_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalModelUsageElement. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2984,13 +3144,13 @@ func (o ExternalModelUsageElement_SdkV2) Type(ctx context.Context) attr.Type { type FoundationModel_SdkV2 struct { // The description of the foundation model. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The display name of the foundation model. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The URL to the documentation of the foundation model. - Docs types.String `tfsdk:"docs" tf:"optional"` + Docs types.String `tfsdk:"docs" tf:""` // The name of the foundation model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *FoundationModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FoundationModel_SdkV2) { @@ -2999,6 +3159,11 @@ func (newState *FoundationModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *FoundationModel_SdkV2) SyncEffectiveFieldsDuringRead(existingState FoundationModel_SdkV2) { } +func (c FoundationModel_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FoundationModel. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3043,12 +3208,6 @@ type GetOpenApiRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetOpenApiRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetOpenApiRequest_SdkV2) { -} - -func (newState *GetOpenApiRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetOpenApiRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetOpenApiRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3085,12 +3244,6 @@ func (o GetOpenApiRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetOpenApiResponse_SdkV2 struct { } -func (newState *GetOpenApiResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetOpenApiResponse_SdkV2) { -} - -func (newState *GetOpenApiResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetOpenApiResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetOpenApiResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3124,12 +3277,6 @@ type GetServingEndpointPermissionLevelsRequest_SdkV2 struct { ServingEndpointId types.String `tfsdk:"-"` } -func (newState *GetServingEndpointPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetServingEndpointPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3163,7 +3310,7 @@ func (o GetServingEndpointPermissionLevelsRequest_SdkV2) Type(ctx context.Contex type GetServingEndpointPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetServingEndpointPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointPermissionLevelsResponse_SdkV2) { @@ -3172,6 +3319,12 @@ func (newState *GetServingEndpointPermissionLevelsResponse_SdkV2) SyncEffectiveF func (newState *GetServingEndpointPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointPermissionLevelsResponse_SdkV2) { } +func (c GetServingEndpointPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpointPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3239,12 +3392,6 @@ type GetServingEndpointPermissionsRequest_SdkV2 struct { ServingEndpointId types.String `tfsdk:"-"` } -func (newState *GetServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointPermissionsRequest_SdkV2) { -} - -func (newState *GetServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3282,12 +3429,6 @@ type GetServingEndpointRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetServingEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointRequest_SdkV2) { -} - -func (newState *GetServingEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3328,7 +3469,7 @@ type GoogleCloudVertexAiConfig_SdkV2 struct { // `private_key_plaintext` // // [Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys - PrivateKey types.String `tfsdk:"private_key" tf:"optional"` + PrivateKey types.String `tfsdk:"private_key" tf:""` // The private key for the service account which has access to the Google // Cloud Vertex AI Service provided as a plaintext secret. See [Best // practices for managing service account keys]. If you prefer to reference @@ -3337,16 +3478,16 @@ type GoogleCloudVertexAiConfig_SdkV2 struct { // `private_key_plaintext`. // // [Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys - PrivateKeyPlaintext types.String `tfsdk:"private_key_plaintext" tf:"optional"` + PrivateKeyPlaintext types.String `tfsdk:"private_key_plaintext" tf:""` // This is the Google Cloud project id that the service account is // associated with. - ProjectId types.String `tfsdk:"project_id" tf:"optional"` + ProjectId types.String `tfsdk:"project_id" tf:""` // This is the region for the Google Cloud Vertex AI Service. See [supported // regions] for more details. Some models are only available in specific // regions. // // [supported regions]: https://cloud.google.com/vertex-ai/docs/general/locations - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *GoogleCloudVertexAiConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GoogleCloudVertexAiConfig_SdkV2) { @@ -3355,6 +3496,11 @@ func (newState *GoogleCloudVertexAiConfig_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *GoogleCloudVertexAiConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState GoogleCloudVertexAiConfig_SdkV2) { } +func (c GoogleCloudVertexAiConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GoogleCloudVertexAiConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3394,7 +3540,7 @@ func (o GoogleCloudVertexAiConfig_SdkV2) Type(ctx context.Context) attr.Type { type ListEndpointsResponse_SdkV2 struct { // The list of endpoints. - Endpoints types.List `tfsdk:"endpoints" tf:"optional"` + Endpoints types.List `tfsdk:"endpoints" tf:""` } func (newState *ListEndpointsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListEndpointsResponse_SdkV2) { @@ -3403,6 +3549,12 @@ func (newState *ListEndpointsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListEndpointsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListEndpointsResponse_SdkV2) { } +func (c ListEndpointsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpoint_SdkV2{}.ToSchema(cs, append(path, "endpoints")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEndpointsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3474,12 +3626,6 @@ type LogsRequest_SdkV2 struct { ServedModelName types.String `tfsdk:"-"` } -func (newState *LogsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogsRequest_SdkV2) { -} - -func (newState *LogsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3515,7 +3661,7 @@ func (o LogsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ModelDataPlaneInfo_SdkV2 struct { // Information required to query DataPlane API 'query' endpoint. - QueryInfo types.List `tfsdk:"query_info" tf:"optional,object"` + QueryInfo types.List `tfsdk:"query_info" tf:"object"` } func (newState *ModelDataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelDataPlaneInfo_SdkV2) { @@ -3524,6 +3670,12 @@ func (newState *ModelDataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ModelDataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelDataPlaneInfo_SdkV2) { } +func (c ModelDataPlaneInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + oauth2_tf.DataPlaneInfo_SdkV2{}.ToSchema(cs, append(path, "query_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelDataPlaneInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3588,55 +3740,55 @@ func (o *ModelDataPlaneInfo_SdkV2) SetQueryInfo(ctx context.Context, v oauth2_tf type OpenAiConfig_SdkV2 struct { // This field is only required for Azure AD OpenAI and is the Microsoft // Entra Client ID. - MicrosoftEntraClientId types.String `tfsdk:"microsoft_entra_client_id" tf:"optional"` + MicrosoftEntraClientId types.String `tfsdk:"microsoft_entra_client_id" tf:""` // The Databricks secret key reference for a client secret used for // Microsoft Entra ID authentication. If you prefer to paste your client // secret directly, see `microsoft_entra_client_secret_plaintext`. You must // provide an API key using one of the following fields: // `microsoft_entra_client_secret` or // `microsoft_entra_client_secret_plaintext`. - MicrosoftEntraClientSecret types.String `tfsdk:"microsoft_entra_client_secret" tf:"optional"` + MicrosoftEntraClientSecret types.String `tfsdk:"microsoft_entra_client_secret" tf:""` // The client secret used for Microsoft Entra ID authentication provided as // a plaintext string. If you prefer to reference your key using Databricks // Secrets, see `microsoft_entra_client_secret`. You must provide an API key // using one of the following fields: `microsoft_entra_client_secret` or // `microsoft_entra_client_secret_plaintext`. - MicrosoftEntraClientSecretPlaintext types.String `tfsdk:"microsoft_entra_client_secret_plaintext" tf:"optional"` + MicrosoftEntraClientSecretPlaintext types.String `tfsdk:"microsoft_entra_client_secret_plaintext" tf:""` // This field is only required for Azure AD OpenAI and is the Microsoft // Entra Tenant ID. - MicrosoftEntraTenantId types.String `tfsdk:"microsoft_entra_tenant_id" tf:"optional"` + MicrosoftEntraTenantId types.String `tfsdk:"microsoft_entra_tenant_id" tf:""` // This is a field to provide a customized base URl for the OpenAI API. For // Azure OpenAI, this field is required, and is the base URL for the Azure // OpenAI API service provided by Azure. For other OpenAI API types, this // field is optional, and if left unspecified, the standard OpenAI base URL // is used. - OpenaiApiBase types.String `tfsdk:"openai_api_base" tf:"optional"` + OpenaiApiBase types.String `tfsdk:"openai_api_base" tf:""` // The Databricks secret key reference for an OpenAI API key using the // OpenAI or Azure service. If you prefer to paste your API key directly, // see `openai_api_key_plaintext`. You must provide an API key using one of // the following fields: `openai_api_key` or `openai_api_key_plaintext`. - OpenaiApiKey types.String `tfsdk:"openai_api_key" tf:"optional"` + OpenaiApiKey types.String `tfsdk:"openai_api_key" tf:""` // The OpenAI API key using the OpenAI or Azure service provided as a // plaintext string. If you prefer to reference your key using Databricks // Secrets, see `openai_api_key`. You must provide an API key using one of // the following fields: `openai_api_key` or `openai_api_key_plaintext`. - OpenaiApiKeyPlaintext types.String `tfsdk:"openai_api_key_plaintext" tf:"optional"` + OpenaiApiKeyPlaintext types.String `tfsdk:"openai_api_key_plaintext" tf:""` // This is an optional field to specify the type of OpenAI API to use. For // Azure OpenAI, this field is required, and adjust this parameter to // represent the preferred security access validation protocol. For access // token validation, use azure. For authentication using Azure Active // Directory (Azure AD) use, azuread. - OpenaiApiType types.String `tfsdk:"openai_api_type" tf:"optional"` + OpenaiApiType types.String `tfsdk:"openai_api_type" tf:""` // This is an optional field to specify the OpenAI API version. For Azure // OpenAI, this field is required, and is the version of the Azure OpenAI // service to utilize, specified by a date. - OpenaiApiVersion types.String `tfsdk:"openai_api_version" tf:"optional"` + OpenaiApiVersion types.String `tfsdk:"openai_api_version" tf:""` // This field is only required for Azure OpenAI and is the name of the // deployment resource for the Azure OpenAI service. - OpenaiDeploymentName types.String `tfsdk:"openai_deployment_name" tf:"optional"` + OpenaiDeploymentName types.String `tfsdk:"openai_deployment_name" tf:""` // This is an optional field to specify the organization in OpenAI or Azure // OpenAI. - OpenaiOrganization types.String `tfsdk:"openai_organization" tf:"optional"` + OpenaiOrganization types.String `tfsdk:"openai_organization" tf:""` } func (newState *OpenAiConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OpenAiConfig_SdkV2) { @@ -3645,6 +3797,11 @@ func (newState *OpenAiConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *OpenAiConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState OpenAiConfig_SdkV2) { } +func (c OpenAiConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OpenAiConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3701,12 +3858,12 @@ type PaLmConfig_SdkV2 struct { // paste your API key directly, see `palm_api_key_plaintext`. You must // provide an API key using one of the following fields: `palm_api_key` or // `palm_api_key_plaintext`. - PalmApiKey types.String `tfsdk:"palm_api_key" tf:"optional"` + PalmApiKey types.String `tfsdk:"palm_api_key" tf:""` // The PaLM API key provided as a plaintext string. If you prefer to // reference your key using Databricks Secrets, see `palm_api_key`. You must // provide an API key using one of the following fields: `palm_api_key` or // `palm_api_key_plaintext`. - PalmApiKeyPlaintext types.String `tfsdk:"palm_api_key_plaintext" tf:"optional"` + PalmApiKeyPlaintext types.String `tfsdk:"palm_api_key_plaintext" tf:""` } func (newState *PaLmConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PaLmConfig_SdkV2) { @@ -3715,6 +3872,11 @@ func (newState *PaLmConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan P func (newState *PaLmConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState PaLmConfig_SdkV2) { } +func (c PaLmConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PaLmConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3750,9 +3912,9 @@ func (o PaLmConfig_SdkV2) Type(ctx context.Context) attr.Type { type PatchServingEndpointTags_SdkV2 struct { // List of endpoint tags to add - AddTags types.List `tfsdk:"add_tags" tf:"optional"` + AddTags types.List `tfsdk:"add_tags" tf:""` // List of tag keys to delete - DeleteTags types.List `tfsdk:"delete_tags" tf:"optional"` + DeleteTags types.List `tfsdk:"delete_tags" tf:""` // The name of the serving endpoint who's tags to patch. This field is // required. Name types.String `tfsdk:"-"` @@ -3764,6 +3926,13 @@ func (newState *PatchServingEndpointTags_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *PatchServingEndpointTags_SdkV2) SyncEffectiveFieldsDuringRead(existingState PatchServingEndpointTags_SdkV2) { } +func (c PatchServingEndpointTags_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointTag_SdkV2{}.ToSchema(cs, append(path, "add_tags")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchServingEndpointTags. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3860,11 +4029,11 @@ func (o *PatchServingEndpointTags_SdkV2) SetDeleteTags(ctx context.Context, v [] type PayloadTable_SdkV2 struct { // The name of the payload table. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The status of the payload table. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The status message of the payload table. - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` } func (newState *PayloadTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PayloadTable_SdkV2) { @@ -3873,6 +4042,11 @@ func (newState *PayloadTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PayloadTable_SdkV2) SyncEffectiveFieldsDuringRead(existingState PayloadTable_SdkV2) { } +func (c PayloadTable_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PayloadTable. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3912,26 +4086,20 @@ func (o PayloadTable_SdkV2) Type(ctx context.Context) attr.Type { type PutAiGatewayRequest_SdkV2 struct { // Configuration for AI Guardrails to prevent unwanted data and unsafe data // in requests and responses. - Guardrails types.List `tfsdk:"guardrails" tf:"optional,object"` + Guardrails types.List `tfsdk:"guardrails" tf:"object"` // Configuration for payload logging using inference tables. Use these // tables to monitor and audit data being sent to and received from model // APIs and to improve model quality. - InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"optional,object"` + InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"object"` // The name of the serving endpoint whose AI Gateway is being updated. This // field is required. Name types.String `tfsdk:"-"` // Configuration for rate limits which can be set to limit endpoint traffic. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + RateLimits types.List `tfsdk:"rate_limits" tf:""` // Configuration to enable usage tracking using system tables. These tables // allow you to monitor operational usage on endpoints and their associated // costs. - UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"optional,object"` -} - -func (newState *PutAiGatewayRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayRequest_SdkV2) { -} - -func (newState *PutAiGatewayRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAiGatewayRequest_SdkV2) { + UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAiGatewayRequest. @@ -4093,23 +4261,17 @@ func (o *PutAiGatewayRequest_SdkV2) SetUsageTrackingConfig(ctx context.Context, type PutAiGatewayResponse_SdkV2 struct { // Configuration for AI Guardrails to prevent unwanted data and unsafe data // in requests and responses. - Guardrails types.List `tfsdk:"guardrails" tf:"optional,object"` + Guardrails types.List `tfsdk:"guardrails" tf:"object"` // Configuration for payload logging using inference tables. Use these // tables to monitor and audit data being sent to and received from model // APIs and to improve model quality . - InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"optional,object"` + InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"object"` // Configuration for rate limits which can be set to limit endpoint traffic. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + RateLimits types.List `tfsdk:"rate_limits" tf:""` // Configuration to enable usage tracking using system tables. These tables // allow you to monitor operational usage on endpoints and their associated // costs. - UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"optional,object"` -} - -func (newState *PutAiGatewayResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayResponse_SdkV2) { -} - -func (newState *PutAiGatewayResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAiGatewayResponse_SdkV2) { + UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAiGatewayResponse. @@ -4272,13 +4434,7 @@ type PutRequest_SdkV2 struct { // This field is required. Name types.String `tfsdk:"-"` // The list of endpoint rate limits. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` -} - -func (newState *PutRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutRequest_SdkV2) { -} - -func (newState *PutRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutRequest_SdkV2) { + RateLimits types.List `tfsdk:"rate_limits" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutRequest. @@ -4346,13 +4502,7 @@ func (o *PutRequest_SdkV2) SetRateLimits(ctx context.Context, v []RateLimit_SdkV type PutResponse_SdkV2 struct { // The list of endpoint rate limits. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` -} - -func (newState *PutResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutResponse_SdkV2) { -} - -func (newState *PutResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutResponse_SdkV2) { + RateLimits types.List `tfsdk:"rate_limits" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutResponse. @@ -4418,54 +4568,54 @@ func (o *PutResponse_SdkV2) SetRateLimits(ctx context.Context, v []RateLimit_Sdk type QueryEndpointInput_SdkV2 struct { // Pandas Dataframe input in the records orientation. - DataframeRecords types.List `tfsdk:"dataframe_records" tf:"optional"` + DataframeRecords types.List `tfsdk:"dataframe_records" tf:""` // Pandas Dataframe input in the split orientation. - DataframeSplit types.List `tfsdk:"dataframe_split" tf:"optional,object"` + DataframeSplit types.List `tfsdk:"dataframe_split" tf:"object"` // The extra parameters field used ONLY for __completions, chat,__ and // __embeddings external & foundation model__ serving endpoints. This is a // map of strings and should only be used with other external/foundation // model query fields. - ExtraParams types.Map `tfsdk:"extra_params" tf:"optional"` + ExtraParams types.Map `tfsdk:"extra_params" tf:""` // The input string (or array of strings) field used ONLY for __embeddings // external & foundation model__ serving endpoints and is the only field // (along with extra_params if needed) used by embeddings queries. - Input types.Object `tfsdk:"input" tf:"optional"` + Input types.Object `tfsdk:"input" tf:""` // Tensor-based input in columnar format. - Inputs types.Object `tfsdk:"inputs" tf:"optional"` + Inputs types.Object `tfsdk:"inputs" tf:""` // Tensor-based input in row format. - Instances types.List `tfsdk:"instances" tf:"optional"` + Instances types.List `tfsdk:"instances" tf:""` // The max tokens field used ONLY for __completions__ and __chat external & // foundation model__ serving endpoints. This is an integer and should only // be used with other chat/completions query fields. - MaxTokens types.Int64 `tfsdk:"max_tokens" tf:"optional"` + MaxTokens types.Int64 `tfsdk:"max_tokens" tf:""` // The messages field used ONLY for __chat external & foundation model__ // serving endpoints. This is a map of strings and should only be used with // other chat query fields. - Messages types.List `tfsdk:"messages" tf:"optional"` + Messages types.List `tfsdk:"messages" tf:""` // The n (number of candidates) field used ONLY for __completions__ and // __chat external & foundation model__ serving endpoints. This is an // integer between 1 and 5 with a default of 1 and should only be used with // other chat/completions query fields. - N types.Int64 `tfsdk:"n" tf:"optional"` + N types.Int64 `tfsdk:"n" tf:""` // The name of the serving endpoint. This field is required. Name types.String `tfsdk:"-"` // The prompt string (or array of strings) field used ONLY for __completions // external & foundation model__ serving endpoints and should only be used // with other completions query fields. - Prompt types.Object `tfsdk:"prompt" tf:"optional"` + Prompt types.Object `tfsdk:"prompt" tf:""` // The stop sequences field used ONLY for __completions__ and __chat // external & foundation model__ serving endpoints. This is a list of // strings and should only be used with other chat/completions query fields. - Stop types.List `tfsdk:"stop" tf:"optional"` + Stop types.List `tfsdk:"stop" tf:""` // The stream field used ONLY for __completions__ and __chat external & // foundation model__ serving endpoints. This is a boolean defaulting to // false and should only be used with other chat/completions query fields. - Stream types.Bool `tfsdk:"stream" tf:"optional"` + Stream types.Bool `tfsdk:"stream" tf:""` // The temperature field used ONLY for __completions__ and __chat external & // foundation model__ serving endpoints. This is a float between 0.0 and 2.0 // with a default of 1.0 and should only be used with other chat/completions // query fields. - Temperature types.Float64 `tfsdk:"temperature" tf:"optional"` + Temperature types.Float64 `tfsdk:"temperature" tf:""` } func (newState *QueryEndpointInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEndpointInput_SdkV2) { @@ -4474,6 +4624,14 @@ func (newState *QueryEndpointInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *QueryEndpointInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryEndpointInput_SdkV2) { } +func (c QueryEndpointInput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DataframeSplitInput_SdkV2{}.ToSchema(cs, append(path, "dataframe_split")...) + ChatMessage_SdkV2{}.ToSchema(cs, append(path, "messages")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryEndpointInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4709,32 +4867,32 @@ func (o *QueryEndpointInput_SdkV2) SetStop(ctx context.Context, v []types.String type QueryEndpointResponse_SdkV2 struct { // The list of choices returned by the __chat or completions // external/foundation model__ serving endpoint. - Choices types.List `tfsdk:"choices" tf:"optional"` + Choices types.List `tfsdk:"choices" tf:""` // The timestamp in seconds when the query was created in Unix time returned // by a __completions or chat external/foundation model__ serving endpoint. - Created types.Int64 `tfsdk:"created" tf:"optional"` + Created types.Int64 `tfsdk:"created" tf:""` // The list of the embeddings returned by the __embeddings // external/foundation model__ serving endpoint. - Data types.List `tfsdk:"data" tf:"optional"` + Data types.List `tfsdk:"data" tf:""` // The ID of the query that may be returned by a __completions or chat // external/foundation model__ serving endpoint. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The name of the __external/foundation model__ used for querying. This is // the name of the model that was specified in the endpoint config. - Model types.String `tfsdk:"model" tf:"optional"` + Model types.String `tfsdk:"model" tf:""` // The type of object returned by the __external/foundation model__ serving // endpoint, one of [text_completion, chat.completion, list (of // embeddings)]. - Object types.String `tfsdk:"object" tf:"optional"` + Object types.String `tfsdk:"object" tf:""` // The predictions returned by the serving endpoint. - Predictions types.List `tfsdk:"predictions" tf:"optional"` + Predictions types.List `tfsdk:"predictions" tf:""` // The name of the served model that served the request. This is useful when // there are multiple models behind the same endpoint with traffic split. ServedModelName types.String `tfsdk:"-"` // The usage object that may be returned by the __external/foundation // model__ serving endpoint. This contains information about the number of // tokens used in the prompt and response. - Usage types.List `tfsdk:"usage" tf:"optional,object"` + Usage types.List `tfsdk:"usage" tf:"object"` } func (newState *QueryEndpointResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEndpointResponse_SdkV2) { @@ -4743,6 +4901,14 @@ func (newState *QueryEndpointResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *QueryEndpointResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryEndpointResponse_SdkV2) { } +func (c QueryEndpointResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + V1ResponseChoiceElement_SdkV2{}.ToSchema(cs, append(path, "choices")...) + EmbeddingsV1ResponseEmbeddingElement_SdkV2{}.ToSchema(cs, append(path, "data")...) + ExternalModelUsageElement_SdkV2{}.ToSchema(cs, append(path, "usage")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryEndpointResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4914,7 +5080,7 @@ type RateLimit_SdkV2 struct { // Key field for a serving endpoint rate limit. Currently, only 'user' and // 'endpoint' are supported, with 'endpoint' being the default if not // specified. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Renewal period field for a serving endpoint rate limit. Currently, only // 'minute' is supported. RenewalPeriod types.String `tfsdk:"renewal_period" tf:""` @@ -4926,6 +5092,13 @@ func (newState *RateLimit_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ra func (newState *RateLimit_SdkV2) SyncEffectiveFieldsDuringRead(existingState RateLimit_SdkV2) { } +func (c RateLimit_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "calls")...) + cs.SetRequired(append(path, "renewal_period")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RateLimit. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4975,6 +5148,13 @@ func (newState *Route_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Route_ func (newState *Route_SdkV2) SyncEffectiveFieldsDuringRead(existingState Route_SdkV2) { } +func (c Route_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "served_model_name")...) + cs.SetRequired(append(path, "traffic_percentage")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Route. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5014,17 +5194,17 @@ type ServedEntityInput_SdkV2 struct { // function of type FEATURE_SPEC in the UC. If it is a UC object, the full // name of the object should be given in the form of // __catalog_name__.__schema_name__.__model_name__. - EntityName types.String `tfsdk:"entity_name" tf:"optional"` + EntityName types.String `tfsdk:"entity_name" tf:""` // The version of the model in Databricks Model Registry to be served or // empty if the entity is a FEATURE_SPEC. - EntityVersion types.String `tfsdk:"entity_version" tf:"optional"` + EntityVersion types.String `tfsdk:"entity_version" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs used for serving this entity. Note: this is an // experimental feature and subject to change. Example entity environment // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": // "{{secrets/my_scope2/my_key2}}"}` - EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:""` // The external model to be served. NOTE: Only one of external_model and // (entity_name, entity_version, workload_size, workload_type, and // scale_to_zero_enabled) can be specified with the latter set being used @@ -5033,24 +5213,24 @@ type ServedEntityInput_SdkV2 struct { // endpoint without external_model. If the endpoint is created without // external_model, users cannot update it to add external_model later. The // task type of all external models within an endpoint must be the same. - ExternalModel types.List `tfsdk:"external_model" tf:"optional,object"` + ExternalModel types.List `tfsdk:"external_model" tf:"object"` // ARN of the instance profile that the served entity uses to access AWS // resources. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The maximum tokens per second that the endpoint can scale up to. - MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:"optional"` + MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:""` // The minimum tokens per second that the endpoint can scale down to. - MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:"optional"` + MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:""` // The name of a served entity. It must be unique across an endpoint. A // served entity name can consist of alphanumeric characters, dashes, and // underscores. If not specified for an external model, this field defaults // to external_model.name, with '.' and ':' replaced with '-', and if not // specified for other entities, it defaults to // -. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether the compute resources for the served entity should scale down to // zero. - ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:""` // The workload size of the served entity. The workload size corresponds to // a range of provisioned concurrency that the compute autoscales between. A // single unit of provisioned concurrency can process one request at a time. @@ -5058,7 +5238,7 @@ type ServedEntityInput_SdkV2 struct { // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 // provisioned concurrency). If scale-to-zero is enabled, the lower bound of // the provisioned concurrency for each workload size is 0. - WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + WorkloadSize types.String `tfsdk:"workload_size" tf:""` // The workload type of the served entity. The workload type selects which // type of compute to use in the endpoint. The default value for this // parameter is "CPU". For deep learning workloads, GPU acceleration is @@ -5066,7 +5246,7 @@ type ServedEntityInput_SdkV2 struct { // available [GPU types]. // // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types - WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` + WorkloadType types.String `tfsdk:"workload_type" tf:""` } func (newState *ServedEntityInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedEntityInput_SdkV2) { @@ -5075,6 +5255,12 @@ func (newState *ServedEntityInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ServedEntityInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedEntityInput_SdkV2) { } +func (c ServedEntityInput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalModel_SdkV2{}.ToSchema(cs, append(path, "external_model")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedEntityInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5187,49 +5373,49 @@ func (o *ServedEntityInput_SdkV2) SetExternalModel(ctx context.Context, v Extern type ServedEntityOutput_SdkV2 struct { // The creation timestamp of the served entity in Unix time. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // The email of the user who created the served entity. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // The name of the entity served. The entity may be a model in the // Databricks Model Registry, a model in the Unity Catalog (UC), or a // function of type FEATURE_SPEC in the UC. If it is a UC object, the full // name of the object is given in the form of // __catalog_name__.__schema_name__.__model_name__. - EntityName types.String `tfsdk:"entity_name" tf:"optional"` + EntityName types.String `tfsdk:"entity_name" tf:""` // The version of the served entity in Databricks Model Registry or empty if // the entity is a FEATURE_SPEC. - EntityVersion types.String `tfsdk:"entity_version" tf:"optional"` + EntityVersion types.String `tfsdk:"entity_version" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs used for serving this entity. Note: this is an // experimental feature and subject to change. Example entity environment // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": // "{{secrets/my_scope2/my_key2}}"}` - EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:""` // The external model that is served. NOTE: Only one of external_model, // foundation_model, and (entity_name, entity_version, workload_size, // workload_type, and scale_to_zero_enabled) is returned based on the // endpoint type. - ExternalModel types.List `tfsdk:"external_model" tf:"optional,object"` + ExternalModel types.List `tfsdk:"external_model" tf:"object"` // The foundation model that is served. NOTE: Only one of foundation_model, // external_model, and (entity_name, entity_version, workload_size, // workload_type, and scale_to_zero_enabled) is returned based on the // endpoint type. - FoundationModel types.List `tfsdk:"foundation_model" tf:"optional,object"` + FoundationModel types.List `tfsdk:"foundation_model" tf:"object"` // ARN of the instance profile that the served entity uses to access AWS // resources. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The maximum tokens per second that the endpoint can scale up to. - MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:"optional"` + MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:""` // The minimum tokens per second that the endpoint can scale down to. - MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:"optional"` + MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:""` // The name of the served entity. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether the compute resources for the served entity should scale down to // zero. - ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:""` // Information corresponding to the state of the served entity. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.List `tfsdk:"state" tf:"object"` // The workload size of the served entity. The workload size corresponds to // a range of provisioned concurrency that the compute autoscales between. A // single unit of provisioned concurrency can process one request at a time. @@ -5237,7 +5423,7 @@ type ServedEntityOutput_SdkV2 struct { // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 // provisioned concurrency). If scale-to-zero is enabled, the lower bound of // the provisioned concurrency for each workload size will be 0. - WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + WorkloadSize types.String `tfsdk:"workload_size" tf:""` // The workload type of the served entity. The workload type selects which // type of compute to use in the endpoint. The default value for this // parameter is "CPU". For deep learning workloads, GPU acceleration is @@ -5245,7 +5431,7 @@ type ServedEntityOutput_SdkV2 struct { // available [GPU types]. // // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types - WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` + WorkloadType types.String `tfsdk:"workload_type" tf:""` } func (newState *ServedEntityOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedEntityOutput_SdkV2) { @@ -5254,6 +5440,14 @@ func (newState *ServedEntityOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ServedEntityOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedEntityOutput_SdkV2) { } +func (c ServedEntityOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalModel_SdkV2{}.ToSchema(cs, append(path, "external_model")...) + FoundationModel_SdkV2{}.ToSchema(cs, append(path, "foundation_model")...) + ServedModelState_SdkV2{}.ToSchema(cs, append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedEntityOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5436,20 +5630,20 @@ type ServedEntitySpec_SdkV2 struct { // function of type FEATURE_SPEC in the UC. If it is a UC object, the full // name of the object is given in the form of // __catalog_name__.__schema_name__.__model_name__. - EntityName types.String `tfsdk:"entity_name" tf:"optional"` + EntityName types.String `tfsdk:"entity_name" tf:""` // The version of the served entity in Databricks Model Registry or empty if // the entity is a FEATURE_SPEC. - EntityVersion types.String `tfsdk:"entity_version" tf:"optional"` + EntityVersion types.String `tfsdk:"entity_version" tf:""` // The external model that is served. NOTE: Only one of external_model, // foundation_model, and (entity_name, entity_version) is returned based on // the endpoint type. - ExternalModel types.List `tfsdk:"external_model" tf:"optional,object"` + ExternalModel types.List `tfsdk:"external_model" tf:"object"` // The foundation model that is served. NOTE: Only one of foundation_model, // external_model, and (entity_name, entity_version) is returned based on // the endpoint type. - FoundationModel types.List `tfsdk:"foundation_model" tf:"optional,object"` + FoundationModel types.List `tfsdk:"foundation_model" tf:"object"` // The name of the served entity. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ServedEntitySpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedEntitySpec_SdkV2) { @@ -5458,6 +5652,13 @@ func (newState *ServedEntitySpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ServedEntitySpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedEntitySpec_SdkV2) { } +func (c ServedEntitySpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalModel_SdkV2{}.ToSchema(cs, append(path, "external_model")...) + FoundationModel_SdkV2{}.ToSchema(cs, append(path, "foundation_model")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedEntitySpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5563,14 +5764,14 @@ type ServedModelInput_SdkV2 struct { // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": // "{{secrets/my_scope2/my_key2}}"}` - EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:""` // ARN of the instance profile that the served model will use to access AWS // resources. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The maximum tokens per second that the endpoint can scale up to. - MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:"optional"` + MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:""` // The minimum tokens per second that the endpoint can scale down to. - MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:"optional"` + MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:""` // The name of the model in Databricks Model Registry to be served or if the // model resides in Unity Catalog, the full name of model, in the form of // __catalog_name__.__schema_name__.__model_name__. @@ -5582,7 +5783,7 @@ type ServedModelInput_SdkV2 struct { // specified, this field will default to -. A // served model name can consist of alphanumeric characters, dashes, and // underscores. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether the compute resources for the served model should scale down to // zero. ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:""` @@ -5593,7 +5794,7 @@ type ServedModelInput_SdkV2 struct { // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 // provisioned concurrency). If scale-to-zero is enabled, the lower bound of // the provisioned concurrency for each workload size will be 0. - WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + WorkloadSize types.String `tfsdk:"workload_size" tf:""` // The workload type of the served model. The workload type selects which // type of compute to use in the endpoint. The default value for this // parameter is "CPU". For deep learning workloads, GPU acceleration is @@ -5601,7 +5802,7 @@ type ServedModelInput_SdkV2 struct { // available [GPU types]. // // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types - WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` + WorkloadType types.String `tfsdk:"workload_type" tf:""` } func (newState *ServedModelInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelInput_SdkV2) { @@ -5610,6 +5811,14 @@ func (newState *ServedModelInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ServedModelInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedModelInput_SdkV2) { } +func (c ServedModelInput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "model_name")...) + cs.SetRequired(append(path, "model_version")...) + cs.SetRequired(append(path, "scale_to_zero_enabled")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5691,32 +5900,32 @@ func (o *ServedModelInput_SdkV2) SetEnvironmentVars(ctx context.Context, v map[s type ServedModelOutput_SdkV2 struct { // The creation timestamp of the served model in Unix time. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // The email of the user who created the served model. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs used for serving this model. Note: this is an // experimental feature and subject to change. Example model environment // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": // "{{secrets/my_scope2/my_key2}}"}` - EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:""` // ARN of the instance profile that the served model will use to access AWS // resources. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The name of the model in Databricks Model Registry or the full name of // the model in Unity Catalog. - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // The version of the model in Databricks Model Registry or Unity Catalog to // be served. - ModelVersion types.String `tfsdk:"model_version" tf:"optional"` + ModelVersion types.String `tfsdk:"model_version" tf:""` // The name of the served model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether the compute resources for the Served Model should scale down to // zero. - ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:""` // Information corresponding to the state of the Served Model. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.List `tfsdk:"state" tf:"object"` // The workload size of the served model. The workload size corresponds to a // range of provisioned concurrency that the compute will autoscale between. // A single unit of provisioned concurrency can process one request at a @@ -5724,7 +5933,7 @@ type ServedModelOutput_SdkV2 struct { // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 // provisioned concurrency). If scale-to-zero is enabled, the lower bound of // the provisioned concurrency for each workload size will be 0. - WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + WorkloadSize types.String `tfsdk:"workload_size" tf:""` // The workload type of the served model. The workload type selects which // type of compute to use in the endpoint. The default value for this // parameter is "CPU". For deep learning workloads, GPU acceleration is @@ -5732,7 +5941,7 @@ type ServedModelOutput_SdkV2 struct { // available [GPU types]. // // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types - WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` + WorkloadType types.String `tfsdk:"workload_type" tf:""` } func (newState *ServedModelOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelOutput_SdkV2) { @@ -5741,6 +5950,12 @@ func (newState *ServedModelOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ServedModelOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedModelOutput_SdkV2) { } +func (c ServedModelOutput_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServedModelState_SdkV2{}.ToSchema(cs, append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5854,12 +6069,12 @@ func (o *ServedModelOutput_SdkV2) SetState(ctx context.Context, v ServedModelSta type ServedModelSpec_SdkV2 struct { // The name of the model in Databricks Model Registry or the full name of // the model in Unity Catalog. - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // The version of the model in Databricks Model Registry or Unity Catalog to // be served. - ModelVersion types.String `tfsdk:"model_version" tf:"optional"` + ModelVersion types.String `tfsdk:"model_version" tf:""` // The name of the served model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ServedModelSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelSpec_SdkV2) { @@ -5868,6 +6083,11 @@ func (newState *ServedModelSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ServedModelSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedModelSpec_SdkV2) { } +func (c ServedModelSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5916,9 +6136,9 @@ type ServedModelState_SdkV2 struct { // etc.) DEPLOYMENT_ABORTED indicates that the deployment was terminated // likely due to a failure in bringing up another served entity under the // same endpoint and config version. - Deployment types.String `tfsdk:"deployment" tf:"optional"` + Deployment types.String `tfsdk:"deployment" tf:""` // More information about the state of the served entity, if available. - DeploymentStateMessage types.String `tfsdk:"deployment_state_message" tf:"optional"` + DeploymentStateMessage types.String `tfsdk:"deployment_state_message" tf:""` } func (newState *ServedModelState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelState_SdkV2) { @@ -5927,6 +6147,11 @@ func (newState *ServedModelState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ServedModelState_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedModelState_SdkV2) { } +func (c ServedModelState_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5972,6 +6197,12 @@ func (newState *ServerLogsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ServerLogsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServerLogsResponse_SdkV2) { } +func (c ServerLogsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "logs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServerLogsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6006,26 +6237,26 @@ func (o ServerLogsResponse_SdkV2) Type(ctx context.Context) attr.Type { type ServingEndpoint_SdkV2 struct { // The AI Gateway configuration for the serving endpoint. NOTE: Only // external model endpoints are currently supported. - AiGateway types.List `tfsdk:"ai_gateway" tf:"optional,object"` + AiGateway types.List `tfsdk:"ai_gateway" tf:"object"` // The config that is currently being served by the endpoint. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.List `tfsdk:"config" tf:"object"` // The timestamp when the endpoint was created in Unix time. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // The email of the user who created the serving endpoint. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // System-generated ID of the endpoint. This is used to refer to the // endpoint in the Permissions API - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The timestamp when the endpoint was last updated by a user in Unix time. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // The name of the serving endpoint. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Information corresponding to the state of the serving endpoint. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.List `tfsdk:"state" tf:"object"` // Tags attached to the serving endpoint. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The task type of the serving endpoint. - Task types.String `tfsdk:"task" tf:"optional"` + Task types.String `tfsdk:"task" tf:""` } func (newState *ServingEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpoint_SdkV2) { @@ -6034,6 +6265,15 @@ func (newState *ServingEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ServingEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpoint_SdkV2) { } +func (c ServingEndpoint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayConfig_SdkV2{}.ToSchema(cs, append(path, "ai_gateway")...) + EndpointCoreConfigSummary_SdkV2{}.ToSchema(cs, append(path, "config")...) + EndpointState_SdkV2{}.ToSchema(cs, append(path, "state")...) + EndpointTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6202,13 +6442,13 @@ func (o *ServingEndpoint_SdkV2) SetTags(ctx context.Context, v []EndpointTag_Sdk type ServingEndpointAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ServingEndpointAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointAccessControlRequest_SdkV2) { @@ -6217,6 +6457,11 @@ func (newState *ServingEndpointAccessControlRequest_SdkV2) SyncEffectiveFieldsDu func (newState *ServingEndpointAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointAccessControlRequest_SdkV2) { } +func (c ServingEndpointAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6256,15 +6501,15 @@ func (o ServingEndpointAccessControlRequest_SdkV2) Type(ctx context.Context) att type ServingEndpointAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ServingEndpointAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointAccessControlResponse_SdkV2) { @@ -6273,6 +6518,12 @@ func (newState *ServingEndpointAccessControlResponse_SdkV2) SyncEffectiveFieldsD func (newState *ServingEndpointAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointAccessControlResponse_SdkV2) { } +func (c ServingEndpointAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpointPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6345,37 +6596,37 @@ func (o *ServingEndpointAccessControlResponse_SdkV2) SetAllPermissions(ctx conte type ServingEndpointDetailed_SdkV2 struct { // The AI Gateway configuration for the serving endpoint. NOTE: Only // external model endpoints are currently supported. - AiGateway types.List `tfsdk:"ai_gateway" tf:"optional,object"` + AiGateway types.List `tfsdk:"ai_gateway" tf:"object"` // The config that is currently being served by the endpoint. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.List `tfsdk:"config" tf:"object"` // The timestamp when the endpoint was created in Unix time. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // The email of the user who created the serving endpoint. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // Information required to query DataPlane APIs. - DataPlaneInfo types.List `tfsdk:"data_plane_info" tf:"optional,object"` + DataPlaneInfo types.List `tfsdk:"data_plane_info" tf:"object"` // Endpoint invocation url if route optimization is enabled for endpoint - EndpointUrl types.String `tfsdk:"endpoint_url" tf:"optional"` + EndpointUrl types.String `tfsdk:"endpoint_url" tf:""` // System-generated ID of the endpoint. This is used to refer to the // endpoint in the Permissions API - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The timestamp when the endpoint was last updated by a user in Unix time. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // The name of the serving endpoint. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The config that the endpoint is attempting to update to. - PendingConfig types.List `tfsdk:"pending_config" tf:"optional,object"` + PendingConfig types.List `tfsdk:"pending_config" tf:"object"` // The permission level of the principal making the request. - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // Boolean representing if route optimization has been enabled for the // endpoint - RouteOptimized types.Bool `tfsdk:"route_optimized" tf:"optional"` + RouteOptimized types.Bool `tfsdk:"route_optimized" tf:""` // Information corresponding to the state of the serving endpoint. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.List `tfsdk:"state" tf:"object"` // Tags attached to the serving endpoint. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The task type of the serving endpoint. - Task types.String `tfsdk:"task" tf:"optional"` + Task types.String `tfsdk:"task" tf:""` } func (newState *ServingEndpointDetailed_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointDetailed_SdkV2) { @@ -6384,6 +6635,17 @@ func (newState *ServingEndpointDetailed_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ServingEndpointDetailed_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointDetailed_SdkV2) { } +func (c ServingEndpointDetailed_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayConfig_SdkV2{}.ToSchema(cs, append(path, "ai_gateway")...) + EndpointCoreConfigOutput_SdkV2{}.ToSchema(cs, append(path, "config")...) + ModelDataPlaneInfo_SdkV2{}.ToSchema(cs, append(path, "data_plane_info")...) + EndpointPendingConfig_SdkV2{}.ToSchema(cs, append(path, "pending_config")...) + EndpointState_SdkV2{}.ToSchema(cs, append(path, "state")...) + EndpointTag_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointDetailed. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6619,11 +6881,11 @@ func (o *ServingEndpointDetailed_SdkV2) SetTags(ctx context.Context, v []Endpoin } type ServingEndpointPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ServingEndpointPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermission_SdkV2) { @@ -6632,6 +6894,11 @@ func (newState *ServingEndpointPermission_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ServingEndpointPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermission_SdkV2) { } +func (c ServingEndpointPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6698,11 +6965,11 @@ func (o *ServingEndpointPermission_SdkV2) SetInheritedFromObject(ctx context.Con } type ServingEndpointPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ServingEndpointPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermissions_SdkV2) { @@ -6711,6 +6978,12 @@ func (newState *ServingEndpointPermissions_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ServingEndpointPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissions_SdkV2) { } +func (c ServingEndpointPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpointAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6777,9 +7050,9 @@ func (o *ServingEndpointPermissions_SdkV2) SetAccessControlList(ctx context.Cont } type ServingEndpointPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ServingEndpointPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermissionsDescription_SdkV2) { @@ -6788,6 +7061,11 @@ func (newState *ServingEndpointPermissionsDescription_SdkV2) SyncEffectiveFields func (newState *ServingEndpointPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissionsDescription_SdkV2) { } +func (c ServingEndpointPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6822,7 +7100,7 @@ func (o ServingEndpointPermissionsDescription_SdkV2) Type(ctx context.Context) a } type ServingEndpointPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The serving endpoint for which to get or manage permissions. ServingEndpointId types.String `tfsdk:"-"` } @@ -6833,6 +7111,13 @@ func (newState *ServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuri func (newState *ServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissionsRequest_SdkV2) { } +func (c ServingEndpointPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpointAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "serving_endpoint_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6898,7 +7183,7 @@ func (o *ServingEndpointPermissionsRequest_SdkV2) SetAccessControlList(ctx conte type TrafficConfig_SdkV2 struct { // The list of routes that define traffic to each served entity. - Routes types.List `tfsdk:"routes" tf:"optional"` + Routes types.List `tfsdk:"routes" tf:""` } func (newState *TrafficConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrafficConfig_SdkV2) { @@ -6907,6 +7192,12 @@ func (newState *TrafficConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *TrafficConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrafficConfig_SdkV2) { } +func (c TrafficConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Route_SdkV2{}.ToSchema(cs, append(path, "routes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrafficConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6970,15 +7261,15 @@ func (o *TrafficConfig_SdkV2) SetRoutes(ctx context.Context, v []Route_SdkV2) { type V1ResponseChoiceElement_SdkV2 struct { // The finish reason returned by the endpoint. - FinishReason types.String `tfsdk:"finishReason" tf:"optional"` + FinishReason types.String `tfsdk:"finishReason" tf:""` // The index of the choice in the __chat or completions__ response. - Index types.Int64 `tfsdk:"index" tf:"optional"` + Index types.Int64 `tfsdk:"index" tf:""` // The logprobs returned only by the __completions__ endpoint. - Logprobs types.Int64 `tfsdk:"logprobs" tf:"optional"` + Logprobs types.Int64 `tfsdk:"logprobs" tf:""` // The message response from the __chat__ endpoint. - Message types.List `tfsdk:"message" tf:"optional,object"` + Message types.List `tfsdk:"message" tf:"object"` // The text response from the __completions__ endpoint. - Text types.String `tfsdk:"text" tf:"optional"` + Text types.String `tfsdk:"text" tf:""` } func (newState *V1ResponseChoiceElement_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan V1ResponseChoiceElement_SdkV2) { @@ -6987,6 +7278,12 @@ func (newState *V1ResponseChoiceElement_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *V1ResponseChoiceElement_SdkV2) SyncEffectiveFieldsDuringRead(existingState V1ResponseChoiceElement_SdkV2) { } +func (c V1ResponseChoiceElement_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ChatMessage_SdkV2{}.ToSchema(cs, append(path, "message")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in V1ResponseChoiceElement. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/serving_tf/model.go b/internal/service/serving_tf/model.go index f9bf0ddbb..74f660a9d 100755 --- a/internal/service/serving_tf/model.go +++ b/internal/service/serving_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/oauth2_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -27,12 +28,12 @@ type Ai21LabsConfig struct { // prefer to paste your API key directly, see `ai21labs_api_key_plaintext`. // You must provide an API key using one of the following fields: // `ai21labs_api_key` or `ai21labs_api_key_plaintext`. - Ai21labsApiKey types.String `tfsdk:"ai21labs_api_key" tf:"optional"` + Ai21labsApiKey types.String `tfsdk:"ai21labs_api_key" tf:""` // An AI21 Labs API key provided as a plaintext string. If you prefer to // reference your key using Databricks Secrets, see `ai21labs_api_key`. You // must provide an API key using one of the following fields: // `ai21labs_api_key` or `ai21labs_api_key_plaintext`. - Ai21labsApiKeyPlaintext types.String `tfsdk:"ai21labs_api_key_plaintext" tf:"optional"` + Ai21labsApiKeyPlaintext types.String `tfsdk:"ai21labs_api_key_plaintext" tf:""` } func (newState *Ai21LabsConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ai21LabsConfig) { @@ -41,6 +42,11 @@ func (newState *Ai21LabsConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ai2 func (newState *Ai21LabsConfig) SyncEffectiveFieldsDuringRead(existingState Ai21LabsConfig) { } +func (c Ai21LabsConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Ai21LabsConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -77,17 +83,17 @@ func (o Ai21LabsConfig) Type(ctx context.Context) attr.Type { type AiGatewayConfig struct { // Configuration for AI Guardrails to prevent unwanted data and unsafe data // in requests and responses. - Guardrails types.Object `tfsdk:"guardrails" tf:"optional,object"` + Guardrails types.Object `tfsdk:"guardrails" tf:"object"` // Configuration for payload logging using inference tables. Use these // tables to monitor and audit data being sent to and received from model // APIs and to improve model quality. - InferenceTableConfig types.Object `tfsdk:"inference_table_config" tf:"optional,object"` + InferenceTableConfig types.Object `tfsdk:"inference_table_config" tf:"object"` // Configuration for rate limits which can be set to limit endpoint traffic. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + RateLimits types.List `tfsdk:"rate_limits" tf:""` // Configuration to enable usage tracking using system tables. These tables // allow you to monitor operational usage on endpoints and their associated // costs. - UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config" tf:"optional,object"` + UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config" tf:"object"` } func (newState *AiGatewayConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayConfig) { @@ -96,6 +102,15 @@ func (newState *AiGatewayConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ai func (newState *AiGatewayConfig) SyncEffectiveFieldsDuringRead(existingState AiGatewayConfig) { } +func (c AiGatewayConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayGuardrails{}.ToSchema(cs, append(path, "guardrails")...) + AiGatewayInferenceTableConfig{}.ToSchema(cs, append(path, "inference_table_config")...) + AiGatewayRateLimit{}.ToSchema(cs, append(path, "rate_limits")...) + AiGatewayUsageTrackingConfig{}.ToSchema(cs, append(path, "usage_tracking_config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -253,14 +268,14 @@ func (o *AiGatewayConfig) SetUsageTrackingConfig(ctx context.Context, v AiGatewa type AiGatewayGuardrailParameters struct { // List of invalid keywords. AI guardrail uses keyword or string matching to // decide if the keyword exists in the request or response content. - InvalidKeywords types.List `tfsdk:"invalid_keywords" tf:"optional"` + InvalidKeywords types.List `tfsdk:"invalid_keywords" tf:""` // Configuration for guardrail PII filter. - Pii types.Object `tfsdk:"pii" tf:"optional,object"` + Pii types.Object `tfsdk:"pii" tf:"object"` // Indicates whether the safety filter is enabled. - Safety types.Bool `tfsdk:"safety" tf:"optional"` + Safety types.Bool `tfsdk:"safety" tf:""` // The list of allowed topics. Given a chat request, this guardrail flags // the request if its topic is not in the allowed topics. - ValidTopics types.List `tfsdk:"valid_topics" tf:"optional"` + ValidTopics types.List `tfsdk:"valid_topics" tf:""` } func (newState *AiGatewayGuardrailParameters) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayGuardrailParameters) { @@ -269,6 +284,12 @@ func (newState *AiGatewayGuardrailParameters) SyncEffectiveFieldsDuringCreateOrU func (newState *AiGatewayGuardrailParameters) SyncEffectiveFieldsDuringRead(existingState AiGatewayGuardrailParameters) { } +func (c AiGatewayGuardrailParameters) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayGuardrailPiiBehavior{}.ToSchema(cs, append(path, "pii")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayGuardrailParameters. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -410,6 +431,12 @@ func (newState *AiGatewayGuardrailPiiBehavior) SyncEffectiveFieldsDuringCreateOr func (newState *AiGatewayGuardrailPiiBehavior) SyncEffectiveFieldsDuringRead(existingState AiGatewayGuardrailPiiBehavior) { } +func (c AiGatewayGuardrailPiiBehavior) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "behavior")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayGuardrailPiiBehavior. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -443,9 +470,9 @@ func (o AiGatewayGuardrailPiiBehavior) Type(ctx context.Context) attr.Type { type AiGatewayGuardrails struct { // Configuration for input guardrail filters. - Input types.Object `tfsdk:"input" tf:"optional,object"` + Input types.Object `tfsdk:"input" tf:"object"` // Configuration for output guardrail filters. - Output types.Object `tfsdk:"output" tf:"optional,object"` + Output types.Object `tfsdk:"output" tf:"object"` } func (newState *AiGatewayGuardrails) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayGuardrails) { @@ -454,6 +481,13 @@ func (newState *AiGatewayGuardrails) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *AiGatewayGuardrails) SyncEffectiveFieldsDuringRead(existingState AiGatewayGuardrails) { } +func (c AiGatewayGuardrails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayGuardrailParameters{}.ToSchema(cs, append(path, "input")...) + AiGatewayGuardrailParameters{}.ToSchema(cs, append(path, "output")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayGuardrails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -550,16 +584,16 @@ type AiGatewayInferenceTableConfig struct { // The name of the catalog in Unity Catalog. Required when enabling // inference tables. NOTE: On update, you have to disable inference table // first in order to change the catalog name. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // Indicates whether the inference table is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the schema in Unity Catalog. Required when enabling inference // tables. NOTE: On update, you have to disable inference table first in // order to change the schema name. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // The prefix of the table in Unity Catalog. NOTE: On update, you have to // disable inference table first in order to change the prefix name. - TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` + TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:""` } func (newState *AiGatewayInferenceTableConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayInferenceTableConfig) { @@ -568,6 +602,11 @@ func (newState *AiGatewayInferenceTableConfig) SyncEffectiveFieldsDuringCreateOr func (newState *AiGatewayInferenceTableConfig) SyncEffectiveFieldsDuringRead(existingState AiGatewayInferenceTableConfig) { } +func (c AiGatewayInferenceTableConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayInferenceTableConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -611,7 +650,7 @@ type AiGatewayRateLimit struct { Calls types.Int64 `tfsdk:"calls" tf:""` // Key field for a rate limit. Currently, only 'user' and 'endpoint' are // supported, with 'endpoint' being the default if not specified. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Renewal period field for a rate limit. Currently, only 'minute' is // supported. RenewalPeriod types.String `tfsdk:"renewal_period" tf:""` @@ -623,6 +662,13 @@ func (newState *AiGatewayRateLimit) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AiGatewayRateLimit) SyncEffectiveFieldsDuringRead(existingState AiGatewayRateLimit) { } +func (c AiGatewayRateLimit) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "calls")...) + cs.SetRequired(append(path, "renewal_period")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayRateLimit. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -660,7 +706,7 @@ func (o AiGatewayRateLimit) Type(ctx context.Context) attr.Type { type AiGatewayUsageTrackingConfig struct { // Whether to enable usage tracking. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` } func (newState *AiGatewayUsageTrackingConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayUsageTrackingConfig) { @@ -669,6 +715,11 @@ func (newState *AiGatewayUsageTrackingConfig) SyncEffectiveFieldsDuringCreateOrU func (newState *AiGatewayUsageTrackingConfig) SyncEffectiveFieldsDuringRead(existingState AiGatewayUsageTrackingConfig) { } +func (c AiGatewayUsageTrackingConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayUsageTrackingConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -706,13 +757,13 @@ type AmazonBedrockConfig struct { // your API key directly, see `aws_access_key_id`. You must provide an API // key using one of the following fields: `aws_access_key_id` or // `aws_access_key_id_plaintext`. - AwsAccessKeyId types.String `tfsdk:"aws_access_key_id" tf:"optional"` + AwsAccessKeyId types.String `tfsdk:"aws_access_key_id" tf:""` // An AWS access key ID with permissions to interact with Bedrock services // provided as a plaintext string. If you prefer to reference your key using // Databricks Secrets, see `aws_access_key_id`. You must provide an API key // using one of the following fields: `aws_access_key_id` or // `aws_access_key_id_plaintext`. - AwsAccessKeyIdPlaintext types.String `tfsdk:"aws_access_key_id_plaintext" tf:"optional"` + AwsAccessKeyIdPlaintext types.String `tfsdk:"aws_access_key_id_plaintext" tf:""` // The AWS region to use. Bedrock has to be enabled there. AwsRegion types.String `tfsdk:"aws_region" tf:""` // The Databricks secret key reference for an AWS secret access key paired @@ -721,14 +772,14 @@ type AmazonBedrockConfig struct { // `aws_secret_access_key_plaintext`. You must provide an API key using one // of the following fields: `aws_secret_access_key` or // `aws_secret_access_key_plaintext`. - AwsSecretAccessKey types.String `tfsdk:"aws_secret_access_key" tf:"optional"` + AwsSecretAccessKey types.String `tfsdk:"aws_secret_access_key" tf:""` // An AWS secret access key paired with the access key ID, with permissions // to interact with Bedrock services provided as a plaintext string. If you // prefer to reference your key using Databricks Secrets, see // `aws_secret_access_key`. You must provide an API key using one of the // following fields: `aws_secret_access_key` or // `aws_secret_access_key_plaintext`. - AwsSecretAccessKeyPlaintext types.String `tfsdk:"aws_secret_access_key_plaintext" tf:"optional"` + AwsSecretAccessKeyPlaintext types.String `tfsdk:"aws_secret_access_key_plaintext" tf:""` // The underlying provider in Amazon Bedrock. Supported values (case // insensitive) include: Anthropic, Cohere, AI21Labs, Amazon. BedrockProvider types.String `tfsdk:"bedrock_provider" tf:""` @@ -740,6 +791,13 @@ func (newState *AmazonBedrockConfig) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *AmazonBedrockConfig) SyncEffectiveFieldsDuringRead(existingState AmazonBedrockConfig) { } +func (c AmazonBedrockConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "aws_region")...) + cs.SetRequired(append(path, "bedrock_provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AmazonBedrockConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -786,12 +844,12 @@ type AnthropicConfig struct { // prefer to paste your API key directly, see `anthropic_api_key_plaintext`. // You must provide an API key using one of the following fields: // `anthropic_api_key` or `anthropic_api_key_plaintext`. - AnthropicApiKey types.String `tfsdk:"anthropic_api_key" tf:"optional"` + AnthropicApiKey types.String `tfsdk:"anthropic_api_key" tf:""` // The Anthropic API key provided as a plaintext string. If you prefer to // reference your key using Databricks Secrets, see `anthropic_api_key`. You // must provide an API key using one of the following fields: // `anthropic_api_key` or `anthropic_api_key_plaintext`. - AnthropicApiKeyPlaintext types.String `tfsdk:"anthropic_api_key_plaintext" tf:"optional"` + AnthropicApiKeyPlaintext types.String `tfsdk:"anthropic_api_key_plaintext" tf:""` } func (newState *AnthropicConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan AnthropicConfig) { @@ -800,6 +858,11 @@ func (newState *AnthropicConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan An func (newState *AnthropicConfig) SyncEffectiveFieldsDuringRead(existingState AnthropicConfig) { } +func (c AnthropicConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AnthropicConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -836,15 +899,15 @@ func (o AnthropicConfig) Type(ctx context.Context) attr.Type { type AutoCaptureConfigInput struct { // The name of the catalog in Unity Catalog. NOTE: On update, you cannot // change the catalog name if the inference table is already enabled. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // Indicates whether the inference table is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the schema in Unity Catalog. NOTE: On update, you cannot // change the schema name if the inference table is already enabled. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` // The prefix of the table in Unity Catalog. NOTE: On update, you cannot // change the prefix name if the inference table is already enabled. - TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` + TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:""` } func (newState *AutoCaptureConfigInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureConfigInput) { @@ -853,6 +916,11 @@ func (newState *AutoCaptureConfigInput) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *AutoCaptureConfigInput) SyncEffectiveFieldsDuringRead(existingState AutoCaptureConfigInput) { } +func (c AutoCaptureConfigInput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoCaptureConfigInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -892,15 +960,15 @@ func (o AutoCaptureConfigInput) Type(ctx context.Context) attr.Type { type AutoCaptureConfigOutput struct { // The name of the catalog in Unity Catalog. - CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + CatalogName types.String `tfsdk:"catalog_name" tf:""` // Indicates whether the inference table is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The name of the schema in Unity Catalog. - SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + SchemaName types.String `tfsdk:"schema_name" tf:""` - State types.Object `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"object"` // The prefix of the table in Unity Catalog. - TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` + TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:""` } func (newState *AutoCaptureConfigOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureConfigOutput) { @@ -909,6 +977,12 @@ func (newState *AutoCaptureConfigOutput) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *AutoCaptureConfigOutput) SyncEffectiveFieldsDuringRead(existingState AutoCaptureConfigOutput) { } +func (c AutoCaptureConfigOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoCaptureState{}.ToSchema(cs, append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoCaptureConfigOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -979,7 +1053,7 @@ func (o *AutoCaptureConfigOutput) SetState(ctx context.Context, v AutoCaptureSta } type AutoCaptureState struct { - PayloadTable types.Object `tfsdk:"payload_table" tf:"optional,object"` + PayloadTable types.Object `tfsdk:"payload_table" tf:"object"` } func (newState *AutoCaptureState) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureState) { @@ -988,6 +1062,12 @@ func (newState *AutoCaptureState) SyncEffectiveFieldsDuringCreateOrUpdate(plan A func (newState *AutoCaptureState) SyncEffectiveFieldsDuringRead(existingState AutoCaptureState) { } +func (c AutoCaptureState) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PayloadTable{}.ToSchema(cs, append(path, "payload_table")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoCaptureState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1059,12 +1139,6 @@ type BuildLogsRequest struct { ServedModelName types.String `tfsdk:"-"` } -func (newState *BuildLogsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan BuildLogsRequest) { -} - -func (newState *BuildLogsRequest) SyncEffectiveFieldsDuringRead(existingState BuildLogsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in BuildLogsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1109,6 +1183,12 @@ func (newState *BuildLogsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *BuildLogsResponse) SyncEffectiveFieldsDuringRead(existingState BuildLogsResponse) { } +func (c BuildLogsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "logs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BuildLogsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1142,9 +1222,9 @@ func (o BuildLogsResponse) Type(ctx context.Context) attr.Type { type ChatMessage struct { // The content of the message. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // The role of the message. One of [system, user, assistant]. - Role types.String `tfsdk:"role" tf:"optional"` + Role types.String `tfsdk:"role" tf:""` } func (newState *ChatMessage) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChatMessage) { @@ -1153,6 +1233,11 @@ func (newState *ChatMessage) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChatMe func (newState *ChatMessage) SyncEffectiveFieldsDuringRead(existingState ChatMessage) { } +func (c ChatMessage) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ChatMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1189,17 +1274,17 @@ func (o ChatMessage) Type(ctx context.Context) attr.Type { type CohereConfig struct { // This is an optional field to provide a customized base URL for the Cohere // API. If left unspecified, the standard Cohere base URL is used. - CohereApiBase types.String `tfsdk:"cohere_api_base" tf:"optional"` + CohereApiBase types.String `tfsdk:"cohere_api_base" tf:""` // The Databricks secret key reference for a Cohere API key. If you prefer // to paste your API key directly, see `cohere_api_key_plaintext`. You must // provide an API key using one of the following fields: `cohere_api_key` or // `cohere_api_key_plaintext`. - CohereApiKey types.String `tfsdk:"cohere_api_key" tf:"optional"` + CohereApiKey types.String `tfsdk:"cohere_api_key" tf:""` // The Cohere API key provided as a plaintext string. If you prefer to // reference your key using Databricks Secrets, see `cohere_api_key`. You // must provide an API key using one of the following fields: // `cohere_api_key` or `cohere_api_key_plaintext`. - CohereApiKeyPlaintext types.String `tfsdk:"cohere_api_key_plaintext" tf:"optional"` + CohereApiKeyPlaintext types.String `tfsdk:"cohere_api_key_plaintext" tf:""` } func (newState *CohereConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan CohereConfig) { @@ -1208,6 +1293,11 @@ func (newState *CohereConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan Coher func (newState *CohereConfig) SyncEffectiveFieldsDuringRead(existingState CohereConfig) { } +func (c CohereConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CohereConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1246,7 +1336,7 @@ func (o CohereConfig) Type(ctx context.Context) attr.Type { type CreateServingEndpoint struct { // The AI Gateway configuration for the serving endpoint. NOTE: only // external model endpoints are supported as of now. - AiGateway types.Object `tfsdk:"ai_gateway" tf:"optional,object"` + AiGateway types.Object `tfsdk:"ai_gateway" tf:"object"` // The core config of the serving endpoint. Config types.Object `tfsdk:"config" tf:"object"` // The name of the serving endpoint. This field is required and must be @@ -1255,12 +1345,12 @@ type CreateServingEndpoint struct { Name types.String `tfsdk:"name" tf:""` // Rate limits to be applied to the serving endpoint. NOTE: this field is // deprecated, please use AI Gateway to manage rate limits. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + RateLimits types.List `tfsdk:"rate_limits" tf:""` // Enable route optimization for the serving endpoint. - RouteOptimized types.Bool `tfsdk:"route_optimized" tf:"optional"` + RouteOptimized types.Bool `tfsdk:"route_optimized" tf:""` // Tags to be attached to the serving endpoint and automatically propagated // to billing logs. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *CreateServingEndpoint) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServingEndpoint) { @@ -1269,6 +1359,17 @@ func (newState *CreateServingEndpoint) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateServingEndpoint) SyncEffectiveFieldsDuringRead(existingState CreateServingEndpoint) { } +func (c CreateServingEndpoint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayConfig{}.ToSchema(cs, append(path, "ai_gateway")...) + cs.SetRequired(append(path, "config")...) + EndpointCoreConfigInput{}.ToSchema(cs, append(path, "config")...) + cs.SetRequired(append(path, "name")...) + RateLimit{}.ToSchema(cs, append(path, "rate_limits")...) + EndpointTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServingEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1434,14 +1535,14 @@ type DatabricksModelServingConfig struct { // to paste your API key directly, see `databricks_api_token_plaintext`. You // must provide an API key using one of the following fields: // `databricks_api_token` or `databricks_api_token_plaintext`. - DatabricksApiToken types.String `tfsdk:"databricks_api_token" tf:"optional"` + DatabricksApiToken types.String `tfsdk:"databricks_api_token" tf:""` // The Databricks API token that corresponds to a user or service principal // with Can Query access to the model serving endpoint pointed to by this // external model provided as a plaintext string. If you prefer to reference // your key using Databricks Secrets, see `databricks_api_token`. You must // provide an API key using one of the following fields: // `databricks_api_token` or `databricks_api_token_plaintext`. - DatabricksApiTokenPlaintext types.String `tfsdk:"databricks_api_token_plaintext" tf:"optional"` + DatabricksApiTokenPlaintext types.String `tfsdk:"databricks_api_token_plaintext" tf:""` // The URL of the Databricks workspace containing the model serving endpoint // pointed to by this external model. DatabricksWorkspaceUrl types.String `tfsdk:"databricks_workspace_url" tf:""` @@ -1453,6 +1554,12 @@ func (newState *DatabricksModelServingConfig) SyncEffectiveFieldsDuringCreateOrU func (newState *DatabricksModelServingConfig) SyncEffectiveFieldsDuringRead(existingState DatabricksModelServingConfig) { } +func (c DatabricksModelServingConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "databricks_workspace_url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksModelServingConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1489,11 +1596,11 @@ func (o DatabricksModelServingConfig) Type(ctx context.Context) attr.Type { } type DataframeSplitInput struct { - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` - Data types.List `tfsdk:"data" tf:"optional"` + Data types.List `tfsdk:"data" tf:""` - Index types.List `tfsdk:"index" tf:"optional"` + Index types.List `tfsdk:"index" tf:""` } func (newState *DataframeSplitInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataframeSplitInput) { @@ -1502,6 +1609,11 @@ func (newState *DataframeSplitInput) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *DataframeSplitInput) SyncEffectiveFieldsDuringRead(existingState DataframeSplitInput) { } +func (c DataframeSplitInput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataframeSplitInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1628,12 +1740,6 @@ func (o *DataframeSplitInput) SetIndex(ctx context.Context, v []types.Int64) { type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1667,12 +1773,6 @@ type DeleteServingEndpointRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteServingEndpointRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServingEndpointRequest) { -} - -func (newState *DeleteServingEndpointRequest) SyncEffectiveFieldsDuringRead(existingState DeleteServingEndpointRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServingEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1705,11 +1805,11 @@ func (o DeleteServingEndpointRequest) Type(ctx context.Context) attr.Type { } type EmbeddingsV1ResponseEmbeddingElement struct { - Embedding types.List `tfsdk:"embedding" tf:"optional"` + Embedding types.List `tfsdk:"embedding" tf:""` // The index of the embedding in the response. - Index types.Int64 `tfsdk:"index" tf:"optional"` + Index types.Int64 `tfsdk:"index" tf:""` // This will always be 'embedding'. - Object types.String `tfsdk:"object" tf:"optional"` + Object types.String `tfsdk:"object" tf:""` } func (newState *EmbeddingsV1ResponseEmbeddingElement) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmbeddingsV1ResponseEmbeddingElement) { @@ -1718,6 +1818,11 @@ func (newState *EmbeddingsV1ResponseEmbeddingElement) SyncEffectiveFieldsDuringC func (newState *EmbeddingsV1ResponseEmbeddingElement) SyncEffectiveFieldsDuringRead(existingState EmbeddingsV1ResponseEmbeddingElement) { } +func (c EmbeddingsV1ResponseEmbeddingElement) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EmbeddingsV1ResponseEmbeddingElement. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1786,18 +1891,18 @@ func (o *EmbeddingsV1ResponseEmbeddingElement) SetEmbedding(ctx context.Context, type EndpointCoreConfigInput struct { // Configuration for Inference Tables which automatically logs requests and // responses to Unity Catalog. - AutoCaptureConfig types.Object `tfsdk:"auto_capture_config" tf:"optional,object"` + AutoCaptureConfig types.Object `tfsdk:"auto_capture_config" tf:"object"` // The name of the serving endpoint to update. This field is required. Name types.String `tfsdk:"-"` // A list of served entities for the endpoint to serve. A serving endpoint // can have up to 15 served entities. - ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + ServedEntities types.List `tfsdk:"served_entities" tf:""` // (Deprecated, use served_entities instead) A list of served models for the // endpoint to serve. A serving endpoint can have up to 15 served models. - ServedModels types.List `tfsdk:"served_models" tf:"optional"` + ServedModels types.List `tfsdk:"served_models" tf:""` // The traffic config defining how invocations to the serving endpoint // should be routed. - TrafficConfig types.Object `tfsdk:"traffic_config" tf:"optional,object"` + TrafficConfig types.Object `tfsdk:"traffic_config" tf:"object"` } func (newState *EndpointCoreConfigInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigInput) { @@ -1806,6 +1911,16 @@ func (newState *EndpointCoreConfigInput) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *EndpointCoreConfigInput) SyncEffectiveFieldsDuringRead(existingState EndpointCoreConfigInput) { } +func (c EndpointCoreConfigInput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoCaptureConfigInput{}.ToSchema(cs, append(path, "auto_capture_config")...) + cs.SetRequired(append(path, "name")...) + ServedEntityInput{}.ToSchema(cs, append(path, "served_entities")...) + ServedModelInput{}.ToSchema(cs, append(path, "served_models")...) + TrafficConfig{}.ToSchema(cs, append(path, "traffic_config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointCoreConfigInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1965,16 +2080,16 @@ func (o *EndpointCoreConfigInput) SetTrafficConfig(ctx context.Context, v Traffi type EndpointCoreConfigOutput struct { // Configuration for Inference Tables which automatically logs requests and // responses to Unity Catalog. - AutoCaptureConfig types.Object `tfsdk:"auto_capture_config" tf:"optional,object"` + AutoCaptureConfig types.Object `tfsdk:"auto_capture_config" tf:"object"` // The config version that the serving endpoint is currently serving. - ConfigVersion types.Int64 `tfsdk:"config_version" tf:"optional"` + ConfigVersion types.Int64 `tfsdk:"config_version" tf:""` // The list of served entities under the serving endpoint config. - ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + ServedEntities types.List `tfsdk:"served_entities" tf:""` // (Deprecated, use served_entities instead) The list of served models under // the serving endpoint config. - ServedModels types.List `tfsdk:"served_models" tf:"optional"` + ServedModels types.List `tfsdk:"served_models" tf:""` // The traffic configuration associated with the serving endpoint config. - TrafficConfig types.Object `tfsdk:"traffic_config" tf:"optional,object"` + TrafficConfig types.Object `tfsdk:"traffic_config" tf:"object"` } func (newState *EndpointCoreConfigOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigOutput) { @@ -1983,6 +2098,15 @@ func (newState *EndpointCoreConfigOutput) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *EndpointCoreConfigOutput) SyncEffectiveFieldsDuringRead(existingState EndpointCoreConfigOutput) { } +func (c EndpointCoreConfigOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoCaptureConfigOutput{}.ToSchema(cs, append(path, "auto_capture_config")...) + ServedEntityOutput{}.ToSchema(cs, append(path, "served_entities")...) + ServedModelOutput{}.ToSchema(cs, append(path, "served_models")...) + TrafficConfig{}.ToSchema(cs, append(path, "traffic_config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointCoreConfigOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2141,10 +2265,10 @@ func (o *EndpointCoreConfigOutput) SetTrafficConfig(ctx context.Context, v Traff type EndpointCoreConfigSummary struct { // The list of served entities under the serving endpoint config. - ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + ServedEntities types.List `tfsdk:"served_entities" tf:""` // (Deprecated, use served_entities instead) The list of served models under // the serving endpoint config. - ServedModels types.List `tfsdk:"served_models" tf:"optional"` + ServedModels types.List `tfsdk:"served_models" tf:""` } func (newState *EndpointCoreConfigSummary) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigSummary) { @@ -2153,6 +2277,13 @@ func (newState *EndpointCoreConfigSummary) SyncEffectiveFieldsDuringCreateOrUpda func (newState *EndpointCoreConfigSummary) SyncEffectiveFieldsDuringRead(existingState EndpointCoreConfigSummary) { } +func (c EndpointCoreConfigSummary) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServedEntitySpec{}.ToSchema(cs, append(path, "served_entities")...) + ServedModelSpec{}.ToSchema(cs, append(path, "served_models")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointCoreConfigSummary. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2248,20 +2379,20 @@ func (o *EndpointCoreConfigSummary) SetServedModels(ctx context.Context, v []Ser type EndpointPendingConfig struct { // Configuration for Inference Tables which automatically logs requests and // responses to Unity Catalog. - AutoCaptureConfig types.Object `tfsdk:"auto_capture_config" tf:"optional,object"` + AutoCaptureConfig types.Object `tfsdk:"auto_capture_config" tf:"object"` // The config version that the serving endpoint is currently serving. - ConfigVersion types.Int64 `tfsdk:"config_version" tf:"optional"` + ConfigVersion types.Int64 `tfsdk:"config_version" tf:""` // The list of served entities belonging to the last issued update to the // serving endpoint. - ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + ServedEntities types.List `tfsdk:"served_entities" tf:""` // (Deprecated, use served_entities instead) The list of served models // belonging to the last issued update to the serving endpoint. - ServedModels types.List `tfsdk:"served_models" tf:"optional"` + ServedModels types.List `tfsdk:"served_models" tf:""` // The timestamp when the update to the pending config started. - StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + StartTime types.Int64 `tfsdk:"start_time" tf:""` // The traffic config defining how invocations to the serving endpoint // should be routed. - TrafficConfig types.Object `tfsdk:"traffic_config" tf:"optional,object"` + TrafficConfig types.Object `tfsdk:"traffic_config" tf:"object"` } func (newState *EndpointPendingConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointPendingConfig) { @@ -2270,6 +2401,15 @@ func (newState *EndpointPendingConfig) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *EndpointPendingConfig) SyncEffectiveFieldsDuringRead(existingState EndpointPendingConfig) { } +func (c EndpointPendingConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AutoCaptureConfigOutput{}.ToSchema(cs, append(path, "auto_capture_config")...) + ServedEntityOutput{}.ToSchema(cs, append(path, "served_entities")...) + ServedModelOutput{}.ToSchema(cs, append(path, "served_models")...) + TrafficConfig{}.ToSchema(cs, append(path, "traffic_config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointPendingConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2434,12 +2574,12 @@ type EndpointState struct { // update in progress. Note that if the endpoint's config_update state value // is IN_PROGRESS, another update can not be made until the update completes // or fails." - ConfigUpdate types.String `tfsdk:"config_update" tf:"optional"` + ConfigUpdate types.String `tfsdk:"config_update" tf:""` // The state of an endpoint, indicating whether or not the endpoint is // queryable. An endpoint is READY if all of the served entities in its // active configuration are ready. If any of the actively served entities // are in a non-ready state, the endpoint state will be NOT_READY. - Ready types.String `tfsdk:"ready" tf:"optional"` + Ready types.String `tfsdk:"ready" tf:""` } func (newState *EndpointState) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointState) { @@ -2448,6 +2588,11 @@ func (newState *EndpointState) SyncEffectiveFieldsDuringCreateOrUpdate(plan Endp func (newState *EndpointState) SyncEffectiveFieldsDuringRead(existingState EndpointState) { } +func (c EndpointState) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2485,7 +2630,7 @@ type EndpointTag struct { // Key field for a serving endpoint tag. Key types.String `tfsdk:"key" tf:""` // Optional value field for a serving endpoint tag. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *EndpointTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointTag) { @@ -2494,6 +2639,12 @@ func (newState *EndpointTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan Endpoi func (newState *EndpointTag) SyncEffectiveFieldsDuringRead(existingState EndpointTag) { } +func (c EndpointTag) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointTag. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2534,12 +2685,6 @@ type ExportMetricsRequest struct { Name types.String `tfsdk:"-"` } -func (newState *ExportMetricsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportMetricsRequest) { -} - -func (newState *ExportMetricsRequest) SyncEffectiveFieldsDuringRead(existingState ExportMetricsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportMetricsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2575,12 +2720,6 @@ type ExportMetricsResponse struct { Contents types.Object `tfsdk:"-"` } -func (newState *ExportMetricsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportMetricsResponse) { -} - -func (newState *ExportMetricsResponse) SyncEffectiveFieldsDuringRead(existingState ExportMetricsResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportMetricsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2614,25 +2753,25 @@ func (o ExportMetricsResponse) Type(ctx context.Context) attr.Type { type ExternalModel struct { // AI21Labs Config. Only required if the provider is 'ai21labs'. - Ai21labsConfig types.Object `tfsdk:"ai21labs_config" tf:"optional,object"` + Ai21labsConfig types.Object `tfsdk:"ai21labs_config" tf:"object"` // Amazon Bedrock Config. Only required if the provider is 'amazon-bedrock'. - AmazonBedrockConfig types.Object `tfsdk:"amazon_bedrock_config" tf:"optional,object"` + AmazonBedrockConfig types.Object `tfsdk:"amazon_bedrock_config" tf:"object"` // Anthropic Config. Only required if the provider is 'anthropic'. - AnthropicConfig types.Object `tfsdk:"anthropic_config" tf:"optional,object"` + AnthropicConfig types.Object `tfsdk:"anthropic_config" tf:"object"` // Cohere Config. Only required if the provider is 'cohere'. - CohereConfig types.Object `tfsdk:"cohere_config" tf:"optional,object"` + CohereConfig types.Object `tfsdk:"cohere_config" tf:"object"` // Databricks Model Serving Config. Only required if the provider is // 'databricks-model-serving'. - DatabricksModelServingConfig types.Object `tfsdk:"databricks_model_serving_config" tf:"optional,object"` + DatabricksModelServingConfig types.Object `tfsdk:"databricks_model_serving_config" tf:"object"` // Google Cloud Vertex AI Config. Only required if the provider is // 'google-cloud-vertex-ai'. - GoogleCloudVertexAiConfig types.Object `tfsdk:"google_cloud_vertex_ai_config" tf:"optional,object"` + GoogleCloudVertexAiConfig types.Object `tfsdk:"google_cloud_vertex_ai_config" tf:"object"` // The name of the external model. Name types.String `tfsdk:"name" tf:""` // OpenAI Config. Only required if the provider is 'openai'. - OpenaiConfig types.Object `tfsdk:"openai_config" tf:"optional,object"` + OpenaiConfig types.Object `tfsdk:"openai_config" tf:"object"` // PaLM Config. Only required if the provider is 'palm'. - PalmConfig types.Object `tfsdk:"palm_config" tf:"optional,object"` + PalmConfig types.Object `tfsdk:"palm_config" tf:"object"` // The name of the provider for the external model. Currently, the supported // providers are 'ai21labs', 'anthropic', 'amazon-bedrock', 'cohere', // 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and @@ -2648,6 +2787,22 @@ func (newState *ExternalModel) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exte func (newState *ExternalModel) SyncEffectiveFieldsDuringRead(existingState ExternalModel) { } +func (c ExternalModel) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Ai21LabsConfig{}.ToSchema(cs, append(path, "ai21labs_config")...) + AmazonBedrockConfig{}.ToSchema(cs, append(path, "amazon_bedrock_config")...) + AnthropicConfig{}.ToSchema(cs, append(path, "anthropic_config")...) + CohereConfig{}.ToSchema(cs, append(path, "cohere_config")...) + DatabricksModelServingConfig{}.ToSchema(cs, append(path, "databricks_model_serving_config")...) + GoogleCloudVertexAiConfig{}.ToSchema(cs, append(path, "google_cloud_vertex_ai_config")...) + cs.SetRequired(append(path, "name")...) + OpenAiConfig{}.ToSchema(cs, append(path, "openai_config")...) + PaLmConfig{}.ToSchema(cs, append(path, "palm_config")...) + cs.SetRequired(append(path, "provider")...) + cs.SetRequired(append(path, "task")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalModel. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2934,11 +3089,11 @@ func (o *ExternalModel) SetPalmConfig(ctx context.Context, v PaLmConfig) { type ExternalModelUsageElement struct { // The number of tokens in the chat/completions response. - CompletionTokens types.Int64 `tfsdk:"completion_tokens" tf:"optional"` + CompletionTokens types.Int64 `tfsdk:"completion_tokens" tf:""` // The number of tokens in the prompt. - PromptTokens types.Int64 `tfsdk:"prompt_tokens" tf:"optional"` + PromptTokens types.Int64 `tfsdk:"prompt_tokens" tf:""` // The total number of tokens in the prompt and response. - TotalTokens types.Int64 `tfsdk:"total_tokens" tf:"optional"` + TotalTokens types.Int64 `tfsdk:"total_tokens" tf:""` } func (newState *ExternalModelUsageElement) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalModelUsageElement) { @@ -2947,6 +3102,11 @@ func (newState *ExternalModelUsageElement) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ExternalModelUsageElement) SyncEffectiveFieldsDuringRead(existingState ExternalModelUsageElement) { } +func (c ExternalModelUsageElement) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalModelUsageElement. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2984,13 +3144,13 @@ func (o ExternalModelUsageElement) Type(ctx context.Context) attr.Type { type FoundationModel struct { // The description of the foundation model. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The display name of the foundation model. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The URL to the documentation of the foundation model. - Docs types.String `tfsdk:"docs" tf:"optional"` + Docs types.String `tfsdk:"docs" tf:""` // The name of the foundation model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *FoundationModel) SyncEffectiveFieldsDuringCreateOrUpdate(plan FoundationModel) { @@ -2999,6 +3159,11 @@ func (newState *FoundationModel) SyncEffectiveFieldsDuringCreateOrUpdate(plan Fo func (newState *FoundationModel) SyncEffectiveFieldsDuringRead(existingState FoundationModel) { } +func (c FoundationModel) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FoundationModel. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3043,12 +3208,6 @@ type GetOpenApiRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetOpenApiRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetOpenApiRequest) { -} - -func (newState *GetOpenApiRequest) SyncEffectiveFieldsDuringRead(existingState GetOpenApiRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetOpenApiRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3085,12 +3244,6 @@ func (o GetOpenApiRequest) Type(ctx context.Context) attr.Type { type GetOpenApiResponse struct { } -func (newState *GetOpenApiResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetOpenApiResponse) { -} - -func (newState *GetOpenApiResponse) SyncEffectiveFieldsDuringRead(existingState GetOpenApiResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetOpenApiResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3124,12 +3277,6 @@ type GetServingEndpointPermissionLevelsRequest struct { ServingEndpointId types.String `tfsdk:"-"` } -func (newState *GetServingEndpointPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointPermissionLevelsRequest) { -} - -func (newState *GetServingEndpointPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3163,7 +3310,7 @@ func (o GetServingEndpointPermissionLevelsRequest) Type(ctx context.Context) att type GetServingEndpointPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetServingEndpointPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointPermissionLevelsResponse) { @@ -3172,6 +3319,12 @@ func (newState *GetServingEndpointPermissionLevelsResponse) SyncEffectiveFieldsD func (newState *GetServingEndpointPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointPermissionLevelsResponse) { } +func (c GetServingEndpointPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpointPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3239,12 +3392,6 @@ type GetServingEndpointPermissionsRequest struct { ServingEndpointId types.String `tfsdk:"-"` } -func (newState *GetServingEndpointPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointPermissionsRequest) { -} - -func (newState *GetServingEndpointPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3282,12 +3429,6 @@ type GetServingEndpointRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetServingEndpointRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointRequest) { -} - -func (newState *GetServingEndpointRequest) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3328,7 +3469,7 @@ type GoogleCloudVertexAiConfig struct { // `private_key_plaintext` // // [Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys - PrivateKey types.String `tfsdk:"private_key" tf:"optional"` + PrivateKey types.String `tfsdk:"private_key" tf:""` // The private key for the service account which has access to the Google // Cloud Vertex AI Service provided as a plaintext secret. See [Best // practices for managing service account keys]. If you prefer to reference @@ -3337,16 +3478,16 @@ type GoogleCloudVertexAiConfig struct { // `private_key_plaintext`. // // [Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys - PrivateKeyPlaintext types.String `tfsdk:"private_key_plaintext" tf:"optional"` + PrivateKeyPlaintext types.String `tfsdk:"private_key_plaintext" tf:""` // This is the Google Cloud project id that the service account is // associated with. - ProjectId types.String `tfsdk:"project_id" tf:"optional"` + ProjectId types.String `tfsdk:"project_id" tf:""` // This is the region for the Google Cloud Vertex AI Service. See [supported // regions] for more details. Some models are only available in specific // regions. // // [supported regions]: https://cloud.google.com/vertex-ai/docs/general/locations - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` } func (newState *GoogleCloudVertexAiConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan GoogleCloudVertexAiConfig) { @@ -3355,6 +3496,11 @@ func (newState *GoogleCloudVertexAiConfig) SyncEffectiveFieldsDuringCreateOrUpda func (newState *GoogleCloudVertexAiConfig) SyncEffectiveFieldsDuringRead(existingState GoogleCloudVertexAiConfig) { } +func (c GoogleCloudVertexAiConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GoogleCloudVertexAiConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3394,7 +3540,7 @@ func (o GoogleCloudVertexAiConfig) Type(ctx context.Context) attr.Type { type ListEndpointsResponse struct { // The list of endpoints. - Endpoints types.List `tfsdk:"endpoints" tf:"optional"` + Endpoints types.List `tfsdk:"endpoints" tf:""` } func (newState *ListEndpointsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListEndpointsResponse) { @@ -3403,6 +3549,12 @@ func (newState *ListEndpointsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListEndpointsResponse) SyncEffectiveFieldsDuringRead(existingState ListEndpointsResponse) { } +func (c ListEndpointsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpoint{}.ToSchema(cs, append(path, "endpoints")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEndpointsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3474,12 +3626,6 @@ type LogsRequest struct { ServedModelName types.String `tfsdk:"-"` } -func (newState *LogsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogsRequest) { -} - -func (newState *LogsRequest) SyncEffectiveFieldsDuringRead(existingState LogsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3515,7 +3661,7 @@ func (o LogsRequest) Type(ctx context.Context) attr.Type { type ModelDataPlaneInfo struct { // Information required to query DataPlane API 'query' endpoint. - QueryInfo types.Object `tfsdk:"query_info" tf:"optional,object"` + QueryInfo types.Object `tfsdk:"query_info" tf:"object"` } func (newState *ModelDataPlaneInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelDataPlaneInfo) { @@ -3524,6 +3670,12 @@ func (newState *ModelDataPlaneInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ModelDataPlaneInfo) SyncEffectiveFieldsDuringRead(existingState ModelDataPlaneInfo) { } +func (c ModelDataPlaneInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + oauth2_tf.DataPlaneInfo{}.ToSchema(cs, append(path, "query_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelDataPlaneInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3588,55 +3740,55 @@ func (o *ModelDataPlaneInfo) SetQueryInfo(ctx context.Context, v oauth2_tf.DataP type OpenAiConfig struct { // This field is only required for Azure AD OpenAI and is the Microsoft // Entra Client ID. - MicrosoftEntraClientId types.String `tfsdk:"microsoft_entra_client_id" tf:"optional"` + MicrosoftEntraClientId types.String `tfsdk:"microsoft_entra_client_id" tf:""` // The Databricks secret key reference for a client secret used for // Microsoft Entra ID authentication. If you prefer to paste your client // secret directly, see `microsoft_entra_client_secret_plaintext`. You must // provide an API key using one of the following fields: // `microsoft_entra_client_secret` or // `microsoft_entra_client_secret_plaintext`. - MicrosoftEntraClientSecret types.String `tfsdk:"microsoft_entra_client_secret" tf:"optional"` + MicrosoftEntraClientSecret types.String `tfsdk:"microsoft_entra_client_secret" tf:""` // The client secret used for Microsoft Entra ID authentication provided as // a plaintext string. If you prefer to reference your key using Databricks // Secrets, see `microsoft_entra_client_secret`. You must provide an API key // using one of the following fields: `microsoft_entra_client_secret` or // `microsoft_entra_client_secret_plaintext`. - MicrosoftEntraClientSecretPlaintext types.String `tfsdk:"microsoft_entra_client_secret_plaintext" tf:"optional"` + MicrosoftEntraClientSecretPlaintext types.String `tfsdk:"microsoft_entra_client_secret_plaintext" tf:""` // This field is only required for Azure AD OpenAI and is the Microsoft // Entra Tenant ID. - MicrosoftEntraTenantId types.String `tfsdk:"microsoft_entra_tenant_id" tf:"optional"` + MicrosoftEntraTenantId types.String `tfsdk:"microsoft_entra_tenant_id" tf:""` // This is a field to provide a customized base URl for the OpenAI API. For // Azure OpenAI, this field is required, and is the base URL for the Azure // OpenAI API service provided by Azure. For other OpenAI API types, this // field is optional, and if left unspecified, the standard OpenAI base URL // is used. - OpenaiApiBase types.String `tfsdk:"openai_api_base" tf:"optional"` + OpenaiApiBase types.String `tfsdk:"openai_api_base" tf:""` // The Databricks secret key reference for an OpenAI API key using the // OpenAI or Azure service. If you prefer to paste your API key directly, // see `openai_api_key_plaintext`. You must provide an API key using one of // the following fields: `openai_api_key` or `openai_api_key_plaintext`. - OpenaiApiKey types.String `tfsdk:"openai_api_key" tf:"optional"` + OpenaiApiKey types.String `tfsdk:"openai_api_key" tf:""` // The OpenAI API key using the OpenAI or Azure service provided as a // plaintext string. If you prefer to reference your key using Databricks // Secrets, see `openai_api_key`. You must provide an API key using one of // the following fields: `openai_api_key` or `openai_api_key_plaintext`. - OpenaiApiKeyPlaintext types.String `tfsdk:"openai_api_key_plaintext" tf:"optional"` + OpenaiApiKeyPlaintext types.String `tfsdk:"openai_api_key_plaintext" tf:""` // This is an optional field to specify the type of OpenAI API to use. For // Azure OpenAI, this field is required, and adjust this parameter to // represent the preferred security access validation protocol. For access // token validation, use azure. For authentication using Azure Active // Directory (Azure AD) use, azuread. - OpenaiApiType types.String `tfsdk:"openai_api_type" tf:"optional"` + OpenaiApiType types.String `tfsdk:"openai_api_type" tf:""` // This is an optional field to specify the OpenAI API version. For Azure // OpenAI, this field is required, and is the version of the Azure OpenAI // service to utilize, specified by a date. - OpenaiApiVersion types.String `tfsdk:"openai_api_version" tf:"optional"` + OpenaiApiVersion types.String `tfsdk:"openai_api_version" tf:""` // This field is only required for Azure OpenAI and is the name of the // deployment resource for the Azure OpenAI service. - OpenaiDeploymentName types.String `tfsdk:"openai_deployment_name" tf:"optional"` + OpenaiDeploymentName types.String `tfsdk:"openai_deployment_name" tf:""` // This is an optional field to specify the organization in OpenAI or Azure // OpenAI. - OpenaiOrganization types.String `tfsdk:"openai_organization" tf:"optional"` + OpenaiOrganization types.String `tfsdk:"openai_organization" tf:""` } func (newState *OpenAiConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan OpenAiConfig) { @@ -3645,6 +3797,11 @@ func (newState *OpenAiConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan OpenA func (newState *OpenAiConfig) SyncEffectiveFieldsDuringRead(existingState OpenAiConfig) { } +func (c OpenAiConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OpenAiConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3701,12 +3858,12 @@ type PaLmConfig struct { // paste your API key directly, see `palm_api_key_plaintext`. You must // provide an API key using one of the following fields: `palm_api_key` or // `palm_api_key_plaintext`. - PalmApiKey types.String `tfsdk:"palm_api_key" tf:"optional"` + PalmApiKey types.String `tfsdk:"palm_api_key" tf:""` // The PaLM API key provided as a plaintext string. If you prefer to // reference your key using Databricks Secrets, see `palm_api_key`. You must // provide an API key using one of the following fields: `palm_api_key` or // `palm_api_key_plaintext`. - PalmApiKeyPlaintext types.String `tfsdk:"palm_api_key_plaintext" tf:"optional"` + PalmApiKeyPlaintext types.String `tfsdk:"palm_api_key_plaintext" tf:""` } func (newState *PaLmConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan PaLmConfig) { @@ -3715,6 +3872,11 @@ func (newState *PaLmConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan PaLmCon func (newState *PaLmConfig) SyncEffectiveFieldsDuringRead(existingState PaLmConfig) { } +func (c PaLmConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PaLmConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3750,9 +3912,9 @@ func (o PaLmConfig) Type(ctx context.Context) attr.Type { type PatchServingEndpointTags struct { // List of endpoint tags to add - AddTags types.List `tfsdk:"add_tags" tf:"optional"` + AddTags types.List `tfsdk:"add_tags" tf:""` // List of tag keys to delete - DeleteTags types.List `tfsdk:"delete_tags" tf:"optional"` + DeleteTags types.List `tfsdk:"delete_tags" tf:""` // The name of the serving endpoint who's tags to patch. This field is // required. Name types.String `tfsdk:"-"` @@ -3764,6 +3926,13 @@ func (newState *PatchServingEndpointTags) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *PatchServingEndpointTags) SyncEffectiveFieldsDuringRead(existingState PatchServingEndpointTags) { } +func (c PatchServingEndpointTags) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointTag{}.ToSchema(cs, append(path, "add_tags")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchServingEndpointTags. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3860,11 +4029,11 @@ func (o *PatchServingEndpointTags) SetDeleteTags(ctx context.Context, v []types. type PayloadTable struct { // The name of the payload table. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The status of the payload table. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The status message of the payload table. - StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + StatusMessage types.String `tfsdk:"status_message" tf:""` } func (newState *PayloadTable) SyncEffectiveFieldsDuringCreateOrUpdate(plan PayloadTable) { @@ -3873,6 +4042,11 @@ func (newState *PayloadTable) SyncEffectiveFieldsDuringCreateOrUpdate(plan Paylo func (newState *PayloadTable) SyncEffectiveFieldsDuringRead(existingState PayloadTable) { } +func (c PayloadTable) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PayloadTable. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3912,26 +4086,20 @@ func (o PayloadTable) Type(ctx context.Context) attr.Type { type PutAiGatewayRequest struct { // Configuration for AI Guardrails to prevent unwanted data and unsafe data // in requests and responses. - Guardrails types.Object `tfsdk:"guardrails" tf:"optional,object"` + Guardrails types.Object `tfsdk:"guardrails" tf:"object"` // Configuration for payload logging using inference tables. Use these // tables to monitor and audit data being sent to and received from model // APIs and to improve model quality. - InferenceTableConfig types.Object `tfsdk:"inference_table_config" tf:"optional,object"` + InferenceTableConfig types.Object `tfsdk:"inference_table_config" tf:"object"` // The name of the serving endpoint whose AI Gateway is being updated. This // field is required. Name types.String `tfsdk:"-"` // Configuration for rate limits which can be set to limit endpoint traffic. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + RateLimits types.List `tfsdk:"rate_limits" tf:""` // Configuration to enable usage tracking using system tables. These tables // allow you to monitor operational usage on endpoints and their associated // costs. - UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config" tf:"optional,object"` -} - -func (newState *PutAiGatewayRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayRequest) { -} - -func (newState *PutAiGatewayRequest) SyncEffectiveFieldsDuringRead(existingState PutAiGatewayRequest) { + UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAiGatewayRequest. @@ -4093,23 +4261,17 @@ func (o *PutAiGatewayRequest) SetUsageTrackingConfig(ctx context.Context, v AiGa type PutAiGatewayResponse struct { // Configuration for AI Guardrails to prevent unwanted data and unsafe data // in requests and responses. - Guardrails types.Object `tfsdk:"guardrails" tf:"optional,object"` + Guardrails types.Object `tfsdk:"guardrails" tf:"object"` // Configuration for payload logging using inference tables. Use these // tables to monitor and audit data being sent to and received from model // APIs and to improve model quality . - InferenceTableConfig types.Object `tfsdk:"inference_table_config" tf:"optional,object"` + InferenceTableConfig types.Object `tfsdk:"inference_table_config" tf:"object"` // Configuration for rate limits which can be set to limit endpoint traffic. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + RateLimits types.List `tfsdk:"rate_limits" tf:""` // Configuration to enable usage tracking using system tables. These tables // allow you to monitor operational usage on endpoints and their associated // costs. - UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config" tf:"optional,object"` -} - -func (newState *PutAiGatewayResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayResponse) { -} - -func (newState *PutAiGatewayResponse) SyncEffectiveFieldsDuringRead(existingState PutAiGatewayResponse) { + UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config" tf:"object"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAiGatewayResponse. @@ -4272,13 +4434,7 @@ type PutRequest struct { // This field is required. Name types.String `tfsdk:"-"` // The list of endpoint rate limits. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` -} - -func (newState *PutRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutRequest) { -} - -func (newState *PutRequest) SyncEffectiveFieldsDuringRead(existingState PutRequest) { + RateLimits types.List `tfsdk:"rate_limits" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutRequest. @@ -4346,13 +4502,7 @@ func (o *PutRequest) SetRateLimits(ctx context.Context, v []RateLimit) { type PutResponse struct { // The list of endpoint rate limits. - RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` -} - -func (newState *PutResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutResponse) { -} - -func (newState *PutResponse) SyncEffectiveFieldsDuringRead(existingState PutResponse) { + RateLimits types.List `tfsdk:"rate_limits" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutResponse. @@ -4418,54 +4568,54 @@ func (o *PutResponse) SetRateLimits(ctx context.Context, v []RateLimit) { type QueryEndpointInput struct { // Pandas Dataframe input in the records orientation. - DataframeRecords types.List `tfsdk:"dataframe_records" tf:"optional"` + DataframeRecords types.List `tfsdk:"dataframe_records" tf:""` // Pandas Dataframe input in the split orientation. - DataframeSplit types.Object `tfsdk:"dataframe_split" tf:"optional,object"` + DataframeSplit types.Object `tfsdk:"dataframe_split" tf:"object"` // The extra parameters field used ONLY for __completions, chat,__ and // __embeddings external & foundation model__ serving endpoints. This is a // map of strings and should only be used with other external/foundation // model query fields. - ExtraParams types.Map `tfsdk:"extra_params" tf:"optional"` + ExtraParams types.Map `tfsdk:"extra_params" tf:""` // The input string (or array of strings) field used ONLY for __embeddings // external & foundation model__ serving endpoints and is the only field // (along with extra_params if needed) used by embeddings queries. - Input types.Object `tfsdk:"input" tf:"optional"` + Input types.Object `tfsdk:"input" tf:""` // Tensor-based input in columnar format. - Inputs types.Object `tfsdk:"inputs" tf:"optional"` + Inputs types.Object `tfsdk:"inputs" tf:""` // Tensor-based input in row format. - Instances types.List `tfsdk:"instances" tf:"optional"` + Instances types.List `tfsdk:"instances" tf:""` // The max tokens field used ONLY for __completions__ and __chat external & // foundation model__ serving endpoints. This is an integer and should only // be used with other chat/completions query fields. - MaxTokens types.Int64 `tfsdk:"max_tokens" tf:"optional"` + MaxTokens types.Int64 `tfsdk:"max_tokens" tf:""` // The messages field used ONLY for __chat external & foundation model__ // serving endpoints. This is a map of strings and should only be used with // other chat query fields. - Messages types.List `tfsdk:"messages" tf:"optional"` + Messages types.List `tfsdk:"messages" tf:""` // The n (number of candidates) field used ONLY for __completions__ and // __chat external & foundation model__ serving endpoints. This is an // integer between 1 and 5 with a default of 1 and should only be used with // other chat/completions query fields. - N types.Int64 `tfsdk:"n" tf:"optional"` + N types.Int64 `tfsdk:"n" tf:""` // The name of the serving endpoint. This field is required. Name types.String `tfsdk:"-"` // The prompt string (or array of strings) field used ONLY for __completions // external & foundation model__ serving endpoints and should only be used // with other completions query fields. - Prompt types.Object `tfsdk:"prompt" tf:"optional"` + Prompt types.Object `tfsdk:"prompt" tf:""` // The stop sequences field used ONLY for __completions__ and __chat // external & foundation model__ serving endpoints. This is a list of // strings and should only be used with other chat/completions query fields. - Stop types.List `tfsdk:"stop" tf:"optional"` + Stop types.List `tfsdk:"stop" tf:""` // The stream field used ONLY for __completions__ and __chat external & // foundation model__ serving endpoints. This is a boolean defaulting to // false and should only be used with other chat/completions query fields. - Stream types.Bool `tfsdk:"stream" tf:"optional"` + Stream types.Bool `tfsdk:"stream" tf:""` // The temperature field used ONLY for __completions__ and __chat external & // foundation model__ serving endpoints. This is a float between 0.0 and 2.0 // with a default of 1.0 and should only be used with other chat/completions // query fields. - Temperature types.Float64 `tfsdk:"temperature" tf:"optional"` + Temperature types.Float64 `tfsdk:"temperature" tf:""` } func (newState *QueryEndpointInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEndpointInput) { @@ -4474,6 +4624,14 @@ func (newState *QueryEndpointInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *QueryEndpointInput) SyncEffectiveFieldsDuringRead(existingState QueryEndpointInput) { } +func (c QueryEndpointInput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DataframeSplitInput{}.ToSchema(cs, append(path, "dataframe_split")...) + ChatMessage{}.ToSchema(cs, append(path, "messages")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryEndpointInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4709,32 +4867,32 @@ func (o *QueryEndpointInput) SetStop(ctx context.Context, v []types.String) { type QueryEndpointResponse struct { // The list of choices returned by the __chat or completions // external/foundation model__ serving endpoint. - Choices types.List `tfsdk:"choices" tf:"optional"` + Choices types.List `tfsdk:"choices" tf:""` // The timestamp in seconds when the query was created in Unix time returned // by a __completions or chat external/foundation model__ serving endpoint. - Created types.Int64 `tfsdk:"created" tf:"optional"` + Created types.Int64 `tfsdk:"created" tf:""` // The list of the embeddings returned by the __embeddings // external/foundation model__ serving endpoint. - Data types.List `tfsdk:"data" tf:"optional"` + Data types.List `tfsdk:"data" tf:""` // The ID of the query that may be returned by a __completions or chat // external/foundation model__ serving endpoint. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The name of the __external/foundation model__ used for querying. This is // the name of the model that was specified in the endpoint config. - Model types.String `tfsdk:"model" tf:"optional"` + Model types.String `tfsdk:"model" tf:""` // The type of object returned by the __external/foundation model__ serving // endpoint, one of [text_completion, chat.completion, list (of // embeddings)]. - Object types.String `tfsdk:"object" tf:"optional"` + Object types.String `tfsdk:"object" tf:""` // The predictions returned by the serving endpoint. - Predictions types.List `tfsdk:"predictions" tf:"optional"` + Predictions types.List `tfsdk:"predictions" tf:""` // The name of the served model that served the request. This is useful when // there are multiple models behind the same endpoint with traffic split. ServedModelName types.String `tfsdk:"-"` // The usage object that may be returned by the __external/foundation // model__ serving endpoint. This contains information about the number of // tokens used in the prompt and response. - Usage types.Object `tfsdk:"usage" tf:"optional,object"` + Usage types.Object `tfsdk:"usage" tf:"object"` } func (newState *QueryEndpointResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEndpointResponse) { @@ -4743,6 +4901,14 @@ func (newState *QueryEndpointResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *QueryEndpointResponse) SyncEffectiveFieldsDuringRead(existingState QueryEndpointResponse) { } +func (c QueryEndpointResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + V1ResponseChoiceElement{}.ToSchema(cs, append(path, "choices")...) + EmbeddingsV1ResponseEmbeddingElement{}.ToSchema(cs, append(path, "data")...) + ExternalModelUsageElement{}.ToSchema(cs, append(path, "usage")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryEndpointResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4914,7 +5080,7 @@ type RateLimit struct { // Key field for a serving endpoint rate limit. Currently, only 'user' and // 'endpoint' are supported, with 'endpoint' being the default if not // specified. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Renewal period field for a serving endpoint rate limit. Currently, only // 'minute' is supported. RenewalPeriod types.String `tfsdk:"renewal_period" tf:""` @@ -4926,6 +5092,13 @@ func (newState *RateLimit) SyncEffectiveFieldsDuringCreateOrUpdate(plan RateLimi func (newState *RateLimit) SyncEffectiveFieldsDuringRead(existingState RateLimit) { } +func (c RateLimit) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "calls")...) + cs.SetRequired(append(path, "renewal_period")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RateLimit. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4975,6 +5148,13 @@ func (newState *Route) SyncEffectiveFieldsDuringCreateOrUpdate(plan Route) { func (newState *Route) SyncEffectiveFieldsDuringRead(existingState Route) { } +func (c Route) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "served_model_name")...) + cs.SetRequired(append(path, "traffic_percentage")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Route. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5014,17 +5194,17 @@ type ServedEntityInput struct { // function of type FEATURE_SPEC in the UC. If it is a UC object, the full // name of the object should be given in the form of // __catalog_name__.__schema_name__.__model_name__. - EntityName types.String `tfsdk:"entity_name" tf:"optional"` + EntityName types.String `tfsdk:"entity_name" tf:""` // The version of the model in Databricks Model Registry to be served or // empty if the entity is a FEATURE_SPEC. - EntityVersion types.String `tfsdk:"entity_version" tf:"optional"` + EntityVersion types.String `tfsdk:"entity_version" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs used for serving this entity. Note: this is an // experimental feature and subject to change. Example entity environment // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": // "{{secrets/my_scope2/my_key2}}"}` - EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:""` // The external model to be served. NOTE: Only one of external_model and // (entity_name, entity_version, workload_size, workload_type, and // scale_to_zero_enabled) can be specified with the latter set being used @@ -5033,24 +5213,24 @@ type ServedEntityInput struct { // endpoint without external_model. If the endpoint is created without // external_model, users cannot update it to add external_model later. The // task type of all external models within an endpoint must be the same. - ExternalModel types.Object `tfsdk:"external_model" tf:"optional,object"` + ExternalModel types.Object `tfsdk:"external_model" tf:"object"` // ARN of the instance profile that the served entity uses to access AWS // resources. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The maximum tokens per second that the endpoint can scale up to. - MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:"optional"` + MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:""` // The minimum tokens per second that the endpoint can scale down to. - MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:"optional"` + MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:""` // The name of a served entity. It must be unique across an endpoint. A // served entity name can consist of alphanumeric characters, dashes, and // underscores. If not specified for an external model, this field defaults // to external_model.name, with '.' and ':' replaced with '-', and if not // specified for other entities, it defaults to // -. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether the compute resources for the served entity should scale down to // zero. - ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:""` // The workload size of the served entity. The workload size corresponds to // a range of provisioned concurrency that the compute autoscales between. A // single unit of provisioned concurrency can process one request at a time. @@ -5058,7 +5238,7 @@ type ServedEntityInput struct { // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 // provisioned concurrency). If scale-to-zero is enabled, the lower bound of // the provisioned concurrency for each workload size is 0. - WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + WorkloadSize types.String `tfsdk:"workload_size" tf:""` // The workload type of the served entity. The workload type selects which // type of compute to use in the endpoint. The default value for this // parameter is "CPU". For deep learning workloads, GPU acceleration is @@ -5066,7 +5246,7 @@ type ServedEntityInput struct { // available [GPU types]. // // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types - WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` + WorkloadType types.String `tfsdk:"workload_type" tf:""` } func (newState *ServedEntityInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedEntityInput) { @@ -5075,6 +5255,12 @@ func (newState *ServedEntityInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ServedEntityInput) SyncEffectiveFieldsDuringRead(existingState ServedEntityInput) { } +func (c ServedEntityInput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalModel{}.ToSchema(cs, append(path, "external_model")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedEntityInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5187,49 +5373,49 @@ func (o *ServedEntityInput) SetExternalModel(ctx context.Context, v ExternalMode type ServedEntityOutput struct { // The creation timestamp of the served entity in Unix time. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // The email of the user who created the served entity. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // The name of the entity served. The entity may be a model in the // Databricks Model Registry, a model in the Unity Catalog (UC), or a // function of type FEATURE_SPEC in the UC. If it is a UC object, the full // name of the object is given in the form of // __catalog_name__.__schema_name__.__model_name__. - EntityName types.String `tfsdk:"entity_name" tf:"optional"` + EntityName types.String `tfsdk:"entity_name" tf:""` // The version of the served entity in Databricks Model Registry or empty if // the entity is a FEATURE_SPEC. - EntityVersion types.String `tfsdk:"entity_version" tf:"optional"` + EntityVersion types.String `tfsdk:"entity_version" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs used for serving this entity. Note: this is an // experimental feature and subject to change. Example entity environment // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": // "{{secrets/my_scope2/my_key2}}"}` - EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:""` // The external model that is served. NOTE: Only one of external_model, // foundation_model, and (entity_name, entity_version, workload_size, // workload_type, and scale_to_zero_enabled) is returned based on the // endpoint type. - ExternalModel types.Object `tfsdk:"external_model" tf:"optional,object"` + ExternalModel types.Object `tfsdk:"external_model" tf:"object"` // The foundation model that is served. NOTE: Only one of foundation_model, // external_model, and (entity_name, entity_version, workload_size, // workload_type, and scale_to_zero_enabled) is returned based on the // endpoint type. - FoundationModel types.Object `tfsdk:"foundation_model" tf:"optional,object"` + FoundationModel types.Object `tfsdk:"foundation_model" tf:"object"` // ARN of the instance profile that the served entity uses to access AWS // resources. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The maximum tokens per second that the endpoint can scale up to. - MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:"optional"` + MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:""` // The minimum tokens per second that the endpoint can scale down to. - MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:"optional"` + MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:""` // The name of the served entity. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether the compute resources for the served entity should scale down to // zero. - ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:""` // Information corresponding to the state of the served entity. - State types.Object `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"object"` // The workload size of the served entity. The workload size corresponds to // a range of provisioned concurrency that the compute autoscales between. A // single unit of provisioned concurrency can process one request at a time. @@ -5237,7 +5423,7 @@ type ServedEntityOutput struct { // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 // provisioned concurrency). If scale-to-zero is enabled, the lower bound of // the provisioned concurrency for each workload size will be 0. - WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + WorkloadSize types.String `tfsdk:"workload_size" tf:""` // The workload type of the served entity. The workload type selects which // type of compute to use in the endpoint. The default value for this // parameter is "CPU". For deep learning workloads, GPU acceleration is @@ -5245,7 +5431,7 @@ type ServedEntityOutput struct { // available [GPU types]. // // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types - WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` + WorkloadType types.String `tfsdk:"workload_type" tf:""` } func (newState *ServedEntityOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedEntityOutput) { @@ -5254,6 +5440,14 @@ func (newState *ServedEntityOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ServedEntityOutput) SyncEffectiveFieldsDuringRead(existingState ServedEntityOutput) { } +func (c ServedEntityOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalModel{}.ToSchema(cs, append(path, "external_model")...) + FoundationModel{}.ToSchema(cs, append(path, "foundation_model")...) + ServedModelState{}.ToSchema(cs, append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedEntityOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5436,20 +5630,20 @@ type ServedEntitySpec struct { // function of type FEATURE_SPEC in the UC. If it is a UC object, the full // name of the object is given in the form of // __catalog_name__.__schema_name__.__model_name__. - EntityName types.String `tfsdk:"entity_name" tf:"optional"` + EntityName types.String `tfsdk:"entity_name" tf:""` // The version of the served entity in Databricks Model Registry or empty if // the entity is a FEATURE_SPEC. - EntityVersion types.String `tfsdk:"entity_version" tf:"optional"` + EntityVersion types.String `tfsdk:"entity_version" tf:""` // The external model that is served. NOTE: Only one of external_model, // foundation_model, and (entity_name, entity_version) is returned based on // the endpoint type. - ExternalModel types.Object `tfsdk:"external_model" tf:"optional,object"` + ExternalModel types.Object `tfsdk:"external_model" tf:"object"` // The foundation model that is served. NOTE: Only one of foundation_model, // external_model, and (entity_name, entity_version) is returned based on // the endpoint type. - FoundationModel types.Object `tfsdk:"foundation_model" tf:"optional,object"` + FoundationModel types.Object `tfsdk:"foundation_model" tf:"object"` // The name of the served entity. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ServedEntitySpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedEntitySpec) { @@ -5458,6 +5652,13 @@ func (newState *ServedEntitySpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *ServedEntitySpec) SyncEffectiveFieldsDuringRead(existingState ServedEntitySpec) { } +func (c ServedEntitySpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalModel{}.ToSchema(cs, append(path, "external_model")...) + FoundationModel{}.ToSchema(cs, append(path, "foundation_model")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedEntitySpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5563,14 +5764,14 @@ type ServedModelInput struct { // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": // "{{secrets/my_scope2/my_key2}}"}` - EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:""` // ARN of the instance profile that the served model will use to access AWS // resources. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The maximum tokens per second that the endpoint can scale up to. - MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:"optional"` + MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:""` // The minimum tokens per second that the endpoint can scale down to. - MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:"optional"` + MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:""` // The name of the model in Databricks Model Registry to be served or if the // model resides in Unity Catalog, the full name of model, in the form of // __catalog_name__.__schema_name__.__model_name__. @@ -5582,7 +5783,7 @@ type ServedModelInput struct { // specified, this field will default to -. A // served model name can consist of alphanumeric characters, dashes, and // underscores. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether the compute resources for the served model should scale down to // zero. ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:""` @@ -5593,7 +5794,7 @@ type ServedModelInput struct { // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 // provisioned concurrency). If scale-to-zero is enabled, the lower bound of // the provisioned concurrency for each workload size will be 0. - WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + WorkloadSize types.String `tfsdk:"workload_size" tf:""` // The workload type of the served model. The workload type selects which // type of compute to use in the endpoint. The default value for this // parameter is "CPU". For deep learning workloads, GPU acceleration is @@ -5601,7 +5802,7 @@ type ServedModelInput struct { // available [GPU types]. // // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types - WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` + WorkloadType types.String `tfsdk:"workload_type" tf:""` } func (newState *ServedModelInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelInput) { @@ -5610,6 +5811,14 @@ func (newState *ServedModelInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *ServedModelInput) SyncEffectiveFieldsDuringRead(existingState ServedModelInput) { } +func (c ServedModelInput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "model_name")...) + cs.SetRequired(append(path, "model_version")...) + cs.SetRequired(append(path, "scale_to_zero_enabled")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelInput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5691,32 +5900,32 @@ func (o *ServedModelInput) SetEnvironmentVars(ctx context.Context, v map[string] type ServedModelOutput struct { // The creation timestamp of the served model in Unix time. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // The email of the user who created the served model. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // An object containing a set of optional, user-specified environment // variable key-value pairs used for serving this model. Note: this is an // experimental feature and subject to change. Example model environment // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": // "{{secrets/my_scope2/my_key2}}"}` - EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:""` // ARN of the instance profile that the served model will use to access AWS // resources. - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // The name of the model in Databricks Model Registry or the full name of // the model in Unity Catalog. - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // The version of the model in Databricks Model Registry or Unity Catalog to // be served. - ModelVersion types.String `tfsdk:"model_version" tf:"optional"` + ModelVersion types.String `tfsdk:"model_version" tf:""` // The name of the served model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Whether the compute resources for the Served Model should scale down to // zero. - ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:""` // Information corresponding to the state of the Served Model. - State types.Object `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"object"` // The workload size of the served model. The workload size corresponds to a // range of provisioned concurrency that the compute will autoscale between. // A single unit of provisioned concurrency can process one request at a @@ -5724,7 +5933,7 @@ type ServedModelOutput struct { // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 // provisioned concurrency). If scale-to-zero is enabled, the lower bound of // the provisioned concurrency for each workload size will be 0. - WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + WorkloadSize types.String `tfsdk:"workload_size" tf:""` // The workload type of the served model. The workload type selects which // type of compute to use in the endpoint. The default value for this // parameter is "CPU". For deep learning workloads, GPU acceleration is @@ -5732,7 +5941,7 @@ type ServedModelOutput struct { // available [GPU types]. // // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types - WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` + WorkloadType types.String `tfsdk:"workload_type" tf:""` } func (newState *ServedModelOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelOutput) { @@ -5741,6 +5950,12 @@ func (newState *ServedModelOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ServedModelOutput) SyncEffectiveFieldsDuringRead(existingState ServedModelOutput) { } +func (c ServedModelOutput) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServedModelState{}.ToSchema(cs, append(path, "state")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelOutput. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5854,12 +6069,12 @@ func (o *ServedModelOutput) SetState(ctx context.Context, v ServedModelState) { type ServedModelSpec struct { // The name of the model in Databricks Model Registry or the full name of // the model in Unity Catalog. - ModelName types.String `tfsdk:"model_name" tf:"optional"` + ModelName types.String `tfsdk:"model_name" tf:""` // The version of the model in Databricks Model Registry or Unity Catalog to // be served. - ModelVersion types.String `tfsdk:"model_version" tf:"optional"` + ModelVersion types.String `tfsdk:"model_version" tf:""` // The name of the served model. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ServedModelSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelSpec) { @@ -5868,6 +6083,11 @@ func (newState *ServedModelSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan Se func (newState *ServedModelSpec) SyncEffectiveFieldsDuringRead(existingState ServedModelSpec) { } +func (c ServedModelSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5916,9 +6136,9 @@ type ServedModelState struct { // etc.) DEPLOYMENT_ABORTED indicates that the deployment was terminated // likely due to a failure in bringing up another served entity under the // same endpoint and config version. - Deployment types.String `tfsdk:"deployment" tf:"optional"` + Deployment types.String `tfsdk:"deployment" tf:""` // More information about the state of the served entity, if available. - DeploymentStateMessage types.String `tfsdk:"deployment_state_message" tf:"optional"` + DeploymentStateMessage types.String `tfsdk:"deployment_state_message" tf:""` } func (newState *ServedModelState) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelState) { @@ -5927,6 +6147,11 @@ func (newState *ServedModelState) SyncEffectiveFieldsDuringCreateOrUpdate(plan S func (newState *ServedModelState) SyncEffectiveFieldsDuringRead(existingState ServedModelState) { } +func (c ServedModelState) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelState. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5972,6 +6197,12 @@ func (newState *ServerLogsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ServerLogsResponse) SyncEffectiveFieldsDuringRead(existingState ServerLogsResponse) { } +func (c ServerLogsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "logs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServerLogsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6006,26 +6237,26 @@ func (o ServerLogsResponse) Type(ctx context.Context) attr.Type { type ServingEndpoint struct { // The AI Gateway configuration for the serving endpoint. NOTE: Only // external model endpoints are currently supported. - AiGateway types.Object `tfsdk:"ai_gateway" tf:"optional,object"` + AiGateway types.Object `tfsdk:"ai_gateway" tf:"object"` // The config that is currently being served by the endpoint. - Config types.Object `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"object"` // The timestamp when the endpoint was created in Unix time. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // The email of the user who created the serving endpoint. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // System-generated ID of the endpoint. This is used to refer to the // endpoint in the Permissions API - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The timestamp when the endpoint was last updated by a user in Unix time. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // The name of the serving endpoint. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Information corresponding to the state of the serving endpoint. - State types.Object `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"object"` // Tags attached to the serving endpoint. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The task type of the serving endpoint. - Task types.String `tfsdk:"task" tf:"optional"` + Task types.String `tfsdk:"task" tf:""` } func (newState *ServingEndpoint) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpoint) { @@ -6034,6 +6265,15 @@ func (newState *ServingEndpoint) SyncEffectiveFieldsDuringCreateOrUpdate(plan Se func (newState *ServingEndpoint) SyncEffectiveFieldsDuringRead(existingState ServingEndpoint) { } +func (c ServingEndpoint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayConfig{}.ToSchema(cs, append(path, "ai_gateway")...) + EndpointCoreConfigSummary{}.ToSchema(cs, append(path, "config")...) + EndpointState{}.ToSchema(cs, append(path, "state")...) + EndpointTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6202,13 +6442,13 @@ func (o *ServingEndpoint) SetTags(ctx context.Context, v []EndpointTag) { type ServingEndpointAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ServingEndpointAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointAccessControlRequest) { @@ -6217,6 +6457,11 @@ func (newState *ServingEndpointAccessControlRequest) SyncEffectiveFieldsDuringCr func (newState *ServingEndpointAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState ServingEndpointAccessControlRequest) { } +func (c ServingEndpointAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6256,15 +6501,15 @@ func (o ServingEndpointAccessControlRequest) Type(ctx context.Context) attr.Type type ServingEndpointAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *ServingEndpointAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointAccessControlResponse) { @@ -6273,6 +6518,12 @@ func (newState *ServingEndpointAccessControlResponse) SyncEffectiveFieldsDuringC func (newState *ServingEndpointAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState ServingEndpointAccessControlResponse) { } +func (c ServingEndpointAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpointPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6345,37 +6596,37 @@ func (o *ServingEndpointAccessControlResponse) SetAllPermissions(ctx context.Con type ServingEndpointDetailed struct { // The AI Gateway configuration for the serving endpoint. NOTE: Only // external model endpoints are currently supported. - AiGateway types.Object `tfsdk:"ai_gateway" tf:"optional,object"` + AiGateway types.Object `tfsdk:"ai_gateway" tf:"object"` // The config that is currently being served by the endpoint. - Config types.Object `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"object"` // The timestamp when the endpoint was created in Unix time. - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // The email of the user who created the serving endpoint. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // Information required to query DataPlane APIs. - DataPlaneInfo types.Object `tfsdk:"data_plane_info" tf:"optional,object"` + DataPlaneInfo types.Object `tfsdk:"data_plane_info" tf:"object"` // Endpoint invocation url if route optimization is enabled for endpoint - EndpointUrl types.String `tfsdk:"endpoint_url" tf:"optional"` + EndpointUrl types.String `tfsdk:"endpoint_url" tf:""` // System-generated ID of the endpoint. This is used to refer to the // endpoint in the Permissions API - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The timestamp when the endpoint was last updated by a user in Unix time. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // The name of the serving endpoint. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The config that the endpoint is attempting to update to. - PendingConfig types.Object `tfsdk:"pending_config" tf:"optional,object"` + PendingConfig types.Object `tfsdk:"pending_config" tf:"object"` // The permission level of the principal making the request. - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // Boolean representing if route optimization has been enabled for the // endpoint - RouteOptimized types.Bool `tfsdk:"route_optimized" tf:"optional"` + RouteOptimized types.Bool `tfsdk:"route_optimized" tf:""` // Information corresponding to the state of the serving endpoint. - State types.Object `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"object"` // Tags attached to the serving endpoint. - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The task type of the serving endpoint. - Task types.String `tfsdk:"task" tf:"optional"` + Task types.String `tfsdk:"task" tf:""` } func (newState *ServingEndpointDetailed) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointDetailed) { @@ -6384,6 +6635,17 @@ func (newState *ServingEndpointDetailed) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ServingEndpointDetailed) SyncEffectiveFieldsDuringRead(existingState ServingEndpointDetailed) { } +func (c ServingEndpointDetailed) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AiGatewayConfig{}.ToSchema(cs, append(path, "ai_gateway")...) + EndpointCoreConfigOutput{}.ToSchema(cs, append(path, "config")...) + ModelDataPlaneInfo{}.ToSchema(cs, append(path, "data_plane_info")...) + EndpointPendingConfig{}.ToSchema(cs, append(path, "pending_config")...) + EndpointState{}.ToSchema(cs, append(path, "state")...) + EndpointTag{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointDetailed. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6619,11 +6881,11 @@ func (o *ServingEndpointDetailed) SetTags(ctx context.Context, v []EndpointTag) } type ServingEndpointPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ServingEndpointPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermission) { @@ -6632,6 +6894,11 @@ func (newState *ServingEndpointPermission) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ServingEndpointPermission) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermission) { } +func (c ServingEndpointPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6698,11 +6965,11 @@ func (o *ServingEndpointPermission) SetInheritedFromObject(ctx context.Context, } type ServingEndpointPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *ServingEndpointPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermissions) { @@ -6711,6 +6978,12 @@ func (newState *ServingEndpointPermissions) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ServingEndpointPermissions) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissions) { } +func (c ServingEndpointPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpointAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6777,9 +7050,9 @@ func (o *ServingEndpointPermissions) SetAccessControlList(ctx context.Context, v } type ServingEndpointPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *ServingEndpointPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermissionsDescription) { @@ -6788,6 +7061,11 @@ func (newState *ServingEndpointPermissionsDescription) SyncEffectiveFieldsDuring func (newState *ServingEndpointPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissionsDescription) { } +func (c ServingEndpointPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6822,7 +7100,7 @@ func (o ServingEndpointPermissionsDescription) Type(ctx context.Context) attr.Ty } type ServingEndpointPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The serving endpoint for which to get or manage permissions. ServingEndpointId types.String `tfsdk:"-"` } @@ -6833,6 +7111,13 @@ func (newState *ServingEndpointPermissionsRequest) SyncEffectiveFieldsDuringCrea func (newState *ServingEndpointPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissionsRequest) { } +func (c ServingEndpointPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServingEndpointAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "serving_endpoint_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6898,7 +7183,7 @@ func (o *ServingEndpointPermissionsRequest) SetAccessControlList(ctx context.Con type TrafficConfig struct { // The list of routes that define traffic to each served entity. - Routes types.List `tfsdk:"routes" tf:"optional"` + Routes types.List `tfsdk:"routes" tf:""` } func (newState *TrafficConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrafficConfig) { @@ -6907,6 +7192,12 @@ func (newState *TrafficConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan Traf func (newState *TrafficConfig) SyncEffectiveFieldsDuringRead(existingState TrafficConfig) { } +func (c TrafficConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Route{}.ToSchema(cs, append(path, "routes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrafficConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6970,15 +7261,15 @@ func (o *TrafficConfig) SetRoutes(ctx context.Context, v []Route) { type V1ResponseChoiceElement struct { // The finish reason returned by the endpoint. - FinishReason types.String `tfsdk:"finishReason" tf:"optional"` + FinishReason types.String `tfsdk:"finishReason" tf:""` // The index of the choice in the __chat or completions__ response. - Index types.Int64 `tfsdk:"index" tf:"optional"` + Index types.Int64 `tfsdk:"index" tf:""` // The logprobs returned only by the __completions__ endpoint. - Logprobs types.Int64 `tfsdk:"logprobs" tf:"optional"` + Logprobs types.Int64 `tfsdk:"logprobs" tf:""` // The message response from the __chat__ endpoint. - Message types.Object `tfsdk:"message" tf:"optional,object"` + Message types.Object `tfsdk:"message" tf:"object"` // The text response from the __completions__ endpoint. - Text types.String `tfsdk:"text" tf:"optional"` + Text types.String `tfsdk:"text" tf:""` } func (newState *V1ResponseChoiceElement) SyncEffectiveFieldsDuringCreateOrUpdate(plan V1ResponseChoiceElement) { @@ -6987,6 +7278,12 @@ func (newState *V1ResponseChoiceElement) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *V1ResponseChoiceElement) SyncEffectiveFieldsDuringRead(existingState V1ResponseChoiceElement) { } +func (c V1ResponseChoiceElement) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ChatMessage{}.ToSchema(cs, append(path, "message")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in V1ResponseChoiceElement. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/settings_tf/legacy_model.go b/internal/service/settings_tf/legacy_model.go index 15b2e7a38..8bd0ec787 100755 --- a/internal/service/settings_tf/legacy_model.go +++ b/internal/service/settings_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -31,6 +32,12 @@ func (newState *AibiDashboardEmbeddingAccessPolicy_SdkV2) SyncEffectiveFieldsDur func (newState *AibiDashboardEmbeddingAccessPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingAccessPolicy_SdkV2) { } +func (c AibiDashboardEmbeddingAccessPolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_policy_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingAccessPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -71,13 +78,13 @@ type AibiDashboardEmbeddingAccessPolicySetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *AibiDashboardEmbeddingAccessPolicySetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingAccessPolicySetting_SdkV2) { @@ -86,6 +93,13 @@ func (newState *AibiDashboardEmbeddingAccessPolicySetting_SdkV2) SyncEffectiveFi func (newState *AibiDashboardEmbeddingAccessPolicySetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingAccessPolicySetting_SdkV2) { } +func (c AibiDashboardEmbeddingAccessPolicySetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "aibi_dashboard_embedding_access_policy")...) + AibiDashboardEmbeddingAccessPolicy_SdkV2{}.ToSchema(cs, append(path, "aibi_dashboard_embedding_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingAccessPolicySetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -152,7 +166,7 @@ func (o *AibiDashboardEmbeddingAccessPolicySetting_SdkV2) SetAibiDashboardEmbedd } type AibiDashboardEmbeddingApprovedDomains_SdkV2 struct { - ApprovedDomains types.List `tfsdk:"approved_domains" tf:"optional"` + ApprovedDomains types.List `tfsdk:"approved_domains" tf:""` } func (newState *AibiDashboardEmbeddingApprovedDomains_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingApprovedDomains_SdkV2) { @@ -161,6 +175,11 @@ func (newState *AibiDashboardEmbeddingApprovedDomains_SdkV2) SyncEffectiveFields func (newState *AibiDashboardEmbeddingApprovedDomains_SdkV2) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingApprovedDomains_SdkV2) { } +func (c AibiDashboardEmbeddingApprovedDomains_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingApprovedDomains. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -231,13 +250,13 @@ type AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) { @@ -246,6 +265,13 @@ func (newState *AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) SyncEffectiv func (newState *AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) { } +func (c AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "aibi_dashboard_embedding_approved_domains")...) + AibiDashboardEmbeddingApprovedDomains_SdkV2{}.ToSchema(cs, append(path, "aibi_dashboard_embedding_approved_domains")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingApprovedDomainsSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -320,13 +346,13 @@ type AutomaticClusterUpdateSetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *AutomaticClusterUpdateSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutomaticClusterUpdateSetting_SdkV2) { @@ -335,6 +361,13 @@ func (newState *AutomaticClusterUpdateSetting_SdkV2) SyncEffectiveFieldsDuringCr func (newState *AutomaticClusterUpdateSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutomaticClusterUpdateSetting_SdkV2) { } +func (c AutomaticClusterUpdateSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "automatic_cluster_update_workspace")...) + ClusterAutoRestartMessage_SdkV2{}.ToSchema(cs, append(path, "automatic_cluster_update_workspace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutomaticClusterUpdateSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -401,7 +434,7 @@ func (o *AutomaticClusterUpdateSetting_SdkV2) SetAutomaticClusterUpdateWorkspace } type BooleanMessage_SdkV2 struct { - Value types.Bool `tfsdk:"value" tf:"optional"` + Value types.Bool `tfsdk:"value" tf:""` } func (newState *BooleanMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BooleanMessage_SdkV2) { @@ -410,6 +443,11 @@ func (newState *BooleanMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *BooleanMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState BooleanMessage_SdkV2) { } +func (c BooleanMessage_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BooleanMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -442,20 +480,20 @@ func (o BooleanMessage_SdkV2) Type(ctx context.Context) attr.Type { } type ClusterAutoRestartMessage_SdkV2 struct { - CanToggle types.Bool `tfsdk:"can_toggle" tf:"optional"` + CanToggle types.Bool `tfsdk:"can_toggle" tf:""` - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // Contains an information about the enablement status judging (e.g. whether // the enterprise tier is enabled) This is only additional information that // MUST NOT be used to decide whether the setting is enabled or not. This is // intended to use only for purposes like showing an error message to the // customer with the additional details. For example, using these details we // can check why exactly the feature is disabled for this customer. - EnablementDetails types.List `tfsdk:"enablement_details" tf:"optional,object"` + EnablementDetails types.List `tfsdk:"enablement_details" tf:"object"` - MaintenanceWindow types.List `tfsdk:"maintenance_window" tf:"optional,object"` + MaintenanceWindow types.List `tfsdk:"maintenance_window" tf:"object"` - RestartEvenIfNoUpdatesAvailable types.Bool `tfsdk:"restart_even_if_no_updates_available" tf:"optional"` + RestartEvenIfNoUpdatesAvailable types.Bool `tfsdk:"restart_even_if_no_updates_available" tf:""` } func (newState *ClusterAutoRestartMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessage_SdkV2) { @@ -464,6 +502,13 @@ func (newState *ClusterAutoRestartMessage_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ClusterAutoRestartMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessage_SdkV2) { } +func (c ClusterAutoRestartMessage_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAutoRestartMessageEnablementDetails_SdkV2{}.ToSchema(cs, append(path, "enablement_details")...) + ClusterAutoRestartMessageMaintenanceWindow_SdkV2{}.ToSchema(cs, append(path, "maintenance_window")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -570,12 +615,12 @@ func (o *ClusterAutoRestartMessage_SdkV2) SetMaintenanceWindow(ctx context.Conte // the feature is disabled for this customer. type ClusterAutoRestartMessageEnablementDetails_SdkV2 struct { // The feature is force enabled if compliance mode is active - ForcedForComplianceMode types.Bool `tfsdk:"forced_for_compliance_mode" tf:"optional"` + ForcedForComplianceMode types.Bool `tfsdk:"forced_for_compliance_mode" tf:""` // The feature is unavailable if the corresponding entitlement disabled (see // getShieldEntitlementEnable) - UnavailableForDisabledEntitlement types.Bool `tfsdk:"unavailable_for_disabled_entitlement" tf:"optional"` + UnavailableForDisabledEntitlement types.Bool `tfsdk:"unavailable_for_disabled_entitlement" tf:""` // The feature is unavailable if the customer doesn't have enterprise tier - UnavailableForNonEnterpriseTier types.Bool `tfsdk:"unavailable_for_non_enterprise_tier" tf:"optional"` + UnavailableForNonEnterpriseTier types.Bool `tfsdk:"unavailable_for_non_enterprise_tier" tf:""` } func (newState *ClusterAutoRestartMessageEnablementDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageEnablementDetails_SdkV2) { @@ -584,6 +629,11 @@ func (newState *ClusterAutoRestartMessageEnablementDetails_SdkV2) SyncEffectiveF func (newState *ClusterAutoRestartMessageEnablementDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageEnablementDetails_SdkV2) { } +func (c ClusterAutoRestartMessageEnablementDetails_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageEnablementDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -620,7 +670,7 @@ func (o ClusterAutoRestartMessageEnablementDetails_SdkV2) Type(ctx context.Conte } type ClusterAutoRestartMessageMaintenanceWindow_SdkV2 struct { - WeekDayBasedSchedule types.List `tfsdk:"week_day_based_schedule" tf:"optional,object"` + WeekDayBasedSchedule types.List `tfsdk:"week_day_based_schedule" tf:"object"` } func (newState *ClusterAutoRestartMessageMaintenanceWindow_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindow_SdkV2) { @@ -629,6 +679,12 @@ func (newState *ClusterAutoRestartMessageMaintenanceWindow_SdkV2) SyncEffectiveF func (newState *ClusterAutoRestartMessageMaintenanceWindow_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageMaintenanceWindow_SdkV2) { } +func (c ClusterAutoRestartMessageMaintenanceWindow_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2{}.ToSchema(cs, append(path, "week_day_based_schedule")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageMaintenanceWindow. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -691,11 +747,11 @@ func (o *ClusterAutoRestartMessageMaintenanceWindow_SdkV2) SetWeekDayBasedSchedu } type ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2 struct { - DayOfWeek types.String `tfsdk:"day_of_week" tf:"optional"` + DayOfWeek types.String `tfsdk:"day_of_week" tf:""` - Frequency types.String `tfsdk:"frequency" tf:"optional"` + Frequency types.String `tfsdk:"frequency" tf:""` - WindowStartTime types.List `tfsdk:"window_start_time" tf:"optional,object"` + WindowStartTime types.List `tfsdk:"window_start_time" tf:"object"` } func (newState *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) { @@ -704,6 +760,12 @@ func (newState *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_S func (newState *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) { } +func (c ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2{}.ToSchema(cs, append(path, "window_start_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -770,9 +832,9 @@ func (o *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) S } type ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2 struct { - Hours types.Int64 `tfsdk:"hours" tf:"optional"` + Hours types.Int64 `tfsdk:"hours" tf:""` - Minutes types.Int64 `tfsdk:"minutes" tf:"optional"` + Minutes types.Int64 `tfsdk:"minutes" tf:""` } func (newState *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) { @@ -781,6 +843,11 @@ func (newState *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) func (newState *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) { } +func (c ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageMaintenanceWindowWindowStartTime. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -817,9 +884,9 @@ func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) Type(ct // SHIELD feature: CSP type ComplianceSecurityProfile_SdkV2 struct { // Set by customers when they request Compliance Security Profile (CSP) - ComplianceStandards types.List `tfsdk:"compliance_standards" tf:"optional"` + ComplianceStandards types.List `tfsdk:"compliance_standards" tf:""` - IsEnabled types.Bool `tfsdk:"is_enabled" tf:"optional"` + IsEnabled types.Bool `tfsdk:"is_enabled" tf:""` } func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplianceSecurityProfile_SdkV2) { @@ -828,6 +895,11 @@ func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComplianceSecurityProfile_SdkV2) { } +func (c ComplianceSecurityProfile_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplianceSecurityProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -901,13 +973,13 @@ type ComplianceSecurityProfileSetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *ComplianceSecurityProfileSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplianceSecurityProfileSetting_SdkV2) { @@ -916,6 +988,13 @@ func (newState *ComplianceSecurityProfileSetting_SdkV2) SyncEffectiveFieldsDurin func (newState *ComplianceSecurityProfileSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComplianceSecurityProfileSetting_SdkV2) { } +func (c ComplianceSecurityProfileSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "compliance_security_profile_workspace")...) + ComplianceSecurityProfile_SdkV2{}.ToSchema(cs, append(path, "compliance_security_profile_workspace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplianceSecurityProfileSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -982,15 +1061,15 @@ func (o *ComplianceSecurityProfileSetting_SdkV2) SetComplianceSecurityProfileWor } type Config_SdkV2 struct { - Email types.List `tfsdk:"email" tf:"optional,object"` + Email types.List `tfsdk:"email" tf:"object"` - GenericWebhook types.List `tfsdk:"generic_webhook" tf:"optional,object"` + GenericWebhook types.List `tfsdk:"generic_webhook" tf:"object"` - MicrosoftTeams types.List `tfsdk:"microsoft_teams" tf:"optional,object"` + MicrosoftTeams types.List `tfsdk:"microsoft_teams" tf:"object"` - Pagerduty types.List `tfsdk:"pagerduty" tf:"optional,object"` + Pagerduty types.List `tfsdk:"pagerduty" tf:"object"` - Slack types.List `tfsdk:"slack" tf:"optional,object"` + Slack types.List `tfsdk:"slack" tf:"object"` } func (newState *Config_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Config_SdkV2) { @@ -999,6 +1078,16 @@ func (newState *Config_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Confi func (newState *Config_SdkV2) SyncEffectiveFieldsDuringRead(existingState Config_SdkV2) { } +func (c Config_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EmailConfig_SdkV2{}.ToSchema(cs, append(path, "email")...) + GenericWebhookConfig_SdkV2{}.ToSchema(cs, append(path, "generic_webhook")...) + MicrosoftTeamsConfig_SdkV2{}.ToSchema(cs, append(path, "microsoft_teams")...) + PagerdutyConfig_SdkV2{}.ToSchema(cs, append(path, "pagerduty")...) + SlackConfig_SdkV2{}.ToSchema(cs, append(path, "slack")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Config. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1186,7 +1275,7 @@ func (o *Config_SdkV2) SetSlack(ctx context.Context, v SlackConfig_SdkV2) { // Details required to configure a block list or allow list. type CreateIpAccessList_SdkV2 struct { - IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + IpAddresses types.List `tfsdk:"ip_addresses" tf:""` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label" tf:""` // Type of IP access list. Valid values are as follows and are @@ -1204,6 +1293,13 @@ func (newState *CreateIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateIpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateIpAccessList_SdkV2) { } +func (c CreateIpAccessList_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "label")...) + cs.SetRequired(append(path, "list_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateIpAccessList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1272,7 +1368,7 @@ func (o *CreateIpAccessList_SdkV2) SetIpAddresses(ctx context.Context, v []types // An IP access list was successfully created. type CreateIpAccessListResponse_SdkV2 struct { // Definition of an IP Access list - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.List `tfsdk:"ip_access_list" tf:"object"` } func (newState *CreateIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateIpAccessListResponse_SdkV2) { @@ -1281,6 +1377,12 @@ func (newState *CreateIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *CreateIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateIpAccessListResponse_SdkV2) { } +func (c CreateIpAccessListResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo_SdkV2{}.ToSchema(cs, append(path, "ip_access_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateIpAccessListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1360,6 +1462,13 @@ func (newState *CreateNetworkConnectivityConfigRequest_SdkV2) SyncEffectiveField func (newState *CreateNetworkConnectivityConfigRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateNetworkConnectivityConfigRequest_SdkV2) { } +func (c CreateNetworkConnectivityConfigRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "region")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateNetworkConnectivityConfigRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1396,9 +1505,9 @@ func (o CreateNetworkConnectivityConfigRequest_SdkV2) Type(ctx context.Context) type CreateNotificationDestinationRequest_SdkV2 struct { // The configuration for the notification destination. Must wrap EXACTLY one // of the nested configs. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.List `tfsdk:"config" tf:"object"` // The display name for the notification destination. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` } func (newState *CreateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNotificationDestinationRequest_SdkV2) { @@ -1407,6 +1516,12 @@ func (newState *CreateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsD func (newState *CreateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateNotificationDestinationRequest_SdkV2) { } +func (c CreateNotificationDestinationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Config_SdkV2{}.ToSchema(cs, append(path, "config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateNotificationDestinationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1475,9 +1590,9 @@ type CreateOboTokenRequest_SdkV2 struct { // Application ID of the service principal. ApplicationId types.String `tfsdk:"application_id" tf:""` // Comment that describes the purpose of the token. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The number of seconds before the token expires. - LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:"optional"` + LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:""` } func (newState *CreateOboTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOboTokenRequest_SdkV2) { @@ -1486,6 +1601,12 @@ func (newState *CreateOboTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *CreateOboTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateOboTokenRequest_SdkV2) { } +func (c CreateOboTokenRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "application_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateOboTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1523,9 +1644,9 @@ func (o CreateOboTokenRequest_SdkV2) Type(ctx context.Context) attr.Type { // An on-behalf token was successfully created for the service principal. type CreateOboTokenResponse_SdkV2 struct { - TokenInfo types.List `tfsdk:"token_info" tf:"optional,object"` + TokenInfo types.List `tfsdk:"token_info" tf:"object"` // Value of the token. - TokenValue types.String `tfsdk:"token_value" tf:"optional"` + TokenValue types.String `tfsdk:"token_value" tf:""` } func (newState *CreateOboTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOboTokenResponse_SdkV2) { @@ -1534,6 +1655,12 @@ func (newState *CreateOboTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CreateOboTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateOboTokenResponse_SdkV2) { } +func (c CreateOboTokenResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenInfo_SdkV2{}.ToSchema(cs, append(path, "token_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateOboTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1614,6 +1741,14 @@ func (newState *CreatePrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDurin func (newState *CreatePrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePrivateEndpointRuleRequest_SdkV2) { } +func (c CreatePrivateEndpointRuleRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "group_id")...) + cs.SetRequired(append(path, "network_connectivity_config_id")...) + cs.SetRequired(append(path, "resource_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePrivateEndpointRuleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1651,11 +1786,11 @@ func (o CreatePrivateEndpointRuleRequest_SdkV2) Type(ctx context.Context) attr.T type CreateTokenRequest_SdkV2 struct { // Optional description to attach to the token. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The lifetime of the token, in seconds. // // If the lifetime is not specified, this token remains valid indefinitely. - LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:"optional"` + LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:""` } func (newState *CreateTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTokenRequest_SdkV2) { @@ -1664,6 +1799,11 @@ func (newState *CreateTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTokenRequest_SdkV2) { } +func (c CreateTokenRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1699,9 +1839,9 @@ func (o CreateTokenRequest_SdkV2) Type(ctx context.Context) attr.Type { type CreateTokenResponse_SdkV2 struct { // The information for the new token. - TokenInfo types.List `tfsdk:"token_info" tf:"optional,object"` + TokenInfo types.List `tfsdk:"token_info" tf:"object"` // The value of the new token. - TokenValue types.String `tfsdk:"token_value" tf:"optional"` + TokenValue types.String `tfsdk:"token_value" tf:""` } func (newState *CreateTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTokenResponse_SdkV2) { @@ -1710,6 +1850,12 @@ func (newState *CreateTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *CreateTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTokenResponse_SdkV2) { } +func (c CreateTokenResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PublicTokenInfo_SdkV2{}.ToSchema(cs, append(path, "token_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1777,9 +1923,9 @@ func (o *CreateTokenResponse_SdkV2) SetTokenInfo(ctx context.Context, v PublicTo type CspEnablementAccount_SdkV2 struct { // Set by customers when they request Compliance Security Profile (CSP) // Invariants are enforced in Settings policy. - ComplianceStandards types.List `tfsdk:"compliance_standards" tf:"optional"` + ComplianceStandards types.List `tfsdk:"compliance_standards" tf:""` // Enforced = it cannot be overriden at workspace level. - IsEnforced types.Bool `tfsdk:"is_enforced" tf:"optional"` + IsEnforced types.Bool `tfsdk:"is_enforced" tf:""` } func (newState *CspEnablementAccount_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CspEnablementAccount_SdkV2) { @@ -1788,6 +1934,11 @@ func (newState *CspEnablementAccount_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CspEnablementAccount_SdkV2) SyncEffectiveFieldsDuringRead(existingState CspEnablementAccount_SdkV2) { } +func (c CspEnablementAccount_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CspEnablementAccount. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1861,13 +2012,13 @@ type CspEnablementAccountSetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *CspEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CspEnablementAccountSetting_SdkV2) { @@ -1876,6 +2027,13 @@ func (newState *CspEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *CspEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState CspEnablementAccountSetting_SdkV2) { } +func (c CspEnablementAccountSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "csp_enablement_account")...) + CspEnablementAccount_SdkV2{}.ToSchema(cs, append(path, "csp_enablement_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CspEnablementAccountSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1958,7 +2116,7 @@ type DefaultNamespaceSetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` Namespace types.List `tfsdk:"namespace" tf:"object"` // Name of the corresponding setting. This field is populated in the @@ -1966,7 +2124,7 @@ type DefaultNamespaceSetting_SdkV2 struct { // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *DefaultNamespaceSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DefaultNamespaceSetting_SdkV2) { @@ -1975,6 +2133,13 @@ func (newState *DefaultNamespaceSetting_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *DefaultNamespaceSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState DefaultNamespaceSetting_SdkV2) { } +func (c DefaultNamespaceSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "namespace")...) + StringMessage_SdkV2{}.ToSchema(cs, append(path, "namespace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DefaultNamespaceSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2046,12 +2211,6 @@ type DeleteAccountIpAccessListRequest_SdkV2 struct { IpAccessListId types.String `tfsdk:"-"` } -func (newState *DeleteAccountIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountIpAccessListRequest_SdkV2) { -} - -func (newState *DeleteAccountIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountIpAccessListRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountIpAccessListRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2095,12 +2254,6 @@ type DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { -} - -func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingAccessPolicySettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2150,6 +2303,12 @@ func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) S func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) { } +func (c DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingAccessPolicySettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2193,12 +2352,6 @@ type DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { -} - -func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2248,6 +2401,12 @@ func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2 func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2) { } +func (c DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2291,12 +2450,6 @@ type DeleteDefaultNamespaceSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDefaultNamespaceSettingRequest_SdkV2) { -} - -func (newState *DeleteDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDefaultNamespaceSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDefaultNamespaceSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2346,6 +2499,12 @@ func (newState *DeleteDefaultNamespaceSettingResponse_SdkV2) SyncEffectiveFields func (newState *DeleteDefaultNamespaceSettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDefaultNamespaceSettingResponse_SdkV2) { } +func (c DeleteDefaultNamespaceSettingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDefaultNamespaceSettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2389,12 +2548,6 @@ type DeleteDisableLegacyAccessRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyAccessRequest_SdkV2) { -} - -func (newState *DeleteDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyAccessRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyAccessRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2444,6 +2597,12 @@ func (newState *DeleteDisableLegacyAccessResponse_SdkV2) SyncEffectiveFieldsDuri func (newState *DeleteDisableLegacyAccessResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyAccessResponse_SdkV2) { } +func (c DeleteDisableLegacyAccessResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyAccessResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2487,12 +2646,6 @@ type DeleteDisableLegacyDbfsRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyDbfsRequest_SdkV2) { -} - -func (newState *DeleteDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyDbfsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2542,6 +2695,12 @@ func (newState *DeleteDisableLegacyDbfsResponse_SdkV2) SyncEffectiveFieldsDuring func (newState *DeleteDisableLegacyDbfsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyDbfsResponse_SdkV2) { } +func (c DeleteDisableLegacyDbfsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyDbfsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2585,12 +2744,6 @@ type DeleteDisableLegacyFeaturesRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyFeaturesRequest_SdkV2) { -} - -func (newState *DeleteDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyFeaturesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyFeaturesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2640,6 +2793,12 @@ func (newState *DeleteDisableLegacyFeaturesResponse_SdkV2) SyncEffectiveFieldsDu func (newState *DeleteDisableLegacyFeaturesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyFeaturesResponse_SdkV2) { } +func (c DeleteDisableLegacyFeaturesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyFeaturesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2677,12 +2836,6 @@ type DeleteIpAccessListRequest_SdkV2 struct { IpAccessListId types.String `tfsdk:"-"` } -func (newState *DeleteIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteIpAccessListRequest_SdkV2) { -} - -func (newState *DeleteIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteIpAccessListRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteIpAccessListRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2720,12 +2873,6 @@ type DeleteNetworkConnectivityConfigurationRequest_SdkV2 struct { NetworkConnectivityConfigId types.String `tfsdk:"-"` } -func (newState *DeleteNetworkConnectivityConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNetworkConnectivityConfigurationRequest_SdkV2) { -} - -func (newState *DeleteNetworkConnectivityConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteNetworkConnectivityConfigurationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkConnectivityConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2760,12 +2907,6 @@ func (o DeleteNetworkConnectivityConfigurationRequest_SdkV2) Type(ctx context.Co type DeleteNetworkConnectivityConfigurationResponse_SdkV2 struct { } -func (newState *DeleteNetworkConnectivityConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNetworkConnectivityConfigurationResponse_SdkV2) { -} - -func (newState *DeleteNetworkConnectivityConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteNetworkConnectivityConfigurationResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkConnectivityConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2798,12 +2939,6 @@ type DeleteNotificationDestinationRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNotificationDestinationRequest_SdkV2) { -} - -func (newState *DeleteNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteNotificationDestinationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNotificationDestinationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2847,12 +2982,6 @@ type DeletePersonalComputeSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *DeletePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePersonalComputeSettingRequest_SdkV2) { -} - -func (newState *DeletePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePersonalComputeSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePersonalComputeSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2902,6 +3031,12 @@ func (newState *DeletePersonalComputeSettingResponse_SdkV2) SyncEffectiveFieldsD func (newState *DeletePersonalComputeSettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePersonalComputeSettingResponse_SdkV2) { } +func (c DeletePersonalComputeSettingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePersonalComputeSettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2941,12 +3076,6 @@ type DeletePrivateEndpointRuleRequest_SdkV2 struct { PrivateEndpointRuleId types.String `tfsdk:"-"` } -func (newState *DeletePrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePrivateEndpointRuleRequest_SdkV2) { -} - -func (newState *DeletePrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePrivateEndpointRuleRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePrivateEndpointRuleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2983,12 +3112,6 @@ func (o DeletePrivateEndpointRuleRequest_SdkV2) Type(ctx context.Context) attr.T type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3028,12 +3151,6 @@ type DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) { -} - -func (newState *DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRestrictWorkspaceAdminsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3083,6 +3200,12 @@ func (newState *DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) SyncEffectiv func (newState *DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) { } +func (c DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRestrictWorkspaceAdminsSettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3120,12 +3243,6 @@ type DeleteTokenManagementRequest_SdkV2 struct { TokenId types.String `tfsdk:"-"` } -func (newState *DeleteTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTokenManagementRequest_SdkV2) { -} - -func (newState *DeleteTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTokenManagementRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTokenManagementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3166,13 +3283,13 @@ type DisableLegacyAccess_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *DisableLegacyAccess_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableLegacyAccess_SdkV2) { @@ -3181,6 +3298,13 @@ func (newState *DisableLegacyAccess_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *DisableLegacyAccess_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableLegacyAccess_SdkV2) { } +func (c DisableLegacyAccess_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "disable_legacy_access")...) + BooleanMessage_SdkV2{}.ToSchema(cs, append(path, "disable_legacy_access")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableLegacyAccess. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3255,13 +3379,13 @@ type DisableLegacyDbfs_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *DisableLegacyDbfs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableLegacyDbfs_SdkV2) { @@ -3270,6 +3394,13 @@ func (newState *DisableLegacyDbfs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *DisableLegacyDbfs_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableLegacyDbfs_SdkV2) { } +func (c DisableLegacyDbfs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "disable_legacy_dbfs")...) + BooleanMessage_SdkV2{}.ToSchema(cs, append(path, "disable_legacy_dbfs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableLegacyDbfs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3344,13 +3475,13 @@ type DisableLegacyFeatures_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *DisableLegacyFeatures_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableLegacyFeatures_SdkV2) { @@ -3359,6 +3490,13 @@ func (newState *DisableLegacyFeatures_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *DisableLegacyFeatures_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableLegacyFeatures_SdkV2) { } +func (c DisableLegacyFeatures_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "disable_legacy_features")...) + BooleanMessage_SdkV2{}.ToSchema(cs, append(path, "disable_legacy_features")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableLegacyFeatures. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3430,7 +3568,7 @@ func (o *DisableLegacyFeatures_SdkV2) SetDisableLegacyFeatures(ctx context.Conte // dataplane, see networkconfig.textproto). type EgressNetworkPolicy_SdkV2 struct { // The access policy enforced for egress traffic to the internet. - InternetAccess types.List `tfsdk:"internet_access" tf:"optional,object"` + InternetAccess types.List `tfsdk:"internet_access" tf:"object"` } func (newState *EgressNetworkPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicy_SdkV2) { @@ -3439,6 +3577,12 @@ func (newState *EgressNetworkPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *EgressNetworkPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicy_SdkV2) { } +func (c EgressNetworkPolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EgressNetworkPolicyInternetAccessPolicy_SdkV2{}.ToSchema(cs, append(path, "internet_access")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3501,19 +3645,19 @@ func (o *EgressNetworkPolicy_SdkV2) SetInternetAccess(ctx context.Context, v Egr } type EgressNetworkPolicyInternetAccessPolicy_SdkV2 struct { - AllowedInternetDestinations types.List `tfsdk:"allowed_internet_destinations" tf:"optional"` + AllowedInternetDestinations types.List `tfsdk:"allowed_internet_destinations" tf:""` - AllowedStorageDestinations types.List `tfsdk:"allowed_storage_destinations" tf:"optional"` + AllowedStorageDestinations types.List `tfsdk:"allowed_storage_destinations" tf:""` // Optional. If not specified, assume the policy is enforced for all // workloads. - LogOnlyMode types.List `tfsdk:"log_only_mode" tf:"optional,object"` + LogOnlyMode types.List `tfsdk:"log_only_mode" tf:"object"` // At which level can Databricks and Databricks managed compute access // Internet. FULL_ACCESS: Databricks can access Internet. No blocking rules // will apply. RESTRICTED_ACCESS: Databricks can only access explicitly // allowed internet and storage destinations, as well as UC connections and // external locations. PRIVATE_ACCESS_ONLY (not used): Databricks can only // access destinations via private link. - RestrictionMode types.String `tfsdk:"restriction_mode" tf:"optional"` + RestrictionMode types.String `tfsdk:"restriction_mode" tf:""` } func (newState *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicy_SdkV2) { @@ -3522,6 +3666,14 @@ func (newState *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SyncEffectiveFiel func (newState *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicy_SdkV2) { } +func (c EgressNetworkPolicyInternetAccessPolicy_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2{}.ToSchema(cs, append(path, "allowed_internet_destinations")...) + EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2{}.ToSchema(cs, append(path, "allowed_storage_destinations")...) + EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2{}.ToSchema(cs, append(path, "log_only_mode")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3651,15 +3803,15 @@ func (o *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SetLogOnlyMode(ctx conte // restricted. We only support domain name (FQDN) destinations for the time // being, though going forwards we want to support host names and IP addresses. type EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2 struct { - Destination types.String `tfsdk:"destination" tf:"optional"` + Destination types.String `tfsdk:"destination" tf:""` // The filtering protocol used by the DP. For private and public preview, // SEG will only support TCP filtering (i.e. DNS based filtering, filtering // by destination IP address), so protocol will be set to TCP by default and // hidden from the user. In the future, users may be able to select HTTP // filtering (i.e. SNI based filtering, filtering by FQDN). - Protocol types.String `tfsdk:"protocol" tf:"optional"` + Protocol types.String `tfsdk:"protocol" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) { @@ -3668,6 +3820,11 @@ func (newState *EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2 func (newState *EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) { } +func (c EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicyInternetDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3704,9 +3861,9 @@ func (o EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) Type(c } type EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2 struct { - LogOnlyModeType types.String `tfsdk:"log_only_mode_type" tf:"optional"` + LogOnlyModeType types.String `tfsdk:"log_only_mode_type" tf:""` - Workloads types.List `tfsdk:"workloads" tf:"optional"` + Workloads types.List `tfsdk:"workloads" tf:""` } func (newState *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) { @@ -3715,6 +3872,11 @@ func (newState *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) SyncEf func (newState *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) { } +func (c EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicyLogOnlyMode. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3780,21 +3942,21 @@ func (o *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) SetWorkloads( // Users can specify accessible storage destinations. type EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2 struct { - AllowedPaths types.List `tfsdk:"allowed_paths" tf:"optional"` + AllowedPaths types.List `tfsdk:"allowed_paths" tf:""` - AzureContainer types.String `tfsdk:"azure_container" tf:"optional"` + AzureContainer types.String `tfsdk:"azure_container" tf:""` - AzureDnsZone types.String `tfsdk:"azure_dns_zone" tf:"optional"` + AzureDnsZone types.String `tfsdk:"azure_dns_zone" tf:""` - AzureStorageAccount types.String `tfsdk:"azure_storage_account" tf:"optional"` + AzureStorageAccount types.String `tfsdk:"azure_storage_account" tf:""` - AzureStorageService types.String `tfsdk:"azure_storage_service" tf:"optional"` + AzureStorageService types.String `tfsdk:"azure_storage_service" tf:""` - BucketName types.String `tfsdk:"bucket_name" tf:"optional"` + BucketName types.String `tfsdk:"bucket_name" tf:""` - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) { @@ -3803,6 +3965,11 @@ func (newState *EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) func (newState *EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) { } +func (c EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicyStorageDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3880,7 +4047,7 @@ func (o *EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) SetAll type EmailConfig_SdkV2 struct { // Email addresses to notify. - Addresses types.List `tfsdk:"addresses" tf:"optional"` + Addresses types.List `tfsdk:"addresses" tf:""` } func (newState *EmailConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmailConfig_SdkV2) { @@ -3889,6 +4056,11 @@ func (newState *EmailConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EmailConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState EmailConfig_SdkV2) { } +func (c EmailConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EmailConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3959,6 +4131,11 @@ func (newState *Empty_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Empty_ func (newState *Empty_SdkV2) SyncEffectiveFieldsDuringRead(existingState Empty_SdkV2) { } +func (c Empty_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Empty. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3988,7 +4165,7 @@ func (o Empty_SdkV2) Type(ctx context.Context) attr.Type { // SHIELD feature: ESM type EnhancedSecurityMonitoring_SdkV2 struct { - IsEnabled types.Bool `tfsdk:"is_enabled" tf:"optional"` + IsEnabled types.Bool `tfsdk:"is_enabled" tf:""` } func (newState *EnhancedSecurityMonitoring_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnhancedSecurityMonitoring_SdkV2) { @@ -3997,6 +4174,11 @@ func (newState *EnhancedSecurityMonitoring_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *EnhancedSecurityMonitoring_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnhancedSecurityMonitoring_SdkV2) { } +func (c EnhancedSecurityMonitoring_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnhancedSecurityMonitoring. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4038,13 +4220,13 @@ type EnhancedSecurityMonitoringSetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *EnhancedSecurityMonitoringSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnhancedSecurityMonitoringSetting_SdkV2) { @@ -4053,6 +4235,13 @@ func (newState *EnhancedSecurityMonitoringSetting_SdkV2) SyncEffectiveFieldsDuri func (newState *EnhancedSecurityMonitoringSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnhancedSecurityMonitoringSetting_SdkV2) { } +func (c EnhancedSecurityMonitoringSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "enhanced_security_monitoring_workspace")...) + EnhancedSecurityMonitoring_SdkV2{}.ToSchema(cs, append(path, "enhanced_security_monitoring_workspace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnhancedSecurityMonitoringSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4120,7 +4309,7 @@ func (o *EnhancedSecurityMonitoringSetting_SdkV2) SetEnhancedSecurityMonitoringW // Account level policy for ESM type EsmEnablementAccount_SdkV2 struct { - IsEnforced types.Bool `tfsdk:"is_enforced" tf:"optional"` + IsEnforced types.Bool `tfsdk:"is_enforced" tf:""` } func (newState *EsmEnablementAccount_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EsmEnablementAccount_SdkV2) { @@ -4129,6 +4318,11 @@ func (newState *EsmEnablementAccount_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *EsmEnablementAccount_SdkV2) SyncEffectiveFieldsDuringRead(existingState EsmEnablementAccount_SdkV2) { } +func (c EsmEnablementAccount_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EsmEnablementAccount. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4170,13 +4364,13 @@ type EsmEnablementAccountSetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *EsmEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EsmEnablementAccountSetting_SdkV2) { @@ -4185,6 +4379,13 @@ func (newState *EsmEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *EsmEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState EsmEnablementAccountSetting_SdkV2) { } +func (c EsmEnablementAccountSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "esm_enablement_account")...) + EsmEnablementAccount_SdkV2{}.ToSchema(cs, append(path, "esm_enablement_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EsmEnablementAccountSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4253,16 +4454,16 @@ func (o *EsmEnablementAccountSetting_SdkV2) SetEsmEnablementAccount(ctx context. // The exchange token is the result of the token exchange with the IdP type ExchangeToken_SdkV2 struct { // The requested token. - Credential types.String `tfsdk:"credential" tf:"optional"` + Credential types.String `tfsdk:"credential" tf:""` // The end-of-life timestamp of the token. The value is in milliseconds // since the Unix epoch. - CredentialEolTime types.Int64 `tfsdk:"credentialEolTime" tf:"optional"` + CredentialEolTime types.Int64 `tfsdk:"credentialEolTime" tf:""` // User ID of the user that owns this token. - OwnerId types.Int64 `tfsdk:"ownerId" tf:"optional"` + OwnerId types.Int64 `tfsdk:"ownerId" tf:""` // The scopes of access granted in the token. - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` // The type of this exchange token - TokenType types.String `tfsdk:"tokenType" tf:"optional"` + TokenType types.String `tfsdk:"tokenType" tf:""` } func (newState *ExchangeToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeToken_SdkV2) { @@ -4271,6 +4472,11 @@ func (newState *ExchangeToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ExchangeToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeToken_SdkV2) { } +func (c ExchangeToken_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4356,6 +4562,15 @@ func (newState *ExchangeTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ExchangeTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeTokenRequest_SdkV2) { } +func (c ExchangeTokenRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "partitionId")...) + PartitionId_SdkV2{}.ToSchema(cs, append(path, "partitionId")...) + cs.SetRequired(append(path, "scopes")...) + cs.SetRequired(append(path, "tokenType")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4481,7 +4696,7 @@ func (o *ExchangeTokenRequest_SdkV2) SetTokenType(ctx context.Context, v []types // Exhanged tokens were successfully returned. type ExchangeTokenResponse_SdkV2 struct { - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *ExchangeTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeTokenResponse_SdkV2) { @@ -4490,6 +4705,12 @@ func (newState *ExchangeTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ExchangeTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeTokenResponse_SdkV2) { } +func (c ExchangeTokenResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeToken_SdkV2{}.ToSchema(cs, append(path, "values")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4554,7 +4775,7 @@ func (o *ExchangeTokenResponse_SdkV2) SetValues(ctx context.Context, v []Exchang // An IP access list was successfully returned. type FetchIpAccessListResponse_SdkV2 struct { // Definition of an IP Access list - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.List `tfsdk:"ip_access_list" tf:"object"` } func (newState *FetchIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FetchIpAccessListResponse_SdkV2) { @@ -4563,6 +4784,12 @@ func (newState *FetchIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *FetchIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState FetchIpAccessListResponse_SdkV2) { } +func (c FetchIpAccessListResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo_SdkV2{}.ToSchema(cs, append(path, "ip_access_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FetchIpAccessListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4626,17 +4853,17 @@ func (o *FetchIpAccessListResponse_SdkV2) SetIpAccessList(ctx context.Context, v type GenericWebhookConfig_SdkV2 struct { // [Input-Only][Optional] Password for webhook. - Password types.String `tfsdk:"password" tf:"optional"` + Password types.String `tfsdk:"password" tf:""` // [Output-Only] Whether password is set. - PasswordSet types.Bool `tfsdk:"password_set" tf:"optional"` + PasswordSet types.Bool `tfsdk:"password_set" tf:""` // [Input-Only] URL for webhook. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` // [Output-Only] Whether URL is set. - UrlSet types.Bool `tfsdk:"url_set" tf:"optional"` + UrlSet types.Bool `tfsdk:"url_set" tf:""` // [Input-Only][Optional] Username for webhook. - Username types.String `tfsdk:"username" tf:"optional"` + Username types.String `tfsdk:"username" tf:""` // [Output-Only] Whether username is set. - UsernameSet types.Bool `tfsdk:"username_set" tf:"optional"` + UsernameSet types.Bool `tfsdk:"username_set" tf:""` } func (newState *GenericWebhookConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenericWebhookConfig_SdkV2) { @@ -4645,6 +4872,11 @@ func (newState *GenericWebhookConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *GenericWebhookConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenericWebhookConfig_SdkV2) { } +func (c GenericWebhookConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenericWebhookConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4692,12 +4924,6 @@ type GetAccountIpAccessListRequest_SdkV2 struct { IpAccessListId types.String `tfsdk:"-"` } -func (newState *GetAccountIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountIpAccessListRequest_SdkV2) { -} - -func (newState *GetAccountIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountIpAccessListRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountIpAccessListRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4741,12 +4967,6 @@ type GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { -} - -func (newState *GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAibiDashboardEmbeddingAccessPolicySettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4790,12 +5010,6 @@ type GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { -} - -func (newState *GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAibiDashboardEmbeddingApprovedDomainsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4839,12 +5053,6 @@ type GetAutomaticClusterUpdateSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAutomaticClusterUpdateSettingRequest_SdkV2) { -} - -func (newState *GetAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAutomaticClusterUpdateSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAutomaticClusterUpdateSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4888,12 +5096,6 @@ type GetComplianceSecurityProfileSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetComplianceSecurityProfileSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetComplianceSecurityProfileSettingRequest_SdkV2) { -} - -func (newState *GetComplianceSecurityProfileSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetComplianceSecurityProfileSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetComplianceSecurityProfileSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4937,12 +5139,6 @@ type GetCspEnablementAccountSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCspEnablementAccountSettingRequest_SdkV2) { -} - -func (newState *GetCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCspEnablementAccountSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCspEnablementAccountSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4986,12 +5182,6 @@ type GetDefaultNamespaceSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDefaultNamespaceSettingRequest_SdkV2) { -} - -func (newState *GetDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDefaultNamespaceSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDefaultNamespaceSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5035,12 +5225,6 @@ type GetDisableLegacyAccessRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDisableLegacyAccessRequest_SdkV2) { -} - -func (newState *GetDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDisableLegacyAccessRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDisableLegacyAccessRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5084,12 +5268,6 @@ type GetDisableLegacyDbfsRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDisableLegacyDbfsRequest_SdkV2) { -} - -func (newState *GetDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDisableLegacyDbfsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDisableLegacyDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5133,12 +5311,6 @@ type GetDisableLegacyFeaturesRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDisableLegacyFeaturesRequest_SdkV2) { -} - -func (newState *GetDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDisableLegacyFeaturesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDisableLegacyFeaturesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5182,12 +5354,6 @@ type GetEnhancedSecurityMonitoringSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEnhancedSecurityMonitoringSettingRequest_SdkV2) { -} - -func (newState *GetEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEnhancedSecurityMonitoringSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEnhancedSecurityMonitoringSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5231,12 +5397,6 @@ type GetEsmEnablementAccountSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEsmEnablementAccountSettingRequest_SdkV2) { -} - -func (newState *GetEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEsmEnablementAccountSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEsmEnablementAccountSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5274,12 +5434,6 @@ type GetIpAccessListRequest_SdkV2 struct { IpAccessListId types.String `tfsdk:"-"` } -func (newState *GetIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListRequest_SdkV2) { -} - -func (newState *GetIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetIpAccessListRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIpAccessListRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5313,7 +5467,7 @@ func (o GetIpAccessListRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetIpAccessListResponse_SdkV2 struct { // Definition of an IP Access list - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.List `tfsdk:"ip_access_list" tf:"object"` } func (newState *GetIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListResponse_SdkV2) { @@ -5322,6 +5476,12 @@ func (newState *GetIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *GetIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetIpAccessListResponse_SdkV2) { } +func (c GetIpAccessListResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo_SdkV2{}.ToSchema(cs, append(path, "ip_access_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIpAccessListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5385,7 +5545,7 @@ func (o *GetIpAccessListResponse_SdkV2) SetIpAccessList(ctx context.Context, v I // IP access lists were successfully returned. type GetIpAccessListsResponse_SdkV2 struct { - IpAccessLists types.List `tfsdk:"ip_access_lists" tf:"optional"` + IpAccessLists types.List `tfsdk:"ip_access_lists" tf:""` } func (newState *GetIpAccessListsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListsResponse_SdkV2) { @@ -5394,6 +5554,12 @@ func (newState *GetIpAccessListsResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *GetIpAccessListsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetIpAccessListsResponse_SdkV2) { } +func (c GetIpAccessListsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo_SdkV2{}.ToSchema(cs, append(path, "ip_access_lists")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIpAccessListsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5461,12 +5627,6 @@ type GetNetworkConnectivityConfigurationRequest_SdkV2 struct { NetworkConnectivityConfigId types.String `tfsdk:"-"` } -func (newState *GetNetworkConnectivityConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetNetworkConnectivityConfigurationRequest_SdkV2) { -} - -func (newState *GetNetworkConnectivityConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetNetworkConnectivityConfigurationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetNetworkConnectivityConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5503,12 +5663,6 @@ type GetNotificationDestinationRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetNotificationDestinationRequest_SdkV2) { -} - -func (newState *GetNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetNotificationDestinationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetNotificationDestinationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5552,12 +5706,6 @@ type GetPersonalComputeSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetPersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPersonalComputeSettingRequest_SdkV2) { -} - -func (newState *GetPersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPersonalComputeSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPersonalComputeSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5597,12 +5745,6 @@ type GetPrivateEndpointRuleRequest_SdkV2 struct { PrivateEndpointRuleId types.String `tfsdk:"-"` } -func (newState *GetPrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPrivateEndpointRuleRequest_SdkV2) { -} - -func (newState *GetPrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPrivateEndpointRuleRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPrivateEndpointRuleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5648,12 +5790,6 @@ type GetRestrictWorkspaceAdminsSettingRequest_SdkV2 struct { Etag types.String `tfsdk:"-"` } -func (newState *GetRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRestrictWorkspaceAdminsSettingRequest_SdkV2) { -} - -func (newState *GetRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRestrictWorkspaceAdminsSettingRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRestrictWorkspaceAdminsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5690,12 +5826,6 @@ type GetStatusRequest_SdkV2 struct { Keys types.String `tfsdk:"-"` } -func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatusRequest_SdkV2) { -} - -func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatusRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5733,12 +5863,6 @@ type GetTokenManagementRequest_SdkV2 struct { TokenId types.String `tfsdk:"-"` } -func (newState *GetTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenManagementRequest_SdkV2) { -} - -func (newState *GetTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetTokenManagementRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenManagementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5772,7 +5896,7 @@ func (o GetTokenManagementRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetTokenPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetTokenPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenPermissionLevelsResponse_SdkV2) { @@ -5781,6 +5905,12 @@ func (newState *GetTokenPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDurin func (newState *GetTokenPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetTokenPermissionLevelsResponse_SdkV2) { } +func (c GetTokenPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5844,7 +5974,7 @@ func (o *GetTokenPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context // Token with specified Token ID was successfully returned. type GetTokenResponse_SdkV2 struct { - TokenInfo types.List `tfsdk:"token_info" tf:"optional,object"` + TokenInfo types.List `tfsdk:"token_info" tf:"object"` } func (newState *GetTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenResponse_SdkV2) { @@ -5853,6 +5983,12 @@ func (newState *GetTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *GetTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetTokenResponse_SdkV2) { } +func (c GetTokenResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenInfo_SdkV2{}.ToSchema(cs, append(path, "token_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5917,30 +6053,30 @@ func (o *GetTokenResponse_SdkV2) SetTokenInfo(ctx context.Context, v TokenInfo_S // Definition of an IP Access list type IpAccessListInfo_SdkV2 struct { // Total number of IP or CIDR values. - AddressCount types.Int64 `tfsdk:"address_count" tf:"optional"` + AddressCount types.Int64 `tfsdk:"address_count" tf:""` // Creation timestamp in milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // User ID of the user who created this list. - CreatedBy types.Int64 `tfsdk:"created_by" tf:"optional"` + CreatedBy types.Int64 `tfsdk:"created_by" tf:""` // Specifies whether this IP access list is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` - IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + IpAddresses types.List `tfsdk:"ip_addresses" tf:""` // Label for the IP access list. This **cannot** be empty. - Label types.String `tfsdk:"label" tf:"optional"` + Label types.String `tfsdk:"label" tf:""` // Universally unique identifier (UUID) of the IP access list. - ListId types.String `tfsdk:"list_id" tf:"optional"` + ListId types.String `tfsdk:"list_id" tf:""` // Type of IP access list. Valid values are as follows and are // case-sensitive: // // * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block // list. Exclude this IP or range. IP addresses in the block list are // excluded even if they are included in an allow list. - ListType types.String `tfsdk:"list_type" tf:"optional"` + ListType types.String `tfsdk:"list_type" tf:""` // Update timestamp in milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // User ID of the user who updated this list. - UpdatedBy types.Int64 `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.Int64 `tfsdk:"updated_by" tf:""` } func (newState *IpAccessListInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IpAccessListInfo_SdkV2) { @@ -5949,6 +6085,11 @@ func (newState *IpAccessListInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *IpAccessListInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState IpAccessListInfo_SdkV2) { } +func (c IpAccessListInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IpAccessListInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6030,7 +6171,7 @@ func (o *IpAccessListInfo_SdkV2) SetIpAddresses(ctx context.Context, v []types.S // IP access lists were successfully returned. type ListIpAccessListResponse_SdkV2 struct { - IpAccessLists types.List `tfsdk:"ip_access_lists" tf:"optional"` + IpAccessLists types.List `tfsdk:"ip_access_lists" tf:""` } func (newState *ListIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListIpAccessListResponse_SdkV2) { @@ -6039,6 +6180,12 @@ func (newState *ListIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *ListIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListIpAccessListResponse_SdkV2) { } +func (c ListIpAccessListResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo_SdkV2{}.ToSchema(cs, append(path, "ip_access_lists")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListIpAccessListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6101,10 +6248,10 @@ func (o *ListIpAccessListResponse_SdkV2) SetIpAccessLists(ctx context.Context, v } type ListNccAzurePrivateEndpointRulesResponse_SdkV2 struct { - Items types.List `tfsdk:"items" tf:"optional"` + Items types.List `tfsdk:"items" tf:""` // A token that can be used to get the next page of results. If null, there // are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListNccAzurePrivateEndpointRulesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNccAzurePrivateEndpointRulesResponse_SdkV2) { @@ -6113,6 +6260,12 @@ func (newState *ListNccAzurePrivateEndpointRulesResponse_SdkV2) SyncEffectiveFie func (newState *ListNccAzurePrivateEndpointRulesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNccAzurePrivateEndpointRulesResponse_SdkV2) { } +func (c ListNccAzurePrivateEndpointRulesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NccAzurePrivateEndpointRule_SdkV2{}.ToSchema(cs, append(path, "items")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNccAzurePrivateEndpointRulesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6182,12 +6335,6 @@ type ListNetworkConnectivityConfigurationsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListNetworkConnectivityConfigurationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNetworkConnectivityConfigurationsRequest_SdkV2) { -} - -func (newState *ListNetworkConnectivityConfigurationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNetworkConnectivityConfigurationsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNetworkConnectivityConfigurationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6220,10 +6367,10 @@ func (o ListNetworkConnectivityConfigurationsRequest_SdkV2) Type(ctx context.Con } type ListNetworkConnectivityConfigurationsResponse_SdkV2 struct { - Items types.List `tfsdk:"items" tf:"optional"` + Items types.List `tfsdk:"items" tf:""` // A token that can be used to get the next page of results. If null, there // are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListNetworkConnectivityConfigurationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNetworkConnectivityConfigurationsResponse_SdkV2) { @@ -6232,6 +6379,12 @@ func (newState *ListNetworkConnectivityConfigurationsResponse_SdkV2) SyncEffecti func (newState *ListNetworkConnectivityConfigurationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNetworkConnectivityConfigurationsResponse_SdkV2) { } +func (c ListNetworkConnectivityConfigurationsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NetworkConnectivityConfiguration_SdkV2{}.ToSchema(cs, append(path, "items")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNetworkConnectivityConfigurationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6302,12 +6455,6 @@ type ListNotificationDestinationsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListNotificationDestinationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNotificationDestinationsRequest_SdkV2) { -} - -func (newState *ListNotificationDestinationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNotificationDestinationsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNotificationDestinationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6343,9 +6490,9 @@ func (o ListNotificationDestinationsRequest_SdkV2) Type(ctx context.Context) att type ListNotificationDestinationsResponse_SdkV2 struct { // Page token for next of results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ListNotificationDestinationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNotificationDestinationsResponse_SdkV2) { @@ -6354,6 +6501,12 @@ func (newState *ListNotificationDestinationsResponse_SdkV2) SyncEffectiveFieldsD func (newState *ListNotificationDestinationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNotificationDestinationsResponse_SdkV2) { } +func (c ListNotificationDestinationsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListNotificationDestinationsResult_SdkV2{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNotificationDestinationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6420,11 +6573,11 @@ func (o *ListNotificationDestinationsResponse_SdkV2) SetResults(ctx context.Cont type ListNotificationDestinationsResult_SdkV2 struct { // [Output-only] The type of the notification destination. The type can not // be changed once set. - DestinationType types.String `tfsdk:"destination_type" tf:"optional"` + DestinationType types.String `tfsdk:"destination_type" tf:""` // The display name for the notification destination. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying notification destination. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *ListNotificationDestinationsResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNotificationDestinationsResult_SdkV2) { @@ -6433,6 +6586,11 @@ func (newState *ListNotificationDestinationsResult_SdkV2) SyncEffectiveFieldsDur func (newState *ListNotificationDestinationsResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNotificationDestinationsResult_SdkV2) { } +func (c ListNotificationDestinationsResult_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNotificationDestinationsResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6476,12 +6634,6 @@ type ListPrivateEndpointRulesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListPrivateEndpointRulesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPrivateEndpointRulesRequest_SdkV2) { -} - -func (newState *ListPrivateEndpointRulesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPrivateEndpointRulesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPrivateEndpointRulesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6517,7 +6669,7 @@ func (o ListPrivateEndpointRulesRequest_SdkV2) Type(ctx context.Context) attr.Ty type ListPublicTokensResponse_SdkV2 struct { // The information for each token. - TokenInfos types.List `tfsdk:"token_infos" tf:"optional"` + TokenInfos types.List `tfsdk:"token_infos" tf:""` } func (newState *ListPublicTokensResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPublicTokensResponse_SdkV2) { @@ -6526,6 +6678,12 @@ func (newState *ListPublicTokensResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *ListPublicTokensResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPublicTokensResponse_SdkV2) { } +func (c ListPublicTokensResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PublicTokenInfo_SdkV2{}.ToSchema(cs, append(path, "token_infos")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPublicTokensResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6595,12 +6753,6 @@ type ListTokenManagementRequest_SdkV2 struct { CreatedByUsername types.String `tfsdk:"-"` } -func (newState *ListTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTokenManagementRequest_SdkV2) { -} - -func (newState *ListTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTokenManagementRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTokenManagementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6637,7 +6789,7 @@ func (o ListTokenManagementRequest_SdkV2) Type(ctx context.Context) attr.Type { // Tokens were successfully returned. type ListTokensResponse_SdkV2 struct { // Token metadata of each user-created token in the workspace - TokenInfos types.List `tfsdk:"token_infos" tf:"optional"` + TokenInfos types.List `tfsdk:"token_infos" tf:""` } func (newState *ListTokensResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTokensResponse_SdkV2) { @@ -6646,6 +6798,12 @@ func (newState *ListTokensResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListTokensResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTokensResponse_SdkV2) { } +func (c ListTokensResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenInfo_SdkV2{}.ToSchema(cs, append(path, "token_infos")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTokensResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6709,9 +6867,9 @@ func (o *ListTokensResponse_SdkV2) SetTokenInfos(ctx context.Context, v []TokenI type MicrosoftTeamsConfig_SdkV2 struct { // [Input-Only] URL for Microsoft Teams. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` // [Output-Only] Whether URL is set. - UrlSet types.Bool `tfsdk:"url_set" tf:"optional"` + UrlSet types.Bool `tfsdk:"url_set" tf:""` } func (newState *MicrosoftTeamsConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MicrosoftTeamsConfig_SdkV2) { @@ -6720,6 +6878,11 @@ func (newState *MicrosoftTeamsConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *MicrosoftTeamsConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState MicrosoftTeamsConfig_SdkV2) { } +func (c MicrosoftTeamsConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MicrosoftTeamsConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6758,7 +6921,7 @@ func (o MicrosoftTeamsConfig_SdkV2) Type(ctx context.Context) attr.Type { type NccAwsStableIpRule_SdkV2 struct { // The list of stable IP CIDR blocks from which Databricks network traffic // originates when accessing your resources. - CidrBlocks types.List `tfsdk:"cidr_blocks" tf:"optional"` + CidrBlocks types.List `tfsdk:"cidr_blocks" tf:""` } func (newState *NccAwsStableIpRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccAwsStableIpRule_SdkV2) { @@ -6767,6 +6930,11 @@ func (newState *NccAwsStableIpRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *NccAwsStableIpRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccAwsStableIpRule_SdkV2) { } +func (c NccAwsStableIpRule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccAwsStableIpRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6842,28 +7010,28 @@ type NccAzurePrivateEndpointRule_SdkV2 struct { // DISCONNECTED: Connection was removed by the private link resource owner, // the private endpoint becomes informative and should be deleted for // clean-up. - ConnectionState types.String `tfsdk:"connection_state" tf:"optional"` + ConnectionState types.String `tfsdk:"connection_state" tf:""` // Time in epoch milliseconds when this object was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Whether this private endpoint is deactivated. - Deactivated types.Bool `tfsdk:"deactivated" tf:"computed"` + Deactivated types.Bool `tfsdk:"deactivated" tf:""` // Time in epoch milliseconds when this object was deactivated. - DeactivatedAt types.Int64 `tfsdk:"deactivated_at" tf:"computed"` + DeactivatedAt types.Int64 `tfsdk:"deactivated_at" tf:""` // The name of the Azure private endpoint resource. - EndpointName types.String `tfsdk:"endpoint_name" tf:"computed"` + EndpointName types.String `tfsdk:"endpoint_name" tf:""` // The sub-resource type (group ID) of the target resource. Note that to // connect to workspace root storage (root DBFS), you need two endpoints, // one for `blob` and one for `dfs`. - GroupId types.String `tfsdk:"group_id" tf:"optional"` + GroupId types.String `tfsdk:"group_id" tf:""` // The ID of a network connectivity configuration, which is the parent // resource of this private endpoint rule object. - NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:"optional"` + NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:""` // The Azure resource ID of the target resource. - ResourceId types.String `tfsdk:"resource_id" tf:"optional"` + ResourceId types.String `tfsdk:"resource_id" tf:""` // The ID of a private endpoint rule. - RuleId types.String `tfsdk:"rule_id" tf:"computed"` + RuleId types.String `tfsdk:"rule_id" tf:""` // Time in epoch milliseconds when this object was updated. - UpdatedTime types.Int64 `tfsdk:"updated_time" tf:"computed"` + UpdatedTime types.Int64 `tfsdk:"updated_time" tf:""` } func (newState *NccAzurePrivateEndpointRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccAzurePrivateEndpointRule_SdkV2) { @@ -6872,6 +7040,17 @@ func (newState *NccAzurePrivateEndpointRule_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *NccAzurePrivateEndpointRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccAzurePrivateEndpointRule_SdkV2) { } +func (c NccAzurePrivateEndpointRule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "creation_time")...) + cs.SetComputed(append(path, "deactivated")...) + cs.SetComputed(append(path, "deactivated_at")...) + cs.SetComputed(append(path, "endpoint_name")...) + cs.SetComputed(append(path, "rule_id")...) + cs.SetComputed(append(path, "updated_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccAzurePrivateEndpointRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6927,11 +7106,11 @@ func (o NccAzurePrivateEndpointRule_SdkV2) Type(ctx context.Context) attr.Type { type NccAzureServiceEndpointRule_SdkV2 struct { // The list of subnets from which Databricks network traffic originates when // accessing your Azure resources. - Subnets types.List `tfsdk:"subnets" tf:"optional"` + Subnets types.List `tfsdk:"subnets" tf:""` // The Azure region in which this service endpoint rule applies. - TargetRegion types.String `tfsdk:"target_region" tf:"optional"` + TargetRegion types.String `tfsdk:"target_region" tf:""` // The Azure services to which this service endpoint rule applies to. - TargetServices types.List `tfsdk:"target_services" tf:"optional"` + TargetServices types.List `tfsdk:"target_services" tf:""` } func (newState *NccAzureServiceEndpointRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccAzureServiceEndpointRule_SdkV2) { @@ -6940,6 +7119,11 @@ func (newState *NccAzureServiceEndpointRule_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *NccAzureServiceEndpointRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccAzureServiceEndpointRule_SdkV2) { } +func (c NccAzureServiceEndpointRule_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccAzureServiceEndpointRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7040,10 +7224,10 @@ type NccEgressConfig_SdkV2 struct { // The network connectivity rules that are applied by default without // resource specific configurations. You can find the stable network // information of your serverless compute resources here. - DefaultRules types.List `tfsdk:"default_rules" tf:"computed,object"` + DefaultRules types.List `tfsdk:"default_rules" tf:"object"` // The network connectivity rules that configured for each destinations. // These rules override default rules. - TargetRules types.List `tfsdk:"target_rules" tf:"optional,object"` + TargetRules types.List `tfsdk:"target_rules" tf:"object"` } func (newState *NccEgressConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressConfig_SdkV2) { @@ -7052,6 +7236,14 @@ func (newState *NccEgressConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *NccEgressConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccEgressConfig_SdkV2) { } +func (c NccEgressConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "default_rules")...) + NccEgressDefaultRules_SdkV2{}.ToSchema(cs, append(path, "default_rules")...) + NccEgressTargetRules_SdkV2{}.ToSchema(cs, append(path, "target_rules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccEgressConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7151,11 +7343,11 @@ type NccEgressDefaultRules_SdkV2 struct { // The stable AWS IP CIDR blocks. You can use these to configure the // firewall of your resources to allow traffic from your Databricks // workspace. - AwsStableIpRule types.List `tfsdk:"aws_stable_ip_rule" tf:"optional,object"` + AwsStableIpRule types.List `tfsdk:"aws_stable_ip_rule" tf:"object"` // The stable Azure service endpoints. You can configure the firewall of // your Azure resources to allow traffic from your Databricks serverless // compute resources. - AzureServiceEndpointRule types.List `tfsdk:"azure_service_endpoint_rule" tf:"optional,object"` + AzureServiceEndpointRule types.List `tfsdk:"azure_service_endpoint_rule" tf:"object"` } func (newState *NccEgressDefaultRules_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressDefaultRules_SdkV2) { @@ -7164,6 +7356,13 @@ func (newState *NccEgressDefaultRules_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *NccEgressDefaultRules_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccEgressDefaultRules_SdkV2) { } +func (c NccEgressDefaultRules_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NccAwsStableIpRule_SdkV2{}.ToSchema(cs, append(path, "aws_stable_ip_rule")...) + NccAzureServiceEndpointRule_SdkV2{}.ToSchema(cs, append(path, "azure_service_endpoint_rule")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccEgressDefaultRules. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7259,7 +7458,7 @@ func (o *NccEgressDefaultRules_SdkV2) SetAzureServiceEndpointRule(ctx context.Co // The network connectivity rules that configured for each destinations. These // rules override default rules. type NccEgressTargetRules_SdkV2 struct { - AzurePrivateEndpointRules types.List `tfsdk:"azure_private_endpoint_rules" tf:"optional"` + AzurePrivateEndpointRules types.List `tfsdk:"azure_private_endpoint_rules" tf:""` } func (newState *NccEgressTargetRules_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressTargetRules_SdkV2) { @@ -7268,6 +7467,12 @@ func (newState *NccEgressTargetRules_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *NccEgressTargetRules_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccEgressTargetRules_SdkV2) { } +func (c NccEgressTargetRules_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NccAzurePrivateEndpointRule_SdkV2{}.ToSchema(cs, append(path, "azure_private_endpoint_rules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccEgressTargetRules. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7331,25 +7536,25 @@ func (o *NccEgressTargetRules_SdkV2) SetAzurePrivateEndpointRules(ctx context.Co type NetworkConnectivityConfiguration_SdkV2 struct { // The Databricks account ID that hosts the credential. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Time in epoch milliseconds when this object was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // The network connectivity rules that apply to network traffic from your // serverless compute resources. - EgressConfig types.List `tfsdk:"egress_config" tf:"optional,object"` + EgressConfig types.List `tfsdk:"egress_config" tf:"object"` // The name of the network connectivity configuration. The name can contain // alphanumeric characters, hyphens, and underscores. The length must be // between 3 and 30 characters. The name must match the regular expression // `^[0-9a-zA-Z-_]{3,30}$`. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Databricks network connectivity configuration ID. - NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:"computed"` + NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:""` // The region for the network connectivity configuration. Only workspaces in // the same region can be attached to the network connectivity // configuration. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // Time in epoch milliseconds when this object was updated. - UpdatedTime types.Int64 `tfsdk:"updated_time" tf:"computed"` + UpdatedTime types.Int64 `tfsdk:"updated_time" tf:""` } func (newState *NetworkConnectivityConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkConnectivityConfiguration_SdkV2) { @@ -7358,6 +7563,15 @@ func (newState *NetworkConnectivityConfiguration_SdkV2) SyncEffectiveFieldsDurin func (newState *NetworkConnectivityConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState NetworkConnectivityConfiguration_SdkV2) { } +func (c NetworkConnectivityConfiguration_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "creation_time")...) + NccEgressConfig_SdkV2{}.ToSchema(cs, append(path, "egress_config")...) + cs.SetComputed(append(path, "network_connectivity_config_id")...) + cs.SetComputed(append(path, "updated_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkConnectivityConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7435,14 +7649,14 @@ type NotificationDestination_SdkV2 struct { // The configuration for the notification destination. Will be exactly one // of the nested configs. Only returns for users with workspace admin // permissions. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.List `tfsdk:"config" tf:"object"` // [Output-only] The type of the notification destination. The type can not // be changed once set. - DestinationType types.String `tfsdk:"destination_type" tf:"optional"` + DestinationType types.String `tfsdk:"destination_type" tf:""` // The display name for the notification destination. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying notification destination. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *NotificationDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotificationDestination_SdkV2) { @@ -7451,6 +7665,12 @@ func (newState *NotificationDestination_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *NotificationDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState NotificationDestination_SdkV2) { } +func (c NotificationDestination_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Config_SdkV2{}.ToSchema(cs, append(path, "config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NotificationDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7520,9 +7740,9 @@ func (o *NotificationDestination_SdkV2) SetConfig(ctx context.Context, v Config_ type PagerdutyConfig_SdkV2 struct { // [Input-Only] Integration key for PagerDuty. - IntegrationKey types.String `tfsdk:"integration_key" tf:"optional"` + IntegrationKey types.String `tfsdk:"integration_key" tf:""` // [Output-Only] Whether integration key is set. - IntegrationKeySet types.Bool `tfsdk:"integration_key_set" tf:"optional"` + IntegrationKeySet types.Bool `tfsdk:"integration_key_set" tf:""` } func (newState *PagerdutyConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PagerdutyConfig_SdkV2) { @@ -7531,6 +7751,11 @@ func (newState *PagerdutyConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PagerdutyConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState PagerdutyConfig_SdkV2) { } +func (c PagerdutyConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PagerdutyConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7567,7 +7792,7 @@ func (o PagerdutyConfig_SdkV2) Type(ctx context.Context) attr.Type { // Partition by workspace or account type PartitionId_SdkV2 struct { // The ID of the workspace. - WorkspaceId types.Int64 `tfsdk:"workspaceId" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspaceId" tf:""` } func (newState *PartitionId_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartitionId_SdkV2) { @@ -7576,6 +7801,11 @@ func (newState *PartitionId_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *PartitionId_SdkV2) SyncEffectiveFieldsDuringRead(existingState PartitionId_SdkV2) { } +func (c PartitionId_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PartitionId. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7624,6 +7854,12 @@ func (newState *PersonalComputeMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *PersonalComputeMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState PersonalComputeMessage_SdkV2) { } +func (c PersonalComputeMessage_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PersonalComputeMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7663,7 +7899,7 @@ type PersonalComputeSetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` PersonalCompute types.List `tfsdk:"personal_compute" tf:"object"` // Name of the corresponding setting. This field is populated in the @@ -7671,7 +7907,7 @@ type PersonalComputeSetting_SdkV2 struct { // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *PersonalComputeSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PersonalComputeSetting_SdkV2) { @@ -7680,6 +7916,13 @@ func (newState *PersonalComputeSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *PersonalComputeSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState PersonalComputeSetting_SdkV2) { } +func (c PersonalComputeSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "personal_compute")...) + PersonalComputeMessage_SdkV2{}.ToSchema(cs, append(path, "personal_compute")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PersonalComputeSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7747,14 +7990,14 @@ func (o *PersonalComputeSetting_SdkV2) SetPersonalCompute(ctx context.Context, v type PublicTokenInfo_SdkV2 struct { // Comment the token was created with, if applicable. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Server time (in epoch milliseconds) when the token was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Server time (in epoch milliseconds) when the token will expire, or -1 if // not applicable. - ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:"optional"` + ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:""` // The ID of this token. - TokenId types.String `tfsdk:"token_id" tf:"optional"` + TokenId types.String `tfsdk:"token_id" tf:""` } func (newState *PublicTokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublicTokenInfo_SdkV2) { @@ -7763,6 +8006,11 @@ func (newState *PublicTokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *PublicTokenInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublicTokenInfo_SdkV2) { } +func (c PublicTokenInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublicTokenInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7807,7 +8055,7 @@ type ReplaceIpAccessList_SdkV2 struct { // The ID for the corresponding IP access list IpAccessListId types.String `tfsdk:"-"` - IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + IpAddresses types.List `tfsdk:"ip_addresses" tf:""` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label" tf:""` // Type of IP access list. Valid values are as follows and are @@ -7825,6 +8073,15 @@ func (newState *ReplaceIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ReplaceIpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReplaceIpAccessList_SdkV2) { } +func (c ReplaceIpAccessList_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "enabled")...) + cs.SetRequired(append(path, "ip_access_list_id")...) + cs.SetRequired(append(path, "label")...) + cs.SetRequired(append(path, "list_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceIpAccessList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7897,12 +8154,6 @@ func (o *ReplaceIpAccessList_SdkV2) SetIpAddresses(ctx context.Context, v []type type ReplaceResponse_SdkV2 struct { } -func (newState *ReplaceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReplaceResponse_SdkV2) { -} - -func (newState *ReplaceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReplaceResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7940,6 +8191,12 @@ func (newState *RestrictWorkspaceAdminsMessage_SdkV2) SyncEffectiveFieldsDuringC func (newState *RestrictWorkspaceAdminsMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestrictWorkspaceAdminsMessage_SdkV2) { } +func (c RestrictWorkspaceAdminsMessage_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestrictWorkspaceAdminsMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7979,7 +8236,7 @@ type RestrictWorkspaceAdminsSetting_SdkV2 struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` RestrictWorkspaceAdmins types.List `tfsdk:"restrict_workspace_admins" tf:"object"` // Name of the corresponding setting. This field is populated in the @@ -7987,7 +8244,7 @@ type RestrictWorkspaceAdminsSetting_SdkV2 struct { // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *RestrictWorkspaceAdminsSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestrictWorkspaceAdminsSetting_SdkV2) { @@ -7996,6 +8253,13 @@ func (newState *RestrictWorkspaceAdminsSetting_SdkV2) SyncEffectiveFieldsDuringC func (newState *RestrictWorkspaceAdminsSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestrictWorkspaceAdminsSetting_SdkV2) { } +func (c RestrictWorkspaceAdminsSetting_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "restrict_workspace_admins")...) + RestrictWorkspaceAdminsMessage_SdkV2{}.ToSchema(cs, append(path, "restrict_workspace_admins")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestrictWorkspaceAdminsSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8072,6 +8336,12 @@ func (newState *RevokeTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *RevokeTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RevokeTokenRequest_SdkV2) { } +func (c RevokeTokenRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "token_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RevokeTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8112,6 +8382,11 @@ func (newState *RevokeTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *RevokeTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RevokeTokenResponse_SdkV2) { } +func (c RevokeTokenResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RevokeTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8142,12 +8417,6 @@ func (o RevokeTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { type SetStatusResponse_SdkV2 struct { } -func (newState *SetStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetStatusResponse_SdkV2) { -} - -func (newState *SetStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetStatusResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8177,9 +8446,9 @@ func (o SetStatusResponse_SdkV2) Type(ctx context.Context) attr.Type { type SlackConfig_SdkV2 struct { // [Input-Only] URL for Slack destination. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` // [Output-Only] Whether URL is set. - UrlSet types.Bool `tfsdk:"url_set" tf:"optional"` + UrlSet types.Bool `tfsdk:"url_set" tf:""` } func (newState *SlackConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SlackConfig_SdkV2) { @@ -8188,6 +8457,11 @@ func (newState *SlackConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SlackConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState SlackConfig_SdkV2) { } +func (c SlackConfig_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SlackConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8223,7 +8497,7 @@ func (o SlackConfig_SdkV2) Type(ctx context.Context) attr.Type { type StringMessage_SdkV2 struct { // Represents a generic string value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *StringMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StringMessage_SdkV2) { @@ -8232,6 +8506,11 @@ func (newState *StringMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *StringMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState StringMessage_SdkV2) { } +func (c StringMessage_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StringMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8265,13 +8544,13 @@ func (o StringMessage_SdkV2) Type(ctx context.Context) attr.Type { type TokenAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *TokenAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenAccessControlRequest_SdkV2) { @@ -8280,6 +8559,11 @@ func (newState *TokenAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *TokenAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenAccessControlRequest_SdkV2) { } +func (c TokenAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8319,15 +8603,15 @@ func (o TokenAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { type TokenAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *TokenAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenAccessControlResponse_SdkV2) { @@ -8336,6 +8620,12 @@ func (newState *TokenAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *TokenAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenAccessControlResponse_SdkV2) { } +func (c TokenAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8408,24 +8698,24 @@ func (o *TokenAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context type TokenInfo_SdkV2 struct { // Comment that describes the purpose of the token, specified by the token // creator. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // User ID of the user that created the token. - CreatedById types.Int64 `tfsdk:"created_by_id" tf:"optional"` + CreatedById types.Int64 `tfsdk:"created_by_id" tf:""` // Username of the user that created the token. - CreatedByUsername types.String `tfsdk:"created_by_username" tf:"optional"` + CreatedByUsername types.String `tfsdk:"created_by_username" tf:""` // Timestamp when the token was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Timestamp when the token expires. - ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:"optional"` + ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:""` // Approximate timestamp for the day the token was last used. Accurate up to // 1 day. - LastUsedDay types.Int64 `tfsdk:"last_used_day" tf:"optional"` + LastUsedDay types.Int64 `tfsdk:"last_used_day" tf:""` // User ID of the user that owns the token. - OwnerId types.Int64 `tfsdk:"owner_id" tf:"optional"` + OwnerId types.Int64 `tfsdk:"owner_id" tf:""` // ID of the token. - TokenId types.String `tfsdk:"token_id" tf:"optional"` + TokenId types.String `tfsdk:"token_id" tf:""` // If applicable, the ID of the workspace that the token was created in. - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` } func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenInfo_SdkV2) { @@ -8434,6 +8724,11 @@ func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan To func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenInfo_SdkV2) { } +func (c TokenInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8482,11 +8777,11 @@ func (o TokenInfo_SdkV2) Type(ctx context.Context) attr.Type { } type TokenPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *TokenPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermission_SdkV2) { @@ -8495,6 +8790,11 @@ func (newState *TokenPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *TokenPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenPermission_SdkV2) { } +func (c TokenPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8561,11 +8861,11 @@ func (o *TokenPermission_SdkV2) SetInheritedFromObject(ctx context.Context, v [] } type TokenPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *TokenPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissions_SdkV2) { @@ -8574,6 +8874,12 @@ func (newState *TokenPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *TokenPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenPermissions_SdkV2) { } +func (c TokenPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8640,9 +8946,9 @@ func (o *TokenPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []T } type TokenPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *TokenPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissionsDescription_SdkV2) { @@ -8651,6 +8957,11 @@ func (newState *TokenPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *TokenPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenPermissionsDescription_SdkV2) { } +func (c TokenPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8685,7 +8996,7 @@ func (o TokenPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { } type TokenPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` } func (newState *TokenPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissionsRequest_SdkV2) { @@ -8694,6 +9005,12 @@ func (newState *TokenPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *TokenPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenPermissionsRequest_SdkV2) { } +func (c TokenPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8775,6 +9092,15 @@ func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) Sy func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { } +func (c UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + AibiDashboardEmbeddingAccessPolicySetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAibiDashboardEmbeddingAccessPolicySettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8860,6 +9186,15 @@ func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { } +func (c UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8945,6 +9280,15 @@ func (newState *UpdateAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveF func (newState *UpdateAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAutomaticClusterUpdateSettingRequest_SdkV2) { } +func (c UpdateAutomaticClusterUpdateSettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + AutomaticClusterUpdateSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAutomaticClusterUpdateSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9030,6 +9374,15 @@ func (newState *UpdateComplianceSecurityProfileSettingRequest_SdkV2) SyncEffecti func (newState *UpdateComplianceSecurityProfileSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateComplianceSecurityProfileSettingRequest_SdkV2) { } +func (c UpdateComplianceSecurityProfileSettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + ComplianceSecurityProfileSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateComplianceSecurityProfileSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9115,6 +9468,15 @@ func (newState *UpdateCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFie func (newState *UpdateCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCspEnablementAccountSettingRequest_SdkV2) { } +func (c UpdateCspEnablementAccountSettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + CspEnablementAccountSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCspEnablementAccountSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9208,6 +9570,15 @@ func (newState *UpdateDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsD func (newState *UpdateDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDefaultNamespaceSettingRequest_SdkV2) { } +func (c UpdateDefaultNamespaceSettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + DefaultNamespaceSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDefaultNamespaceSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9293,6 +9664,15 @@ func (newState *UpdateDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDurin func (newState *UpdateDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyAccessRequest_SdkV2) { } +func (c UpdateDisableLegacyAccessRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + DisableLegacyAccess_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDisableLegacyAccessRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9378,6 +9758,15 @@ func (newState *UpdateDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringC func (newState *UpdateDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyDbfsRequest_SdkV2) { } +func (c UpdateDisableLegacyDbfsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + DisableLegacyDbfs_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDisableLegacyDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9463,6 +9852,15 @@ func (newState *UpdateDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDur func (newState *UpdateDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyFeaturesRequest_SdkV2) { } +func (c UpdateDisableLegacyFeaturesRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + DisableLegacyFeatures_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDisableLegacyFeaturesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9548,6 +9946,15 @@ func (newState *UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffect func (newState *UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) { } +func (c UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + EnhancedSecurityMonitoringSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEnhancedSecurityMonitoringSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9633,6 +10040,15 @@ func (newState *UpdateEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFie func (newState *UpdateEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEsmEnablementAccountSettingRequest_SdkV2) { } +func (c UpdateEsmEnablementAccountSettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + EsmEnablementAccountSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEsmEnablementAccountSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9701,20 +10117,20 @@ func (o *UpdateEsmEnablementAccountSettingRequest_SdkV2) SetSetting(ctx context. // Details required to update an IP access list. type UpdateIpAccessList_SdkV2 struct { // Specifies whether this IP access list is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The ID for the corresponding IP access list IpAccessListId types.String `tfsdk:"-"` - IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + IpAddresses types.List `tfsdk:"ip_addresses" tf:""` // Label for the IP access list. This **cannot** be empty. - Label types.String `tfsdk:"label" tf:"optional"` + Label types.String `tfsdk:"label" tf:""` // Type of IP access list. Valid values are as follows and are // case-sensitive: // // * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block // list. Exclude this IP or range. IP addresses in the block list are // excluded even if they are included in an allow list. - ListType types.String `tfsdk:"list_type" tf:"optional"` + ListType types.String `tfsdk:"list_type" tf:""` } func (newState *UpdateIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateIpAccessList_SdkV2) { @@ -9723,6 +10139,12 @@ func (newState *UpdateIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *UpdateIpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateIpAccessList_SdkV2) { } +func (c UpdateIpAccessList_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "ip_access_list_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateIpAccessList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9795,9 +10217,9 @@ func (o *UpdateIpAccessList_SdkV2) SetIpAddresses(ctx context.Context, v []types type UpdateNotificationDestinationRequest_SdkV2 struct { // The configuration for the notification destination. Must wrap EXACTLY one // of the nested configs. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.List `tfsdk:"config" tf:"object"` // The display name for the notification destination. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying notification destination. Id types.String `tfsdk:"-"` } @@ -9808,6 +10230,13 @@ func (newState *UpdateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsD func (newState *UpdateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateNotificationDestinationRequest_SdkV2) { } +func (c UpdateNotificationDestinationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Config_SdkV2{}.ToSchema(cs, append(path, "config")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateNotificationDestinationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9893,6 +10322,15 @@ func (newState *UpdatePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDu func (newState *UpdatePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalComputeSettingRequest_SdkV2) { } +func (c UpdatePersonalComputeSettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + PersonalComputeSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePersonalComputeSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9961,12 +10399,6 @@ func (o *UpdatePersonalComputeSettingRequest_SdkV2) SetSetting(ctx context.Conte type UpdateResponse_SdkV2 struct { } -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { -} - -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10014,6 +10446,15 @@ func (newState *UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffective func (newState *UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) { } +func (c UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + RestrictWorkspaceAdminsSetting_SdkV2{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRestrictWorkspaceAdminsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/settings_tf/model.go b/internal/service/settings_tf/model.go index 14010b78d..858635f62 100755 --- a/internal/service/settings_tf/model.go +++ b/internal/service/settings_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -31,6 +32,12 @@ func (newState *AibiDashboardEmbeddingAccessPolicy) SyncEffectiveFieldsDuringCre func (newState *AibiDashboardEmbeddingAccessPolicy) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingAccessPolicy) { } +func (c AibiDashboardEmbeddingAccessPolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "access_policy_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingAccessPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -71,13 +78,13 @@ type AibiDashboardEmbeddingAccessPolicySetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *AibiDashboardEmbeddingAccessPolicySetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingAccessPolicySetting) { @@ -86,6 +93,13 @@ func (newState *AibiDashboardEmbeddingAccessPolicySetting) SyncEffectiveFieldsDu func (newState *AibiDashboardEmbeddingAccessPolicySetting) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingAccessPolicySetting) { } +func (c AibiDashboardEmbeddingAccessPolicySetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "aibi_dashboard_embedding_access_policy")...) + AibiDashboardEmbeddingAccessPolicy{}.ToSchema(cs, append(path, "aibi_dashboard_embedding_access_policy")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingAccessPolicySetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -152,7 +166,7 @@ func (o *AibiDashboardEmbeddingAccessPolicySetting) SetAibiDashboardEmbeddingAcc } type AibiDashboardEmbeddingApprovedDomains struct { - ApprovedDomains types.List `tfsdk:"approved_domains" tf:"optional"` + ApprovedDomains types.List `tfsdk:"approved_domains" tf:""` } func (newState *AibiDashboardEmbeddingApprovedDomains) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingApprovedDomains) { @@ -161,6 +175,11 @@ func (newState *AibiDashboardEmbeddingApprovedDomains) SyncEffectiveFieldsDuring func (newState *AibiDashboardEmbeddingApprovedDomains) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingApprovedDomains) { } +func (c AibiDashboardEmbeddingApprovedDomains) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingApprovedDomains. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -231,13 +250,13 @@ type AibiDashboardEmbeddingApprovedDomainsSetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *AibiDashboardEmbeddingApprovedDomainsSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingApprovedDomainsSetting) { @@ -246,6 +265,13 @@ func (newState *AibiDashboardEmbeddingApprovedDomainsSetting) SyncEffectiveField func (newState *AibiDashboardEmbeddingApprovedDomainsSetting) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingApprovedDomainsSetting) { } +func (c AibiDashboardEmbeddingApprovedDomainsSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "aibi_dashboard_embedding_approved_domains")...) + AibiDashboardEmbeddingApprovedDomains{}.ToSchema(cs, append(path, "aibi_dashboard_embedding_approved_domains")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingApprovedDomainsSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -320,13 +346,13 @@ type AutomaticClusterUpdateSetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *AutomaticClusterUpdateSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutomaticClusterUpdateSetting) { @@ -335,6 +361,13 @@ func (newState *AutomaticClusterUpdateSetting) SyncEffectiveFieldsDuringCreateOr func (newState *AutomaticClusterUpdateSetting) SyncEffectiveFieldsDuringRead(existingState AutomaticClusterUpdateSetting) { } +func (c AutomaticClusterUpdateSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "automatic_cluster_update_workspace")...) + ClusterAutoRestartMessage{}.ToSchema(cs, append(path, "automatic_cluster_update_workspace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AutomaticClusterUpdateSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -401,7 +434,7 @@ func (o *AutomaticClusterUpdateSetting) SetAutomaticClusterUpdateWorkspace(ctx c } type BooleanMessage struct { - Value types.Bool `tfsdk:"value" tf:"optional"` + Value types.Bool `tfsdk:"value" tf:""` } func (newState *BooleanMessage) SyncEffectiveFieldsDuringCreateOrUpdate(plan BooleanMessage) { @@ -410,6 +443,11 @@ func (newState *BooleanMessage) SyncEffectiveFieldsDuringCreateOrUpdate(plan Boo func (newState *BooleanMessage) SyncEffectiveFieldsDuringRead(existingState BooleanMessage) { } +func (c BooleanMessage) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BooleanMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -442,20 +480,20 @@ func (o BooleanMessage) Type(ctx context.Context) attr.Type { } type ClusterAutoRestartMessage struct { - CanToggle types.Bool `tfsdk:"can_toggle" tf:"optional"` + CanToggle types.Bool `tfsdk:"can_toggle" tf:""` - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // Contains an information about the enablement status judging (e.g. whether // the enterprise tier is enabled) This is only additional information that // MUST NOT be used to decide whether the setting is enabled or not. This is // intended to use only for purposes like showing an error message to the // customer with the additional details. For example, using these details we // can check why exactly the feature is disabled for this customer. - EnablementDetails types.Object `tfsdk:"enablement_details" tf:"optional,object"` + EnablementDetails types.Object `tfsdk:"enablement_details" tf:"object"` - MaintenanceWindow types.Object `tfsdk:"maintenance_window" tf:"optional,object"` + MaintenanceWindow types.Object `tfsdk:"maintenance_window" tf:"object"` - RestartEvenIfNoUpdatesAvailable types.Bool `tfsdk:"restart_even_if_no_updates_available" tf:"optional"` + RestartEvenIfNoUpdatesAvailable types.Bool `tfsdk:"restart_even_if_no_updates_available" tf:""` } func (newState *ClusterAutoRestartMessage) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessage) { @@ -464,6 +502,13 @@ func (newState *ClusterAutoRestartMessage) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ClusterAutoRestartMessage) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessage) { } +func (c ClusterAutoRestartMessage) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAutoRestartMessageEnablementDetails{}.ToSchema(cs, append(path, "enablement_details")...) + ClusterAutoRestartMessageMaintenanceWindow{}.ToSchema(cs, append(path, "maintenance_window")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -570,12 +615,12 @@ func (o *ClusterAutoRestartMessage) SetMaintenanceWindow(ctx context.Context, v // the feature is disabled for this customer. type ClusterAutoRestartMessageEnablementDetails struct { // The feature is force enabled if compliance mode is active - ForcedForComplianceMode types.Bool `tfsdk:"forced_for_compliance_mode" tf:"optional"` + ForcedForComplianceMode types.Bool `tfsdk:"forced_for_compliance_mode" tf:""` // The feature is unavailable if the corresponding entitlement disabled (see // getShieldEntitlementEnable) - UnavailableForDisabledEntitlement types.Bool `tfsdk:"unavailable_for_disabled_entitlement" tf:"optional"` + UnavailableForDisabledEntitlement types.Bool `tfsdk:"unavailable_for_disabled_entitlement" tf:""` // The feature is unavailable if the customer doesn't have enterprise tier - UnavailableForNonEnterpriseTier types.Bool `tfsdk:"unavailable_for_non_enterprise_tier" tf:"optional"` + UnavailableForNonEnterpriseTier types.Bool `tfsdk:"unavailable_for_non_enterprise_tier" tf:""` } func (newState *ClusterAutoRestartMessageEnablementDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageEnablementDetails) { @@ -584,6 +629,11 @@ func (newState *ClusterAutoRestartMessageEnablementDetails) SyncEffectiveFieldsD func (newState *ClusterAutoRestartMessageEnablementDetails) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageEnablementDetails) { } +func (c ClusterAutoRestartMessageEnablementDetails) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageEnablementDetails. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -620,7 +670,7 @@ func (o ClusterAutoRestartMessageEnablementDetails) Type(ctx context.Context) at } type ClusterAutoRestartMessageMaintenanceWindow struct { - WeekDayBasedSchedule types.Object `tfsdk:"week_day_based_schedule" tf:"optional,object"` + WeekDayBasedSchedule types.Object `tfsdk:"week_day_based_schedule" tf:"object"` } func (newState *ClusterAutoRestartMessageMaintenanceWindow) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindow) { @@ -629,6 +679,12 @@ func (newState *ClusterAutoRestartMessageMaintenanceWindow) SyncEffectiveFieldsD func (newState *ClusterAutoRestartMessageMaintenanceWindow) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageMaintenanceWindow) { } +func (c ClusterAutoRestartMessageMaintenanceWindow) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule{}.ToSchema(cs, append(path, "week_day_based_schedule")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageMaintenanceWindow. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -691,11 +747,11 @@ func (o *ClusterAutoRestartMessageMaintenanceWindow) SetWeekDayBasedSchedule(ctx } type ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule struct { - DayOfWeek types.String `tfsdk:"day_of_week" tf:"optional"` + DayOfWeek types.String `tfsdk:"day_of_week" tf:""` - Frequency types.String `tfsdk:"frequency" tf:"optional"` + Frequency types.String `tfsdk:"frequency" tf:""` - WindowStartTime types.Object `tfsdk:"window_start_time" tf:"optional,object"` + WindowStartTime types.Object `tfsdk:"window_start_time" tf:"object"` } func (newState *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) { @@ -704,6 +760,12 @@ func (newState *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) func (newState *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) { } +func (c ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ClusterAutoRestartMessageMaintenanceWindowWindowStartTime{}.ToSchema(cs, append(path, "window_start_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -770,9 +832,9 @@ func (o *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) SetWind } type ClusterAutoRestartMessageMaintenanceWindowWindowStartTime struct { - Hours types.Int64 `tfsdk:"hours" tf:"optional"` + Hours types.Int64 `tfsdk:"hours" tf:""` - Minutes types.Int64 `tfsdk:"minutes" tf:"optional"` + Minutes types.Int64 `tfsdk:"minutes" tf:""` } func (newState *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) { @@ -781,6 +843,11 @@ func (newState *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) SyncE func (newState *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) { } +func (c ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageMaintenanceWindowWindowStartTime. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -817,9 +884,9 @@ func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) Type(ctx cont // SHIELD feature: CSP type ComplianceSecurityProfile struct { // Set by customers when they request Compliance Security Profile (CSP) - ComplianceStandards types.List `tfsdk:"compliance_standards" tf:"optional"` + ComplianceStandards types.List `tfsdk:"compliance_standards" tf:""` - IsEnabled types.Bool `tfsdk:"is_enabled" tf:"optional"` + IsEnabled types.Bool `tfsdk:"is_enabled" tf:""` } func (newState *ComplianceSecurityProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplianceSecurityProfile) { @@ -828,6 +895,11 @@ func (newState *ComplianceSecurityProfile) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ComplianceSecurityProfile) SyncEffectiveFieldsDuringRead(existingState ComplianceSecurityProfile) { } +func (c ComplianceSecurityProfile) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplianceSecurityProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -901,13 +973,13 @@ type ComplianceSecurityProfileSetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *ComplianceSecurityProfileSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplianceSecurityProfileSetting) { @@ -916,6 +988,13 @@ func (newState *ComplianceSecurityProfileSetting) SyncEffectiveFieldsDuringCreat func (newState *ComplianceSecurityProfileSetting) SyncEffectiveFieldsDuringRead(existingState ComplianceSecurityProfileSetting) { } +func (c ComplianceSecurityProfileSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "compliance_security_profile_workspace")...) + ComplianceSecurityProfile{}.ToSchema(cs, append(path, "compliance_security_profile_workspace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplianceSecurityProfileSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -982,15 +1061,15 @@ func (o *ComplianceSecurityProfileSetting) SetComplianceSecurityProfileWorkspace } type Config struct { - Email types.Object `tfsdk:"email" tf:"optional,object"` + Email types.Object `tfsdk:"email" tf:"object"` - GenericWebhook types.Object `tfsdk:"generic_webhook" tf:"optional,object"` + GenericWebhook types.Object `tfsdk:"generic_webhook" tf:"object"` - MicrosoftTeams types.Object `tfsdk:"microsoft_teams" tf:"optional,object"` + MicrosoftTeams types.Object `tfsdk:"microsoft_teams" tf:"object"` - Pagerduty types.Object `tfsdk:"pagerduty" tf:"optional,object"` + Pagerduty types.Object `tfsdk:"pagerduty" tf:"object"` - Slack types.Object `tfsdk:"slack" tf:"optional,object"` + Slack types.Object `tfsdk:"slack" tf:"object"` } func (newState *Config) SyncEffectiveFieldsDuringCreateOrUpdate(plan Config) { @@ -999,6 +1078,16 @@ func (newState *Config) SyncEffectiveFieldsDuringCreateOrUpdate(plan Config) { func (newState *Config) SyncEffectiveFieldsDuringRead(existingState Config) { } +func (c Config) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EmailConfig{}.ToSchema(cs, append(path, "email")...) + GenericWebhookConfig{}.ToSchema(cs, append(path, "generic_webhook")...) + MicrosoftTeamsConfig{}.ToSchema(cs, append(path, "microsoft_teams")...) + PagerdutyConfig{}.ToSchema(cs, append(path, "pagerduty")...) + SlackConfig{}.ToSchema(cs, append(path, "slack")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Config. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1186,7 +1275,7 @@ func (o *Config) SetSlack(ctx context.Context, v SlackConfig) { // Details required to configure a block list or allow list. type CreateIpAccessList struct { - IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + IpAddresses types.List `tfsdk:"ip_addresses" tf:""` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label" tf:""` // Type of IP access list. Valid values are as follows and are @@ -1204,6 +1293,13 @@ func (newState *CreateIpAccessList) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateIpAccessList) SyncEffectiveFieldsDuringRead(existingState CreateIpAccessList) { } +func (c CreateIpAccessList) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "label")...) + cs.SetRequired(append(path, "list_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateIpAccessList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1272,7 +1368,7 @@ func (o *CreateIpAccessList) SetIpAddresses(ctx context.Context, v []types.Strin // An IP access list was successfully created. type CreateIpAccessListResponse struct { // Definition of an IP Access list - IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"object"` } func (newState *CreateIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateIpAccessListResponse) { @@ -1281,6 +1377,12 @@ func (newState *CreateIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CreateIpAccessListResponse) SyncEffectiveFieldsDuringRead(existingState CreateIpAccessListResponse) { } +func (c CreateIpAccessListResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo{}.ToSchema(cs, append(path, "ip_access_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateIpAccessListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1360,6 +1462,13 @@ func (newState *CreateNetworkConnectivityConfigRequest) SyncEffectiveFieldsDurin func (newState *CreateNetworkConnectivityConfigRequest) SyncEffectiveFieldsDuringRead(existingState CreateNetworkConnectivityConfigRequest) { } +func (c CreateNetworkConnectivityConfigRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "region")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateNetworkConnectivityConfigRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1396,9 +1505,9 @@ func (o CreateNetworkConnectivityConfigRequest) Type(ctx context.Context) attr.T type CreateNotificationDestinationRequest struct { // The configuration for the notification destination. Must wrap EXACTLY one // of the nested configs. - Config types.Object `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"object"` // The display name for the notification destination. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` } func (newState *CreateNotificationDestinationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNotificationDestinationRequest) { @@ -1407,6 +1516,12 @@ func (newState *CreateNotificationDestinationRequest) SyncEffectiveFieldsDuringC func (newState *CreateNotificationDestinationRequest) SyncEffectiveFieldsDuringRead(existingState CreateNotificationDestinationRequest) { } +func (c CreateNotificationDestinationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Config{}.ToSchema(cs, append(path, "config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateNotificationDestinationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1475,9 +1590,9 @@ type CreateOboTokenRequest struct { // Application ID of the service principal. ApplicationId types.String `tfsdk:"application_id" tf:""` // Comment that describes the purpose of the token. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The number of seconds before the token expires. - LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:"optional"` + LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:""` } func (newState *CreateOboTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOboTokenRequest) { @@ -1486,6 +1601,12 @@ func (newState *CreateOboTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateOboTokenRequest) SyncEffectiveFieldsDuringRead(existingState CreateOboTokenRequest) { } +func (c CreateOboTokenRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "application_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateOboTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1523,9 +1644,9 @@ func (o CreateOboTokenRequest) Type(ctx context.Context) attr.Type { // An on-behalf token was successfully created for the service principal. type CreateOboTokenResponse struct { - TokenInfo types.Object `tfsdk:"token_info" tf:"optional,object"` + TokenInfo types.Object `tfsdk:"token_info" tf:"object"` // Value of the token. - TokenValue types.String `tfsdk:"token_value" tf:"optional"` + TokenValue types.String `tfsdk:"token_value" tf:""` } func (newState *CreateOboTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOboTokenResponse) { @@ -1534,6 +1655,12 @@ func (newState *CreateOboTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateOboTokenResponse) SyncEffectiveFieldsDuringRead(existingState CreateOboTokenResponse) { } +func (c CreateOboTokenResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenInfo{}.ToSchema(cs, append(path, "token_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateOboTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1614,6 +1741,14 @@ func (newState *CreatePrivateEndpointRuleRequest) SyncEffectiveFieldsDuringCreat func (newState *CreatePrivateEndpointRuleRequest) SyncEffectiveFieldsDuringRead(existingState CreatePrivateEndpointRuleRequest) { } +func (c CreatePrivateEndpointRuleRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "group_id")...) + cs.SetRequired(append(path, "network_connectivity_config_id")...) + cs.SetRequired(append(path, "resource_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePrivateEndpointRuleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1651,11 +1786,11 @@ func (o CreatePrivateEndpointRuleRequest) Type(ctx context.Context) attr.Type { type CreateTokenRequest struct { // Optional description to attach to the token. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The lifetime of the token, in seconds. // // If the lifetime is not specified, this token remains valid indefinitely. - LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:"optional"` + LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:""` } func (newState *CreateTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTokenRequest) { @@ -1664,6 +1799,11 @@ func (newState *CreateTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateTokenRequest) SyncEffectiveFieldsDuringRead(existingState CreateTokenRequest) { } +func (c CreateTokenRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1699,9 +1839,9 @@ func (o CreateTokenRequest) Type(ctx context.Context) attr.Type { type CreateTokenResponse struct { // The information for the new token. - TokenInfo types.Object `tfsdk:"token_info" tf:"optional,object"` + TokenInfo types.Object `tfsdk:"token_info" tf:"object"` // The value of the new token. - TokenValue types.String `tfsdk:"token_value" tf:"optional"` + TokenValue types.String `tfsdk:"token_value" tf:""` } func (newState *CreateTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTokenResponse) { @@ -1710,6 +1850,12 @@ func (newState *CreateTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *CreateTokenResponse) SyncEffectiveFieldsDuringRead(existingState CreateTokenResponse) { } +func (c CreateTokenResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PublicTokenInfo{}.ToSchema(cs, append(path, "token_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1777,9 +1923,9 @@ func (o *CreateTokenResponse) SetTokenInfo(ctx context.Context, v PublicTokenInf type CspEnablementAccount struct { // Set by customers when they request Compliance Security Profile (CSP) // Invariants are enforced in Settings policy. - ComplianceStandards types.List `tfsdk:"compliance_standards" tf:"optional"` + ComplianceStandards types.List `tfsdk:"compliance_standards" tf:""` // Enforced = it cannot be overriden at workspace level. - IsEnforced types.Bool `tfsdk:"is_enforced" tf:"optional"` + IsEnforced types.Bool `tfsdk:"is_enforced" tf:""` } func (newState *CspEnablementAccount) SyncEffectiveFieldsDuringCreateOrUpdate(plan CspEnablementAccount) { @@ -1788,6 +1934,11 @@ func (newState *CspEnablementAccount) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CspEnablementAccount) SyncEffectiveFieldsDuringRead(existingState CspEnablementAccount) { } +func (c CspEnablementAccount) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CspEnablementAccount. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1861,13 +2012,13 @@ type CspEnablementAccountSetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *CspEnablementAccountSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan CspEnablementAccountSetting) { @@ -1876,6 +2027,13 @@ func (newState *CspEnablementAccountSetting) SyncEffectiveFieldsDuringCreateOrUp func (newState *CspEnablementAccountSetting) SyncEffectiveFieldsDuringRead(existingState CspEnablementAccountSetting) { } +func (c CspEnablementAccountSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "csp_enablement_account")...) + CspEnablementAccount{}.ToSchema(cs, append(path, "csp_enablement_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CspEnablementAccountSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1958,7 +2116,7 @@ type DefaultNamespaceSetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` Namespace types.Object `tfsdk:"namespace" tf:"object"` // Name of the corresponding setting. This field is populated in the @@ -1966,7 +2124,7 @@ type DefaultNamespaceSetting struct { // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *DefaultNamespaceSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan DefaultNamespaceSetting) { @@ -1975,6 +2133,13 @@ func (newState *DefaultNamespaceSetting) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *DefaultNamespaceSetting) SyncEffectiveFieldsDuringRead(existingState DefaultNamespaceSetting) { } +func (c DefaultNamespaceSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "namespace")...) + StringMessage{}.ToSchema(cs, append(path, "namespace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DefaultNamespaceSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2046,12 +2211,6 @@ type DeleteAccountIpAccessListRequest struct { IpAccessListId types.String `tfsdk:"-"` } -func (newState *DeleteAccountIpAccessListRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountIpAccessListRequest) { -} - -func (newState *DeleteAccountIpAccessListRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAccountIpAccessListRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountIpAccessListRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2095,12 +2254,6 @@ type DeleteAibiDashboardEmbeddingAccessPolicySettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) { -} - -func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingAccessPolicySettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2150,6 +2303,12 @@ func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingResponse) SyncEff func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingResponse) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingAccessPolicySettingResponse) { } +func (c DeleteAibiDashboardEmbeddingAccessPolicySettingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingAccessPolicySettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2193,12 +2352,6 @@ type DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) { -} - -func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2248,6 +2401,12 @@ func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse) Sync func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse) { } +func (c DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2291,12 +2450,6 @@ type DeleteDefaultNamespaceSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteDefaultNamespaceSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDefaultNamespaceSettingRequest) { -} - -func (newState *DeleteDefaultNamespaceSettingRequest) SyncEffectiveFieldsDuringRead(existingState DeleteDefaultNamespaceSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDefaultNamespaceSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2346,6 +2499,12 @@ func (newState *DeleteDefaultNamespaceSettingResponse) SyncEffectiveFieldsDuring func (newState *DeleteDefaultNamespaceSettingResponse) SyncEffectiveFieldsDuringRead(existingState DeleteDefaultNamespaceSettingResponse) { } +func (c DeleteDefaultNamespaceSettingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDefaultNamespaceSettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2389,12 +2548,6 @@ type DeleteDisableLegacyAccessRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteDisableLegacyAccessRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyAccessRequest) { -} - -func (newState *DeleteDisableLegacyAccessRequest) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyAccessRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyAccessRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2444,6 +2597,12 @@ func (newState *DeleteDisableLegacyAccessResponse) SyncEffectiveFieldsDuringCrea func (newState *DeleteDisableLegacyAccessResponse) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyAccessResponse) { } +func (c DeleteDisableLegacyAccessResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyAccessResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2487,12 +2646,6 @@ type DeleteDisableLegacyDbfsRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteDisableLegacyDbfsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyDbfsRequest) { -} - -func (newState *DeleteDisableLegacyDbfsRequest) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyDbfsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2542,6 +2695,12 @@ func (newState *DeleteDisableLegacyDbfsResponse) SyncEffectiveFieldsDuringCreate func (newState *DeleteDisableLegacyDbfsResponse) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyDbfsResponse) { } +func (c DeleteDisableLegacyDbfsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyDbfsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2585,12 +2744,6 @@ type DeleteDisableLegacyFeaturesRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteDisableLegacyFeaturesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyFeaturesRequest) { -} - -func (newState *DeleteDisableLegacyFeaturesRequest) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyFeaturesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyFeaturesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2640,6 +2793,12 @@ func (newState *DeleteDisableLegacyFeaturesResponse) SyncEffectiveFieldsDuringCr func (newState *DeleteDisableLegacyFeaturesResponse) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyFeaturesResponse) { } +func (c DeleteDisableLegacyFeaturesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyFeaturesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2677,12 +2836,6 @@ type DeleteIpAccessListRequest struct { IpAccessListId types.String `tfsdk:"-"` } -func (newState *DeleteIpAccessListRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteIpAccessListRequest) { -} - -func (newState *DeleteIpAccessListRequest) SyncEffectiveFieldsDuringRead(existingState DeleteIpAccessListRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteIpAccessListRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2720,12 +2873,6 @@ type DeleteNetworkConnectivityConfigurationRequest struct { NetworkConnectivityConfigId types.String `tfsdk:"-"` } -func (newState *DeleteNetworkConnectivityConfigurationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNetworkConnectivityConfigurationRequest) { -} - -func (newState *DeleteNetworkConnectivityConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState DeleteNetworkConnectivityConfigurationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkConnectivityConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2760,12 +2907,6 @@ func (o DeleteNetworkConnectivityConfigurationRequest) Type(ctx context.Context) type DeleteNetworkConnectivityConfigurationResponse struct { } -func (newState *DeleteNetworkConnectivityConfigurationResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNetworkConnectivityConfigurationResponse) { -} - -func (newState *DeleteNetworkConnectivityConfigurationResponse) SyncEffectiveFieldsDuringRead(existingState DeleteNetworkConnectivityConfigurationResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkConnectivityConfigurationResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2798,12 +2939,6 @@ type DeleteNotificationDestinationRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteNotificationDestinationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNotificationDestinationRequest) { -} - -func (newState *DeleteNotificationDestinationRequest) SyncEffectiveFieldsDuringRead(existingState DeleteNotificationDestinationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNotificationDestinationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2847,12 +2982,6 @@ type DeletePersonalComputeSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *DeletePersonalComputeSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePersonalComputeSettingRequest) { -} - -func (newState *DeletePersonalComputeSettingRequest) SyncEffectiveFieldsDuringRead(existingState DeletePersonalComputeSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePersonalComputeSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2902,6 +3031,12 @@ func (newState *DeletePersonalComputeSettingResponse) SyncEffectiveFieldsDuringC func (newState *DeletePersonalComputeSettingResponse) SyncEffectiveFieldsDuringRead(existingState DeletePersonalComputeSettingResponse) { } +func (c DeletePersonalComputeSettingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePersonalComputeSettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2941,12 +3076,6 @@ type DeletePrivateEndpointRuleRequest struct { PrivateEndpointRuleId types.String `tfsdk:"-"` } -func (newState *DeletePrivateEndpointRuleRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePrivateEndpointRuleRequest) { -} - -func (newState *DeletePrivateEndpointRuleRequest) SyncEffectiveFieldsDuringRead(existingState DeletePrivateEndpointRuleRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePrivateEndpointRuleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2983,12 +3112,6 @@ func (o DeletePrivateEndpointRuleRequest) Type(ctx context.Context) attr.Type { type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3028,12 +3151,6 @@ type DeleteRestrictWorkspaceAdminsSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *DeleteRestrictWorkspaceAdminsSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRestrictWorkspaceAdminsSettingRequest) { -} - -func (newState *DeleteRestrictWorkspaceAdminsSettingRequest) SyncEffectiveFieldsDuringRead(existingState DeleteRestrictWorkspaceAdminsSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRestrictWorkspaceAdminsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3083,6 +3200,12 @@ func (newState *DeleteRestrictWorkspaceAdminsSettingResponse) SyncEffectiveField func (newState *DeleteRestrictWorkspaceAdminsSettingResponse) SyncEffectiveFieldsDuringRead(existingState DeleteRestrictWorkspaceAdminsSettingResponse) { } +func (c DeleteRestrictWorkspaceAdminsSettingResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "etag")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRestrictWorkspaceAdminsSettingResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3120,12 +3243,6 @@ type DeleteTokenManagementRequest struct { TokenId types.String `tfsdk:"-"` } -func (newState *DeleteTokenManagementRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTokenManagementRequest) { -} - -func (newState *DeleteTokenManagementRequest) SyncEffectiveFieldsDuringRead(existingState DeleteTokenManagementRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTokenManagementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3166,13 +3283,13 @@ type DisableLegacyAccess struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *DisableLegacyAccess) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableLegacyAccess) { @@ -3181,6 +3298,13 @@ func (newState *DisableLegacyAccess) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *DisableLegacyAccess) SyncEffectiveFieldsDuringRead(existingState DisableLegacyAccess) { } +func (c DisableLegacyAccess) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "disable_legacy_access")...) + BooleanMessage{}.ToSchema(cs, append(path, "disable_legacy_access")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableLegacyAccess. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3255,13 +3379,13 @@ type DisableLegacyDbfs struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *DisableLegacyDbfs) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableLegacyDbfs) { @@ -3270,6 +3394,13 @@ func (newState *DisableLegacyDbfs) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DisableLegacyDbfs) SyncEffectiveFieldsDuringRead(existingState DisableLegacyDbfs) { } +func (c DisableLegacyDbfs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "disable_legacy_dbfs")...) + BooleanMessage{}.ToSchema(cs, append(path, "disable_legacy_dbfs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableLegacyDbfs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3344,13 +3475,13 @@ type DisableLegacyFeatures struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *DisableLegacyFeatures) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableLegacyFeatures) { @@ -3359,6 +3490,13 @@ func (newState *DisableLegacyFeatures) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *DisableLegacyFeatures) SyncEffectiveFieldsDuringRead(existingState DisableLegacyFeatures) { } +func (c DisableLegacyFeatures) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "disable_legacy_features")...) + BooleanMessage{}.ToSchema(cs, append(path, "disable_legacy_features")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableLegacyFeatures. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3430,7 +3568,7 @@ func (o *DisableLegacyFeatures) SetDisableLegacyFeatures(ctx context.Context, v // dataplane, see networkconfig.textproto). type EgressNetworkPolicy struct { // The access policy enforced for egress traffic to the internet. - InternetAccess types.Object `tfsdk:"internet_access" tf:"optional,object"` + InternetAccess types.Object `tfsdk:"internet_access" tf:"object"` } func (newState *EgressNetworkPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicy) { @@ -3439,6 +3577,12 @@ func (newState *EgressNetworkPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *EgressNetworkPolicy) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicy) { } +func (c EgressNetworkPolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EgressNetworkPolicyInternetAccessPolicy{}.ToSchema(cs, append(path, "internet_access")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3501,19 +3645,19 @@ func (o *EgressNetworkPolicy) SetInternetAccess(ctx context.Context, v EgressNet } type EgressNetworkPolicyInternetAccessPolicy struct { - AllowedInternetDestinations types.List `tfsdk:"allowed_internet_destinations" tf:"optional"` + AllowedInternetDestinations types.List `tfsdk:"allowed_internet_destinations" tf:""` - AllowedStorageDestinations types.List `tfsdk:"allowed_storage_destinations" tf:"optional"` + AllowedStorageDestinations types.List `tfsdk:"allowed_storage_destinations" tf:""` // Optional. If not specified, assume the policy is enforced for all // workloads. - LogOnlyMode types.Object `tfsdk:"log_only_mode" tf:"optional,object"` + LogOnlyMode types.Object `tfsdk:"log_only_mode" tf:"object"` // At which level can Databricks and Databricks managed compute access // Internet. FULL_ACCESS: Databricks can access Internet. No blocking rules // will apply. RESTRICTED_ACCESS: Databricks can only access explicitly // allowed internet and storage destinations, as well as UC connections and // external locations. PRIVATE_ACCESS_ONLY (not used): Databricks can only // access destinations via private link. - RestrictionMode types.String `tfsdk:"restriction_mode" tf:"optional"` + RestrictionMode types.String `tfsdk:"restriction_mode" tf:""` } func (newState *EgressNetworkPolicyInternetAccessPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicy) { @@ -3522,6 +3666,14 @@ func (newState *EgressNetworkPolicyInternetAccessPolicy) SyncEffectiveFieldsDuri func (newState *EgressNetworkPolicyInternetAccessPolicy) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicy) { } +func (c EgressNetworkPolicyInternetAccessPolicy) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EgressNetworkPolicyInternetAccessPolicyInternetDestination{}.ToSchema(cs, append(path, "allowed_internet_destinations")...) + EgressNetworkPolicyInternetAccessPolicyStorageDestination{}.ToSchema(cs, append(path, "allowed_storage_destinations")...) + EgressNetworkPolicyInternetAccessPolicyLogOnlyMode{}.ToSchema(cs, append(path, "log_only_mode")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicy. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3651,15 +3803,15 @@ func (o *EgressNetworkPolicyInternetAccessPolicy) SetLogOnlyMode(ctx context.Con // restricted. We only support domain name (FQDN) destinations for the time // being, though going forwards we want to support host names and IP addresses. type EgressNetworkPolicyInternetAccessPolicyInternetDestination struct { - Destination types.String `tfsdk:"destination" tf:"optional"` + Destination types.String `tfsdk:"destination" tf:""` // The filtering protocol used by the DP. For private and public preview, // SEG will only support TCP filtering (i.e. DNS based filtering, filtering // by destination IP address), so protocol will be set to TCP by default and // hidden from the user. In the future, users may be able to select HTTP // filtering (i.e. SNI based filtering, filtering by FQDN). - Protocol types.String `tfsdk:"protocol" tf:"optional"` + Protocol types.String `tfsdk:"protocol" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *EgressNetworkPolicyInternetAccessPolicyInternetDestination) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicyInternetDestination) { @@ -3668,6 +3820,11 @@ func (newState *EgressNetworkPolicyInternetAccessPolicyInternetDestination) Sync func (newState *EgressNetworkPolicyInternetAccessPolicyInternetDestination) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicyInternetDestination) { } +func (c EgressNetworkPolicyInternetAccessPolicyInternetDestination) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicyInternetDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3704,9 +3861,9 @@ func (o EgressNetworkPolicyInternetAccessPolicyInternetDestination) Type(ctx con } type EgressNetworkPolicyInternetAccessPolicyLogOnlyMode struct { - LogOnlyModeType types.String `tfsdk:"log_only_mode_type" tf:"optional"` + LogOnlyModeType types.String `tfsdk:"log_only_mode_type" tf:""` - Workloads types.List `tfsdk:"workloads" tf:"optional"` + Workloads types.List `tfsdk:"workloads" tf:""` } func (newState *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) { @@ -3715,6 +3872,11 @@ func (newState *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) SyncEffectiv func (newState *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) { } +func (c EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicyLogOnlyMode. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3780,21 +3942,21 @@ func (o *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) SetWorkloads(ctx co // Users can specify accessible storage destinations. type EgressNetworkPolicyInternetAccessPolicyStorageDestination struct { - AllowedPaths types.List `tfsdk:"allowed_paths" tf:"optional"` + AllowedPaths types.List `tfsdk:"allowed_paths" tf:""` - AzureContainer types.String `tfsdk:"azure_container" tf:"optional"` + AzureContainer types.String `tfsdk:"azure_container" tf:""` - AzureDnsZone types.String `tfsdk:"azure_dns_zone" tf:"optional"` + AzureDnsZone types.String `tfsdk:"azure_dns_zone" tf:""` - AzureStorageAccount types.String `tfsdk:"azure_storage_account" tf:"optional"` + AzureStorageAccount types.String `tfsdk:"azure_storage_account" tf:""` - AzureStorageService types.String `tfsdk:"azure_storage_service" tf:"optional"` + AzureStorageService types.String `tfsdk:"azure_storage_service" tf:""` - BucketName types.String `tfsdk:"bucket_name" tf:"optional"` + BucketName types.String `tfsdk:"bucket_name" tf:""` - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *EgressNetworkPolicyInternetAccessPolicyStorageDestination) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicyStorageDestination) { @@ -3803,6 +3965,11 @@ func (newState *EgressNetworkPolicyInternetAccessPolicyStorageDestination) SyncE func (newState *EgressNetworkPolicyInternetAccessPolicyStorageDestination) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicyStorageDestination) { } +func (c EgressNetworkPolicyInternetAccessPolicyStorageDestination) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicyStorageDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3880,7 +4047,7 @@ func (o *EgressNetworkPolicyInternetAccessPolicyStorageDestination) SetAllowedPa type EmailConfig struct { // Email addresses to notify. - Addresses types.List `tfsdk:"addresses" tf:"optional"` + Addresses types.List `tfsdk:"addresses" tf:""` } func (newState *EmailConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmailConfig) { @@ -3889,6 +4056,11 @@ func (newState *EmailConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmailC func (newState *EmailConfig) SyncEffectiveFieldsDuringRead(existingState EmailConfig) { } +func (c EmailConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EmailConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3959,6 +4131,11 @@ func (newState *Empty) SyncEffectiveFieldsDuringCreateOrUpdate(plan Empty) { func (newState *Empty) SyncEffectiveFieldsDuringRead(existingState Empty) { } +func (c Empty) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Empty. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3988,7 +4165,7 @@ func (o Empty) Type(ctx context.Context) attr.Type { // SHIELD feature: ESM type EnhancedSecurityMonitoring struct { - IsEnabled types.Bool `tfsdk:"is_enabled" tf:"optional"` + IsEnabled types.Bool `tfsdk:"is_enabled" tf:""` } func (newState *EnhancedSecurityMonitoring) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnhancedSecurityMonitoring) { @@ -3997,6 +4174,11 @@ func (newState *EnhancedSecurityMonitoring) SyncEffectiveFieldsDuringCreateOrUpd func (newState *EnhancedSecurityMonitoring) SyncEffectiveFieldsDuringRead(existingState EnhancedSecurityMonitoring) { } +func (c EnhancedSecurityMonitoring) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnhancedSecurityMonitoring. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4038,13 +4220,13 @@ type EnhancedSecurityMonitoringSetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *EnhancedSecurityMonitoringSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnhancedSecurityMonitoringSetting) { @@ -4053,6 +4235,13 @@ func (newState *EnhancedSecurityMonitoringSetting) SyncEffectiveFieldsDuringCrea func (newState *EnhancedSecurityMonitoringSetting) SyncEffectiveFieldsDuringRead(existingState EnhancedSecurityMonitoringSetting) { } +func (c EnhancedSecurityMonitoringSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "enhanced_security_monitoring_workspace")...) + EnhancedSecurityMonitoring{}.ToSchema(cs, append(path, "enhanced_security_monitoring_workspace")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnhancedSecurityMonitoringSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4120,7 +4309,7 @@ func (o *EnhancedSecurityMonitoringSetting) SetEnhancedSecurityMonitoringWorkspa // Account level policy for ESM type EsmEnablementAccount struct { - IsEnforced types.Bool `tfsdk:"is_enforced" tf:"optional"` + IsEnforced types.Bool `tfsdk:"is_enforced" tf:""` } func (newState *EsmEnablementAccount) SyncEffectiveFieldsDuringCreateOrUpdate(plan EsmEnablementAccount) { @@ -4129,6 +4318,11 @@ func (newState *EsmEnablementAccount) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *EsmEnablementAccount) SyncEffectiveFieldsDuringRead(existingState EsmEnablementAccount) { } +func (c EsmEnablementAccount) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EsmEnablementAccount. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4170,13 +4364,13 @@ type EsmEnablementAccountSetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *EsmEnablementAccountSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan EsmEnablementAccountSetting) { @@ -4185,6 +4379,13 @@ func (newState *EsmEnablementAccountSetting) SyncEffectiveFieldsDuringCreateOrUp func (newState *EsmEnablementAccountSetting) SyncEffectiveFieldsDuringRead(existingState EsmEnablementAccountSetting) { } +func (c EsmEnablementAccountSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "esm_enablement_account")...) + EsmEnablementAccount{}.ToSchema(cs, append(path, "esm_enablement_account")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EsmEnablementAccountSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4253,16 +4454,16 @@ func (o *EsmEnablementAccountSetting) SetEsmEnablementAccount(ctx context.Contex // The exchange token is the result of the token exchange with the IdP type ExchangeToken struct { // The requested token. - Credential types.String `tfsdk:"credential" tf:"optional"` + Credential types.String `tfsdk:"credential" tf:""` // The end-of-life timestamp of the token. The value is in milliseconds // since the Unix epoch. - CredentialEolTime types.Int64 `tfsdk:"credentialEolTime" tf:"optional"` + CredentialEolTime types.Int64 `tfsdk:"credentialEolTime" tf:""` // User ID of the user that owns this token. - OwnerId types.Int64 `tfsdk:"ownerId" tf:"optional"` + OwnerId types.Int64 `tfsdk:"ownerId" tf:""` // The scopes of access granted in the token. - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` // The type of this exchange token - TokenType types.String `tfsdk:"tokenType" tf:"optional"` + TokenType types.String `tfsdk:"tokenType" tf:""` } func (newState *ExchangeToken) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeToken) { @@ -4271,6 +4472,11 @@ func (newState *ExchangeToken) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exch func (newState *ExchangeToken) SyncEffectiveFieldsDuringRead(existingState ExchangeToken) { } +func (c ExchangeToken) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4356,6 +4562,15 @@ func (newState *ExchangeTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ExchangeTokenRequest) SyncEffectiveFieldsDuringRead(existingState ExchangeTokenRequest) { } +func (c ExchangeTokenRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "partitionId")...) + PartitionId{}.ToSchema(cs, append(path, "partitionId")...) + cs.SetRequired(append(path, "scopes")...) + cs.SetRequired(append(path, "tokenType")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4481,7 +4696,7 @@ func (o *ExchangeTokenRequest) SetTokenType(ctx context.Context, v []types.Strin // Exhanged tokens were successfully returned. type ExchangeTokenResponse struct { - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *ExchangeTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeTokenResponse) { @@ -4490,6 +4705,12 @@ func (newState *ExchangeTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ExchangeTokenResponse) SyncEffectiveFieldsDuringRead(existingState ExchangeTokenResponse) { } +func (c ExchangeTokenResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExchangeToken{}.ToSchema(cs, append(path, "values")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4554,7 +4775,7 @@ func (o *ExchangeTokenResponse) SetValues(ctx context.Context, v []ExchangeToken // An IP access list was successfully returned. type FetchIpAccessListResponse struct { // Definition of an IP Access list - IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"object"` } func (newState *FetchIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan FetchIpAccessListResponse) { @@ -4563,6 +4784,12 @@ func (newState *FetchIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *FetchIpAccessListResponse) SyncEffectiveFieldsDuringRead(existingState FetchIpAccessListResponse) { } +func (c FetchIpAccessListResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo{}.ToSchema(cs, append(path, "ip_access_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in FetchIpAccessListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4626,17 +4853,17 @@ func (o *FetchIpAccessListResponse) SetIpAccessList(ctx context.Context, v IpAcc type GenericWebhookConfig struct { // [Input-Only][Optional] Password for webhook. - Password types.String `tfsdk:"password" tf:"optional"` + Password types.String `tfsdk:"password" tf:""` // [Output-Only] Whether password is set. - PasswordSet types.Bool `tfsdk:"password_set" tf:"optional"` + PasswordSet types.Bool `tfsdk:"password_set" tf:""` // [Input-Only] URL for webhook. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` // [Output-Only] Whether URL is set. - UrlSet types.Bool `tfsdk:"url_set" tf:"optional"` + UrlSet types.Bool `tfsdk:"url_set" tf:""` // [Input-Only][Optional] Username for webhook. - Username types.String `tfsdk:"username" tf:"optional"` + Username types.String `tfsdk:"username" tf:""` // [Output-Only] Whether username is set. - UsernameSet types.Bool `tfsdk:"username_set" tf:"optional"` + UsernameSet types.Bool `tfsdk:"username_set" tf:""` } func (newState *GenericWebhookConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenericWebhookConfig) { @@ -4645,6 +4872,11 @@ func (newState *GenericWebhookConfig) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *GenericWebhookConfig) SyncEffectiveFieldsDuringRead(existingState GenericWebhookConfig) { } +func (c GenericWebhookConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenericWebhookConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4692,12 +4924,6 @@ type GetAccountIpAccessListRequest struct { IpAccessListId types.String `tfsdk:"-"` } -func (newState *GetAccountIpAccessListRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountIpAccessListRequest) { -} - -func (newState *GetAccountIpAccessListRequest) SyncEffectiveFieldsDuringRead(existingState GetAccountIpAccessListRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountIpAccessListRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4741,12 +4967,6 @@ type GetAibiDashboardEmbeddingAccessPolicySettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetAibiDashboardEmbeddingAccessPolicySettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAibiDashboardEmbeddingAccessPolicySettingRequest) { -} - -func (newState *GetAibiDashboardEmbeddingAccessPolicySettingRequest) SyncEffectiveFieldsDuringRead(existingState GetAibiDashboardEmbeddingAccessPolicySettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAibiDashboardEmbeddingAccessPolicySettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4790,12 +5010,6 @@ type GetAibiDashboardEmbeddingApprovedDomainsSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) { -} - -func (newState *GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) SyncEffectiveFieldsDuringRead(existingState GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAibiDashboardEmbeddingApprovedDomainsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4839,12 +5053,6 @@ type GetAutomaticClusterUpdateSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetAutomaticClusterUpdateSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAutomaticClusterUpdateSettingRequest) { -} - -func (newState *GetAutomaticClusterUpdateSettingRequest) SyncEffectiveFieldsDuringRead(existingState GetAutomaticClusterUpdateSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAutomaticClusterUpdateSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4888,12 +5096,6 @@ type GetComplianceSecurityProfileSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetComplianceSecurityProfileSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetComplianceSecurityProfileSettingRequest) { -} - -func (newState *GetComplianceSecurityProfileSettingRequest) SyncEffectiveFieldsDuringRead(existingState GetComplianceSecurityProfileSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetComplianceSecurityProfileSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4937,12 +5139,6 @@ type GetCspEnablementAccountSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetCspEnablementAccountSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCspEnablementAccountSettingRequest) { -} - -func (newState *GetCspEnablementAccountSettingRequest) SyncEffectiveFieldsDuringRead(existingState GetCspEnablementAccountSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCspEnablementAccountSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4986,12 +5182,6 @@ type GetDefaultNamespaceSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetDefaultNamespaceSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDefaultNamespaceSettingRequest) { -} - -func (newState *GetDefaultNamespaceSettingRequest) SyncEffectiveFieldsDuringRead(existingState GetDefaultNamespaceSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDefaultNamespaceSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5035,12 +5225,6 @@ type GetDisableLegacyAccessRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetDisableLegacyAccessRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDisableLegacyAccessRequest) { -} - -func (newState *GetDisableLegacyAccessRequest) SyncEffectiveFieldsDuringRead(existingState GetDisableLegacyAccessRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDisableLegacyAccessRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5084,12 +5268,6 @@ type GetDisableLegacyDbfsRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetDisableLegacyDbfsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDisableLegacyDbfsRequest) { -} - -func (newState *GetDisableLegacyDbfsRequest) SyncEffectiveFieldsDuringRead(existingState GetDisableLegacyDbfsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDisableLegacyDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5133,12 +5311,6 @@ type GetDisableLegacyFeaturesRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetDisableLegacyFeaturesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDisableLegacyFeaturesRequest) { -} - -func (newState *GetDisableLegacyFeaturesRequest) SyncEffectiveFieldsDuringRead(existingState GetDisableLegacyFeaturesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDisableLegacyFeaturesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5182,12 +5354,6 @@ type GetEnhancedSecurityMonitoringSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetEnhancedSecurityMonitoringSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEnhancedSecurityMonitoringSettingRequest) { -} - -func (newState *GetEnhancedSecurityMonitoringSettingRequest) SyncEffectiveFieldsDuringRead(existingState GetEnhancedSecurityMonitoringSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEnhancedSecurityMonitoringSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5231,12 +5397,6 @@ type GetEsmEnablementAccountSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetEsmEnablementAccountSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEsmEnablementAccountSettingRequest) { -} - -func (newState *GetEsmEnablementAccountSettingRequest) SyncEffectiveFieldsDuringRead(existingState GetEsmEnablementAccountSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEsmEnablementAccountSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5274,12 +5434,6 @@ type GetIpAccessListRequest struct { IpAccessListId types.String `tfsdk:"-"` } -func (newState *GetIpAccessListRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListRequest) { -} - -func (newState *GetIpAccessListRequest) SyncEffectiveFieldsDuringRead(existingState GetIpAccessListRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIpAccessListRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5313,7 +5467,7 @@ func (o GetIpAccessListRequest) Type(ctx context.Context) attr.Type { type GetIpAccessListResponse struct { // Definition of an IP Access list - IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"object"` } func (newState *GetIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListResponse) { @@ -5322,6 +5476,12 @@ func (newState *GetIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *GetIpAccessListResponse) SyncEffectiveFieldsDuringRead(existingState GetIpAccessListResponse) { } +func (c GetIpAccessListResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo{}.ToSchema(cs, append(path, "ip_access_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIpAccessListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5385,7 +5545,7 @@ func (o *GetIpAccessListResponse) SetIpAccessList(ctx context.Context, v IpAcces // IP access lists were successfully returned. type GetIpAccessListsResponse struct { - IpAccessLists types.List `tfsdk:"ip_access_lists" tf:"optional"` + IpAccessLists types.List `tfsdk:"ip_access_lists" tf:""` } func (newState *GetIpAccessListsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListsResponse) { @@ -5394,6 +5554,12 @@ func (newState *GetIpAccessListsResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *GetIpAccessListsResponse) SyncEffectiveFieldsDuringRead(existingState GetIpAccessListsResponse) { } +func (c GetIpAccessListsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo{}.ToSchema(cs, append(path, "ip_access_lists")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIpAccessListsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5461,12 +5627,6 @@ type GetNetworkConnectivityConfigurationRequest struct { NetworkConnectivityConfigId types.String `tfsdk:"-"` } -func (newState *GetNetworkConnectivityConfigurationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetNetworkConnectivityConfigurationRequest) { -} - -func (newState *GetNetworkConnectivityConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState GetNetworkConnectivityConfigurationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetNetworkConnectivityConfigurationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5503,12 +5663,6 @@ type GetNotificationDestinationRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetNotificationDestinationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetNotificationDestinationRequest) { -} - -func (newState *GetNotificationDestinationRequest) SyncEffectiveFieldsDuringRead(existingState GetNotificationDestinationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetNotificationDestinationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5552,12 +5706,6 @@ type GetPersonalComputeSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetPersonalComputeSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPersonalComputeSettingRequest) { -} - -func (newState *GetPersonalComputeSettingRequest) SyncEffectiveFieldsDuringRead(existingState GetPersonalComputeSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPersonalComputeSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5597,12 +5745,6 @@ type GetPrivateEndpointRuleRequest struct { PrivateEndpointRuleId types.String `tfsdk:"-"` } -func (newState *GetPrivateEndpointRuleRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPrivateEndpointRuleRequest) { -} - -func (newState *GetPrivateEndpointRuleRequest) SyncEffectiveFieldsDuringRead(existingState GetPrivateEndpointRuleRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPrivateEndpointRuleRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5648,12 +5790,6 @@ type GetRestrictWorkspaceAdminsSettingRequest struct { Etag types.String `tfsdk:"-"` } -func (newState *GetRestrictWorkspaceAdminsSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRestrictWorkspaceAdminsSettingRequest) { -} - -func (newState *GetRestrictWorkspaceAdminsSettingRequest) SyncEffectiveFieldsDuringRead(existingState GetRestrictWorkspaceAdminsSettingRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRestrictWorkspaceAdminsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5690,12 +5826,6 @@ type GetStatusRequest struct { Keys types.String `tfsdk:"-"` } -func (newState *GetStatusRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatusRequest) { -} - -func (newState *GetStatusRequest) SyncEffectiveFieldsDuringRead(existingState GetStatusRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5733,12 +5863,6 @@ type GetTokenManagementRequest struct { TokenId types.String `tfsdk:"-"` } -func (newState *GetTokenManagementRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenManagementRequest) { -} - -func (newState *GetTokenManagementRequest) SyncEffectiveFieldsDuringRead(existingState GetTokenManagementRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenManagementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5772,7 +5896,7 @@ func (o GetTokenManagementRequest) Type(ctx context.Context) attr.Type { type GetTokenPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetTokenPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenPermissionLevelsResponse) { @@ -5781,6 +5905,12 @@ func (newState *GetTokenPermissionLevelsResponse) SyncEffectiveFieldsDuringCreat func (newState *GetTokenPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetTokenPermissionLevelsResponse) { } +func (c GetTokenPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5844,7 +5974,7 @@ func (o *GetTokenPermissionLevelsResponse) SetPermissionLevels(ctx context.Conte // Token with specified Token ID was successfully returned. type GetTokenResponse struct { - TokenInfo types.Object `tfsdk:"token_info" tf:"optional,object"` + TokenInfo types.Object `tfsdk:"token_info" tf:"object"` } func (newState *GetTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenResponse) { @@ -5853,6 +5983,12 @@ func (newState *GetTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan G func (newState *GetTokenResponse) SyncEffectiveFieldsDuringRead(existingState GetTokenResponse) { } +func (c GetTokenResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenInfo{}.ToSchema(cs, append(path, "token_info")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5917,30 +6053,30 @@ func (o *GetTokenResponse) SetTokenInfo(ctx context.Context, v TokenInfo) { // Definition of an IP Access list type IpAccessListInfo struct { // Total number of IP or CIDR values. - AddressCount types.Int64 `tfsdk:"address_count" tf:"optional"` + AddressCount types.Int64 `tfsdk:"address_count" tf:""` // Creation timestamp in milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // User ID of the user who created this list. - CreatedBy types.Int64 `tfsdk:"created_by" tf:"optional"` + CreatedBy types.Int64 `tfsdk:"created_by" tf:""` // Specifies whether this IP access list is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` - IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + IpAddresses types.List `tfsdk:"ip_addresses" tf:""` // Label for the IP access list. This **cannot** be empty. - Label types.String `tfsdk:"label" tf:"optional"` + Label types.String `tfsdk:"label" tf:""` // Universally unique identifier (UUID) of the IP access list. - ListId types.String `tfsdk:"list_id" tf:"optional"` + ListId types.String `tfsdk:"list_id" tf:""` // Type of IP access list. Valid values are as follows and are // case-sensitive: // // * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block // list. Exclude this IP or range. IP addresses in the block list are // excluded even if they are included in an allow list. - ListType types.String `tfsdk:"list_type" tf:"optional"` + ListType types.String `tfsdk:"list_type" tf:""` // Update timestamp in milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // User ID of the user who updated this list. - UpdatedBy types.Int64 `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.Int64 `tfsdk:"updated_by" tf:""` } func (newState *IpAccessListInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan IpAccessListInfo) { @@ -5949,6 +6085,11 @@ func (newState *IpAccessListInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan I func (newState *IpAccessListInfo) SyncEffectiveFieldsDuringRead(existingState IpAccessListInfo) { } +func (c IpAccessListInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IpAccessListInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6030,7 +6171,7 @@ func (o *IpAccessListInfo) SetIpAddresses(ctx context.Context, v []types.String) // IP access lists were successfully returned. type ListIpAccessListResponse struct { - IpAccessLists types.List `tfsdk:"ip_access_lists" tf:"optional"` + IpAccessLists types.List `tfsdk:"ip_access_lists" tf:""` } func (newState *ListIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListIpAccessListResponse) { @@ -6039,6 +6180,12 @@ func (newState *ListIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListIpAccessListResponse) SyncEffectiveFieldsDuringRead(existingState ListIpAccessListResponse) { } +func (c ListIpAccessListResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessListInfo{}.ToSchema(cs, append(path, "ip_access_lists")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListIpAccessListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6101,10 +6248,10 @@ func (o *ListIpAccessListResponse) SetIpAccessLists(ctx context.Context, v []IpA } type ListNccAzurePrivateEndpointRulesResponse struct { - Items types.List `tfsdk:"items" tf:"optional"` + Items types.List `tfsdk:"items" tf:""` // A token that can be used to get the next page of results. If null, there // are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListNccAzurePrivateEndpointRulesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNccAzurePrivateEndpointRulesResponse) { @@ -6113,6 +6260,12 @@ func (newState *ListNccAzurePrivateEndpointRulesResponse) SyncEffectiveFieldsDur func (newState *ListNccAzurePrivateEndpointRulesResponse) SyncEffectiveFieldsDuringRead(existingState ListNccAzurePrivateEndpointRulesResponse) { } +func (c ListNccAzurePrivateEndpointRulesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NccAzurePrivateEndpointRule{}.ToSchema(cs, append(path, "items")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNccAzurePrivateEndpointRulesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6182,12 +6335,6 @@ type ListNetworkConnectivityConfigurationsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListNetworkConnectivityConfigurationsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNetworkConnectivityConfigurationsRequest) { -} - -func (newState *ListNetworkConnectivityConfigurationsRequest) SyncEffectiveFieldsDuringRead(existingState ListNetworkConnectivityConfigurationsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNetworkConnectivityConfigurationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6220,10 +6367,10 @@ func (o ListNetworkConnectivityConfigurationsRequest) Type(ctx context.Context) } type ListNetworkConnectivityConfigurationsResponse struct { - Items types.List `tfsdk:"items" tf:"optional"` + Items types.List `tfsdk:"items" tf:""` // A token that can be used to get the next page of results. If null, there // are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListNetworkConnectivityConfigurationsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNetworkConnectivityConfigurationsResponse) { @@ -6232,6 +6379,12 @@ func (newState *ListNetworkConnectivityConfigurationsResponse) SyncEffectiveFiel func (newState *ListNetworkConnectivityConfigurationsResponse) SyncEffectiveFieldsDuringRead(existingState ListNetworkConnectivityConfigurationsResponse) { } +func (c ListNetworkConnectivityConfigurationsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NetworkConnectivityConfiguration{}.ToSchema(cs, append(path, "items")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNetworkConnectivityConfigurationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6302,12 +6455,6 @@ type ListNotificationDestinationsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListNotificationDestinationsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNotificationDestinationsRequest) { -} - -func (newState *ListNotificationDestinationsRequest) SyncEffectiveFieldsDuringRead(existingState ListNotificationDestinationsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNotificationDestinationsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6343,9 +6490,9 @@ func (o ListNotificationDestinationsRequest) Type(ctx context.Context) attr.Type type ListNotificationDestinationsResponse struct { // Page token for next of results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ListNotificationDestinationsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNotificationDestinationsResponse) { @@ -6354,6 +6501,12 @@ func (newState *ListNotificationDestinationsResponse) SyncEffectiveFieldsDuringC func (newState *ListNotificationDestinationsResponse) SyncEffectiveFieldsDuringRead(existingState ListNotificationDestinationsResponse) { } +func (c ListNotificationDestinationsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListNotificationDestinationsResult{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNotificationDestinationsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6420,11 +6573,11 @@ func (o *ListNotificationDestinationsResponse) SetResults(ctx context.Context, v type ListNotificationDestinationsResult struct { // [Output-only] The type of the notification destination. The type can not // be changed once set. - DestinationType types.String `tfsdk:"destination_type" tf:"optional"` + DestinationType types.String `tfsdk:"destination_type" tf:""` // The display name for the notification destination. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying notification destination. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *ListNotificationDestinationsResult) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNotificationDestinationsResult) { @@ -6433,6 +6586,11 @@ func (newState *ListNotificationDestinationsResult) SyncEffectiveFieldsDuringCre func (newState *ListNotificationDestinationsResult) SyncEffectiveFieldsDuringRead(existingState ListNotificationDestinationsResult) { } +func (c ListNotificationDestinationsResult) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNotificationDestinationsResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6476,12 +6634,6 @@ type ListPrivateEndpointRulesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListPrivateEndpointRulesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPrivateEndpointRulesRequest) { -} - -func (newState *ListPrivateEndpointRulesRequest) SyncEffectiveFieldsDuringRead(existingState ListPrivateEndpointRulesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPrivateEndpointRulesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6517,7 +6669,7 @@ func (o ListPrivateEndpointRulesRequest) Type(ctx context.Context) attr.Type { type ListPublicTokensResponse struct { // The information for each token. - TokenInfos types.List `tfsdk:"token_infos" tf:"optional"` + TokenInfos types.List `tfsdk:"token_infos" tf:""` } func (newState *ListPublicTokensResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPublicTokensResponse) { @@ -6526,6 +6678,12 @@ func (newState *ListPublicTokensResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListPublicTokensResponse) SyncEffectiveFieldsDuringRead(existingState ListPublicTokensResponse) { } +func (c ListPublicTokensResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PublicTokenInfo{}.ToSchema(cs, append(path, "token_infos")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPublicTokensResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6595,12 +6753,6 @@ type ListTokenManagementRequest struct { CreatedByUsername types.String `tfsdk:"-"` } -func (newState *ListTokenManagementRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTokenManagementRequest) { -} - -func (newState *ListTokenManagementRequest) SyncEffectiveFieldsDuringRead(existingState ListTokenManagementRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTokenManagementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6637,7 +6789,7 @@ func (o ListTokenManagementRequest) Type(ctx context.Context) attr.Type { // Tokens were successfully returned. type ListTokensResponse struct { // Token metadata of each user-created token in the workspace - TokenInfos types.List `tfsdk:"token_infos" tf:"optional"` + TokenInfos types.List `tfsdk:"token_infos" tf:""` } func (newState *ListTokensResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTokensResponse) { @@ -6646,6 +6798,12 @@ func (newState *ListTokensResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListTokensResponse) SyncEffectiveFieldsDuringRead(existingState ListTokensResponse) { } +func (c ListTokensResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenInfo{}.ToSchema(cs, append(path, "token_infos")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTokensResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6709,9 +6867,9 @@ func (o *ListTokensResponse) SetTokenInfos(ctx context.Context, v []TokenInfo) { type MicrosoftTeamsConfig struct { // [Input-Only] URL for Microsoft Teams. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` // [Output-Only] Whether URL is set. - UrlSet types.Bool `tfsdk:"url_set" tf:"optional"` + UrlSet types.Bool `tfsdk:"url_set" tf:""` } func (newState *MicrosoftTeamsConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan MicrosoftTeamsConfig) { @@ -6720,6 +6878,11 @@ func (newState *MicrosoftTeamsConfig) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *MicrosoftTeamsConfig) SyncEffectiveFieldsDuringRead(existingState MicrosoftTeamsConfig) { } +func (c MicrosoftTeamsConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MicrosoftTeamsConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6758,7 +6921,7 @@ func (o MicrosoftTeamsConfig) Type(ctx context.Context) attr.Type { type NccAwsStableIpRule struct { // The list of stable IP CIDR blocks from which Databricks network traffic // originates when accessing your resources. - CidrBlocks types.List `tfsdk:"cidr_blocks" tf:"optional"` + CidrBlocks types.List `tfsdk:"cidr_blocks" tf:""` } func (newState *NccAwsStableIpRule) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccAwsStableIpRule) { @@ -6767,6 +6930,11 @@ func (newState *NccAwsStableIpRule) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *NccAwsStableIpRule) SyncEffectiveFieldsDuringRead(existingState NccAwsStableIpRule) { } +func (c NccAwsStableIpRule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccAwsStableIpRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6842,28 +7010,28 @@ type NccAzurePrivateEndpointRule struct { // DISCONNECTED: Connection was removed by the private link resource owner, // the private endpoint becomes informative and should be deleted for // clean-up. - ConnectionState types.String `tfsdk:"connection_state" tf:"optional"` + ConnectionState types.String `tfsdk:"connection_state" tf:""` // Time in epoch milliseconds when this object was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Whether this private endpoint is deactivated. - Deactivated types.Bool `tfsdk:"deactivated" tf:"computed"` + Deactivated types.Bool `tfsdk:"deactivated" tf:""` // Time in epoch milliseconds when this object was deactivated. - DeactivatedAt types.Int64 `tfsdk:"deactivated_at" tf:"computed"` + DeactivatedAt types.Int64 `tfsdk:"deactivated_at" tf:""` // The name of the Azure private endpoint resource. - EndpointName types.String `tfsdk:"endpoint_name" tf:"computed"` + EndpointName types.String `tfsdk:"endpoint_name" tf:""` // The sub-resource type (group ID) of the target resource. Note that to // connect to workspace root storage (root DBFS), you need two endpoints, // one for `blob` and one for `dfs`. - GroupId types.String `tfsdk:"group_id" tf:"optional"` + GroupId types.String `tfsdk:"group_id" tf:""` // The ID of a network connectivity configuration, which is the parent // resource of this private endpoint rule object. - NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:"optional"` + NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:""` // The Azure resource ID of the target resource. - ResourceId types.String `tfsdk:"resource_id" tf:"optional"` + ResourceId types.String `tfsdk:"resource_id" tf:""` // The ID of a private endpoint rule. - RuleId types.String `tfsdk:"rule_id" tf:"computed"` + RuleId types.String `tfsdk:"rule_id" tf:""` // Time in epoch milliseconds when this object was updated. - UpdatedTime types.Int64 `tfsdk:"updated_time" tf:"computed"` + UpdatedTime types.Int64 `tfsdk:"updated_time" tf:""` } func (newState *NccAzurePrivateEndpointRule) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccAzurePrivateEndpointRule) { @@ -6872,6 +7040,17 @@ func (newState *NccAzurePrivateEndpointRule) SyncEffectiveFieldsDuringCreateOrUp func (newState *NccAzurePrivateEndpointRule) SyncEffectiveFieldsDuringRead(existingState NccAzurePrivateEndpointRule) { } +func (c NccAzurePrivateEndpointRule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "creation_time")...) + cs.SetComputed(append(path, "deactivated")...) + cs.SetComputed(append(path, "deactivated_at")...) + cs.SetComputed(append(path, "endpoint_name")...) + cs.SetComputed(append(path, "rule_id")...) + cs.SetComputed(append(path, "updated_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccAzurePrivateEndpointRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6927,11 +7106,11 @@ func (o NccAzurePrivateEndpointRule) Type(ctx context.Context) attr.Type { type NccAzureServiceEndpointRule struct { // The list of subnets from which Databricks network traffic originates when // accessing your Azure resources. - Subnets types.List `tfsdk:"subnets" tf:"optional"` + Subnets types.List `tfsdk:"subnets" tf:""` // The Azure region in which this service endpoint rule applies. - TargetRegion types.String `tfsdk:"target_region" tf:"optional"` + TargetRegion types.String `tfsdk:"target_region" tf:""` // The Azure services to which this service endpoint rule applies to. - TargetServices types.List `tfsdk:"target_services" tf:"optional"` + TargetServices types.List `tfsdk:"target_services" tf:""` } func (newState *NccAzureServiceEndpointRule) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccAzureServiceEndpointRule) { @@ -6940,6 +7119,11 @@ func (newState *NccAzureServiceEndpointRule) SyncEffectiveFieldsDuringCreateOrUp func (newState *NccAzureServiceEndpointRule) SyncEffectiveFieldsDuringRead(existingState NccAzureServiceEndpointRule) { } +func (c NccAzureServiceEndpointRule) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccAzureServiceEndpointRule. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7040,10 +7224,10 @@ type NccEgressConfig struct { // The network connectivity rules that are applied by default without // resource specific configurations. You can find the stable network // information of your serverless compute resources here. - DefaultRules types.Object `tfsdk:"default_rules" tf:"computed,object"` + DefaultRules types.Object `tfsdk:"default_rules" tf:"object"` // The network connectivity rules that configured for each destinations. // These rules override default rules. - TargetRules types.Object `tfsdk:"target_rules" tf:"optional,object"` + TargetRules types.Object `tfsdk:"target_rules" tf:"object"` } func (newState *NccEgressConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressConfig) { @@ -7052,6 +7236,14 @@ func (newState *NccEgressConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan Nc func (newState *NccEgressConfig) SyncEffectiveFieldsDuringRead(existingState NccEgressConfig) { } +func (c NccEgressConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "default_rules")...) + NccEgressDefaultRules{}.ToSchema(cs, append(path, "default_rules")...) + NccEgressTargetRules{}.ToSchema(cs, append(path, "target_rules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccEgressConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7151,11 +7343,11 @@ type NccEgressDefaultRules struct { // The stable AWS IP CIDR blocks. You can use these to configure the // firewall of your resources to allow traffic from your Databricks // workspace. - AwsStableIpRule types.Object `tfsdk:"aws_stable_ip_rule" tf:"optional,object"` + AwsStableIpRule types.Object `tfsdk:"aws_stable_ip_rule" tf:"object"` // The stable Azure service endpoints. You can configure the firewall of // your Azure resources to allow traffic from your Databricks serverless // compute resources. - AzureServiceEndpointRule types.Object `tfsdk:"azure_service_endpoint_rule" tf:"optional,object"` + AzureServiceEndpointRule types.Object `tfsdk:"azure_service_endpoint_rule" tf:"object"` } func (newState *NccEgressDefaultRules) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressDefaultRules) { @@ -7164,6 +7356,13 @@ func (newState *NccEgressDefaultRules) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *NccEgressDefaultRules) SyncEffectiveFieldsDuringRead(existingState NccEgressDefaultRules) { } +func (c NccEgressDefaultRules) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NccAwsStableIpRule{}.ToSchema(cs, append(path, "aws_stable_ip_rule")...) + NccAzureServiceEndpointRule{}.ToSchema(cs, append(path, "azure_service_endpoint_rule")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccEgressDefaultRules. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7259,7 +7458,7 @@ func (o *NccEgressDefaultRules) SetAzureServiceEndpointRule(ctx context.Context, // The network connectivity rules that configured for each destinations. These // rules override default rules. type NccEgressTargetRules struct { - AzurePrivateEndpointRules types.List `tfsdk:"azure_private_endpoint_rules" tf:"optional"` + AzurePrivateEndpointRules types.List `tfsdk:"azure_private_endpoint_rules" tf:""` } func (newState *NccEgressTargetRules) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressTargetRules) { @@ -7268,6 +7467,12 @@ func (newState *NccEgressTargetRules) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *NccEgressTargetRules) SyncEffectiveFieldsDuringRead(existingState NccEgressTargetRules) { } +func (c NccEgressTargetRules) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + NccAzurePrivateEndpointRule{}.ToSchema(cs, append(path, "azure_private_endpoint_rules")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NccEgressTargetRules. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7331,25 +7536,25 @@ func (o *NccEgressTargetRules) SetAzurePrivateEndpointRules(ctx context.Context, type NetworkConnectivityConfiguration struct { // The Databricks account ID that hosts the credential. - AccountId types.String `tfsdk:"account_id" tf:"optional"` + AccountId types.String `tfsdk:"account_id" tf:""` // Time in epoch milliseconds when this object was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // The network connectivity rules that apply to network traffic from your // serverless compute resources. - EgressConfig types.Object `tfsdk:"egress_config" tf:"optional,object"` + EgressConfig types.Object `tfsdk:"egress_config" tf:"object"` // The name of the network connectivity configuration. The name can contain // alphanumeric characters, hyphens, and underscores. The length must be // between 3 and 30 characters. The name must match the regular expression // `^[0-9a-zA-Z-_]{3,30}$`. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Databricks network connectivity configuration ID. - NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:"computed"` + NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:""` // The region for the network connectivity configuration. Only workspaces in // the same region can be attached to the network connectivity // configuration. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // Time in epoch milliseconds when this object was updated. - UpdatedTime types.Int64 `tfsdk:"updated_time" tf:"computed"` + UpdatedTime types.Int64 `tfsdk:"updated_time" tf:""` } func (newState *NetworkConnectivityConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkConnectivityConfiguration) { @@ -7358,6 +7563,15 @@ func (newState *NetworkConnectivityConfiguration) SyncEffectiveFieldsDuringCreat func (newState *NetworkConnectivityConfiguration) SyncEffectiveFieldsDuringRead(existingState NetworkConnectivityConfiguration) { } +func (c NetworkConnectivityConfiguration) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "creation_time")...) + NccEgressConfig{}.ToSchema(cs, append(path, "egress_config")...) + cs.SetComputed(append(path, "network_connectivity_config_id")...) + cs.SetComputed(append(path, "updated_time")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkConnectivityConfiguration. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7435,14 +7649,14 @@ type NotificationDestination struct { // The configuration for the notification destination. Will be exactly one // of the nested configs. Only returns for users with workspace admin // permissions. - Config types.Object `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"object"` // [Output-only] The type of the notification destination. The type can not // be changed once set. - DestinationType types.String `tfsdk:"destination_type" tf:"optional"` + DestinationType types.String `tfsdk:"destination_type" tf:""` // The display name for the notification destination. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying notification destination. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *NotificationDestination) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotificationDestination) { @@ -7451,6 +7665,12 @@ func (newState *NotificationDestination) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *NotificationDestination) SyncEffectiveFieldsDuringRead(existingState NotificationDestination) { } +func (c NotificationDestination) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Config{}.ToSchema(cs, append(path, "config")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NotificationDestination. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7520,9 +7740,9 @@ func (o *NotificationDestination) SetConfig(ctx context.Context, v Config) { type PagerdutyConfig struct { // [Input-Only] Integration key for PagerDuty. - IntegrationKey types.String `tfsdk:"integration_key" tf:"optional"` + IntegrationKey types.String `tfsdk:"integration_key" tf:""` // [Output-Only] Whether integration key is set. - IntegrationKeySet types.Bool `tfsdk:"integration_key_set" tf:"optional"` + IntegrationKeySet types.Bool `tfsdk:"integration_key_set" tf:""` } func (newState *PagerdutyConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan PagerdutyConfig) { @@ -7531,6 +7751,11 @@ func (newState *PagerdutyConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pa func (newState *PagerdutyConfig) SyncEffectiveFieldsDuringRead(existingState PagerdutyConfig) { } +func (c PagerdutyConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PagerdutyConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7567,7 +7792,7 @@ func (o PagerdutyConfig) Type(ctx context.Context) attr.Type { // Partition by workspace or account type PartitionId struct { // The ID of the workspace. - WorkspaceId types.Int64 `tfsdk:"workspaceId" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspaceId" tf:""` } func (newState *PartitionId) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartitionId) { @@ -7576,6 +7801,11 @@ func (newState *PartitionId) SyncEffectiveFieldsDuringCreateOrUpdate(plan Partit func (newState *PartitionId) SyncEffectiveFieldsDuringRead(existingState PartitionId) { } +func (c PartitionId) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PartitionId. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7624,6 +7854,12 @@ func (newState *PersonalComputeMessage) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *PersonalComputeMessage) SyncEffectiveFieldsDuringRead(existingState PersonalComputeMessage) { } +func (c PersonalComputeMessage) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PersonalComputeMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7663,7 +7899,7 @@ type PersonalComputeSetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` PersonalCompute types.Object `tfsdk:"personal_compute" tf:"object"` // Name of the corresponding setting. This field is populated in the @@ -7671,7 +7907,7 @@ type PersonalComputeSetting struct { // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *PersonalComputeSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan PersonalComputeSetting) { @@ -7680,6 +7916,13 @@ func (newState *PersonalComputeSetting) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *PersonalComputeSetting) SyncEffectiveFieldsDuringRead(existingState PersonalComputeSetting) { } +func (c PersonalComputeSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "personal_compute")...) + PersonalComputeMessage{}.ToSchema(cs, append(path, "personal_compute")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PersonalComputeSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7747,14 +7990,14 @@ func (o *PersonalComputeSetting) SetPersonalCompute(ctx context.Context, v Perso type PublicTokenInfo struct { // Comment the token was created with, if applicable. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Server time (in epoch milliseconds) when the token was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Server time (in epoch milliseconds) when the token will expire, or -1 if // not applicable. - ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:"optional"` + ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:""` // The ID of this token. - TokenId types.String `tfsdk:"token_id" tf:"optional"` + TokenId types.String `tfsdk:"token_id" tf:""` } func (newState *PublicTokenInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublicTokenInfo) { @@ -7763,6 +8006,11 @@ func (newState *PublicTokenInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pu func (newState *PublicTokenInfo) SyncEffectiveFieldsDuringRead(existingState PublicTokenInfo) { } +func (c PublicTokenInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublicTokenInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7807,7 +8055,7 @@ type ReplaceIpAccessList struct { // The ID for the corresponding IP access list IpAccessListId types.String `tfsdk:"-"` - IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + IpAddresses types.List `tfsdk:"ip_addresses" tf:""` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label" tf:""` // Type of IP access list. Valid values are as follows and are @@ -7825,6 +8073,15 @@ func (newState *ReplaceIpAccessList) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ReplaceIpAccessList) SyncEffectiveFieldsDuringRead(existingState ReplaceIpAccessList) { } +func (c ReplaceIpAccessList) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "enabled")...) + cs.SetRequired(append(path, "ip_access_list_id")...) + cs.SetRequired(append(path, "label")...) + cs.SetRequired(append(path, "list_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceIpAccessList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7897,12 +8154,6 @@ func (o *ReplaceIpAccessList) SetIpAddresses(ctx context.Context, v []types.Stri type ReplaceResponse struct { } -func (newState *ReplaceResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReplaceResponse) { -} - -func (newState *ReplaceResponse) SyncEffectiveFieldsDuringRead(existingState ReplaceResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7940,6 +8191,12 @@ func (newState *RestrictWorkspaceAdminsMessage) SyncEffectiveFieldsDuringCreateO func (newState *RestrictWorkspaceAdminsMessage) SyncEffectiveFieldsDuringRead(existingState RestrictWorkspaceAdminsMessage) { } +func (c RestrictWorkspaceAdminsMessage) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestrictWorkspaceAdminsMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7979,7 +8236,7 @@ type RestrictWorkspaceAdminsSetting struct { // update pattern to perform setting updates in order to avoid race // conditions. That is, get an etag from a GET request, and pass it with the // PATCH request to identify the setting version you are updating. - Etag types.String `tfsdk:"etag" tf:"optional"` + Etag types.String `tfsdk:"etag" tf:""` RestrictWorkspaceAdmins types.Object `tfsdk:"restrict_workspace_admins" tf:"object"` // Name of the corresponding setting. This field is populated in the @@ -7987,7 +8244,7 @@ type RestrictWorkspaceAdminsSetting struct { // body. The setting name in the path parameter will be respected instead. // Setting name is required to be 'default' if the setting only has one // instance per workspace. - SettingName types.String `tfsdk:"setting_name" tf:"optional"` + SettingName types.String `tfsdk:"setting_name" tf:""` } func (newState *RestrictWorkspaceAdminsSetting) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestrictWorkspaceAdminsSetting) { @@ -7996,6 +8253,13 @@ func (newState *RestrictWorkspaceAdminsSetting) SyncEffectiveFieldsDuringCreateO func (newState *RestrictWorkspaceAdminsSetting) SyncEffectiveFieldsDuringRead(existingState RestrictWorkspaceAdminsSetting) { } +func (c RestrictWorkspaceAdminsSetting) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "restrict_workspace_admins")...) + RestrictWorkspaceAdminsMessage{}.ToSchema(cs, append(path, "restrict_workspace_admins")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestrictWorkspaceAdminsSetting. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8072,6 +8336,12 @@ func (newState *RevokeTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RevokeTokenRequest) SyncEffectiveFieldsDuringRead(existingState RevokeTokenRequest) { } +func (c RevokeTokenRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "token_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RevokeTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8112,6 +8382,11 @@ func (newState *RevokeTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *RevokeTokenResponse) SyncEffectiveFieldsDuringRead(existingState RevokeTokenResponse) { } +func (c RevokeTokenResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RevokeTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8142,12 +8417,6 @@ func (o RevokeTokenResponse) Type(ctx context.Context) attr.Type { type SetStatusResponse struct { } -func (newState *SetStatusResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetStatusResponse) { -} - -func (newState *SetStatusResponse) SyncEffectiveFieldsDuringRead(existingState SetStatusResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetStatusResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8177,9 +8446,9 @@ func (o SetStatusResponse) Type(ctx context.Context) attr.Type { type SlackConfig struct { // [Input-Only] URL for Slack destination. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` // [Output-Only] Whether URL is set. - UrlSet types.Bool `tfsdk:"url_set" tf:"optional"` + UrlSet types.Bool `tfsdk:"url_set" tf:""` } func (newState *SlackConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan SlackConfig) { @@ -8188,6 +8457,11 @@ func (newState *SlackConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan SlackC func (newState *SlackConfig) SyncEffectiveFieldsDuringRead(existingState SlackConfig) { } +func (c SlackConfig) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SlackConfig. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8223,7 +8497,7 @@ func (o SlackConfig) Type(ctx context.Context) attr.Type { type StringMessage struct { // Represents a generic string value. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *StringMessage) SyncEffectiveFieldsDuringCreateOrUpdate(plan StringMessage) { @@ -8232,6 +8506,11 @@ func (newState *StringMessage) SyncEffectiveFieldsDuringCreateOrUpdate(plan Stri func (newState *StringMessage) SyncEffectiveFieldsDuringRead(existingState StringMessage) { } +func (c StringMessage) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StringMessage. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8265,13 +8544,13 @@ func (o StringMessage) Type(ctx context.Context) attr.Type { type TokenAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *TokenAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenAccessControlRequest) { @@ -8280,6 +8559,11 @@ func (newState *TokenAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpda func (newState *TokenAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState TokenAccessControlRequest) { } +func (c TokenAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8319,15 +8603,15 @@ func (o TokenAccessControlRequest) Type(ctx context.Context) attr.Type { type TokenAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *TokenAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenAccessControlResponse) { @@ -8336,6 +8620,12 @@ func (newState *TokenAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *TokenAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState TokenAccessControlResponse) { } +func (c TokenAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8408,24 +8698,24 @@ func (o *TokenAccessControlResponse) SetAllPermissions(ctx context.Context, v [] type TokenInfo struct { // Comment that describes the purpose of the token, specified by the token // creator. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // User ID of the user that created the token. - CreatedById types.Int64 `tfsdk:"created_by_id" tf:"optional"` + CreatedById types.Int64 `tfsdk:"created_by_id" tf:""` // Username of the user that created the token. - CreatedByUsername types.String `tfsdk:"created_by_username" tf:"optional"` + CreatedByUsername types.String `tfsdk:"created_by_username" tf:""` // Timestamp when the token was created. - CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + CreationTime types.Int64 `tfsdk:"creation_time" tf:""` // Timestamp when the token expires. - ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:"optional"` + ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:""` // Approximate timestamp for the day the token was last used. Accurate up to // 1 day. - LastUsedDay types.Int64 `tfsdk:"last_used_day" tf:"optional"` + LastUsedDay types.Int64 `tfsdk:"last_used_day" tf:""` // User ID of the user that owns the token. - OwnerId types.Int64 `tfsdk:"owner_id" tf:"optional"` + OwnerId types.Int64 `tfsdk:"owner_id" tf:""` // ID of the token. - TokenId types.String `tfsdk:"token_id" tf:"optional"` + TokenId types.String `tfsdk:"token_id" tf:""` // If applicable, the ID of the workspace that the token was created in. - WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` } func (newState *TokenInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenInfo) { @@ -8434,6 +8724,11 @@ func (newState *TokenInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenInf func (newState *TokenInfo) SyncEffectiveFieldsDuringRead(existingState TokenInfo) { } +func (c TokenInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8482,11 +8777,11 @@ func (o TokenInfo) Type(ctx context.Context) attr.Type { } type TokenPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *TokenPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermission) { @@ -8495,6 +8790,11 @@ func (newState *TokenPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan To func (newState *TokenPermission) SyncEffectiveFieldsDuringRead(existingState TokenPermission) { } +func (c TokenPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8561,11 +8861,11 @@ func (o *TokenPermission) SetInheritedFromObject(ctx context.Context, v []types. } type TokenPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *TokenPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissions) { @@ -8574,6 +8874,12 @@ func (newState *TokenPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan T func (newState *TokenPermissions) SyncEffectiveFieldsDuringRead(existingState TokenPermissions) { } +func (c TokenPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8640,9 +8946,9 @@ func (o *TokenPermissions) SetAccessControlList(ctx context.Context, v []TokenAc } type TokenPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *TokenPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissionsDescription) { @@ -8651,6 +8957,11 @@ func (newState *TokenPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUp func (newState *TokenPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState TokenPermissionsDescription) { } +func (c TokenPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8685,7 +8996,7 @@ func (o TokenPermissionsDescription) Type(ctx context.Context) attr.Type { } type TokenPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` } func (newState *TokenPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissionsRequest) { @@ -8694,6 +9005,12 @@ func (newState *TokenPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *TokenPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState TokenPermissionsRequest) { } +func (c TokenPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TokenAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8775,6 +9092,15 @@ func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) SyncEffe func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) { } +func (c UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + AibiDashboardEmbeddingAccessPolicySetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAibiDashboardEmbeddingAccessPolicySettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8860,6 +9186,15 @@ func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) SyncE func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) { } +func (c UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + AibiDashboardEmbeddingApprovedDomainsSetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8945,6 +9280,15 @@ func (newState *UpdateAutomaticClusterUpdateSettingRequest) SyncEffectiveFieldsD func (newState *UpdateAutomaticClusterUpdateSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAutomaticClusterUpdateSettingRequest) { } +func (c UpdateAutomaticClusterUpdateSettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + AutomaticClusterUpdateSetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAutomaticClusterUpdateSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9030,6 +9374,15 @@ func (newState *UpdateComplianceSecurityProfileSettingRequest) SyncEffectiveFiel func (newState *UpdateComplianceSecurityProfileSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateComplianceSecurityProfileSettingRequest) { } +func (c UpdateComplianceSecurityProfileSettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + ComplianceSecurityProfileSetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateComplianceSecurityProfileSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9115,6 +9468,15 @@ func (newState *UpdateCspEnablementAccountSettingRequest) SyncEffectiveFieldsDur func (newState *UpdateCspEnablementAccountSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCspEnablementAccountSettingRequest) { } +func (c UpdateCspEnablementAccountSettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + CspEnablementAccountSetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCspEnablementAccountSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9208,6 +9570,15 @@ func (newState *UpdateDefaultNamespaceSettingRequest) SyncEffectiveFieldsDuringC func (newState *UpdateDefaultNamespaceSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDefaultNamespaceSettingRequest) { } +func (c UpdateDefaultNamespaceSettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + DefaultNamespaceSetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDefaultNamespaceSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9293,6 +9664,15 @@ func (newState *UpdateDisableLegacyAccessRequest) SyncEffectiveFieldsDuringCreat func (newState *UpdateDisableLegacyAccessRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyAccessRequest) { } +func (c UpdateDisableLegacyAccessRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + DisableLegacyAccess{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDisableLegacyAccessRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9378,6 +9758,15 @@ func (newState *UpdateDisableLegacyDbfsRequest) SyncEffectiveFieldsDuringCreateO func (newState *UpdateDisableLegacyDbfsRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyDbfsRequest) { } +func (c UpdateDisableLegacyDbfsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + DisableLegacyDbfs{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDisableLegacyDbfsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9463,6 +9852,15 @@ func (newState *UpdateDisableLegacyFeaturesRequest) SyncEffectiveFieldsDuringCre func (newState *UpdateDisableLegacyFeaturesRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyFeaturesRequest) { } +func (c UpdateDisableLegacyFeaturesRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + DisableLegacyFeatures{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDisableLegacyFeaturesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9548,6 +9946,15 @@ func (newState *UpdateEnhancedSecurityMonitoringSettingRequest) SyncEffectiveFie func (newState *UpdateEnhancedSecurityMonitoringSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateEnhancedSecurityMonitoringSettingRequest) { } +func (c UpdateEnhancedSecurityMonitoringSettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + EnhancedSecurityMonitoringSetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEnhancedSecurityMonitoringSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9633,6 +10040,15 @@ func (newState *UpdateEsmEnablementAccountSettingRequest) SyncEffectiveFieldsDur func (newState *UpdateEsmEnablementAccountSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateEsmEnablementAccountSettingRequest) { } +func (c UpdateEsmEnablementAccountSettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + EsmEnablementAccountSetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEsmEnablementAccountSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9701,20 +10117,20 @@ func (o *UpdateEsmEnablementAccountSettingRequest) SetSetting(ctx context.Contex // Details required to update an IP access list. type UpdateIpAccessList struct { // Specifies whether this IP access list is enabled. - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // The ID for the corresponding IP access list IpAccessListId types.String `tfsdk:"-"` - IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + IpAddresses types.List `tfsdk:"ip_addresses" tf:""` // Label for the IP access list. This **cannot** be empty. - Label types.String `tfsdk:"label" tf:"optional"` + Label types.String `tfsdk:"label" tf:""` // Type of IP access list. Valid values are as follows and are // case-sensitive: // // * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block // list. Exclude this IP or range. IP addresses in the block list are // excluded even if they are included in an allow list. - ListType types.String `tfsdk:"list_type" tf:"optional"` + ListType types.String `tfsdk:"list_type" tf:""` } func (newState *UpdateIpAccessList) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateIpAccessList) { @@ -9723,6 +10139,12 @@ func (newState *UpdateIpAccessList) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UpdateIpAccessList) SyncEffectiveFieldsDuringRead(existingState UpdateIpAccessList) { } +func (c UpdateIpAccessList) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "ip_access_list_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateIpAccessList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9795,9 +10217,9 @@ func (o *UpdateIpAccessList) SetIpAddresses(ctx context.Context, v []types.Strin type UpdateNotificationDestinationRequest struct { // The configuration for the notification destination. Must wrap EXACTLY one // of the nested configs. - Config types.Object `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"object"` // The display name for the notification destination. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying notification destination. Id types.String `tfsdk:"-"` } @@ -9808,6 +10230,13 @@ func (newState *UpdateNotificationDestinationRequest) SyncEffectiveFieldsDuringC func (newState *UpdateNotificationDestinationRequest) SyncEffectiveFieldsDuringRead(existingState UpdateNotificationDestinationRequest) { } +func (c UpdateNotificationDestinationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Config{}.ToSchema(cs, append(path, "config")...) + cs.SetRequired(append(path, "id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateNotificationDestinationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9893,6 +10322,15 @@ func (newState *UpdatePersonalComputeSettingRequest) SyncEffectiveFieldsDuringCr func (newState *UpdatePersonalComputeSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalComputeSettingRequest) { } +func (c UpdatePersonalComputeSettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + PersonalComputeSetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePersonalComputeSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9961,12 +10399,6 @@ func (o *UpdatePersonalComputeSettingRequest) SetSetting(ctx context.Context, v type UpdateResponse struct { } -func (newState *UpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse) { -} - -func (newState *UpdateResponse) SyncEffectiveFieldsDuringRead(existingState UpdateResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10014,6 +10446,15 @@ func (newState *UpdateRestrictWorkspaceAdminsSettingRequest) SyncEffectiveFields func (newState *UpdateRestrictWorkspaceAdminsSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateRestrictWorkspaceAdminsSettingRequest) { } +func (c UpdateRestrictWorkspaceAdminsSettingRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "allow_missing")...) + cs.SetRequired(append(path, "field_mask")...) + cs.SetRequired(append(path, "setting")...) + RestrictWorkspaceAdminsSetting{}.ToSchema(cs, append(path, "setting")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRestrictWorkspaceAdminsSettingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/sharing_tf/legacy_model.go b/internal/service/sharing_tf/legacy_model.go index 6bbf36a8e..38d2dba3c 100755 --- a/internal/service/sharing_tf/legacy_model.go +++ b/internal/service/sharing_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/catalog_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -26,12 +27,12 @@ type CreateProvider_SdkV2 struct { // The delta sharing authentication type. AuthenticationType types.String `tfsdk:"authentication_type" tf:""` // Description about the provider. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the Provider. Name types.String `tfsdk:"name" tf:""` // This field is required when the __authentication_type__ is **TOKEN** or // not provided. - RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` + RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:""` } func (newState *CreateProvider_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProvider_SdkV2) { @@ -40,6 +41,13 @@ func (newState *CreateProvider_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CreateProvider_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateProvider_SdkV2) { } +func (c CreateProvider_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "authentication_type")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProvider. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -81,25 +89,25 @@ type CreateRecipient_SdkV2 struct { // The delta sharing authentication type. AuthenticationType types.String `tfsdk:"authentication_type" tf:""` // Description about the recipient. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The global Unity Catalog metastore id provided by the data recipient. // This field is required when the __authentication_type__ is // **DATABRICKS**. The identifier is of format // __cloud__:__region__:__metastore-uuid__. - DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:"optional"` + DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:""` // Expiration timestamp of the token, in epoch milliseconds. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // IP Access List - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.List `tfsdk:"ip_access_list" tf:"object"` // Name of Recipient. Name types.String `tfsdk:"name" tf:""` // Username of the recipient owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Recipient properties as map of string key-value pairs. - PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"optional,object"` + PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"object"` // The one-time sharing code provided by the data recipient. This field is // required when the __authentication_type__ is **DATABRICKS**. - SharingCode types.String `tfsdk:"sharing_code" tf:"optional"` + SharingCode types.String `tfsdk:"sharing_code" tf:""` } func (newState *CreateRecipient_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRecipient_SdkV2) { @@ -108,6 +116,15 @@ func (newState *CreateRecipient_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *CreateRecipient_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRecipient_SdkV2) { } +func (c CreateRecipient_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "authentication_type")...) + IpAccessList_SdkV2{}.ToSchema(cs, append(path, "ip_access_list")...) + cs.SetRequired(append(path, "name")...) + SecurablePropertiesKvPairs_SdkV2{}.ToSchema(cs, append(path, "properties_kvpairs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRecipient. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -216,11 +233,11 @@ func (o *CreateRecipient_SdkV2) SetPropertiesKvpairs(ctx context.Context, v Secu type CreateShare_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the share. Name types.String `tfsdk:"name" tf:""` // Storage root URL for the share. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` } func (newState *CreateShare_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateShare_SdkV2) { @@ -229,6 +246,12 @@ func (newState *CreateShare_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateShare_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateShare_SdkV2) { } +func (c CreateShare_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateShare. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -270,12 +293,6 @@ type DeleteProviderRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteProviderRequest_SdkV2) { -} - -func (newState *DeleteProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteProviderRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -313,12 +330,6 @@ type DeleteRecipientRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteRecipientRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRecipientRequest_SdkV2) { -} - -func (newState *DeleteRecipientRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRecipientRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRecipientRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -353,12 +364,6 @@ func (o DeleteRecipientRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -392,12 +397,6 @@ type DeleteShareRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteShareRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteShareRequest_SdkV2) { -} - -func (newState *DeleteShareRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteShareRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteShareRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -435,12 +434,6 @@ type GetActivationUrlInfoRequest_SdkV2 struct { ActivationUrl types.String `tfsdk:"-"` } -func (newState *GetActivationUrlInfoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetActivationUrlInfoRequest_SdkV2) { -} - -func (newState *GetActivationUrlInfoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetActivationUrlInfoRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetActivationUrlInfoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -481,6 +474,11 @@ func (newState *GetActivationUrlInfoResponse_SdkV2) SyncEffectiveFieldsDuringCre func (newState *GetActivationUrlInfoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetActivationUrlInfoResponse_SdkV2) { } +func (c GetActivationUrlInfoResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetActivationUrlInfoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -514,12 +512,6 @@ type GetProviderRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderRequest_SdkV2) { -} - -func (newState *GetProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetProviderRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -557,12 +549,6 @@ type GetRecipientRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetRecipientRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRecipientRequest_SdkV2) { -} - -func (newState *GetRecipientRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRecipientRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRecipientRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -598,9 +584,9 @@ type GetRecipientSharePermissionsResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of data share permissions for a recipient. - PermissionsOut types.List `tfsdk:"permissions_out" tf:"optional"` + PermissionsOut types.List `tfsdk:"permissions_out" tf:""` } func (newState *GetRecipientSharePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRecipientSharePermissionsResponse_SdkV2) { @@ -609,6 +595,12 @@ func (newState *GetRecipientSharePermissionsResponse_SdkV2) SyncEffectiveFieldsD func (newState *GetRecipientSharePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRecipientSharePermissionsResponse_SdkV2) { } +func (c GetRecipientSharePermissionsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ShareToPrivilegeAssignment_SdkV2{}.ToSchema(cs, append(path, "permissions_out")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRecipientSharePermissionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -680,12 +672,6 @@ type GetShareRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *GetShareRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetShareRequest_SdkV2) { -} - -func (newState *GetShareRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetShareRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetShareRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -721,7 +707,7 @@ func (o GetShareRequest_SdkV2) Type(ctx context.Context) attr.Type { type IpAccessList_SdkV2 struct { // Allowed IP Addresses in CIDR notation. Limit of 100. - AllowedIpAddresses types.List `tfsdk:"allowed_ip_addresses" tf:"optional"` + AllowedIpAddresses types.List `tfsdk:"allowed_ip_addresses" tf:""` } func (newState *IpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IpAccessList_SdkV2) { @@ -730,6 +716,11 @@ func (newState *IpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *IpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState IpAccessList_SdkV2) { } +func (c IpAccessList_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IpAccessList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -795,9 +786,9 @@ type ListProviderSharesResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of provider shares. - Shares types.List `tfsdk:"shares" tf:"optional"` + Shares types.List `tfsdk:"shares" tf:""` } func (newState *ListProviderSharesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProviderSharesResponse_SdkV2) { @@ -806,6 +797,12 @@ func (newState *ListProviderSharesResponse_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ListProviderSharesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProviderSharesResponse_SdkV2) { } +func (c ListProviderSharesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderShare_SdkV2{}.ToSchema(cs, append(path, "shares")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProviderSharesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -888,12 +885,6 @@ type ListProvidersRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListProvidersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersRequest_SdkV2) { -} - -func (newState *ListProvidersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProvidersRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -933,9 +924,9 @@ type ListProvidersResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of provider information objects. - Providers types.List `tfsdk:"providers" tf:"optional"` + Providers types.List `tfsdk:"providers" tf:""` } func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersResponse_SdkV2) { @@ -944,6 +935,12 @@ func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProvidersResponse_SdkV2) { } +func (c ListProvidersResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo_SdkV2{}.ToSchema(cs, append(path, "providers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1026,12 +1023,6 @@ type ListRecipientsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListRecipientsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRecipientsRequest_SdkV2) { -} - -func (newState *ListRecipientsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRecipientsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRecipientsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1071,9 +1062,9 @@ type ListRecipientsResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of recipient information objects. - Recipients types.List `tfsdk:"recipients" tf:"optional"` + Recipients types.List `tfsdk:"recipients" tf:""` } func (newState *ListRecipientsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRecipientsResponse_SdkV2) { @@ -1082,6 +1073,12 @@ func (newState *ListRecipientsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *ListRecipientsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRecipientsResponse_SdkV2) { } +func (c ListRecipientsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RecipientInfo_SdkV2{}.ToSchema(cs, append(path, "recipients")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRecipientsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1163,12 +1160,6 @@ type ListSharesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListSharesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSharesRequest_SdkV2) { -} - -func (newState *ListSharesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSharesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSharesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1208,9 +1199,9 @@ type ListSharesResponse_SdkV2 struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of data share information objects. - Shares types.List `tfsdk:"shares" tf:"optional"` + Shares types.List `tfsdk:"shares" tf:""` } func (newState *ListSharesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSharesResponse_SdkV2) { @@ -1219,6 +1210,12 @@ func (newState *ListSharesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListSharesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSharesResponse_SdkV2) { } +func (c ListSharesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ShareInfo_SdkV2{}.ToSchema(cs, append(path, "shares")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSharesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1284,7 +1281,7 @@ func (o *ListSharesResponse_SdkV2) SetShares(ctx context.Context, v []ShareInfo_ type Partition_SdkV2 struct { // An array of partition values. - Values types.List `tfsdk:"value" tf:"optional"` + Values types.List `tfsdk:"value" tf:""` } func (newState *Partition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Partition_SdkV2) { @@ -1293,6 +1290,12 @@ func (newState *Partition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pa func (newState *Partition_SdkV2) SyncEffectiveFieldsDuringRead(existingState Partition_SdkV2) { } +func (c Partition_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PartitionValue_SdkV2{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Partition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1356,7 +1359,7 @@ func (o *Partition_SdkV2) SetValues(ctx context.Context, v []PartitionValue_SdkV type PartitionSpecificationPartition_SdkV2 struct { // An array of partition values. - Values types.List `tfsdk:"value" tf:"optional"` + Values types.List `tfsdk:"value" tf:""` } func (newState *PartitionSpecificationPartition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartitionSpecificationPartition_SdkV2) { @@ -1365,6 +1368,12 @@ func (newState *PartitionSpecificationPartition_SdkV2) SyncEffectiveFieldsDuring func (newState *PartitionSpecificationPartition_SdkV2) SyncEffectiveFieldsDuringRead(existingState PartitionSpecificationPartition_SdkV2) { } +func (c PartitionSpecificationPartition_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PartitionValue_SdkV2{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PartitionSpecificationPartition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1428,17 +1437,17 @@ func (o *PartitionSpecificationPartition_SdkV2) SetValues(ctx context.Context, v type PartitionValue_SdkV2 struct { // The name of the partition column. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The operator to apply for the value. - Op types.String `tfsdk:"op" tf:"optional"` + Op types.String `tfsdk:"op" tf:""` // The key of a Delta Sharing recipient's property. For example // "databricks-account-id". When this field is set, field `value` can not be // set. - RecipientPropertyKey types.String `tfsdk:"recipient_property_key" tf:"optional"` + RecipientPropertyKey types.String `tfsdk:"recipient_property_key" tf:""` // The value of the partition column. When this value is not set, it means // `null` value. When this field is set, field `recipient_property_key` can // not be set. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *PartitionValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartitionValue_SdkV2) { @@ -1447,6 +1456,11 @@ func (newState *PartitionValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *PartitionValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState PartitionValue_SdkV2) { } +func (c PartitionValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PartitionValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1486,9 +1500,9 @@ func (o PartitionValue_SdkV2) Type(ctx context.Context) attr.Type { type PrivilegeAssignment_SdkV2 struct { // The principal (user email address or group name). - Principal types.String `tfsdk:"principal" tf:"optional"` + Principal types.String `tfsdk:"principal" tf:""` // The privileges assigned to the principal. - Privileges types.List `tfsdk:"privileges" tf:"optional"` + Privileges types.List `tfsdk:"privileges" tf:""` } func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrivilegeAssignment_SdkV2) { @@ -1497,6 +1511,11 @@ func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrivilegeAssignment_SdkV2) { } +func (c PrivilegeAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrivilegeAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1562,40 +1581,40 @@ func (o *PrivilegeAssignment_SdkV2) SetPrivileges(ctx context.Context, v []types type ProviderInfo_SdkV2 struct { // The delta sharing authentication type. - AuthenticationType types.String `tfsdk:"authentication_type" tf:"optional"` + AuthenticationType types.String `tfsdk:"authentication_type" tf:""` // Cloud vendor of the provider's UC metastore. This field is only present // when the __authentication_type__ is **DATABRICKS**. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // Description about the provider. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this Provider was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of Provider creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The global UC metastore id of the data provider. This field is only // present when the __authentication_type__ is **DATABRICKS**. The // identifier is of format ::. - DataProviderGlobalMetastoreId types.String `tfsdk:"data_provider_global_metastore_id" tf:"optional"` + DataProviderGlobalMetastoreId types.String `tfsdk:"data_provider_global_metastore_id" tf:""` // UUID of the provider's UC metastore. This field is only present when the // __authentication_type__ is **DATABRICKS**. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The name of the Provider. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of Provider owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // The recipient profile. This field is only present when the // authentication_type is `TOKEN`. - RecipientProfile types.List `tfsdk:"recipient_profile" tf:"optional,object"` + RecipientProfile types.List `tfsdk:"recipient_profile" tf:"object"` // This field is only present when the authentication_type is `TOKEN` or not // provided. - RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` + RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:""` // Cloud region of the provider's UC metastore. This field is only present // when the __authentication_type__ is **DATABRICKS**. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // Time at which this Provider was created, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified Share. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *ProviderInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProviderInfo_SdkV2) { @@ -1604,6 +1623,12 @@ func (newState *ProviderInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ProviderInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProviderInfo_SdkV2) { } +func (c ProviderInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RecipientProfile_SdkV2{}.ToSchema(cs, append(path, "recipient_profile")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1693,7 +1718,7 @@ func (o *ProviderInfo_SdkV2) SetRecipientProfile(ctx context.Context, v Recipien type ProviderShare_SdkV2 struct { // The name of the Provider Share. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ProviderShare_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProviderShare_SdkV2) { @@ -1702,6 +1727,11 @@ func (newState *ProviderShare_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ProviderShare_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProviderShare_SdkV2) { } +func (c ProviderShare_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderShare. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1736,49 +1766,49 @@ func (o ProviderShare_SdkV2) Type(ctx context.Context) attr.Type { type RecipientInfo_SdkV2 struct { // A boolean status field showing whether the Recipient's activation URL has // been exercised or not. - Activated types.Bool `tfsdk:"activated" tf:"optional"` + Activated types.Bool `tfsdk:"activated" tf:""` // Full activation url to retrieve the access token. It will be empty if the // token is already retrieved. - ActivationUrl types.String `tfsdk:"activation_url" tf:"optional"` + ActivationUrl types.String `tfsdk:"activation_url" tf:""` // The delta sharing authentication type. - AuthenticationType types.String `tfsdk:"authentication_type" tf:"optional"` + AuthenticationType types.String `tfsdk:"authentication_type" tf:""` // Cloud vendor of the recipient's Unity Catalog Metstore. This field is // only present when the __authentication_type__ is **DATABRICKS**`. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // Description about the recipient. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this recipient was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of recipient creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The global Unity Catalog metastore id provided by the data recipient. // This field is only present when the __authentication_type__ is // **DATABRICKS**. The identifier is of format // __cloud__:__region__:__metastore-uuid__. - DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:"optional"` + DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:""` // IP Access List - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.List `tfsdk:"ip_access_list" tf:"object"` // Unique identifier of recipient's Unity Catalog metastore. This field is // only present when the __authentication_type__ is **DATABRICKS** - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of Recipient. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of the recipient owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Recipient properties as map of string key-value pairs. - PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"optional,object"` + PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"object"` // Cloud region of the recipient's Unity Catalog Metstore. This field is // only present when the __authentication_type__ is **DATABRICKS**. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The one-time sharing code provided by the data recipient. This field is // only present when the __authentication_type__ is **DATABRICKS**. - SharingCode types.String `tfsdk:"sharing_code" tf:"optional"` + SharingCode types.String `tfsdk:"sharing_code" tf:""` // This field is only present when the __authentication_type__ is **TOKEN**. - Tokens types.List `tfsdk:"tokens" tf:"optional"` + Tokens types.List `tfsdk:"tokens" tf:""` // Time at which the recipient was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of recipient updater. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *RecipientInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RecipientInfo_SdkV2) { @@ -1787,6 +1817,14 @@ func (newState *RecipientInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *RecipientInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RecipientInfo_SdkV2) { } +func (c RecipientInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessList_SdkV2{}.ToSchema(cs, append(path, "ip_access_list")...) + SecurablePropertiesKvPairs_SdkV2{}.ToSchema(cs, append(path, "properties_kvpairs")...) + RecipientTokenInfo_SdkV2{}.ToSchema(cs, append(path, "tokens")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RecipientInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1942,11 +1980,11 @@ func (o *RecipientInfo_SdkV2) SetTokens(ctx context.Context, v []RecipientTokenI type RecipientProfile_SdkV2 struct { // The token used to authorize the recipient. - BearerToken types.String `tfsdk:"bearer_token" tf:"optional"` + BearerToken types.String `tfsdk:"bearer_token" tf:""` // The endpoint for the share to be used by the recipient. - Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + Endpoint types.String `tfsdk:"endpoint" tf:""` // The version number of the recipient's credentials on a share. - ShareCredentialsVersion types.Int64 `tfsdk:"share_credentials_version" tf:"optional"` + ShareCredentialsVersion types.Int64 `tfsdk:"share_credentials_version" tf:""` } func (newState *RecipientProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RecipientProfile_SdkV2) { @@ -1955,6 +1993,11 @@ func (newState *RecipientProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *RecipientProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState RecipientProfile_SdkV2) { } +func (c RecipientProfile_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RecipientProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1993,19 +2036,19 @@ func (o RecipientProfile_SdkV2) Type(ctx context.Context) attr.Type { type RecipientTokenInfo_SdkV2 struct { // Full activation URL to retrieve the access token. It will be empty if the // token is already retrieved. - ActivationUrl types.String `tfsdk:"activation_url" tf:"optional"` + ActivationUrl types.String `tfsdk:"activation_url" tf:""` // Time at which this recipient Token was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of recipient token creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Expiration timestamp of the token in epoch milliseconds. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // Unique ID of the recipient token. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time at which this recipient Token was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of recipient Token updater. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *RecipientTokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RecipientTokenInfo_SdkV2) { @@ -2014,6 +2057,11 @@ func (newState *RecipientTokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *RecipientTokenInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RecipientTokenInfo_SdkV2) { } +func (c RecipientTokenInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RecipientTokenInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2063,12 +2111,6 @@ type RetrieveTokenRequest_SdkV2 struct { ActivationUrl types.String `tfsdk:"-"` } -func (newState *RetrieveTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RetrieveTokenRequest_SdkV2) { -} - -func (newState *RetrieveTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RetrieveTokenRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RetrieveTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2102,13 +2144,13 @@ func (o RetrieveTokenRequest_SdkV2) Type(ctx context.Context) attr.Type { type RetrieveTokenResponse_SdkV2 struct { // The token used to authorize the recipient. - BearerToken types.String `tfsdk:"bearerToken" tf:"optional"` + BearerToken types.String `tfsdk:"bearerToken" tf:""` // The endpoint for the share to be used by the recipient. - Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + Endpoint types.String `tfsdk:"endpoint" tf:""` // Expiration timestamp of the token in epoch milliseconds. - ExpirationTime types.String `tfsdk:"expirationTime" tf:"optional"` + ExpirationTime types.String `tfsdk:"expirationTime" tf:""` // These field names must follow the delta sharing protocol. - ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:"optional"` + ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:""` } func (newState *RetrieveTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RetrieveTokenResponse_SdkV2) { @@ -2117,6 +2159,11 @@ func (newState *RetrieveTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *RetrieveTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RetrieveTokenResponse_SdkV2) { } +func (c RetrieveTokenResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RetrieveTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2170,6 +2217,13 @@ func (newState *RotateRecipientToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *RotateRecipientToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState RotateRecipientToken_SdkV2) { } +func (c RotateRecipientToken_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "existing_token_expire_in_seconds")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RotateRecipientToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2216,6 +2270,12 @@ func (newState *SecurablePropertiesKvPairs_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *SecurablePropertiesKvPairs_SdkV2) SyncEffectiveFieldsDuringRead(existingState SecurablePropertiesKvPairs_SdkV2) { } +func (c SecurablePropertiesKvPairs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "properties")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SecurablePropertiesKvPairs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2279,31 +2339,49 @@ func (o *SecurablePropertiesKvPairs_SdkV2) SetProperties(ctx context.Context, v type ShareInfo_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this share was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"computed"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of share creator. - CreatedBy types.String `tfsdk:"created_by" tf:"computed"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Name of the share. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // A list of shared data objects within the share. - Objects types.List `tfsdk:"object" tf:"optional"` + Objects types.List `tfsdk:"object" tf:""` // Username of current owner of share. - Owner types.String `tfsdk:"owner" tf:"computed"` + Owner types.String `tfsdk:"owner" tf:""` + EffectiveOwner types.String `tfsdk:"effective_owner" tf:""` // Storage Location URL (full path) for the share. - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // Storage root URL for the share. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // Time at which this share was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"computed"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of share updater. - UpdatedBy types.String `tfsdk:"updated_by" tf:"computed"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *ShareInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ShareInfo_SdkV2) { + newState.EffectiveOwner = newState.Owner + newState.Owner = plan.Owner } func (newState *ShareInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ShareInfo_SdkV2) { + newState.EffectiveOwner = existingState.EffectiveOwner + if existingState.EffectiveOwner.ValueString() == newState.Owner.ValueString() { + newState.Owner = existingState.Owner + } +} + +func (c ShareInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "created_at")...) + cs.SetComputed(append(path, "created_by")...) + SharedDataObject_SdkV2{}.ToSchema(cs, append(path, "object")...) + cs.SetComputed(append(path, "effective_owner")...) + cs.SetComputed(append(path, "updated_at")...) + cs.SetComputed(append(path, "updated_by")...) + + return cs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ShareInfo. @@ -2332,6 +2410,7 @@ func (o ShareInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValu "name": o.Name, "object": o.Objects, "owner": o.Owner, + "effective_owner": o.EffectiveOwner, "storage_location": o.StorageLocation, "storage_root": o.StorageRoot, "updated_at": o.UpdatedAt, @@ -2351,6 +2430,7 @@ func (o ShareInfo_SdkV2) Type(ctx context.Context) attr.Type { ElemType: SharedDataObject_SdkV2{}.Type(ctx), }, "owner": types.StringType, + "effective_owner": types.StringType, "storage_location": types.StringType, "storage_root": types.StringType, "updated_at": types.Int64Type, @@ -2403,12 +2483,6 @@ type SharePermissionsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *SharePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharePermissionsRequest_SdkV2) { -} - -func (newState *SharePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SharePermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SharePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2446,9 +2520,9 @@ func (o SharePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ShareToPrivilegeAssignment_SdkV2 struct { // The privileges assigned to the principal. - PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:"optional"` + PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:""` // The share name. - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` } func (newState *ShareToPrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ShareToPrivilegeAssignment_SdkV2) { @@ -2457,6 +2531,12 @@ func (newState *ShareToPrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *ShareToPrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState ShareToPrivilegeAssignment_SdkV2) { } +func (c ShareToPrivilegeAssignment_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PrivilegeAssignment_SdkV2{}.ToSchema(cs, append(path, "privilege_assignments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ShareToPrivilegeAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2523,38 +2603,38 @@ func (o *ShareToPrivilegeAssignment_SdkV2) SetPrivilegeAssignments(ctx context.C type SharedDataObject_SdkV2 struct { // The time when this data object is added to the share, in epoch // milliseconds. - AddedAt types.Int64 `tfsdk:"added_at" tf:"computed"` + AddedAt types.Int64 `tfsdk:"added_at" tf:""` // Username of the sharer. - AddedBy types.String `tfsdk:"added_by" tf:"computed"` + AddedBy types.String `tfsdk:"added_by" tf:""` // Whether to enable cdf or indicate if cdf is enabled on the shared object. - CdfEnabled types.Bool `tfsdk:"cdf_enabled" tf:"optional"` - EffectiveCdfEnabled types.Bool `tfsdk:"effective_cdf_enabled" tf:"computed"` + CdfEnabled types.Bool `tfsdk:"cdf_enabled" tf:""` + EffectiveCdfEnabled types.Bool `tfsdk:"effective_cdf_enabled" tf:""` // A user-provided comment when adding the data object to the share. // [Update:OPT] - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The content of the notebook file when the data object type is // NOTEBOOK_FILE. This should be base64 encoded. Required for adding a // NOTEBOOK_FILE, optional for updating, ignored for other types. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // The type of the data object. - DataObjectType types.String `tfsdk:"data_object_type" tf:"optional"` + DataObjectType types.String `tfsdk:"data_object_type" tf:""` // Whether to enable or disable sharing of data history. If not specified, // the default is **DISABLED**. - HistoryDataSharingStatus types.String `tfsdk:"history_data_sharing_status" tf:"optional"` - EffectiveHistoryDataSharingStatus types.String `tfsdk:"effective_history_data_sharing_status" tf:"computed"` + HistoryDataSharingStatus types.String `tfsdk:"history_data_sharing_status" tf:""` + EffectiveHistoryDataSharingStatus types.String `tfsdk:"effective_history_data_sharing_status" tf:""` // A fully qualified name that uniquely identifies a data object. // // For example, a table's fully qualified name is in the format of // `..`. Name types.String `tfsdk:"name" tf:""` // Array of partitions for the shared data. - Partitions types.List `tfsdk:"partition" tf:"optional"` + Partitions types.List `tfsdk:"partition" tf:""` // A user-provided new name for the data object within the share. If this // new name is not provided, the object's original name will be used as the // `shared_as` name. The `shared_as` name must be unique within a share. For // tables, the new name must follow the format of `.
`. - SharedAs types.String `tfsdk:"shared_as" tf:"optional"` - EffectiveSharedAs types.String `tfsdk:"effective_shared_as" tf:"computed"` + SharedAs types.String `tfsdk:"shared_as" tf:""` + EffectiveSharedAs types.String `tfsdk:"effective_shared_as" tf:""` // The start version associated with the object. This allows data providers // to control the lowest object version that is accessible by clients. If // specified, clients can query snapshots or changes for versions >= @@ -2562,16 +2642,16 @@ type SharedDataObject_SdkV2 struct { // version of the object at the time it was added to the share. // // NOTE: The start_version should be <= the `current` version of the object. - StartVersion types.Int64 `tfsdk:"start_version" tf:"optional"` - EffectiveStartVersion types.Int64 `tfsdk:"effective_start_version" tf:"computed"` + StartVersion types.Int64 `tfsdk:"start_version" tf:""` + EffectiveStartVersion types.Int64 `tfsdk:"effective_start_version" tf:""` // One of: **ACTIVE**, **PERMISSION_DENIED**. - Status types.String `tfsdk:"status" tf:"computed"` + Status types.String `tfsdk:"status" tf:""` // A user-provided new name for the data object within the share. If this // new name is not provided, the object's original name will be used as the // `string_shared_as` name. The `string_shared_as` name must be unique // within a share. For notebooks, the new name should be the new notebook // file name. - StringSharedAs types.String `tfsdk:"string_shared_as" tf:"optional"` + StringSharedAs types.String `tfsdk:"string_shared_as" tf:""` } func (newState *SharedDataObject_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObject_SdkV2) { @@ -2604,6 +2684,20 @@ func (newState *SharedDataObject_SdkV2) SyncEffectiveFieldsDuringRead(existingSt } } +func (c SharedDataObject_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "added_at")...) + cs.SetComputed(append(path, "added_by")...) + cs.SetComputed(append(path, "effective_cdf_enabled")...) + cs.SetComputed(append(path, "effective_history_data_sharing_status")...) + cs.SetRequired(append(path, "name")...) + Partition_SdkV2{}.ToSchema(cs, append(path, "partition")...) + cs.SetComputed(append(path, "effective_shared_as")...) + cs.SetComputed(append(path, "effective_start_version")...) + cs.SetComputed(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SharedDataObject. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2699,9 +2793,9 @@ func (o *SharedDataObject_SdkV2) SetPartitions(ctx context.Context, v []Partitio type SharedDataObjectUpdate_SdkV2 struct { // One of: **ADD**, **REMOVE**, **UPDATE**. - Action types.String `tfsdk:"action" tf:"optional"` + Action types.String `tfsdk:"action" tf:""` // The data object that is being added, removed, or updated. - DataObject types.List `tfsdk:"data_object" tf:"optional,object"` + DataObject types.List `tfsdk:"data_object" tf:"object"` } func (newState *SharedDataObjectUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObjectUpdate_SdkV2) { @@ -2710,6 +2804,12 @@ func (newState *SharedDataObjectUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *SharedDataObjectUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState SharedDataObjectUpdate_SdkV2) { } +func (c SharedDataObjectUpdate_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SharedDataObject_SdkV2{}.ToSchema(cs, append(path, "data_object")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SharedDataObjectUpdate. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2776,12 +2876,6 @@ func (o *SharedDataObjectUpdate_SdkV2) SetDataObject(ctx context.Context, v Shar type UpdatePermissionsResponse_SdkV2 struct { } -func (newState *UpdatePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePermissionsResponse_SdkV2) { -} - -func (newState *UpdatePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePermissionsResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePermissionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2811,16 +2905,16 @@ func (o UpdatePermissionsResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateProvider_SdkV2 struct { // Description about the provider. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the provider. Name types.String `tfsdk:"-"` // New name for the provider. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of Provider owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // This field is required when the __authentication_type__ is **TOKEN** or // not provided. - RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` + RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:""` } func (newState *UpdateProvider_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProvider_SdkV2) { @@ -2829,6 +2923,12 @@ func (newState *UpdateProvider_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *UpdateProvider_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProvider_SdkV2) { } +func (c UpdateProvider_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProvider. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2870,22 +2970,22 @@ func (o UpdateProvider_SdkV2) Type(ctx context.Context) attr.Type { type UpdateRecipient_SdkV2 struct { // Description about the recipient. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Expiration timestamp of the token, in epoch milliseconds. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // IP Access List - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.List `tfsdk:"ip_access_list" tf:"object"` // Name of the recipient. Name types.String `tfsdk:"-"` // New name for the recipient. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of the recipient owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Recipient properties as map of string key-value pairs. When provided in // update request, the specified properties will override the existing // properties. To add and remove properties, one would need to perform a // read-modify-write. - PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"optional,object"` + PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"object"` } func (newState *UpdateRecipient_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRecipient_SdkV2) { @@ -2894,6 +2994,14 @@ func (newState *UpdateRecipient_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *UpdateRecipient_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRecipient_SdkV2) { } +func (c UpdateRecipient_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessList_SdkV2{}.ToSchema(cs, append(path, "ip_access_list")...) + cs.SetRequired(append(path, "name")...) + SecurablePropertiesKvPairs_SdkV2{}.ToSchema(cs, append(path, "properties_kvpairs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRecipient. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2999,12 +3107,6 @@ func (o *UpdateRecipient_SdkV2) SetPropertiesKvpairs(ctx context.Context, v Secu type UpdateResponse_SdkV2 struct { } -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { -} - -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3034,23 +3136,38 @@ func (o UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateShare_SdkV2 struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the share. Name types.String `tfsdk:"-"` // New name for the share. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of share. - Owner types.String `tfsdk:"owner" tf:"computed"` + Owner types.String `tfsdk:"owner" tf:""` + EffectiveOwner types.String `tfsdk:"effective_owner" tf:""` // Storage root URL for the share. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // Array of shared data object updates. - Updates types.List `tfsdk:"updates" tf:"optional"` + Updates types.List `tfsdk:"updates" tf:""` } func (newState *UpdateShare_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateShare_SdkV2) { + newState.EffectiveOwner = newState.Owner + newState.Owner = plan.Owner } func (newState *UpdateShare_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateShare_SdkV2) { + newState.EffectiveOwner = existingState.EffectiveOwner + if existingState.EffectiveOwner.ValueString() == newState.Owner.ValueString() { + newState.Owner = existingState.Owner + } +} + +func (c UpdateShare_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetComputed(append(path, "effective_owner")...) + SharedDataObjectUpdate_SdkV2{}.ToSchema(cs, append(path, "updates")...) + + return cs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateShare. @@ -3073,12 +3190,13 @@ func (o UpdateShare_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVa return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "comment": o.Comment, - "name": o.Name, - "new_name": o.NewName, - "owner": o.Owner, - "storage_root": o.StorageRoot, - "updates": o.Updates, + "comment": o.Comment, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + "effective_owner": o.EffectiveOwner, + "storage_root": o.StorageRoot, + "updates": o.Updates, }) } @@ -3086,11 +3204,12 @@ func (o UpdateShare_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o UpdateShare_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "comment": types.StringType, - "name": types.StringType, - "new_name": types.StringType, - "owner": types.StringType, - "storage_root": types.StringType, + "comment": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "effective_owner": types.StringType, + "storage_root": types.StringType, "updates": basetypes.ListType{ ElemType: SharedDataObjectUpdate_SdkV2{}.Type(ctx), }, @@ -3126,7 +3245,7 @@ func (o *UpdateShare_SdkV2) SetUpdates(ctx context.Context, v []SharedDataObject type UpdateSharePermissions_SdkV2 struct { // Array of permission changes. - Changes types.List `tfsdk:"changes" tf:"optional"` + Changes types.List `tfsdk:"changes" tf:""` // Maximum number of permissions to return. - when set to 0, the page length // is set to a server configured value (recommended); - when set to a value // greater than 0, the page length is the minimum of this value and a server @@ -3149,6 +3268,12 @@ func (newState *UpdateSharePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *UpdateSharePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateSharePermissions_SdkV2) { } +func (c UpdateSharePermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateSharePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/sharing_tf/model.go b/internal/service/sharing_tf/model.go index d1918325e..c08f8ff22 100755 --- a/internal/service/sharing_tf/model.go +++ b/internal/service/sharing_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/databricks/terraform-provider-databricks/internal/service/catalog_tf" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -26,12 +27,12 @@ type CreateProvider struct { // The delta sharing authentication type. AuthenticationType types.String `tfsdk:"authentication_type" tf:""` // Description about the provider. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the Provider. Name types.String `tfsdk:"name" tf:""` // This field is required when the __authentication_type__ is **TOKEN** or // not provided. - RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` + RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:""` } func (newState *CreateProvider) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProvider) { @@ -40,6 +41,13 @@ func (newState *CreateProvider) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cre func (newState *CreateProvider) SyncEffectiveFieldsDuringRead(existingState CreateProvider) { } +func (c CreateProvider) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "authentication_type")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProvider. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -81,25 +89,25 @@ type CreateRecipient struct { // The delta sharing authentication type. AuthenticationType types.String `tfsdk:"authentication_type" tf:""` // Description about the recipient. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The global Unity Catalog metastore id provided by the data recipient. // This field is required when the __authentication_type__ is // **DATABRICKS**. The identifier is of format // __cloud__:__region__:__metastore-uuid__. - DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:"optional"` + DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:""` // Expiration timestamp of the token, in epoch milliseconds. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // IP Access List - IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"object"` // Name of Recipient. Name types.String `tfsdk:"name" tf:""` // Username of the recipient owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Recipient properties as map of string key-value pairs. - PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs" tf:"optional,object"` + PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs" tf:"object"` // The one-time sharing code provided by the data recipient. This field is // required when the __authentication_type__ is **DATABRICKS**. - SharingCode types.String `tfsdk:"sharing_code" tf:"optional"` + SharingCode types.String `tfsdk:"sharing_code" tf:""` } func (newState *CreateRecipient) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRecipient) { @@ -108,6 +116,15 @@ func (newState *CreateRecipient) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cr func (newState *CreateRecipient) SyncEffectiveFieldsDuringRead(existingState CreateRecipient) { } +func (c CreateRecipient) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "authentication_type")...) + IpAccessList{}.ToSchema(cs, append(path, "ip_access_list")...) + cs.SetRequired(append(path, "name")...) + SecurablePropertiesKvPairs{}.ToSchema(cs, append(path, "properties_kvpairs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRecipient. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -216,11 +233,11 @@ func (o *CreateRecipient) SetPropertiesKvpairs(ctx context.Context, v SecurableP type CreateShare struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the share. Name types.String `tfsdk:"name" tf:""` // Storage root URL for the share. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` } func (newState *CreateShare) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateShare) { @@ -229,6 +246,12 @@ func (newState *CreateShare) SyncEffectiveFieldsDuringCreateOrUpdate(plan Create func (newState *CreateShare) SyncEffectiveFieldsDuringRead(existingState CreateShare) { } +func (c CreateShare) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateShare. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -270,12 +293,6 @@ type DeleteProviderRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteProviderRequest) { -} - -func (newState *DeleteProviderRequest) SyncEffectiveFieldsDuringRead(existingState DeleteProviderRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -313,12 +330,6 @@ type DeleteRecipientRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteRecipientRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRecipientRequest) { -} - -func (newState *DeleteRecipientRequest) SyncEffectiveFieldsDuringRead(existingState DeleteRecipientRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRecipientRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -353,12 +364,6 @@ func (o DeleteRecipientRequest) Type(ctx context.Context) attr.Type { type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -392,12 +397,6 @@ type DeleteShareRequest struct { Name types.String `tfsdk:"-"` } -func (newState *DeleteShareRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteShareRequest) { -} - -func (newState *DeleteShareRequest) SyncEffectiveFieldsDuringRead(existingState DeleteShareRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteShareRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -435,12 +434,6 @@ type GetActivationUrlInfoRequest struct { ActivationUrl types.String `tfsdk:"-"` } -func (newState *GetActivationUrlInfoRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetActivationUrlInfoRequest) { -} - -func (newState *GetActivationUrlInfoRequest) SyncEffectiveFieldsDuringRead(existingState GetActivationUrlInfoRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetActivationUrlInfoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -481,6 +474,11 @@ func (newState *GetActivationUrlInfoResponse) SyncEffectiveFieldsDuringCreateOrU func (newState *GetActivationUrlInfoResponse) SyncEffectiveFieldsDuringRead(existingState GetActivationUrlInfoResponse) { } +func (c GetActivationUrlInfoResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetActivationUrlInfoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -514,12 +512,6 @@ type GetProviderRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderRequest) { -} - -func (newState *GetProviderRequest) SyncEffectiveFieldsDuringRead(existingState GetProviderRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetProviderRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -557,12 +549,6 @@ type GetRecipientRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetRecipientRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRecipientRequest) { -} - -func (newState *GetRecipientRequest) SyncEffectiveFieldsDuringRead(existingState GetRecipientRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRecipientRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -598,9 +584,9 @@ type GetRecipientSharePermissionsResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of data share permissions for a recipient. - PermissionsOut types.List `tfsdk:"permissions_out" tf:"optional"` + PermissionsOut types.List `tfsdk:"permissions_out" tf:""` } func (newState *GetRecipientSharePermissionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRecipientSharePermissionsResponse) { @@ -609,6 +595,12 @@ func (newState *GetRecipientSharePermissionsResponse) SyncEffectiveFieldsDuringC func (newState *GetRecipientSharePermissionsResponse) SyncEffectiveFieldsDuringRead(existingState GetRecipientSharePermissionsResponse) { } +func (c GetRecipientSharePermissionsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ShareToPrivilegeAssignment{}.ToSchema(cs, append(path, "permissions_out")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRecipientSharePermissionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -680,12 +672,6 @@ type GetShareRequest struct { Name types.String `tfsdk:"-"` } -func (newState *GetShareRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetShareRequest) { -} - -func (newState *GetShareRequest) SyncEffectiveFieldsDuringRead(existingState GetShareRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetShareRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -721,7 +707,7 @@ func (o GetShareRequest) Type(ctx context.Context) attr.Type { type IpAccessList struct { // Allowed IP Addresses in CIDR notation. Limit of 100. - AllowedIpAddresses types.List `tfsdk:"allowed_ip_addresses" tf:"optional"` + AllowedIpAddresses types.List `tfsdk:"allowed_ip_addresses" tf:""` } func (newState *IpAccessList) SyncEffectiveFieldsDuringCreateOrUpdate(plan IpAccessList) { @@ -730,6 +716,11 @@ func (newState *IpAccessList) SyncEffectiveFieldsDuringCreateOrUpdate(plan IpAcc func (newState *IpAccessList) SyncEffectiveFieldsDuringRead(existingState IpAccessList) { } +func (c IpAccessList) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in IpAccessList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -795,9 +786,9 @@ type ListProviderSharesResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of provider shares. - Shares types.List `tfsdk:"shares" tf:"optional"` + Shares types.List `tfsdk:"shares" tf:""` } func (newState *ListProviderSharesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProviderSharesResponse) { @@ -806,6 +797,12 @@ func (newState *ListProviderSharesResponse) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListProviderSharesResponse) SyncEffectiveFieldsDuringRead(existingState ListProviderSharesResponse) { } +func (c ListProviderSharesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderShare{}.ToSchema(cs, append(path, "shares")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProviderSharesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -888,12 +885,6 @@ type ListProvidersRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListProvidersRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersRequest) { -} - -func (newState *ListProvidersRequest) SyncEffectiveFieldsDuringRead(existingState ListProvidersRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -933,9 +924,9 @@ type ListProvidersResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of provider information objects. - Providers types.List `tfsdk:"providers" tf:"optional"` + Providers types.List `tfsdk:"providers" tf:""` } func (newState *ListProvidersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersResponse) { @@ -944,6 +935,12 @@ func (newState *ListProvidersResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *ListProvidersResponse) SyncEffectiveFieldsDuringRead(existingState ListProvidersResponse) { } +func (c ListProvidersResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ProviderInfo{}.ToSchema(cs, append(path, "providers")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1026,12 +1023,6 @@ type ListRecipientsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListRecipientsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRecipientsRequest) { -} - -func (newState *ListRecipientsRequest) SyncEffectiveFieldsDuringRead(existingState ListRecipientsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRecipientsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1071,9 +1062,9 @@ type ListRecipientsResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of recipient information objects. - Recipients types.List `tfsdk:"recipients" tf:"optional"` + Recipients types.List `tfsdk:"recipients" tf:""` } func (newState *ListRecipientsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRecipientsResponse) { @@ -1082,6 +1073,12 @@ func (newState *ListRecipientsResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ListRecipientsResponse) SyncEffectiveFieldsDuringRead(existingState ListRecipientsResponse) { } +func (c ListRecipientsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RecipientInfo{}.ToSchema(cs, append(path, "recipients")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRecipientsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1163,12 +1160,6 @@ type ListSharesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListSharesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSharesRequest) { -} - -func (newState *ListSharesRequest) SyncEffectiveFieldsDuringRead(existingState ListSharesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSharesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1208,9 +1199,9 @@ type ListSharesResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next // request (for the next page of results). - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // An array of data share information objects. - Shares types.List `tfsdk:"shares" tf:"optional"` + Shares types.List `tfsdk:"shares" tf:""` } func (newState *ListSharesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSharesResponse) { @@ -1219,6 +1210,12 @@ func (newState *ListSharesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListSharesResponse) SyncEffectiveFieldsDuringRead(existingState ListSharesResponse) { } +func (c ListSharesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ShareInfo{}.ToSchema(cs, append(path, "shares")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSharesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1284,7 +1281,7 @@ func (o *ListSharesResponse) SetShares(ctx context.Context, v []ShareInfo) { type Partition struct { // An array of partition values. - Values types.List `tfsdk:"value" tf:"optional"` + Values types.List `tfsdk:"value" tf:""` } func (newState *Partition) SyncEffectiveFieldsDuringCreateOrUpdate(plan Partition) { @@ -1293,6 +1290,12 @@ func (newState *Partition) SyncEffectiveFieldsDuringCreateOrUpdate(plan Partitio func (newState *Partition) SyncEffectiveFieldsDuringRead(existingState Partition) { } +func (c Partition) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PartitionValue{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Partition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1356,7 +1359,7 @@ func (o *Partition) SetValues(ctx context.Context, v []PartitionValue) { type PartitionSpecificationPartition struct { // An array of partition values. - Values types.List `tfsdk:"value" tf:"optional"` + Values types.List `tfsdk:"value" tf:""` } func (newState *PartitionSpecificationPartition) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartitionSpecificationPartition) { @@ -1365,6 +1368,12 @@ func (newState *PartitionSpecificationPartition) SyncEffectiveFieldsDuringCreate func (newState *PartitionSpecificationPartition) SyncEffectiveFieldsDuringRead(existingState PartitionSpecificationPartition) { } +func (c PartitionSpecificationPartition) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PartitionValue{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PartitionSpecificationPartition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1428,17 +1437,17 @@ func (o *PartitionSpecificationPartition) SetValues(ctx context.Context, v []Par type PartitionValue struct { // The name of the partition column. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The operator to apply for the value. - Op types.String `tfsdk:"op" tf:"optional"` + Op types.String `tfsdk:"op" tf:""` // The key of a Delta Sharing recipient's property. For example // "databricks-account-id". When this field is set, field `value` can not be // set. - RecipientPropertyKey types.String `tfsdk:"recipient_property_key" tf:"optional"` + RecipientPropertyKey types.String `tfsdk:"recipient_property_key" tf:""` // The value of the partition column. When this value is not set, it means // `null` value. When this field is set, field `recipient_property_key` can // not be set. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *PartitionValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartitionValue) { @@ -1447,6 +1456,11 @@ func (newState *PartitionValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan Par func (newState *PartitionValue) SyncEffectiveFieldsDuringRead(existingState PartitionValue) { } +func (c PartitionValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PartitionValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1486,9 +1500,9 @@ func (o PartitionValue) Type(ctx context.Context) attr.Type { type PrivilegeAssignment struct { // The principal (user email address or group name). - Principal types.String `tfsdk:"principal" tf:"optional"` + Principal types.String `tfsdk:"principal" tf:""` // The privileges assigned to the principal. - Privileges types.List `tfsdk:"privileges" tf:"optional"` + Privileges types.List `tfsdk:"privileges" tf:""` } func (newState *PrivilegeAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrivilegeAssignment) { @@ -1497,6 +1511,11 @@ func (newState *PrivilegeAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *PrivilegeAssignment) SyncEffectiveFieldsDuringRead(existingState PrivilegeAssignment) { } +func (c PrivilegeAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PrivilegeAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1562,40 +1581,40 @@ func (o *PrivilegeAssignment) SetPrivileges(ctx context.Context, v []types.Strin type ProviderInfo struct { // The delta sharing authentication type. - AuthenticationType types.String `tfsdk:"authentication_type" tf:"optional"` + AuthenticationType types.String `tfsdk:"authentication_type" tf:""` // Cloud vendor of the provider's UC metastore. This field is only present // when the __authentication_type__ is **DATABRICKS**. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // Description about the provider. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this Provider was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of Provider creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The global UC metastore id of the data provider. This field is only // present when the __authentication_type__ is **DATABRICKS**. The // identifier is of format ::. - DataProviderGlobalMetastoreId types.String `tfsdk:"data_provider_global_metastore_id" tf:"optional"` + DataProviderGlobalMetastoreId types.String `tfsdk:"data_provider_global_metastore_id" tf:""` // UUID of the provider's UC metastore. This field is only present when the // __authentication_type__ is **DATABRICKS**. - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // The name of the Provider. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of Provider owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // The recipient profile. This field is only present when the // authentication_type is `TOKEN`. - RecipientProfile types.Object `tfsdk:"recipient_profile" tf:"optional,object"` + RecipientProfile types.Object `tfsdk:"recipient_profile" tf:"object"` // This field is only present when the authentication_type is `TOKEN` or not // provided. - RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` + RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:""` // Cloud region of the provider's UC metastore. This field is only present // when the __authentication_type__ is **DATABRICKS**. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // Time at which this Provider was created, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of user who last modified Share. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *ProviderInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProviderInfo) { @@ -1604,6 +1623,12 @@ func (newState *ProviderInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Provi func (newState *ProviderInfo) SyncEffectiveFieldsDuringRead(existingState ProviderInfo) { } +func (c ProviderInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RecipientProfile{}.ToSchema(cs, append(path, "recipient_profile")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1693,7 +1718,7 @@ func (o *ProviderInfo) SetRecipientProfile(ctx context.Context, v RecipientProfi type ProviderShare struct { // The name of the Provider Share. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ProviderShare) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProviderShare) { @@ -1702,6 +1727,11 @@ func (newState *ProviderShare) SyncEffectiveFieldsDuringCreateOrUpdate(plan Prov func (newState *ProviderShare) SyncEffectiveFieldsDuringRead(existingState ProviderShare) { } +func (c ProviderShare) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderShare. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1736,49 +1766,49 @@ func (o ProviderShare) Type(ctx context.Context) attr.Type { type RecipientInfo struct { // A boolean status field showing whether the Recipient's activation URL has // been exercised or not. - Activated types.Bool `tfsdk:"activated" tf:"optional"` + Activated types.Bool `tfsdk:"activated" tf:""` // Full activation url to retrieve the access token. It will be empty if the // token is already retrieved. - ActivationUrl types.String `tfsdk:"activation_url" tf:"optional"` + ActivationUrl types.String `tfsdk:"activation_url" tf:""` // The delta sharing authentication type. - AuthenticationType types.String `tfsdk:"authentication_type" tf:"optional"` + AuthenticationType types.String `tfsdk:"authentication_type" tf:""` // Cloud vendor of the recipient's Unity Catalog Metstore. This field is // only present when the __authentication_type__ is **DATABRICKS**`. - Cloud types.String `tfsdk:"cloud" tf:"optional"` + Cloud types.String `tfsdk:"cloud" tf:""` // Description about the recipient. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this recipient was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of recipient creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // The global Unity Catalog metastore id provided by the data recipient. // This field is only present when the __authentication_type__ is // **DATABRICKS**. The identifier is of format // __cloud__:__region__:__metastore-uuid__. - DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:"optional"` + DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:""` // IP Access List - IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"object"` // Unique identifier of recipient's Unity Catalog metastore. This field is // only present when the __authentication_type__ is **DATABRICKS** - MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + MetastoreId types.String `tfsdk:"metastore_id" tf:""` // Name of Recipient. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Username of the recipient owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Recipient properties as map of string key-value pairs. - PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs" tf:"optional,object"` + PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs" tf:"object"` // Cloud region of the recipient's Unity Catalog Metstore. This field is // only present when the __authentication_type__ is **DATABRICKS**. - Region types.String `tfsdk:"region" tf:"optional"` + Region types.String `tfsdk:"region" tf:""` // The one-time sharing code provided by the data recipient. This field is // only present when the __authentication_type__ is **DATABRICKS**. - SharingCode types.String `tfsdk:"sharing_code" tf:"optional"` + SharingCode types.String `tfsdk:"sharing_code" tf:""` // This field is only present when the __authentication_type__ is **TOKEN**. - Tokens types.List `tfsdk:"tokens" tf:"optional"` + Tokens types.List `tfsdk:"tokens" tf:""` // Time at which the recipient was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of recipient updater. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *RecipientInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RecipientInfo) { @@ -1787,6 +1817,14 @@ func (newState *RecipientInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Reci func (newState *RecipientInfo) SyncEffectiveFieldsDuringRead(existingState RecipientInfo) { } +func (c RecipientInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessList{}.ToSchema(cs, append(path, "ip_access_list")...) + SecurablePropertiesKvPairs{}.ToSchema(cs, append(path, "properties_kvpairs")...) + RecipientTokenInfo{}.ToSchema(cs, append(path, "tokens")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RecipientInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1942,11 +1980,11 @@ func (o *RecipientInfo) SetTokens(ctx context.Context, v []RecipientTokenInfo) { type RecipientProfile struct { // The token used to authorize the recipient. - BearerToken types.String `tfsdk:"bearer_token" tf:"optional"` + BearerToken types.String `tfsdk:"bearer_token" tf:""` // The endpoint for the share to be used by the recipient. - Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + Endpoint types.String `tfsdk:"endpoint" tf:""` // The version number of the recipient's credentials on a share. - ShareCredentialsVersion types.Int64 `tfsdk:"share_credentials_version" tf:"optional"` + ShareCredentialsVersion types.Int64 `tfsdk:"share_credentials_version" tf:""` } func (newState *RecipientProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan RecipientProfile) { @@ -1955,6 +1993,11 @@ func (newState *RecipientProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan R func (newState *RecipientProfile) SyncEffectiveFieldsDuringRead(existingState RecipientProfile) { } +func (c RecipientProfile) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RecipientProfile. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1993,19 +2036,19 @@ func (o RecipientProfile) Type(ctx context.Context) attr.Type { type RecipientTokenInfo struct { // Full activation URL to retrieve the access token. It will be empty if the // token is already retrieved. - ActivationUrl types.String `tfsdk:"activation_url" tf:"optional"` + ActivationUrl types.String `tfsdk:"activation_url" tf:""` // Time at which this recipient Token was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of recipient token creator. - CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Expiration timestamp of the token in epoch milliseconds. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // Unique ID of the recipient token. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Time at which this recipient Token was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of recipient Token updater. - UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *RecipientTokenInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RecipientTokenInfo) { @@ -2014,6 +2057,11 @@ func (newState *RecipientTokenInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *RecipientTokenInfo) SyncEffectiveFieldsDuringRead(existingState RecipientTokenInfo) { } +func (c RecipientTokenInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RecipientTokenInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2063,12 +2111,6 @@ type RetrieveTokenRequest struct { ActivationUrl types.String `tfsdk:"-"` } -func (newState *RetrieveTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RetrieveTokenRequest) { -} - -func (newState *RetrieveTokenRequest) SyncEffectiveFieldsDuringRead(existingState RetrieveTokenRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RetrieveTokenRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2102,13 +2144,13 @@ func (o RetrieveTokenRequest) Type(ctx context.Context) attr.Type { type RetrieveTokenResponse struct { // The token used to authorize the recipient. - BearerToken types.String `tfsdk:"bearerToken" tf:"optional"` + BearerToken types.String `tfsdk:"bearerToken" tf:""` // The endpoint for the share to be used by the recipient. - Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + Endpoint types.String `tfsdk:"endpoint" tf:""` // Expiration timestamp of the token in epoch milliseconds. - ExpirationTime types.String `tfsdk:"expirationTime" tf:"optional"` + ExpirationTime types.String `tfsdk:"expirationTime" tf:""` // These field names must follow the delta sharing protocol. - ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:"optional"` + ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:""` } func (newState *RetrieveTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RetrieveTokenResponse) { @@ -2117,6 +2159,11 @@ func (newState *RetrieveTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *RetrieveTokenResponse) SyncEffectiveFieldsDuringRead(existingState RetrieveTokenResponse) { } +func (c RetrieveTokenResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RetrieveTokenResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2170,6 +2217,13 @@ func (newState *RotateRecipientToken) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *RotateRecipientToken) SyncEffectiveFieldsDuringRead(existingState RotateRecipientToken) { } +func (c RotateRecipientToken) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "existing_token_expire_in_seconds")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RotateRecipientToken. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2216,6 +2270,12 @@ func (newState *SecurablePropertiesKvPairs) SyncEffectiveFieldsDuringCreateOrUpd func (newState *SecurablePropertiesKvPairs) SyncEffectiveFieldsDuringRead(existingState SecurablePropertiesKvPairs) { } +func (c SecurablePropertiesKvPairs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "properties")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SecurablePropertiesKvPairs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2279,31 +2339,49 @@ func (o *SecurablePropertiesKvPairs) SetProperties(ctx context.Context, v map[st type ShareInfo struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Time at which this share was created, in epoch milliseconds. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"computed"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // Username of share creator. - CreatedBy types.String `tfsdk:"created_by" tf:"computed"` + CreatedBy types.String `tfsdk:"created_by" tf:""` // Name of the share. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // A list of shared data objects within the share. - Objects types.List `tfsdk:"object" tf:"optional"` + Objects types.List `tfsdk:"object" tf:""` // Username of current owner of share. - Owner types.String `tfsdk:"owner" tf:"computed"` + Owner types.String `tfsdk:"owner" tf:""` + EffectiveOwner types.String `tfsdk:"effective_owner" tf:""` // Storage Location URL (full path) for the share. - StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + StorageLocation types.String `tfsdk:"storage_location" tf:""` // Storage root URL for the share. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // Time at which this share was updated, in epoch milliseconds. - UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"computed"` + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:""` // Username of share updater. - UpdatedBy types.String `tfsdk:"updated_by" tf:"computed"` + UpdatedBy types.String `tfsdk:"updated_by" tf:""` } func (newState *ShareInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ShareInfo) { + newState.EffectiveOwner = newState.Owner + newState.Owner = plan.Owner } func (newState *ShareInfo) SyncEffectiveFieldsDuringRead(existingState ShareInfo) { + newState.EffectiveOwner = existingState.EffectiveOwner + if existingState.EffectiveOwner.ValueString() == newState.Owner.ValueString() { + newState.Owner = existingState.Owner + } +} + +func (c ShareInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "created_at")...) + cs.SetComputed(append(path, "created_by")...) + SharedDataObject{}.ToSchema(cs, append(path, "object")...) + cs.SetComputed(append(path, "effective_owner")...) + cs.SetComputed(append(path, "updated_at")...) + cs.SetComputed(append(path, "updated_by")...) + + return cs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ShareInfo. @@ -2332,6 +2410,7 @@ func (o ShareInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { "name": o.Name, "object": o.Objects, "owner": o.Owner, + "effective_owner": o.EffectiveOwner, "storage_location": o.StorageLocation, "storage_root": o.StorageRoot, "updated_at": o.UpdatedAt, @@ -2351,6 +2430,7 @@ func (o ShareInfo) Type(ctx context.Context) attr.Type { ElemType: SharedDataObject{}.Type(ctx), }, "owner": types.StringType, + "effective_owner": types.StringType, "storage_location": types.StringType, "storage_root": types.StringType, "updated_at": types.Int64Type, @@ -2403,12 +2483,6 @@ type SharePermissionsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *SharePermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharePermissionsRequest) { -} - -func (newState *SharePermissionsRequest) SyncEffectiveFieldsDuringRead(existingState SharePermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SharePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2446,9 +2520,9 @@ func (o SharePermissionsRequest) Type(ctx context.Context) attr.Type { type ShareToPrivilegeAssignment struct { // The privileges assigned to the principal. - PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:"optional"` + PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:""` // The share name. - ShareName types.String `tfsdk:"share_name" tf:"optional"` + ShareName types.String `tfsdk:"share_name" tf:""` } func (newState *ShareToPrivilegeAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan ShareToPrivilegeAssignment) { @@ -2457,6 +2531,12 @@ func (newState *ShareToPrivilegeAssignment) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ShareToPrivilegeAssignment) SyncEffectiveFieldsDuringRead(existingState ShareToPrivilegeAssignment) { } +func (c ShareToPrivilegeAssignment) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + PrivilegeAssignment{}.ToSchema(cs, append(path, "privilege_assignments")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ShareToPrivilegeAssignment. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2523,38 +2603,38 @@ func (o *ShareToPrivilegeAssignment) SetPrivilegeAssignments(ctx context.Context type SharedDataObject struct { // The time when this data object is added to the share, in epoch // milliseconds. - AddedAt types.Int64 `tfsdk:"added_at" tf:"computed"` + AddedAt types.Int64 `tfsdk:"added_at" tf:""` // Username of the sharer. - AddedBy types.String `tfsdk:"added_by" tf:"computed"` + AddedBy types.String `tfsdk:"added_by" tf:""` // Whether to enable cdf or indicate if cdf is enabled on the shared object. - CdfEnabled types.Bool `tfsdk:"cdf_enabled" tf:"optional"` - EffectiveCdfEnabled types.Bool `tfsdk:"effective_cdf_enabled" tf:"computed"` + CdfEnabled types.Bool `tfsdk:"cdf_enabled" tf:""` + EffectiveCdfEnabled types.Bool `tfsdk:"effective_cdf_enabled" tf:""` // A user-provided comment when adding the data object to the share. // [Update:OPT] - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The content of the notebook file when the data object type is // NOTEBOOK_FILE. This should be base64 encoded. Required for adding a // NOTEBOOK_FILE, optional for updating, ignored for other types. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // The type of the data object. - DataObjectType types.String `tfsdk:"data_object_type" tf:"optional"` + DataObjectType types.String `tfsdk:"data_object_type" tf:""` // Whether to enable or disable sharing of data history. If not specified, // the default is **DISABLED**. - HistoryDataSharingStatus types.String `tfsdk:"history_data_sharing_status" tf:"optional"` - EffectiveHistoryDataSharingStatus types.String `tfsdk:"effective_history_data_sharing_status" tf:"computed"` + HistoryDataSharingStatus types.String `tfsdk:"history_data_sharing_status" tf:""` + EffectiveHistoryDataSharingStatus types.String `tfsdk:"effective_history_data_sharing_status" tf:""` // A fully qualified name that uniquely identifies a data object. // // For example, a table's fully qualified name is in the format of // `..
`. Name types.String `tfsdk:"name" tf:""` // Array of partitions for the shared data. - Partitions types.List `tfsdk:"partition" tf:"optional"` + Partitions types.List `tfsdk:"partition" tf:""` // A user-provided new name for the data object within the share. If this // new name is not provided, the object's original name will be used as the // `shared_as` name. The `shared_as` name must be unique within a share. For // tables, the new name must follow the format of `.
`. - SharedAs types.String `tfsdk:"shared_as" tf:"optional"` - EffectiveSharedAs types.String `tfsdk:"effective_shared_as" tf:"computed"` + SharedAs types.String `tfsdk:"shared_as" tf:""` + EffectiveSharedAs types.String `tfsdk:"effective_shared_as" tf:""` // The start version associated with the object. This allows data providers // to control the lowest object version that is accessible by clients. If // specified, clients can query snapshots or changes for versions >= @@ -2562,16 +2642,16 @@ type SharedDataObject struct { // version of the object at the time it was added to the share. // // NOTE: The start_version should be <= the `current` version of the object. - StartVersion types.Int64 `tfsdk:"start_version" tf:"optional"` - EffectiveStartVersion types.Int64 `tfsdk:"effective_start_version" tf:"computed"` + StartVersion types.Int64 `tfsdk:"start_version" tf:""` + EffectiveStartVersion types.Int64 `tfsdk:"effective_start_version" tf:""` // One of: **ACTIVE**, **PERMISSION_DENIED**. - Status types.String `tfsdk:"status" tf:"computed"` + Status types.String `tfsdk:"status" tf:""` // A user-provided new name for the data object within the share. If this // new name is not provided, the object's original name will be used as the // `string_shared_as` name. The `string_shared_as` name must be unique // within a share. For notebooks, the new name should be the new notebook // file name. - StringSharedAs types.String `tfsdk:"string_shared_as" tf:"optional"` + StringSharedAs types.String `tfsdk:"string_shared_as" tf:""` } func (newState *SharedDataObject) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObject) { @@ -2604,6 +2684,20 @@ func (newState *SharedDataObject) SyncEffectiveFieldsDuringRead(existingState Sh } } +func (c SharedDataObject) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetComputed(append(path, "added_at")...) + cs.SetComputed(append(path, "added_by")...) + cs.SetComputed(append(path, "effective_cdf_enabled")...) + cs.SetComputed(append(path, "effective_history_data_sharing_status")...) + cs.SetRequired(append(path, "name")...) + Partition{}.ToSchema(cs, append(path, "partition")...) + cs.SetComputed(append(path, "effective_shared_as")...) + cs.SetComputed(append(path, "effective_start_version")...) + cs.SetComputed(append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SharedDataObject. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2699,9 +2793,9 @@ func (o *SharedDataObject) SetPartitions(ctx context.Context, v []Partition) { type SharedDataObjectUpdate struct { // One of: **ADD**, **REMOVE**, **UPDATE**. - Action types.String `tfsdk:"action" tf:"optional"` + Action types.String `tfsdk:"action" tf:""` // The data object that is being added, removed, or updated. - DataObject types.Object `tfsdk:"data_object" tf:"optional,object"` + DataObject types.Object `tfsdk:"data_object" tf:"object"` } func (newState *SharedDataObjectUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObjectUpdate) { @@ -2710,6 +2804,12 @@ func (newState *SharedDataObjectUpdate) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *SharedDataObjectUpdate) SyncEffectiveFieldsDuringRead(existingState SharedDataObjectUpdate) { } +func (c SharedDataObjectUpdate) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SharedDataObject{}.ToSchema(cs, append(path, "data_object")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SharedDataObjectUpdate. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2776,12 +2876,6 @@ func (o *SharedDataObjectUpdate) SetDataObject(ctx context.Context, v SharedData type UpdatePermissionsResponse struct { } -func (newState *UpdatePermissionsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePermissionsResponse) { -} - -func (newState *UpdatePermissionsResponse) SyncEffectiveFieldsDuringRead(existingState UpdatePermissionsResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePermissionsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2811,16 +2905,16 @@ func (o UpdatePermissionsResponse) Type(ctx context.Context) attr.Type { type UpdateProvider struct { // Description about the provider. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Name of the provider. Name types.String `tfsdk:"-"` // New name for the provider. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of Provider owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // This field is required when the __authentication_type__ is **TOKEN** or // not provided. - RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` + RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:""` } func (newState *UpdateProvider) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProvider) { @@ -2829,6 +2923,12 @@ func (newState *UpdateProvider) SyncEffectiveFieldsDuringCreateOrUpdate(plan Upd func (newState *UpdateProvider) SyncEffectiveFieldsDuringRead(existingState UpdateProvider) { } +func (c UpdateProvider) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProvider. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2870,22 +2970,22 @@ func (o UpdateProvider) Type(ctx context.Context) attr.Type { type UpdateRecipient struct { // Description about the recipient. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // Expiration timestamp of the token, in epoch milliseconds. - ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:""` // IP Access List - IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"object"` // Name of the recipient. Name types.String `tfsdk:"-"` // New name for the recipient. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of the recipient owner. - Owner types.String `tfsdk:"owner" tf:"optional"` + Owner types.String `tfsdk:"owner" tf:""` // Recipient properties as map of string key-value pairs. When provided in // update request, the specified properties will override the existing // properties. To add and remove properties, one would need to perform a // read-modify-write. - PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs" tf:"optional,object"` + PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs" tf:"object"` } func (newState *UpdateRecipient) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRecipient) { @@ -2894,6 +2994,14 @@ func (newState *UpdateRecipient) SyncEffectiveFieldsDuringCreateOrUpdate(plan Up func (newState *UpdateRecipient) SyncEffectiveFieldsDuringRead(existingState UpdateRecipient) { } +func (c UpdateRecipient) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + IpAccessList{}.ToSchema(cs, append(path, "ip_access_list")...) + cs.SetRequired(append(path, "name")...) + SecurablePropertiesKvPairs{}.ToSchema(cs, append(path, "properties_kvpairs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRecipient. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2999,12 +3107,6 @@ func (o *UpdateRecipient) SetPropertiesKvpairs(ctx context.Context, v SecurableP type UpdateResponse struct { } -func (newState *UpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse) { -} - -func (newState *UpdateResponse) SyncEffectiveFieldsDuringRead(existingState UpdateResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3034,23 +3136,38 @@ func (o UpdateResponse) Type(ctx context.Context) attr.Type { type UpdateShare struct { // User-provided free-form text description. - Comment types.String `tfsdk:"comment" tf:"optional"` + Comment types.String `tfsdk:"comment" tf:""` // The name of the share. Name types.String `tfsdk:"-"` // New name for the share. - NewName types.String `tfsdk:"new_name" tf:"optional"` + NewName types.String `tfsdk:"new_name" tf:""` // Username of current owner of share. - Owner types.String `tfsdk:"owner" tf:"computed"` + Owner types.String `tfsdk:"owner" tf:""` + EffectiveOwner types.String `tfsdk:"effective_owner" tf:""` // Storage root URL for the share. - StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + StorageRoot types.String `tfsdk:"storage_root" tf:""` // Array of shared data object updates. - Updates types.List `tfsdk:"updates" tf:"optional"` + Updates types.List `tfsdk:"updates" tf:""` } func (newState *UpdateShare) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateShare) { + newState.EffectiveOwner = newState.Owner + newState.Owner = plan.Owner } func (newState *UpdateShare) SyncEffectiveFieldsDuringRead(existingState UpdateShare) { + newState.EffectiveOwner = existingState.EffectiveOwner + if existingState.EffectiveOwner.ValueString() == newState.Owner.ValueString() { + newState.Owner = existingState.Owner + } +} + +func (c UpdateShare) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetComputed(append(path, "effective_owner")...) + SharedDataObjectUpdate{}.ToSchema(cs, append(path, "updates")...) + + return cs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateShare. @@ -3073,12 +3190,13 @@ func (o UpdateShare) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "comment": o.Comment, - "name": o.Name, - "new_name": o.NewName, - "owner": o.Owner, - "storage_root": o.StorageRoot, - "updates": o.Updates, + "comment": o.Comment, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + "effective_owner": o.EffectiveOwner, + "storage_root": o.StorageRoot, + "updates": o.Updates, }) } @@ -3086,11 +3204,12 @@ func (o UpdateShare) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o UpdateShare) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "comment": types.StringType, - "name": types.StringType, - "new_name": types.StringType, - "owner": types.StringType, - "storage_root": types.StringType, + "comment": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "effective_owner": types.StringType, + "storage_root": types.StringType, "updates": basetypes.ListType{ ElemType: SharedDataObjectUpdate{}.Type(ctx), }, @@ -3126,7 +3245,7 @@ func (o *UpdateShare) SetUpdates(ctx context.Context, v []SharedDataObjectUpdate type UpdateSharePermissions struct { // Array of permission changes. - Changes types.List `tfsdk:"changes" tf:"optional"` + Changes types.List `tfsdk:"changes" tf:""` // Maximum number of permissions to return. - when set to 0, the page length // is set to a server configured value (recommended); - when set to a value // greater than 0, the page length is the minimum of this value and a server @@ -3149,6 +3268,12 @@ func (newState *UpdateSharePermissions) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *UpdateSharePermissions) SyncEffectiveFieldsDuringRead(existingState UpdateSharePermissions) { } +func (c UpdateSharePermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateSharePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/sql_tf/legacy_model.go b/internal/service/sql_tf/legacy_model.go index 38e1e401f..3d411dad5 100755 --- a/internal/service/sql_tf/legacy_model.go +++ b/internal/service/sql_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -22,12 +23,12 @@ import ( ) type AccessControl_SdkV2 struct { - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * // `CAN_EDIT`: Can edit the query * `CAN_MANAGE`: Can manage the query - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AccessControl_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccessControl_SdkV2) { @@ -36,6 +37,11 @@ func (newState *AccessControl_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *AccessControl_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccessControl_SdkV2) { } +func (c AccessControl_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccessControl. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -73,48 +79,48 @@ func (o AccessControl_SdkV2) Type(ctx context.Context) attr.Type { type Alert_SdkV2 struct { // Trigger conditions of the alert. - Condition types.List `tfsdk:"condition" tf:"optional,object"` + Condition types.List `tfsdk:"condition" tf:"object"` // The timestamp indicating when the alert was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This can include // email subject entries and Slack notification headers, for example. See // [here] for custom templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The display name of the alert. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the alert. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The workspace state of the alert. Used for tracking trashed status. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // Whether to notify alert subscribers when alert returns back to normal. - NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:""` // The owner's username. This field is set to "Unavailable" if the user has // been deleted. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // The workspace path of the folder containing the alert. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // UUID of the query attached to the alert. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds an alert must wait after being triggered to rearm // itself. After rearming, it can be triggered again. If 0 or not specified, // the alert will not be triggered again. - SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:""` // Current state of the alert's trigger status. This field is set to UNKNOWN // if the alert has not yet been evaluated or ran into an error during the // last evaluation. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Timestamp when the alert was last triggered, if the alert has been // triggered before. - TriggerTime types.String `tfsdk:"trigger_time" tf:"optional"` + TriggerTime types.String `tfsdk:"trigger_time" tf:""` // The timestamp indicating when the alert was updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *Alert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Alert_SdkV2) { @@ -123,6 +129,12 @@ func (newState *Alert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Alert_ func (newState *Alert_SdkV2) SyncEffectiveFieldsDuringRead(existingState Alert_SdkV2) { } +func (c Alert_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertCondition_SdkV2{}.ToSchema(cs, append(path, "condition")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Alert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -214,14 +226,14 @@ func (o *Alert_SdkV2) SetCondition(ctx context.Context, v AlertCondition_SdkV2) type AlertCondition_SdkV2 struct { // Alert state if result is empty. - EmptyResultState types.String `tfsdk:"empty_result_state" tf:"optional"` + EmptyResultState types.String `tfsdk:"empty_result_state" tf:""` // Operator used for comparison in alert evaluation. - Op types.String `tfsdk:"op" tf:"optional"` + Op types.String `tfsdk:"op" tf:""` // Name of the column from the query result to use for comparison in alert // evaluation. - Operand types.List `tfsdk:"operand" tf:"optional,object"` + Operand types.List `tfsdk:"operand" tf:"object"` // Threshold value used for comparison in alert evaluation. - Threshold types.List `tfsdk:"threshold" tf:"optional,object"` + Threshold types.List `tfsdk:"threshold" tf:"object"` } func (newState *AlertCondition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertCondition_SdkV2) { @@ -230,6 +242,13 @@ func (newState *AlertCondition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *AlertCondition_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertCondition_SdkV2) { } +func (c AlertCondition_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertConditionOperand_SdkV2{}.ToSchema(cs, append(path, "operand")...) + AlertConditionThreshold_SdkV2{}.ToSchema(cs, append(path, "threshold")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertCondition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -327,7 +346,7 @@ func (o *AlertCondition_SdkV2) SetThreshold(ctx context.Context, v AlertConditio } type AlertConditionOperand_SdkV2 struct { - Column types.List `tfsdk:"column" tf:"optional,object"` + Column types.List `tfsdk:"column" tf:"object"` } func (newState *AlertConditionOperand_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConditionOperand_SdkV2) { @@ -336,6 +355,12 @@ func (newState *AlertConditionOperand_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *AlertConditionOperand_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertConditionOperand_SdkV2) { } +func (c AlertConditionOperand_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertOperandColumn_SdkV2{}.ToSchema(cs, append(path, "column")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertConditionOperand. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -398,7 +423,7 @@ func (o *AlertConditionOperand_SdkV2) SetColumn(ctx context.Context, v AlertOper } type AlertConditionThreshold_SdkV2 struct { - Value types.List `tfsdk:"value" tf:"optional,object"` + Value types.List `tfsdk:"value" tf:"object"` } func (newState *AlertConditionThreshold_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConditionThreshold_SdkV2) { @@ -407,6 +432,12 @@ func (newState *AlertConditionThreshold_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *AlertConditionThreshold_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertConditionThreshold_SdkV2) { } +func (c AlertConditionThreshold_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertOperandValue_SdkV2{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertConditionThreshold. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -469,7 +500,7 @@ func (o *AlertConditionThreshold_SdkV2) SetValue(ctx context.Context, v AlertOpe } type AlertOperandColumn_SdkV2 struct { - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *AlertOperandColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertOperandColumn_SdkV2) { @@ -478,6 +509,11 @@ func (newState *AlertOperandColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *AlertOperandColumn_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertOperandColumn_SdkV2) { } +func (c AlertOperandColumn_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertOperandColumn. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -510,11 +546,11 @@ func (o AlertOperandColumn_SdkV2) Type(ctx context.Context) attr.Type { } type AlertOperandValue_SdkV2 struct { - BoolValue types.Bool `tfsdk:"bool_value" tf:"optional"` + BoolValue types.Bool `tfsdk:"bool_value" tf:""` - DoubleValue types.Float64 `tfsdk:"double_value" tf:"optional"` + DoubleValue types.Float64 `tfsdk:"double_value" tf:""` - StringValue types.String `tfsdk:"string_value" tf:"optional"` + StringValue types.String `tfsdk:"string_value" tf:""` } func (newState *AlertOperandValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertOperandValue_SdkV2) { @@ -523,6 +559,11 @@ func (newState *AlertOperandValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *AlertOperandValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertOperandValue_SdkV2) { } +func (c AlertOperandValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertOperandValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -566,18 +607,18 @@ type AlertOptions_SdkV2 struct { // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This includes email // subject, Slack notification header, etc. See [here] for custom templating // instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // State that alert evaluates to when query result is empty. - EmptyResultState types.String `tfsdk:"empty_result_state" tf:"optional"` + EmptyResultState types.String `tfsdk:"empty_result_state" tf:""` // Whether or not the alert is muted. If an alert is muted, it will not // notify users and notification destinations when triggered. - Muted types.Bool `tfsdk:"muted" tf:"optional"` + Muted types.Bool `tfsdk:"muted" tf:""` // Operator used to compare in alert evaluation: `>`, `>=`, `<`, `<=`, `==`, // `!=` Op types.String `tfsdk:"op" tf:""` @@ -592,6 +633,14 @@ func (newState *AlertOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AlertOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertOptions_SdkV2) { } +func (c AlertOptions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "column")...) + cs.SetRequired(append(path, "op")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -637,44 +686,44 @@ func (o AlertOptions_SdkV2) Type(ctx context.Context) attr.Type { type AlertQuery_SdkV2 struct { // The timestamp when this query was created. - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // Data source ID maps to the ID of the data source used by the resource and // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + DataSourceId types.String `tfsdk:"data_source_id" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Query ID. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Indicates whether the query is trashed. Trashed queries can't be used in // dashboards, or appear in search results. If this boolean is `true`, the // `options` property for this query includes a `moved_to_trash_at` // timestamp. Trashed queries are permanently deleted after 30 days. - IsArchived types.Bool `tfsdk:"is_archived" tf:"optional"` + IsArchived types.Bool `tfsdk:"is_archived" tf:""` // Whether the query is a draft. Draft queries only appear in list views for // their owners. Visualizations from draft queries cannot appear on // dashboards. - IsDraft types.Bool `tfsdk:"is_draft" tf:"optional"` + IsDraft types.Bool `tfsdk:"is_draft" tf:""` // Text parameter types are not safe from SQL injection for all types of // data source. Set this Boolean parameter to `true` if a query either does // not use any text type parameters or uses a data source type where text // type parameters are handled safely. - IsSafe types.Bool `tfsdk:"is_safe" tf:"optional"` + IsSafe types.Bool `tfsdk:"is_safe" tf:""` // The title of this query that appears in list views, widget headings, and // on the query page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.List `tfsdk:"options" tf:"object"` // The text of the query to be run. - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The timestamp at which this query was last updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` // The ID of the user who owns the query. - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` } func (newState *AlertQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertQuery_SdkV2) { @@ -683,6 +732,12 @@ func (newState *AlertQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan A func (newState *AlertQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertQuery_SdkV2) { } +func (c AlertQuery_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryOptions_SdkV2{}.ToSchema(cs, append(path, "options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -803,13 +858,13 @@ func (o *AlertQuery_SdkV2) SetTags(ctx context.Context, v []types.String) { type BaseChunkInfo_SdkV2 struct { // The number of bytes in the result chunk. This field is not available when // using `INLINE` disposition. - ByteCount types.Int64 `tfsdk:"byte_count" tf:"optional"` + ByteCount types.Int64 `tfsdk:"byte_count" tf:""` // The position within the sequence of result set chunks. - ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:"optional"` + ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:""` // The number of rows within the result chunk. - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` // The starting row offset within the result set. - RowOffset types.Int64 `tfsdk:"row_offset" tf:"optional"` + RowOffset types.Int64 `tfsdk:"row_offset" tf:""` } func (newState *BaseChunkInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseChunkInfo_SdkV2) { @@ -818,6 +873,11 @@ func (newState *BaseChunkInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *BaseChunkInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState BaseChunkInfo_SdkV2) { } +func (c BaseChunkInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BaseChunkInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -862,12 +922,6 @@ type CancelExecutionRequest_SdkV2 struct { StatementId types.String `tfsdk:"-"` } -func (newState *CancelExecutionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelExecutionRequest_SdkV2) { -} - -func (newState *CancelExecutionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelExecutionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelExecutionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -902,12 +956,6 @@ func (o CancelExecutionRequest_SdkV2) Type(ctx context.Context) attr.Type { type CancelExecutionResponse_SdkV2 struct { } -func (newState *CancelExecutionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelExecutionResponse_SdkV2) { -} - -func (newState *CancelExecutionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelExecutionResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelExecutionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -938,9 +986,9 @@ func (o CancelExecutionResponse_SdkV2) Type(ctx context.Context) attr.Type { // Configures the channel name and DBSQL version of the warehouse. // CHANNEL_NAME_CUSTOM should be chosen only when `dbsql_version` is specified. type Channel_SdkV2 struct { - DbsqlVersion types.String `tfsdk:"dbsql_version" tf:"optional"` + DbsqlVersion types.String `tfsdk:"dbsql_version" tf:""` - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *Channel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Channel_SdkV2) { @@ -949,6 +997,11 @@ func (newState *Channel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Chan func (newState *Channel_SdkV2) SyncEffectiveFieldsDuringRead(existingState Channel_SdkV2) { } +func (c Channel_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Channel. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -985,9 +1038,9 @@ func (o Channel_SdkV2) Type(ctx context.Context) attr.Type { // Details about a Channel. type ChannelInfo_SdkV2 struct { // DB SQL Version the Channel is mapped to. - DbsqlVersion types.String `tfsdk:"dbsql_version" tf:"optional"` + DbsqlVersion types.String `tfsdk:"dbsql_version" tf:""` // Name of the channel - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ChannelInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChannelInfo_SdkV2) { @@ -996,6 +1049,11 @@ func (newState *ChannelInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ChannelInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ChannelInfo_SdkV2) { } +func (c ChannelInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ChannelInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1031,22 +1089,22 @@ func (o ChannelInfo_SdkV2) Type(ctx context.Context) attr.Type { type ColumnInfo_SdkV2 struct { // The name of the column. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The ordinal position of the column (starting at position 0). - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The format of the interval type. - TypeIntervalType types.String `tfsdk:"type_interval_type" tf:"optional"` + TypeIntervalType types.String `tfsdk:"type_interval_type" tf:""` // The name of the base data type. This doesn't include details for complex // types such as STRUCT, MAP or ARRAY. - TypeName types.String `tfsdk:"type_name" tf:"optional"` + TypeName types.String `tfsdk:"type_name" tf:""` // Specifies the number of digits in a number. This applies to the DECIMAL // type. - TypePrecision types.Int64 `tfsdk:"type_precision" tf:"optional"` + TypePrecision types.Int64 `tfsdk:"type_precision" tf:""` // Specifies the number of digits to the right of the decimal point in a // number. This applies to the DECIMAL type. - TypeScale types.Int64 `tfsdk:"type_scale" tf:"optional"` + TypeScale types.Int64 `tfsdk:"type_scale" tf:""` // The full SQL type specification. - TypeText types.String `tfsdk:"type_text" tf:"optional"` + TypeText types.String `tfsdk:"type_text" tf:""` } func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnInfo_SdkV2) { @@ -1055,6 +1113,11 @@ func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ColumnInfo_SdkV2) { } +func (c ColumnInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1104,13 +1167,13 @@ type CreateAlert_SdkV2 struct { // Alert configuration options. Options types.List `tfsdk:"options" tf:"object"` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // Query ID. QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds after being triggered before the alert rearms itself // and can be triggered again. If `null`, alert will never be triggered // again. - Rearm types.Int64 `tfsdk:"rearm" tf:"optional"` + Rearm types.Int64 `tfsdk:"rearm" tf:""` } func (newState *CreateAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlert_SdkV2) { @@ -1119,6 +1182,15 @@ func (newState *CreateAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAlert_SdkV2) { } +func (c CreateAlert_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "options")...) + AlertOptions_SdkV2{}.ToSchema(cs, append(path, "options")...) + cs.SetRequired(append(path, "query_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1189,7 +1261,7 @@ func (o *CreateAlert_SdkV2) SetOptions(ctx context.Context, v AlertOptions_SdkV2 } type CreateAlertRequest_SdkV2 struct { - Alert types.List `tfsdk:"alert" tf:"optional,object"` + Alert types.List `tfsdk:"alert" tf:"object"` } func (newState *CreateAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlertRequest_SdkV2) { @@ -1198,6 +1270,12 @@ func (newState *CreateAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAlertRequest_SdkV2) { } +func (c CreateAlertRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateAlertRequestAlert_SdkV2{}.ToSchema(cs, append(path, "alert")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAlertRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1261,30 +1339,30 @@ func (o *CreateAlertRequest_SdkV2) SetAlert(ctx context.Context, v CreateAlertRe type CreateAlertRequestAlert_SdkV2 struct { // Trigger conditions of the alert. - Condition types.List `tfsdk:"condition" tf:"optional,object"` + Condition types.List `tfsdk:"condition" tf:"object"` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This can include // email subject entries and Slack notification headers, for example. See // [here] for custom templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The display name of the alert. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Whether to notify alert subscribers when alert returns back to normal. - NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:""` // The workspace path of the folder containing the alert. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // UUID of the query attached to the alert. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds an alert must wait after being triggered to rearm // itself. After rearming, it can be triggered again. If 0 or not specified, // the alert will not be triggered again. - SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:""` } func (newState *CreateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlertRequestAlert_SdkV2) { @@ -1293,6 +1371,12 @@ func (newState *CreateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *CreateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAlertRequestAlert_SdkV2) { } +func (c CreateAlertRequestAlert_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertCondition_SdkV2{}.ToSchema(cs, append(path, "condition")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAlertRequestAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1369,7 +1453,7 @@ func (o *CreateAlertRequestAlert_SdkV2) SetCondition(ctx context.Context, v Aler } type CreateQueryRequest_SdkV2 struct { - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.List `tfsdk:"query" tf:"object"` } func (newState *CreateQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryRequest_SdkV2) { @@ -1378,6 +1462,12 @@ func (newState *CreateQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateQueryRequest_SdkV2) { } +func (c CreateQueryRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateQueryRequestQuery_SdkV2{}.ToSchema(cs, append(path, "query")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1441,29 +1531,29 @@ func (o *CreateQueryRequest_SdkV2) SetQuery(ctx context.Context, v CreateQueryRe type CreateQueryRequestQuery_SdkV2 struct { // Whether to apply a 1000 row limit to the query result. - ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:""` // Name of the catalog where this query will be executed. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Display name of the query that appears in list views, widget headings, // and on the query page. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // List of query parameter definitions. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Workspace path of the workspace folder containing the object. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // Text of the query to be run. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Sets the "Run as" role for the object. - RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + RunAsMode types.String `tfsdk:"run_as_mode" tf:""` // Name of the schema where this query will be executed. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // ID of the SQL warehouse attached to the query. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *CreateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryRequestQuery_SdkV2) { @@ -1472,6 +1562,12 @@ func (newState *CreateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *CreateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateQueryRequestQuery_SdkV2) { } +func (c CreateQueryRequestQuery_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryParameter_SdkV2{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateQueryRequestQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1586,10 +1682,10 @@ func (o *CreateQueryRequestQuery_SdkV2) SetTags(ctx context.Context, v []types.S type CreateQueryVisualizationsLegacyRequest_SdkV2 struct { // A short description of this visualization. This is not displayed in the // UI. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The name of the visualization that appears on dashboards and the query // screen. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The options object varies widely from one visualization type to the next // and is unsupported. Databricks does not recommend modifying visualization // settings in JSON. @@ -1600,12 +1696,6 @@ type CreateQueryVisualizationsLegacyRequest_SdkV2 struct { Type_ types.String `tfsdk:"type" tf:""` } -func (newState *CreateQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryVisualizationsLegacyRequest_SdkV2) { -} - -func (newState *CreateQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateQueryVisualizationsLegacyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateQueryVisualizationsLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1646,7 +1736,7 @@ func (o CreateQueryVisualizationsLegacyRequest_SdkV2) Type(ctx context.Context) } type CreateVisualizationRequest_SdkV2 struct { - Visualization types.List `tfsdk:"visualization" tf:"optional,object"` + Visualization types.List `tfsdk:"visualization" tf:"object"` } func (newState *CreateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVisualizationRequest_SdkV2) { @@ -1655,6 +1745,12 @@ func (newState *CreateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *CreateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVisualizationRequest_SdkV2) { } +func (c CreateVisualizationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateVisualizationRequestVisualization_SdkV2{}.ToSchema(cs, append(path, "visualization")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVisualizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1718,19 +1814,19 @@ func (o *CreateVisualizationRequest_SdkV2) SetVisualization(ctx context.Context, type CreateVisualizationRequestVisualization_SdkV2 struct { // The display name of the visualization. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID of the query that the visualization is attached to. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // The visualization options varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying // visualization options directly. - SerializedOptions types.String `tfsdk:"serialized_options" tf:"optional"` + SerializedOptions types.String `tfsdk:"serialized_options" tf:""` // The visualization query plan varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying the // visualization query plan directly. - SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:"optional"` + SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:""` // The type of visualization: counter, table, funnel, and so on. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *CreateVisualizationRequestVisualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVisualizationRequestVisualization_SdkV2) { @@ -1739,6 +1835,11 @@ func (newState *CreateVisualizationRequestVisualization_SdkV2) SyncEffectiveFiel func (newState *CreateVisualizationRequestVisualization_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVisualizationRequestVisualization_SdkV2) { } +func (c CreateVisualizationRequestVisualization_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVisualizationRequestVisualization. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1787,33 +1888,33 @@ type CreateWarehouseRequest_SdkV2 struct { // autostop. // // Defaults to 120 mins - AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:""` // Channel Details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.List `tfsdk:"channel" tf:"object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. // // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large // - 2X-Large - 3X-Large - 4X-Large - ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + ClusterSize types.String `tfsdk:"cluster_size" tf:""` // warehouse creator name - CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + CreatorName types.String `tfsdk:"creator_name" tf:""` // Configures whether the warehouse should use Photon optimized clusters. // // Defaults to false. - EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:""` // Configures whether the warehouse should use serverless compute - EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:""` // Deprecated. Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // Maximum number of clusters that the autoscaler will create to handle // concurrent queries. // // Supported values: - Must be >= min_num_clusters - Must be <= 30. // // Defaults to min_clusters if unset. - MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:""` // Minimum number of available clusters that will be maintained for this SQL // warehouse. Increasing this will ensure that a larger number of clusters // are always running and therefore may reduce the cold start time for new @@ -1823,23 +1924,23 @@ type CreateWarehouseRequest_SdkV2 struct { // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) // // Defaults to 1 - MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:""` // Logical name for the cluster. // // Supported values: - Must be unique within an org. - Must be less than 100 // characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Configurations whether the warehouse should use spot instances. - SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:""` // A set of key-value pairs that will be tagged on all resources (e.g., AWS // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.List `tfsdk:"tags" tf:"optional,object"` + Tags types.List `tfsdk:"tags" tf:"object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *CreateWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWarehouseRequest_SdkV2) { @@ -1848,6 +1949,13 @@ func (newState *CreateWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *CreateWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWarehouseRequest_SdkV2) { } +func (c CreateWarehouseRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel_SdkV2{}.ToSchema(cs, append(path, "channel")...) + EndpointTags_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWarehouseRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1964,7 +2072,7 @@ func (o *CreateWarehouseRequest_SdkV2) SetTags(ctx context.Context, v EndpointTa type CreateWarehouseResponse_SdkV2 struct { // Id for the SQL warehouse. This value is unique across all SQL warehouses. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *CreateWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWarehouseResponse_SdkV2) { @@ -1973,6 +2081,11 @@ func (newState *CreateWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *CreateWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWarehouseResponse_SdkV2) { } +func (c CreateWarehouseResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2014,9 +2127,9 @@ type CreateWidget_SdkV2 struct { // If this is a textbox widget, the application displays this text. This // field is ignored if the widget contains a visualization in the // `visualization` field. - Text types.String `tfsdk:"text" tf:"optional"` + Text types.String `tfsdk:"text" tf:""` // Query Vizualization ID returned by :method:queryvisualizations/create. - VisualizationId types.String `tfsdk:"visualization_id" tf:"optional"` + VisualizationId types.String `tfsdk:"visualization_id" tf:""` // Width of a widget Width types.Int64 `tfsdk:"width" tf:""` } @@ -2027,6 +2140,16 @@ func (newState *CreateWidget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateWidget_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWidget_SdkV2) { } +func (c CreateWidget_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "options")...) + WidgetOptions_SdkV2{}.ToSchema(cs, append(path, "options")...) + cs.SetRequired(append(path, "width")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWidget. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2102,49 +2225,49 @@ func (o *CreateWidget_SdkV2) SetOptions(ctx context.Context, v WidgetOptions_Sdk // boxes. type Dashboard_SdkV2 struct { // Whether the authenticated user can edit the query definition. - CanEdit types.Bool `tfsdk:"can_edit" tf:"optional"` + CanEdit types.Bool `tfsdk:"can_edit" tf:""` // Timestamp when this dashboard was created. - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // In the web application, query filters that share a name are coupled to a // single selection box if this value is `true`. - DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:"optional"` + DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:""` // The ID for this dashboard. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Indicates whether a dashboard is trashed. Trashed dashboards won't appear // in list views. If this boolean is `true`, the `options` property for this // dashboard includes a `moved_to_trash_at` timestamp. Items in trash are // permanently deleted after 30 days. - IsArchived types.Bool `tfsdk:"is_archived" tf:"optional"` + IsArchived types.Bool `tfsdk:"is_archived" tf:""` // Whether a dashboard is a draft. Draft dashboards only appear in list // views for their owners. - IsDraft types.Bool `tfsdk:"is_draft" tf:"optional"` + IsDraft types.Bool `tfsdk:"is_draft" tf:""` // Indicates whether this query object appears in the current user's // favorites list. This flag determines whether the star icon for favorites // is selected. - IsFavorite types.Bool `tfsdk:"is_favorite" tf:"optional"` + IsFavorite types.Bool `tfsdk:"is_favorite" tf:""` // The title of the dashboard that appears in list views and at the top of // the dashboard page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.List `tfsdk:"options" tf:"object"` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * // `CAN_EDIT`: Can edit the query * `CAN_MANAGE`: Can manage the query - PermissionTier types.String `tfsdk:"permission_tier" tf:"optional"` + PermissionTier types.String `tfsdk:"permission_tier" tf:""` // URL slug. Usually mirrors the query name with dashes (`-`) instead of // spaces. Appears in the URL for this query. - Slug types.String `tfsdk:"slug" tf:"optional"` + Slug types.String `tfsdk:"slug" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // Timestamp when this dashboard was last updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` - User types.List `tfsdk:"user" tf:"optional,object"` + User types.List `tfsdk:"user" tf:"object"` // The ID of the user who owns the dashboard. - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` - Widgets types.List `tfsdk:"widgets" tf:"optional"` + Widgets types.List `tfsdk:"widgets" tf:""` } func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dashboard_SdkV2) { @@ -2153,6 +2276,14 @@ func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Da func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState Dashboard_SdkV2) { } +func (c Dashboard_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DashboardOptions_SdkV2{}.ToSchema(cs, append(path, "options")...) + User_SdkV2{}.ToSchema(cs, append(path, "user")...) + Widget_SdkV2{}.ToSchema(cs, append(path, "widgets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Dashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2337,13 +2468,13 @@ type DashboardEditContent_SdkV2 struct { DashboardId types.String `tfsdk:"-"` // The title of this dashboard that appears in list views and at the top of // the dashboard page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *DashboardEditContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardEditContent_SdkV2) { @@ -2352,6 +2483,12 @@ func (newState *DashboardEditContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *DashboardEditContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState DashboardEditContent_SdkV2) { } +func (c DashboardEditContent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DashboardEditContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2423,7 +2560,7 @@ type DashboardOptions_SdkV2 struct { // The timestamp when this dashboard was moved to trash. Only present when // the `is_archived` property is `true`. Trashed items are deleted after // thirty days. - MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:"optional"` + MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:""` } func (newState *DashboardOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardOptions_SdkV2) { @@ -2432,6 +2569,11 @@ func (newState *DashboardOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *DashboardOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState DashboardOptions_SdkV2) { } +func (c DashboardOptions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DashboardOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2465,21 +2607,21 @@ func (o DashboardOptions_SdkV2) Type(ctx context.Context) attr.Type { type DashboardPostContent_SdkV2 struct { // Indicates whether the dashboard filters are enabled - DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:"optional"` + DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:""` // Indicates whether this dashboard object should appear in the current // user's favorites list. - IsFavorite types.Bool `tfsdk:"is_favorite" tf:"optional"` + IsFavorite types.Bool `tfsdk:"is_favorite" tf:""` // The title of this dashboard that appears in list views and at the top of // the dashboard page. Name types.String `tfsdk:"name" tf:""` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *DashboardPostContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardPostContent_SdkV2) { @@ -2488,6 +2630,12 @@ func (newState *DashboardPostContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *DashboardPostContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState DashboardPostContent_SdkV2) { } +func (c DashboardPostContent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DashboardPostContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2565,26 +2713,26 @@ type DataSource_SdkV2 struct { // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The string name of this data source / SQL warehouse as it appears in the // Databricks SQL web application. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Reserved for internal use. - PauseReason types.String `tfsdk:"pause_reason" tf:"optional"` + PauseReason types.String `tfsdk:"pause_reason" tf:""` // Reserved for internal use. - Paused types.Int64 `tfsdk:"paused" tf:"optional"` + Paused types.Int64 `tfsdk:"paused" tf:""` // Reserved for internal use. - SupportsAutoLimit types.Bool `tfsdk:"supports_auto_limit" tf:"optional"` + SupportsAutoLimit types.Bool `tfsdk:"supports_auto_limit" tf:""` // Reserved for internal use. - Syntax types.String `tfsdk:"syntax" tf:"optional"` + Syntax types.String `tfsdk:"syntax" tf:""` // The type of data source. For SQL warehouses, this will be // `databricks_internal`. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` // Reserved for internal use. - ViewOnly types.Bool `tfsdk:"view_only" tf:"optional"` + ViewOnly types.Bool `tfsdk:"view_only" tf:""` // The ID of the associated SQL warehouse, if this data source is backed by // a SQL warehouse. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *DataSource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataSource_SdkV2) { @@ -2593,6 +2741,11 @@ func (newState *DataSource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan D func (newState *DataSource_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataSource_SdkV2) { } +func (c DataSource_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataSource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2652,6 +2805,13 @@ func (newState *DateRange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Da func (newState *DateRange_SdkV2) SyncEffectiveFieldsDuringRead(existingState DateRange_SdkV2) { } +func (c DateRange_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "end")...) + cs.SetRequired(append(path, "start")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DateRange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2687,14 +2847,14 @@ func (o DateRange_SdkV2) Type(ctx context.Context) attr.Type { type DateRangeValue_SdkV2 struct { // Manually specified date-time range value. - DateRangeValue types.List `tfsdk:"date_range_value" tf:"optional,object"` + DateRangeValue types.List `tfsdk:"date_range_value" tf:"object"` // Dynamic date-time range value based on current date-time. - DynamicDateRangeValue types.String `tfsdk:"dynamic_date_range_value" tf:"optional"` + DynamicDateRangeValue types.String `tfsdk:"dynamic_date_range_value" tf:""` // Date-time precision to format the value into when the query is run. // Defaults to DAY_PRECISION (YYYY-MM-DD). - Precision types.String `tfsdk:"precision" tf:"optional"` + Precision types.String `tfsdk:"precision" tf:""` - StartDayOfWeek types.Int64 `tfsdk:"start_day_of_week" tf:"optional"` + StartDayOfWeek types.Int64 `tfsdk:"start_day_of_week" tf:""` } func (newState *DateRangeValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DateRangeValue_SdkV2) { @@ -2703,6 +2863,12 @@ func (newState *DateRangeValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DateRangeValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState DateRangeValue_SdkV2) { } +func (c DateRangeValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DateRange_SdkV2{}.ToSchema(cs, append(path, "date_range_value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DateRangeValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2772,12 +2938,12 @@ func (o *DateRangeValue_SdkV2) SetDateRangeValue(ctx context.Context, v DateRang type DateValue_SdkV2 struct { // Manually specified date-time value. - DateValue types.String `tfsdk:"date_value" tf:"optional"` + DateValue types.String `tfsdk:"date_value" tf:""` // Dynamic date-time value based on current date-time. - DynamicDateValue types.String `tfsdk:"dynamic_date_value" tf:"optional"` + DynamicDateValue types.String `tfsdk:"dynamic_date_value" tf:""` // Date-time precision to format the value into when the query is run. // Defaults to DAY_PRECISION (YYYY-MM-DD). - Precision types.String `tfsdk:"precision" tf:"optional"` + Precision types.String `tfsdk:"precision" tf:""` } func (newState *DateValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DateValue_SdkV2) { @@ -2786,6 +2952,11 @@ func (newState *DateValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Da func (newState *DateValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState DateValue_SdkV2) { } +func (c DateValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DateValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2826,12 +2997,6 @@ type DeleteAlertsLegacyRequest_SdkV2 struct { AlertId types.String `tfsdk:"-"` } -func (newState *DeleteAlertsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAlertsLegacyRequest_SdkV2) { -} - -func (newState *DeleteAlertsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAlertsLegacyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAlertsLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2868,12 +3033,6 @@ type DeleteDashboardRequest_SdkV2 struct { DashboardId types.String `tfsdk:"-"` } -func (newState *DeleteDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDashboardRequest_SdkV2) { -} - -func (newState *DeleteDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDashboardRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2911,12 +3070,6 @@ type DeleteDashboardWidgetRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteDashboardWidgetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDashboardWidgetRequest_SdkV2) { -} - -func (newState *DeleteDashboardWidgetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDashboardWidgetRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDashboardWidgetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2953,12 +3106,6 @@ type DeleteQueriesLegacyRequest_SdkV2 struct { QueryId types.String `tfsdk:"-"` } -func (newState *DeleteQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteQueriesLegacyRequest_SdkV2) { -} - -func (newState *DeleteQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteQueriesLegacyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQueriesLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2996,12 +3143,6 @@ type DeleteQueryVisualizationsLegacyRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteQueryVisualizationsLegacyRequest_SdkV2) { -} - -func (newState *DeleteQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteQueryVisualizationsLegacyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQueryVisualizationsLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3036,12 +3177,6 @@ func (o DeleteQueryVisualizationsLegacyRequest_SdkV2) Type(ctx context.Context) type DeleteResponse_SdkV2 struct { } -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { -} - -func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3074,12 +3209,6 @@ type DeleteVisualizationRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteVisualizationRequest_SdkV2) { -} - -func (newState *DeleteVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteVisualizationRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteVisualizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3117,12 +3246,6 @@ type DeleteWarehouseRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWarehouseRequest_SdkV2) { -} - -func (newState *DeleteWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWarehouseRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWarehouseRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3163,6 +3286,11 @@ func (newState *DeleteWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *DeleteWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWarehouseResponse_SdkV2) { } +func (c DeleteWarehouseResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3201,7 +3329,7 @@ type EditAlert_SdkV2 struct { // Number of seconds after being triggered before the alert rearms itself // and can be triggered again. If `null`, alert will never be triggered // again. - Rearm types.Int64 `tfsdk:"rearm" tf:"optional"` + Rearm types.Int64 `tfsdk:"rearm" tf:""` } func (newState *EditAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditAlert_SdkV2) { @@ -3210,6 +3338,16 @@ func (newState *EditAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ed func (newState *EditAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditAlert_SdkV2) { } +func (c EditAlert_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "alert_id")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "options")...) + AlertOptions_SdkV2{}.ToSchema(cs, append(path, "options")...) + cs.SetRequired(append(path, "query_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3286,35 +3424,35 @@ type EditWarehouseRequest_SdkV2 struct { // Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. // // Defaults to 120 mins - AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:""` // Channel Details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.List `tfsdk:"channel" tf:"object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. // // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large // - 2X-Large - 3X-Large - 4X-Large - ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + ClusterSize types.String `tfsdk:"cluster_size" tf:""` // warehouse creator name - CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + CreatorName types.String `tfsdk:"creator_name" tf:""` // Configures whether the warehouse should use Photon optimized clusters. // // Defaults to false. - EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:""` // Configures whether the warehouse should use serverless compute. - EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:""` // Required. Id of the warehouse to configure. Id types.String `tfsdk:"-"` // Deprecated. Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // Maximum number of clusters that the autoscaler will create to handle // concurrent queries. // // Supported values: - Must be >= min_num_clusters - Must be <= 30. // // Defaults to min_clusters if unset. - MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:""` // Minimum number of available clusters that will be maintained for this SQL // warehouse. Increasing this will ensure that a larger number of clusters // are always running and therefore may reduce the cold start time for new @@ -3324,23 +3462,23 @@ type EditWarehouseRequest_SdkV2 struct { // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) // // Defaults to 1 - MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:""` // Logical name for the cluster. // // Supported values: - Must be unique within an org. - Must be less than 100 // characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Configurations whether the warehouse should use spot instances. - SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:""` // A set of key-value pairs that will be tagged on all resources (e.g., AWS // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.List `tfsdk:"tags" tf:"optional,object"` + Tags types.List `tfsdk:"tags" tf:"object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *EditWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditWarehouseRequest_SdkV2) { @@ -3349,6 +3487,14 @@ func (newState *EditWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *EditWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditWarehouseRequest_SdkV2) { } +func (c EditWarehouseRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel_SdkV2{}.ToSchema(cs, append(path, "channel")...) + cs.SetRequired(append(path, "id")...) + EndpointTags_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditWarehouseRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3474,6 +3620,11 @@ func (newState *EditWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *EditWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditWarehouseResponse_SdkV2) { } +func (c EditWarehouseResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3512,6 +3663,11 @@ func (newState *Empty_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Empty_ func (newState *Empty_SdkV2) SyncEffectiveFieldsDuringRead(existingState Empty_SdkV2) { } +func (c Empty_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Empty. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3540,9 +3696,9 @@ func (o Empty_SdkV2) Type(ctx context.Context) attr.Type { } type EndpointConfPair_SdkV2 struct { - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *EndpointConfPair_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointConfPair_SdkV2) { @@ -3551,6 +3707,11 @@ func (newState *EndpointConfPair_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *EndpointConfPair_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointConfPair_SdkV2) { } +func (c EndpointConfPair_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointConfPair. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3586,17 +3747,17 @@ func (o EndpointConfPair_SdkV2) Type(ctx context.Context) attr.Type { type EndpointHealth_SdkV2 struct { // Details about errors that are causing current degraded/failed status. - Details types.String `tfsdk:"details" tf:"optional"` + Details types.String `tfsdk:"details" tf:""` // The reason for failure to bring up clusters for this warehouse. This is // available when status is 'FAILED' and sometimes when it is DEGRADED. - FailureReason types.List `tfsdk:"failure_reason" tf:"optional,object"` + FailureReason types.List `tfsdk:"failure_reason" tf:"object"` // Deprecated. split into summary and details for security - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Health status of the warehouse. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // A short summary of the health status in case of degraded/failed // warehouses. - Summary types.String `tfsdk:"summary" tf:"optional"` + Summary types.String `tfsdk:"summary" tf:""` } func (newState *EndpointHealth_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointHealth_SdkV2) { @@ -3605,6 +3766,12 @@ func (newState *EndpointHealth_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *EndpointHealth_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointHealth_SdkV2) { } +func (c EndpointHealth_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TerminationReason_SdkV2{}.ToSchema(cs, append(path, "failure_reason")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointHealth. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3681,40 +3848,40 @@ type EndpointInfo_SdkV2 struct { // Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. // // Defaults to 120 mins - AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:""` // Channel Details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.List `tfsdk:"channel" tf:"object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. // // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large // - 2X-Large - 3X-Large - 4X-Large - ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + ClusterSize types.String `tfsdk:"cluster_size" tf:""` // warehouse creator name - CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + CreatorName types.String `tfsdk:"creator_name" tf:""` // Configures whether the warehouse should use Photon optimized clusters. // // Defaults to false. - EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:""` // Configures whether the warehouse should use serverless compute - EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:""` // Optional health status. Assume the warehouse is healthy if this field is // not set. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.List `tfsdk:"health" tf:"object"` // unique identifier for warehouse - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Deprecated. Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // the jdbc connection string for this warehouse - JdbcUrl types.String `tfsdk:"jdbc_url" tf:"optional"` + JdbcUrl types.String `tfsdk:"jdbc_url" tf:""` // Maximum number of clusters that the autoscaler will create to handle // concurrent queries. // // Supported values: - Must be >= min_num_clusters - Must be <= 30. // // Defaults to min_clusters if unset. - MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:""` // Minimum number of available clusters that will be maintained for this SQL // warehouse. Increasing this will ensure that a larger number of clusters // are always running and therefore may reduce the cold start time for new @@ -3724,31 +3891,31 @@ type EndpointInfo_SdkV2 struct { // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) // // Defaults to 1 - MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:""` // Logical name for the cluster. // // Supported values: - Must be unique within an org. - Must be less than 100 // characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // current number of active sessions for the warehouse - NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:"optional"` + NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:""` // current number of clusters running for the service - NumClusters types.Int64 `tfsdk:"num_clusters" tf:"optional"` + NumClusters types.Int64 `tfsdk:"num_clusters" tf:""` // ODBC parameters for the SQL warehouse - OdbcParams types.List `tfsdk:"odbc_params" tf:"optional,object"` + OdbcParams types.List `tfsdk:"odbc_params" tf:"object"` // Configurations whether the warehouse should use spot instances. - SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:""` // State of the warehouse - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // A set of key-value pairs that will be tagged on all resources (e.g., AWS // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.List `tfsdk:"tags" tf:"optional,object"` + Tags types.List `tfsdk:"tags" tf:"object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointInfo_SdkV2) { @@ -3757,6 +3924,15 @@ func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointInfo_SdkV2) { } +func (c EndpointInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel_SdkV2{}.ToSchema(cs, append(path, "channel")...) + EndpointHealth_SdkV2{}.ToSchema(cs, append(path, "health")...) + OdbcParams_SdkV2{}.ToSchema(cs, append(path, "odbc_params")...) + EndpointTags_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3944,9 +4120,9 @@ func (o *EndpointInfo_SdkV2) SetTags(ctx context.Context, v EndpointTags_SdkV2) } type EndpointTagPair_SdkV2 struct { - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *EndpointTagPair_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointTagPair_SdkV2) { @@ -3955,6 +4131,11 @@ func (newState *EndpointTagPair_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *EndpointTagPair_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointTagPair_SdkV2) { } +func (c EndpointTagPair_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointTagPair. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3989,7 +4170,7 @@ func (o EndpointTagPair_SdkV2) Type(ctx context.Context) attr.Type { } type EndpointTags_SdkV2 struct { - CustomTags types.List `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.List `tfsdk:"custom_tags" tf:""` } func (newState *EndpointTags_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointTags_SdkV2) { @@ -3998,6 +4179,12 @@ func (newState *EndpointTags_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EndpointTags_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointTags_SdkV2) { } +func (c EndpointTags_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointTagPair_SdkV2{}.ToSchema(cs, append(path, "custom_tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointTags. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4061,11 +4248,11 @@ func (o *EndpointTags_SdkV2) SetCustomTags(ctx context.Context, v []EndpointTagP type EnumValue_SdkV2 struct { // List of valid query parameter values, newline delimited. - EnumOptions types.String `tfsdk:"enum_options" tf:"optional"` + EnumOptions types.String `tfsdk:"enum_options" tf:""` // If specified, allows multiple values to be selected for this parameter. - MultiValuesOptions types.List `tfsdk:"multi_values_options" tf:"optional,object"` + MultiValuesOptions types.List `tfsdk:"multi_values_options" tf:"object"` // List of selected query parameter values. - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *EnumValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnumValue_SdkV2) { @@ -4074,6 +4261,12 @@ func (newState *EnumValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan En func (newState *EnumValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnumValue_SdkV2) { } +func (c EnumValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MultiValuesOptions_SdkV2{}.ToSchema(cs, append(path, "multi_values_options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnumValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4175,14 +4368,14 @@ type ExecuteStatementRequest_SdkV2 struct { // byte limit, then `truncated` in the response is set to `true`. When using // `EXTERNAL_LINKS` disposition, a default `byte_limit` of 100 GiB is // applied if `byte_limit` is not explcitly set. - ByteLimit types.Int64 `tfsdk:"byte_limit" tf:"optional"` + ByteLimit types.Int64 `tfsdk:"byte_limit" tf:""` // Sets default catalog for statement execution, similar to [`USE CATALOG`] // in SQL. // // [`USE CATALOG`]: https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-catalog.html - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` - Disposition types.String `tfsdk:"disposition" tf:"optional"` + Disposition types.String `tfsdk:"disposition" tf:""` // Statement execution supports three result formats: `JSON_ARRAY` // (default), `ARROW_STREAM`, and `CSV`. // @@ -4219,7 +4412,7 @@ type ExecuteStatementRequest_SdkV2 struct { // // [Apache Arrow streaming format]: https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format // [RFC 4180]: https://www.rfc-editor.org/rfc/rfc4180 - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // When `wait_timeout > 0s`, the call will block up to the specified time. // If the statement execution doesn't finish within this time, // `on_wait_timeout` determines whether the execution should continue or be @@ -4228,7 +4421,7 @@ type ExecuteStatementRequest_SdkV2 struct { // polling with :method:statementexecution/getStatement. When set to // `CANCEL`, the statement execution is canceled and the call returns with a // `CANCELED` state. - OnWaitTimeout types.String `tfsdk:"on_wait_timeout" tf:"optional"` + OnWaitTimeout types.String `tfsdk:"on_wait_timeout" tf:""` // A list of parameters to pass into a SQL statement containing parameter // markers. A parameter consists of a name, a value, and optionally a type. // To represent a NULL value, the `value` field may be omitted or set to @@ -4259,16 +4452,16 @@ type ExecuteStatementRequest_SdkV2 struct { // // [Parameter markers]: https://docs.databricks.com/sql/language-manual/sql-ref-parameter-marker.html // [`cast` function]: https://docs.databricks.com/sql/language-manual/functions/cast.html - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Applies the given row limit to the statement's result set, but unlike the // `LIMIT` clause in SQL, it also sets the `truncated` field in the response // to indicate whether the result was trimmed due to the limit or not. - RowLimit types.Int64 `tfsdk:"row_limit" tf:"optional"` + RowLimit types.Int64 `tfsdk:"row_limit" tf:""` // Sets default schema for statement execution, similar to [`USE SCHEMA`] in // SQL. // // [`USE SCHEMA`]: https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-schema.html - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // The SQL statement to execute. The statement can optionally be // parameterized, see `parameters`. Statement types.String `tfsdk:"statement" tf:""` @@ -4286,7 +4479,7 @@ type ExecuteStatementRequest_SdkV2 struct { // manifest and result data (or a `FAILED` state in case of an execution // error). If the statement takes longer to execute, `on_wait_timeout` // determines what should happen after the timeout is reached. - WaitTimeout types.String `tfsdk:"wait_timeout" tf:"optional"` + WaitTimeout types.String `tfsdk:"wait_timeout" tf:""` // Warehouse upon which to execute a statement. See also [What are SQL // warehouses?] // @@ -4300,6 +4493,14 @@ func (newState *ExecuteStatementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ExecuteStatementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExecuteStatementRequest_SdkV2) { } +func (c ExecuteStatementRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StatementParameterListItem_SdkV2{}.ToSchema(cs, append(path, "parameters")...) + cs.SetRequired(append(path, "statement")...) + cs.SetRequired(append(path, "warehouse_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExecuteStatementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4384,34 +4585,34 @@ func (o *ExecuteStatementRequest_SdkV2) SetParameters(ctx context.Context, v []S type ExternalLink_SdkV2 struct { // The number of bytes in the result chunk. This field is not available when // using `INLINE` disposition. - ByteCount types.Int64 `tfsdk:"byte_count" tf:"optional"` + ByteCount types.Int64 `tfsdk:"byte_count" tf:""` // The position within the sequence of result set chunks. - ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:"optional"` + ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:""` // Indicates the date-time that the given external link will expire and // becomes invalid, after which point a new `external_link` must be // requested. - Expiration types.String `tfsdk:"expiration" tf:"optional"` + Expiration types.String `tfsdk:"expiration" tf:""` - ExternalLink types.String `tfsdk:"external_link" tf:"optional"` + ExternalLink types.String `tfsdk:"external_link" tf:""` // HTTP headers that must be included with a GET request to the // `external_link`. Each header is provided as a key-value pair. Headers are // typically used to pass a decryption key to the external service. The // values of these headers should be considered sensitive and the client // should not expose these values in a log. - HttpHeaders types.Map `tfsdk:"http_headers" tf:"optional"` + HttpHeaders types.Map `tfsdk:"http_headers" tf:""` // When fetching, provides the `chunk_index` for the _next_ chunk. If // absent, indicates there are no more chunks. The next chunk can be fetched // with a :method:statementexecution/getStatementResultChunkN request. - NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:"optional"` + NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:""` // When fetching, provides a link to fetch the _next_ chunk. If absent, // indicates there are no more chunks. This link is an absolute `path` to be // joined with your `$DATABRICKS_HOST`, and should be treated as an opaque // link. This is an alternative to using `next_chunk_index`. - NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:"optional"` + NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:""` // The number of rows within the result chunk. - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` // The starting row offset within the result set. - RowOffset types.Int64 `tfsdk:"row_offset" tf:"optional"` + RowOffset types.Int64 `tfsdk:"row_offset" tf:""` } func (newState *ExternalLink_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLink_SdkV2) { @@ -4420,6 +4621,11 @@ func (newState *ExternalLink_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ExternalLink_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLink_SdkV2) { } +func (c ExternalLink_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLink. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4502,12 +4708,6 @@ type GetAlertRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAlertRequest_SdkV2) { -} - -func (newState *GetAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAlertRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAlertRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4544,12 +4744,6 @@ type GetAlertsLegacyRequest_SdkV2 struct { AlertId types.String `tfsdk:"-"` } -func (newState *GetAlertsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAlertsLegacyRequest_SdkV2) { -} - -func (newState *GetAlertsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAlertsLegacyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAlertsLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4586,12 +4780,6 @@ type GetDashboardRequest_SdkV2 struct { DashboardId types.String `tfsdk:"-"` } -func (newState *GetDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDashboardRequest_SdkV2) { -} - -func (newState *GetDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDashboardRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4631,12 +4819,6 @@ type GetDbsqlPermissionRequest_SdkV2 struct { ObjectType types.String `tfsdk:"-"` } -func (newState *GetDbsqlPermissionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDbsqlPermissionRequest_SdkV2) { -} - -func (newState *GetDbsqlPermissionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDbsqlPermissionRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDbsqlPermissionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4675,12 +4857,6 @@ type GetQueriesLegacyRequest_SdkV2 struct { QueryId types.String `tfsdk:"-"` } -func (newState *GetQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQueriesLegacyRequest_SdkV2) { -} - -func (newState *GetQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQueriesLegacyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQueriesLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4717,12 +4893,6 @@ type GetQueryRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQueryRequest_SdkV2) { -} - -func (newState *GetQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQueryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4755,17 +4925,11 @@ func (o GetQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { } type GetResponse_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // An object's type and UUID, separated by a forward slash (/) character. - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` // A singular noun object type. - ObjectType types.String `tfsdk:"object_type" tf:"optional"` -} - -func (newState *GetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetResponse_SdkV2) { -} - -func (newState *GetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetResponse_SdkV2) { + ObjectType types.String `tfsdk:"object_type" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetResponse. @@ -4840,12 +5004,6 @@ type GetStatementRequest_SdkV2 struct { StatementId types.String `tfsdk:"-"` } -func (newState *GetStatementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatementRequest_SdkV2) { -} - -func (newState *GetStatementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatementRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4885,12 +5043,6 @@ type GetStatementResultChunkNRequest_SdkV2 struct { StatementId types.String `tfsdk:"-"` } -func (newState *GetStatementResultChunkNRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatementResultChunkNRequest_SdkV2) { -} - -func (newState *GetStatementResultChunkNRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatementResultChunkNRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatementResultChunkNRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4930,12 +5082,6 @@ type GetWarehousePermissionLevelsRequest_SdkV2 struct { WarehouseId types.String `tfsdk:"-"` } -func (newState *GetWarehousePermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehousePermissionLevelsRequest_SdkV2) { -} - -func (newState *GetWarehousePermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehousePermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehousePermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4969,7 +5115,7 @@ func (o GetWarehousePermissionLevelsRequest_SdkV2) Type(ctx context.Context) att type GetWarehousePermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetWarehousePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehousePermissionLevelsResponse_SdkV2) { @@ -4978,6 +5124,12 @@ func (newState *GetWarehousePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsD func (newState *GetWarehousePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehousePermissionLevelsResponse_SdkV2) { } +func (c GetWarehousePermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WarehousePermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehousePermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5045,12 +5197,6 @@ type GetWarehousePermissionsRequest_SdkV2 struct { WarehouseId types.String `tfsdk:"-"` } -func (newState *GetWarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehousePermissionsRequest_SdkV2) { -} - -func (newState *GetWarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehousePermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehousePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5088,12 +5234,6 @@ type GetWarehouseRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *GetWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehouseRequest_SdkV2) { -} - -func (newState *GetWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehouseRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehouseRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5132,40 +5272,40 @@ type GetWarehouseResponse_SdkV2 struct { // Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. // // Defaults to 120 mins - AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:""` // Channel Details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.List `tfsdk:"channel" tf:"object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. // // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large // - 2X-Large - 3X-Large - 4X-Large - ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + ClusterSize types.String `tfsdk:"cluster_size" tf:""` // warehouse creator name - CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + CreatorName types.String `tfsdk:"creator_name" tf:""` // Configures whether the warehouse should use Photon optimized clusters. // // Defaults to false. - EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:""` // Configures whether the warehouse should use serverless compute - EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:""` // Optional health status. Assume the warehouse is healthy if this field is // not set. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.List `tfsdk:"health" tf:"object"` // unique identifier for warehouse - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Deprecated. Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // the jdbc connection string for this warehouse - JdbcUrl types.String `tfsdk:"jdbc_url" tf:"optional"` + JdbcUrl types.String `tfsdk:"jdbc_url" tf:""` // Maximum number of clusters that the autoscaler will create to handle // concurrent queries. // // Supported values: - Must be >= min_num_clusters - Must be <= 30. // // Defaults to min_clusters if unset. - MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:""` // Minimum number of available clusters that will be maintained for this SQL // warehouse. Increasing this will ensure that a larger number of clusters // are always running and therefore may reduce the cold start time for new @@ -5175,31 +5315,31 @@ type GetWarehouseResponse_SdkV2 struct { // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) // // Defaults to 1 - MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:""` // Logical name for the cluster. // // Supported values: - Must be unique within an org. - Must be less than 100 // characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // current number of active sessions for the warehouse - NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:"optional"` + NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:""` // current number of clusters running for the service - NumClusters types.Int64 `tfsdk:"num_clusters" tf:"optional"` + NumClusters types.Int64 `tfsdk:"num_clusters" tf:""` // ODBC parameters for the SQL warehouse - OdbcParams types.List `tfsdk:"odbc_params" tf:"optional,object"` + OdbcParams types.List `tfsdk:"odbc_params" tf:"object"` // Configurations whether the warehouse should use spot instances. - SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:""` // State of the warehouse - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // A set of key-value pairs that will be tagged on all resources (e.g., AWS // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.List `tfsdk:"tags" tf:"optional,object"` + Tags types.List `tfsdk:"tags" tf:"object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *GetWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehouseResponse_SdkV2) { @@ -5208,6 +5348,15 @@ func (newState *GetWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *GetWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehouseResponse_SdkV2) { } +func (c GetWarehouseResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel_SdkV2{}.ToSchema(cs, append(path, "channel")...) + EndpointHealth_SdkV2{}.ToSchema(cs, append(path, "health")...) + OdbcParams_SdkV2{}.ToSchema(cs, append(path, "odbc_params")...) + EndpointTags_SdkV2{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5396,30 +5545,30 @@ func (o *GetWarehouseResponse_SdkV2) SetTags(ctx context.Context, v EndpointTags type GetWorkspaceWarehouseConfigResponse_SdkV2 struct { // Optional: Channel selection details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.List `tfsdk:"channel" tf:"object"` // Deprecated: Use sql_configuration_parameters - ConfigParam types.List `tfsdk:"config_param" tf:"optional,object"` + ConfigParam types.List `tfsdk:"config_param" tf:"object"` // Spark confs for external hive metastore configuration JSON serialized // size must be less than <= 512K - DataAccessConfig types.List `tfsdk:"data_access_config" tf:"optional"` + DataAccessConfig types.List `tfsdk:"data_access_config" tf:""` // List of Warehouse Types allowed in this workspace (limits allowed value // of the type field in CreateWarehouse and EditWarehouse). Note: Some types // cannot be disabled, they don't need to be specified in // SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing // warehouses to be converted to another type. Used by frontend to save // specific type availability in the warehouse create and edit form UI. - EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:"optional"` + EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:""` // Deprecated: Use sql_configuration_parameters - GlobalParam types.List `tfsdk:"global_param" tf:"optional,object"` + GlobalParam types.List `tfsdk:"global_param" tf:"object"` // GCP only: Google Service Account used to pass to cluster to access Google // Cloud Storage - GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` + GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:""` // AWS Only: Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // Security policy for warehouses - SecurityPolicy types.String `tfsdk:"security_policy" tf:"optional"` + SecurityPolicy types.String `tfsdk:"security_policy" tf:""` // SQL configuration parameters - SqlConfigurationParameters types.List `tfsdk:"sql_configuration_parameters" tf:"optional,object"` + SqlConfigurationParameters types.List `tfsdk:"sql_configuration_parameters" tf:"object"` } func (newState *GetWorkspaceWarehouseConfigResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceWarehouseConfigResponse_SdkV2) { @@ -5428,6 +5577,17 @@ func (newState *GetWorkspaceWarehouseConfigResponse_SdkV2) SyncEffectiveFieldsDu func (newState *GetWorkspaceWarehouseConfigResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceWarehouseConfigResponse_SdkV2) { } +func (c GetWorkspaceWarehouseConfigResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel_SdkV2{}.ToSchema(cs, append(path, "channel")...) + RepeatedEndpointConfPairs_SdkV2{}.ToSchema(cs, append(path, "config_param")...) + EndpointConfPair_SdkV2{}.ToSchema(cs, append(path, "data_access_config")...) + WarehouseTypePair_SdkV2{}.ToSchema(cs, append(path, "enabled_warehouse_types")...) + RepeatedEndpointConfPairs_SdkV2{}.ToSchema(cs, append(path, "global_param")...) + RepeatedEndpointConfPairs_SdkV2{}.ToSchema(cs, append(path, "sql_configuration_parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceWarehouseConfigResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5652,31 +5812,31 @@ func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) SetSqlConfigurationParameter type LegacyAlert_SdkV2 struct { // Timestamp when the alert was created. - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // Alert ID. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Timestamp when the alert was last triggered. - LastTriggeredAt types.String `tfsdk:"last_triggered_at" tf:"optional"` + LastTriggeredAt types.String `tfsdk:"last_triggered_at" tf:""` // Name of the alert. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Alert configuration options. - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.List `tfsdk:"options" tf:"object"` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.List `tfsdk:"query" tf:"object"` // Number of seconds after being triggered before the alert rearms itself // and can be triggered again. If `null`, alert will never be triggered // again. - Rearm types.Int64 `tfsdk:"rearm" tf:"optional"` + Rearm types.Int64 `tfsdk:"rearm" tf:""` // State of the alert. Possible values are: `unknown` (yet to be evaluated), // `triggered` (evaluated and fulfilled trigger conditions), or `ok` // (evaluated and did not fulfill trigger conditions). - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Timestamp when the alert was last updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` - User types.List `tfsdk:"user" tf:"optional,object"` + User types.List `tfsdk:"user" tf:"object"` } func (newState *LegacyAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyAlert_SdkV2) { @@ -5685,6 +5845,14 @@ func (newState *LegacyAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *LegacyAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState LegacyAlert_SdkV2) { } +func (c LegacyAlert_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertOptions_SdkV2{}.ToSchema(cs, append(path, "options")...) + AlertQuery_SdkV2{}.ToSchema(cs, append(path, "query")...) + User_SdkV2{}.ToSchema(cs, append(path, "user")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LegacyAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5827,72 +5995,72 @@ func (o *LegacyAlert_SdkV2) SetUser(ctx context.Context, v User_SdkV2) { type LegacyQuery_SdkV2 struct { // Describes whether the authenticated user is allowed to edit the // definition of this query. - CanEdit types.Bool `tfsdk:"can_edit" tf:"optional"` + CanEdit types.Bool `tfsdk:"can_edit" tf:""` // The timestamp when this query was created. - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // Data source ID maps to the ID of the data source used by the resource and // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + DataSourceId types.String `tfsdk:"data_source_id" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Query ID. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Indicates whether the query is trashed. Trashed queries can't be used in // dashboards, or appear in search results. If this boolean is `true`, the // `options` property for this query includes a `moved_to_trash_at` // timestamp. Trashed queries are permanently deleted after 30 days. - IsArchived types.Bool `tfsdk:"is_archived" tf:"optional"` + IsArchived types.Bool `tfsdk:"is_archived" tf:""` // Whether the query is a draft. Draft queries only appear in list views for // their owners. Visualizations from draft queries cannot appear on // dashboards. - IsDraft types.Bool `tfsdk:"is_draft" tf:"optional"` + IsDraft types.Bool `tfsdk:"is_draft" tf:""` // Whether this query object appears in the current user's favorites list. // This flag determines whether the star icon for favorites is selected. - IsFavorite types.Bool `tfsdk:"is_favorite" tf:"optional"` + IsFavorite types.Bool `tfsdk:"is_favorite" tf:""` // Text parameter types are not safe from SQL injection for all types of // data source. Set this Boolean parameter to `true` if a query either does // not use any text type parameters or uses a data source type where text // type parameters are handled safely. - IsSafe types.Bool `tfsdk:"is_safe" tf:"optional"` + IsSafe types.Bool `tfsdk:"is_safe" tf:""` - LastModifiedBy types.List `tfsdk:"last_modified_by" tf:"optional,object"` + LastModifiedBy types.List `tfsdk:"last_modified_by" tf:"object"` // The ID of the user who last saved changes to this query. - LastModifiedById types.Int64 `tfsdk:"last_modified_by_id" tf:"optional"` + LastModifiedById types.Int64 `tfsdk:"last_modified_by_id" tf:""` // If there is a cached result for this query and user, this field includes // the query result ID. If this query uses parameters, this field is always // null. - LatestQueryDataId types.String `tfsdk:"latest_query_data_id" tf:"optional"` + LatestQueryDataId types.String `tfsdk:"latest_query_data_id" tf:""` // The title of this query that appears in list views, widget headings, and // on the query page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.List `tfsdk:"options" tf:"object"` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * // `CAN_EDIT`: Can edit the query * `CAN_MANAGE`: Can manage the query - PermissionTier types.String `tfsdk:"permission_tier" tf:"optional"` + PermissionTier types.String `tfsdk:"permission_tier" tf:""` // The text of the query to be run. - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` // A SHA-256 hash of the query text along with the authenticated user ID. - QueryHash types.String `tfsdk:"query_hash" tf:"optional"` + QueryHash types.String `tfsdk:"query_hash" tf:""` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The timestamp at which this query was last updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` - User types.List `tfsdk:"user" tf:"optional,object"` + User types.List `tfsdk:"user" tf:"object"` // The ID of the user who owns the query. - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` - Visualizations types.List `tfsdk:"visualizations" tf:"optional"` + Visualizations types.List `tfsdk:"visualizations" tf:""` } func (newState *LegacyQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyQuery_SdkV2) { @@ -5901,6 +6069,15 @@ func (newState *LegacyQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *LegacyQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState LegacyQuery_SdkV2) { } +func (c LegacyQuery_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + User_SdkV2{}.ToSchema(cs, append(path, "last_modified_by")...) + QueryOptions_SdkV2{}.ToSchema(cs, append(path, "options")...) + User_SdkV2{}.ToSchema(cs, append(path, "user")...) + LegacyVisualization_SdkV2{}.ToSchema(cs, append(path, "visualizations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LegacyQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6130,25 +6307,25 @@ func (o *LegacyQuery_SdkV2) SetVisualizations(ctx context.Context, v []LegacyVis // same endpoint. Databricks does not recommend constructing ad-hoc // visualizations entirely in JSON. type LegacyVisualization_SdkV2 struct { - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // A short description of this visualization. This is not displayed in the // UI. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The UUID for this visualization. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The name of the visualization that appears on dashboards and the query // screen. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The options object varies widely from one visualization type to the next // and is unsupported. Databricks does not recommend modifying visualization // settings in JSON. - Options types.Object `tfsdk:"options" tf:"optional"` + Options types.Object `tfsdk:"options" tf:""` - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.List `tfsdk:"query" tf:"object"` // The type of visualization: chart, table, pivot table, and so on. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` } func (newState *LegacyVisualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyVisualization_SdkV2) { @@ -6157,6 +6334,12 @@ func (newState *LegacyVisualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *LegacyVisualization_SdkV2) SyncEffectiveFieldsDuringRead(existingState LegacyVisualization_SdkV2) { } +func (c LegacyVisualization_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LegacyQuery_SdkV2{}.ToSchema(cs, append(path, "query")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LegacyVisualization. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6239,12 +6422,6 @@ type ListAlertsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAlertsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAlertsRequest_SdkV2) { -} - -func (newState *ListAlertsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAlertsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAlertsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6279,9 +6456,9 @@ func (o ListAlertsRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListAlertsResponse_SdkV2 struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ListAlertsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAlertsResponse_SdkV2) { @@ -6290,6 +6467,12 @@ func (newState *ListAlertsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListAlertsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAlertsResponse_SdkV2) { } +func (c ListAlertsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListAlertsResponseAlert_SdkV2{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAlertsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6355,46 +6538,46 @@ func (o *ListAlertsResponse_SdkV2) SetResults(ctx context.Context, v []ListAlert type ListAlertsResponseAlert_SdkV2 struct { // Trigger conditions of the alert. - Condition types.List `tfsdk:"condition" tf:"optional,object"` + Condition types.List `tfsdk:"condition" tf:"object"` // The timestamp indicating when the alert was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This can include // email subject entries and Slack notification headers, for example. See // [here] for custom templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The display name of the alert. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the alert. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The workspace state of the alert. Used for tracking trashed status. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // Whether to notify alert subscribers when alert returns back to normal. - NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:""` // The owner's username. This field is set to "Unavailable" if the user has // been deleted. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // UUID of the query attached to the alert. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds an alert must wait after being triggered to rearm // itself. After rearming, it can be triggered again. If 0 or not specified, // the alert will not be triggered again. - SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:""` // Current state of the alert's trigger status. This field is set to UNKNOWN // if the alert has not yet been evaluated or ran into an error during the // last evaluation. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Timestamp when the alert was last triggered, if the alert has been // triggered before. - TriggerTime types.String `tfsdk:"trigger_time" tf:"optional"` + TriggerTime types.String `tfsdk:"trigger_time" tf:""` // The timestamp indicating when the alert was updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *ListAlertsResponseAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAlertsResponseAlert_SdkV2) { @@ -6403,6 +6586,12 @@ func (newState *ListAlertsResponseAlert_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ListAlertsResponseAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAlertsResponseAlert_SdkV2) { } +func (c ListAlertsResponseAlert_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertCondition_SdkV2{}.ToSchema(cs, append(path, "condition")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAlertsResponseAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6497,15 +6686,9 @@ type ListDashboardsRequest_SdkV2 struct { // Page number to retrieve. Page types.Int64 `tfsdk:"-"` // Number of dashboards to return per page. - PageSize types.Int64 `tfsdk:"-"` - // Full text search term. - Q types.String `tfsdk:"-"` -} - -func (newState *ListDashboardsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDashboardsRequest_SdkV2) { -} - -func (newState *ListDashboardsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDashboardsRequest_SdkV2) { + PageSize types.Int64 `tfsdk:"-"` + // Full text search term. + Q types.String `tfsdk:"-"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDashboardsRequest. @@ -6570,12 +6753,6 @@ type ListQueriesLegacyRequest_SdkV2 struct { Q types.String `tfsdk:"-"` } -func (newState *ListQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueriesLegacyRequest_SdkV2) { -} - -func (newState *ListQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueriesLegacyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueriesLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6620,12 +6797,6 @@ type ListQueriesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListQueriesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueriesRequest_SdkV2) { -} - -func (newState *ListQueriesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueriesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueriesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6661,11 +6832,11 @@ func (o ListQueriesRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListQueriesResponse_SdkV2 struct { // Whether there is another page of results. - HasNextPage types.Bool `tfsdk:"has_next_page" tf:"optional"` + HasNextPage types.Bool `tfsdk:"has_next_page" tf:""` // A token that can be used to get the next page of results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Res types.List `tfsdk:"res" tf:"optional"` + Res types.List `tfsdk:"res" tf:""` } func (newState *ListQueriesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueriesResponse_SdkV2) { @@ -6674,6 +6845,12 @@ func (newState *ListQueriesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ListQueriesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueriesResponse_SdkV2) { } +func (c ListQueriesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryInfo_SdkV2{}.ToSchema(cs, append(path, "res")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueriesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6756,12 +6933,6 @@ type ListQueryHistoryRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListQueryHistoryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueryHistoryRequest_SdkV2) { -} - -func (newState *ListQueryHistoryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueryHistoryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueryHistoryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6830,9 +7001,9 @@ func (o *ListQueryHistoryRequest_SdkV2) SetFilterBy(ctx context.Context, v Query } type ListQueryObjectsResponse_SdkV2 struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ListQueryObjectsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueryObjectsResponse_SdkV2) { @@ -6841,6 +7012,12 @@ func (newState *ListQueryObjectsResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *ListQueryObjectsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueryObjectsResponse_SdkV2) { } +func (c ListQueryObjectsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListQueryObjectsResponseQuery_SdkV2{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueryObjectsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6906,39 +7083,39 @@ func (o *ListQueryObjectsResponse_SdkV2) SetResults(ctx context.Context, v []Lis type ListQueryObjectsResponseQuery_SdkV2 struct { // Whether to apply a 1000 row limit to the query result. - ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:""` // Name of the catalog where this query will be executed. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // Timestamp when this query was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Display name of the query that appears in list views, widget headings, // and on the query page. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the query. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Username of the user who last saved changes to this query. - LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:"optional"` + LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:""` // Indicates whether the query is trashed. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // Username of the user that owns the query. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // List of query parameter definitions. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Text of the query to be run. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Sets the "Run as" role for the object. - RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + RunAsMode types.String `tfsdk:"run_as_mode" tf:""` // Name of the schema where this query will be executed. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // Timestamp when this query was last updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // ID of the SQL warehouse attached to the query. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *ListQueryObjectsResponseQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueryObjectsResponseQuery_SdkV2) { @@ -6947,6 +7124,12 @@ func (newState *ListQueryObjectsResponseQuery_SdkV2) SyncEffectiveFieldsDuringCr func (newState *ListQueryObjectsResponseQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueryObjectsResponseQuery_SdkV2) { } +func (c ListQueryObjectsResponseQuery_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryParameter_SdkV2{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueryObjectsResponseQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7069,19 +7252,13 @@ func (o *ListQueryObjectsResponseQuery_SdkV2) SetTags(ctx context.Context, v []t type ListResponse_SdkV2 struct { // The total number of dashboards. - Count types.Int64 `tfsdk:"count" tf:"optional"` + Count types.Int64 `tfsdk:"count" tf:""` // The current page being displayed. - Page types.Int64 `tfsdk:"page" tf:"optional"` + Page types.Int64 `tfsdk:"page" tf:""` // The number of dashboards per page. - PageSize types.Int64 `tfsdk:"page_size" tf:"optional"` + PageSize types.Int64 `tfsdk:"page_size" tf:""` // List of dashboards returned. - Results types.List `tfsdk:"results" tf:"optional"` -} - -func (newState *ListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListResponse_SdkV2) { -} - -func (newState *ListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListResponse_SdkV2) { + Results types.List `tfsdk:"results" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListResponse. @@ -7160,12 +7337,6 @@ type ListVisualizationsForQueryRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListVisualizationsForQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVisualizationsForQueryRequest_SdkV2) { -} - -func (newState *ListVisualizationsForQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVisualizationsForQueryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVisualizationsForQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7202,9 +7373,9 @@ func (o ListVisualizationsForQueryRequest_SdkV2) Type(ctx context.Context) attr. } type ListVisualizationsForQueryResponse_SdkV2 struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ListVisualizationsForQueryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVisualizationsForQueryResponse_SdkV2) { @@ -7213,6 +7384,12 @@ func (newState *ListVisualizationsForQueryResponse_SdkV2) SyncEffectiveFieldsDur func (newState *ListVisualizationsForQueryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVisualizationsForQueryResponse_SdkV2) { } +func (c ListVisualizationsForQueryResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Visualization_SdkV2{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVisualizationsForQueryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7283,12 +7460,6 @@ type ListWarehousesRequest_SdkV2 struct { RunAsUserId types.Int64 `tfsdk:"-"` } -func (newState *ListWarehousesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWarehousesRequest_SdkV2) { -} - -func (newState *ListWarehousesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWarehousesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWarehousesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7322,7 +7493,7 @@ func (o ListWarehousesRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListWarehousesResponse_SdkV2 struct { // A list of warehouses and their configurations. - Warehouses types.List `tfsdk:"warehouses" tf:"optional"` + Warehouses types.List `tfsdk:"warehouses" tf:""` } func (newState *ListWarehousesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWarehousesResponse_SdkV2) { @@ -7331,6 +7502,12 @@ func (newState *ListWarehousesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *ListWarehousesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWarehousesResponse_SdkV2) { } +func (c ListWarehousesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointInfo_SdkV2{}.ToSchema(cs, append(path, "warehouses")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWarehousesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7394,12 +7571,12 @@ func (o *ListWarehousesResponse_SdkV2) SetWarehouses(ctx context.Context, v []En type MultiValuesOptions_SdkV2 struct { // Character that prefixes each selected parameter value. - Prefix types.String `tfsdk:"prefix" tf:"optional"` + Prefix types.String `tfsdk:"prefix" tf:""` // Character that separates each selected parameter value. Defaults to a // comma. - Separator types.String `tfsdk:"separator" tf:"optional"` + Separator types.String `tfsdk:"separator" tf:""` // Character that suffixes each selected parameter value. - Suffix types.String `tfsdk:"suffix" tf:"optional"` + Suffix types.String `tfsdk:"suffix" tf:""` } func (newState *MultiValuesOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MultiValuesOptions_SdkV2) { @@ -7408,6 +7585,11 @@ func (newState *MultiValuesOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *MultiValuesOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState MultiValuesOptions_SdkV2) { } +func (c MultiValuesOptions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MultiValuesOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7444,7 +7626,7 @@ func (o MultiValuesOptions_SdkV2) Type(ctx context.Context) attr.Type { } type NumericValue_SdkV2 struct { - Value types.Float64 `tfsdk:"value" tf:"optional"` + Value types.Float64 `tfsdk:"value" tf:""` } func (newState *NumericValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NumericValue_SdkV2) { @@ -7453,6 +7635,11 @@ func (newState *NumericValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *NumericValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState NumericValue_SdkV2) { } +func (c NumericValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NumericValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7485,13 +7672,13 @@ func (o NumericValue_SdkV2) Type(ctx context.Context) attr.Type { } type OdbcParams_SdkV2 struct { - Hostname types.String `tfsdk:"hostname" tf:"optional"` + Hostname types.String `tfsdk:"hostname" tf:""` - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` - Port types.Int64 `tfsdk:"port" tf:"optional"` + Port types.Int64 `tfsdk:"port" tf:""` - Protocol types.String `tfsdk:"protocol" tf:"optional"` + Protocol types.String `tfsdk:"protocol" tf:""` } func (newState *OdbcParams_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OdbcParams_SdkV2) { @@ -7500,6 +7687,11 @@ func (newState *OdbcParams_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan O func (newState *OdbcParams_SdkV2) SyncEffectiveFieldsDuringRead(existingState OdbcParams_SdkV2) { } +func (c OdbcParams_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OdbcParams. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7540,22 +7732,22 @@ func (o OdbcParams_SdkV2) Type(ctx context.Context) attr.Type { type Parameter_SdkV2 struct { // List of valid parameter values, newline delimited. Only applies for // dropdown list parameters. - EnumOptions types.String `tfsdk:"enumOptions" tf:"optional"` + EnumOptions types.String `tfsdk:"enumOptions" tf:""` // If specified, allows multiple values to be selected for this parameter. // Only applies to dropdown list and query-based dropdown list parameters. - MultiValuesOptions types.List `tfsdk:"multiValuesOptions" tf:"optional,object"` + MultiValuesOptions types.List `tfsdk:"multiValuesOptions" tf:"object"` // The literal parameter marker that appears between double curly braces in // the query text. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The UUID of the query that provides the parameter values. Only applies // for query-based dropdown list parameters. - QueryId types.String `tfsdk:"queryId" tf:"optional"` + QueryId types.String `tfsdk:"queryId" tf:""` // The text displayed in a parameter picking widget. - Title types.String `tfsdk:"title" tf:"optional"` + Title types.String `tfsdk:"title" tf:""` // Parameters can have several different types. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` // The default value for this parameter. - Value types.Object `tfsdk:"value" tf:"optional"` + Value types.Object `tfsdk:"value" tf:""` } func (newState *Parameter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Parameter_SdkV2) { @@ -7564,6 +7756,12 @@ func (newState *Parameter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pa func (newState *Parameter_SdkV2) SyncEffectiveFieldsDuringRead(existingState Parameter_SdkV2) { } +func (c Parameter_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MultiValuesOptions_SdkV2{}.ToSchema(cs, append(path, "multiValuesOptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Parameter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7639,41 +7837,41 @@ func (o *Parameter_SdkV2) SetMultiValuesOptions(ctx context.Context, v MultiValu type Query_SdkV2 struct { // Whether to apply a 1000 row limit to the query result. - ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:""` // Name of the catalog where this query will be executed. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // Timestamp when this query was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Display name of the query that appears in list views, widget headings, // and on the query page. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the query. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Username of the user who last saved changes to this query. - LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:"optional"` + LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:""` // Indicates whether the query is trashed. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // Username of the user that owns the query. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // List of query parameter definitions. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Workspace path of the workspace folder containing the object. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // Text of the query to be run. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Sets the "Run as" role for the object. - RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + RunAsMode types.String `tfsdk:"run_as_mode" tf:""` // Name of the schema where this query will be executed. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // Timestamp when this query was last updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // ID of the SQL warehouse attached to the query. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *Query_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Query_SdkV2) { @@ -7682,6 +7880,12 @@ func (newState *Query_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Query_ func (newState *Query_SdkV2) SyncEffectiveFieldsDuringRead(existingState Query_SdkV2) { } +func (c Query_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryParameter_SdkV2{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Query. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7806,11 +8010,11 @@ func (o *Query_SdkV2) SetTags(ctx context.Context, v []types.String) { type QueryBackedValue_SdkV2 struct { // If specified, allows multiple values to be selected for this parameter. - MultiValuesOptions types.List `tfsdk:"multi_values_options" tf:"optional,object"` + MultiValuesOptions types.List `tfsdk:"multi_values_options" tf:"object"` // UUID of the query that provides the parameter values. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // List of selected query parameter values. - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *QueryBackedValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryBackedValue_SdkV2) { @@ -7819,6 +8023,12 @@ func (newState *QueryBackedValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *QueryBackedValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryBackedValue_SdkV2) { } +func (c QueryBackedValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MultiValuesOptions_SdkV2{}.ToSchema(cs, append(path, "multi_values_options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryBackedValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7918,27 +8128,27 @@ type QueryEditContent_SdkV2 struct { // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + DataSourceId types.String `tfsdk:"data_source_id" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The title of this query that appears in list views, widget headings, and // on the query page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Exclusively used for storing a list parameter definitions. A parameter is // an object with `title`, `name`, `type`, and `value` properties. The // `value` field here is the default value. It can be overridden at runtime. - Options types.Object `tfsdk:"options" tf:"optional"` + Options types.Object `tfsdk:"options" tf:""` // The text of the query to be run. - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` QueryId types.String `tfsdk:"-"` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *QueryEditContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEditContent_SdkV2) { @@ -7947,6 +8157,12 @@ func (newState *QueryEditContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *QueryEditContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryEditContent_SdkV2) { } +func (c QueryEditContent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "query_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryEditContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8025,15 +8241,15 @@ func (o *QueryEditContent_SdkV2) SetTags(ctx context.Context, v []types.String) type QueryFilter_SdkV2 struct { // A range filter for query submitted time. The time range must be <= 30 // days. - QueryStartTimeRange types.List `tfsdk:"query_start_time_range" tf:"optional,object"` + QueryStartTimeRange types.List `tfsdk:"query_start_time_range" tf:"object"` // A list of statement IDs. - StatementIds types.List `tfsdk:"statement_ids" tf:"optional"` + StatementIds types.List `tfsdk:"statement_ids" tf:""` - Statuses types.List `tfsdk:"statuses" tf:"optional"` + Statuses types.List `tfsdk:"statuses" tf:""` // A list of user IDs who ran the queries. - UserIds types.List `tfsdk:"user_ids" tf:"optional"` + UserIds types.List `tfsdk:"user_ids" tf:""` // A list of warehouse IDs. - WarehouseIds types.List `tfsdk:"warehouse_ids" tf:"optional"` + WarehouseIds types.List `tfsdk:"warehouse_ids" tf:""` } func (newState *QueryFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryFilter_SdkV2) { @@ -8042,6 +8258,12 @@ func (newState *QueryFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *QueryFilter_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryFilter_SdkV2) { } +func (c QueryFilter_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TimeRange_SdkV2{}.ToSchema(cs, append(path, "query_start_time_range")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryFilter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8229,54 +8451,54 @@ func (o *QueryFilter_SdkV2) SetWarehouseIds(ctx context.Context, v []types.Strin type QueryInfo_SdkV2 struct { // SQL Warehouse channel information at the time of query execution - ChannelUsed types.List `tfsdk:"channel_used" tf:"optional,object"` + ChannelUsed types.List `tfsdk:"channel_used" tf:"object"` // Total execution time of the statement ( excluding result fetch time ). - Duration types.Int64 `tfsdk:"duration" tf:"optional"` + Duration types.Int64 `tfsdk:"duration" tf:""` // Alias for `warehouse_id`. - EndpointId types.String `tfsdk:"endpoint_id" tf:"optional"` + EndpointId types.String `tfsdk:"endpoint_id" tf:""` // Message describing why the query could not complete. - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` // The ID of the user whose credentials were used to run the query. - ExecutedAsUserId types.Int64 `tfsdk:"executed_as_user_id" tf:"optional"` + ExecutedAsUserId types.Int64 `tfsdk:"executed_as_user_id" tf:""` // The email address or username of the user whose credentials were used to // run the query. - ExecutedAsUserName types.String `tfsdk:"executed_as_user_name" tf:"optional"` + ExecutedAsUserName types.String `tfsdk:"executed_as_user_name" tf:""` // The time execution of the query ended. - ExecutionEndTimeMs types.Int64 `tfsdk:"execution_end_time_ms" tf:"optional"` + ExecutionEndTimeMs types.Int64 `tfsdk:"execution_end_time_ms" tf:""` // Whether more updates for the query are expected. - IsFinal types.Bool `tfsdk:"is_final" tf:"optional"` + IsFinal types.Bool `tfsdk:"is_final" tf:""` // A key that can be used to look up query details. - LookupKey types.String `tfsdk:"lookup_key" tf:"optional"` + LookupKey types.String `tfsdk:"lookup_key" tf:""` // Metrics about query execution. - Metrics types.List `tfsdk:"metrics" tf:"optional,object"` + Metrics types.List `tfsdk:"metrics" tf:"object"` // Whether plans exist for the execution, or the reason why they are missing - PlansState types.String `tfsdk:"plans_state" tf:"optional"` + PlansState types.String `tfsdk:"plans_state" tf:""` // The time the query ended. - QueryEndTimeMs types.Int64 `tfsdk:"query_end_time_ms" tf:"optional"` + QueryEndTimeMs types.Int64 `tfsdk:"query_end_time_ms" tf:""` // The query ID. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // The time the query started. - QueryStartTimeMs types.Int64 `tfsdk:"query_start_time_ms" tf:"optional"` + QueryStartTimeMs types.Int64 `tfsdk:"query_start_time_ms" tf:""` // The text of the query. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // The number of results returned by the query. - RowsProduced types.Int64 `tfsdk:"rows_produced" tf:"optional"` + RowsProduced types.Int64 `tfsdk:"rows_produced" tf:""` // URL to the Spark UI query plan. - SparkUiUrl types.String `tfsdk:"spark_ui_url" tf:"optional"` + SparkUiUrl types.String `tfsdk:"spark_ui_url" tf:""` // Type of statement for this query - StatementType types.String `tfsdk:"statement_type" tf:"optional"` + StatementType types.String `tfsdk:"statement_type" tf:""` // Query status with one the following values: // // - `QUEUED`: Query has been received and queued. - `RUNNING`: Query has // started. - `CANCELED`: Query has been cancelled by the user. - `FAILED`: // Query has failed. - `FINISHED`: Query has completed. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The ID of the user who ran the query. - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` // The email address or username of the user who ran the query. - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` // Warehouse ID. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *QueryInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryInfo_SdkV2) { @@ -8285,6 +8507,13 @@ func (newState *QueryInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Qu func (newState *QueryInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryInfo_SdkV2) { } +func (c QueryInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ChannelInfo_SdkV2{}.ToSchema(cs, append(path, "channel_used")...) + QueryMetrics_SdkV2{}.ToSchema(cs, append(path, "metrics")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8419,13 +8648,13 @@ func (o *QueryInfo_SdkV2) SetMetrics(ctx context.Context, v QueryMetrics_SdkV2) type QueryList_SdkV2 struct { // The total number of queries. - Count types.Int64 `tfsdk:"count" tf:"optional"` + Count types.Int64 `tfsdk:"count" tf:""` // The page number that is currently displayed. - Page types.Int64 `tfsdk:"page" tf:"optional"` + Page types.Int64 `tfsdk:"page" tf:""` // The number of queries per page. - PageSize types.Int64 `tfsdk:"page_size" tf:"optional"` + PageSize types.Int64 `tfsdk:"page_size" tf:""` // List of queries returned. - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *QueryList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryList_SdkV2) { @@ -8434,6 +8663,12 @@ func (newState *QueryList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Qu func (newState *QueryList_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryList_SdkV2) { } +func (c QueryList_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LegacyQuery_SdkV2{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8505,61 +8740,61 @@ func (o *QueryList_SdkV2) SetResults(ctx context.Context, v []LegacyQuery_SdkV2) // Metrics come from the driver and are stored in the history service database. type QueryMetrics_SdkV2 struct { // Time spent loading metadata and optimizing the query, in milliseconds. - CompilationTimeMs types.Int64 `tfsdk:"compilation_time_ms" tf:"optional"` + CompilationTimeMs types.Int64 `tfsdk:"compilation_time_ms" tf:""` // Time spent executing the query, in milliseconds. - ExecutionTimeMs types.Int64 `tfsdk:"execution_time_ms" tf:"optional"` + ExecutionTimeMs types.Int64 `tfsdk:"execution_time_ms" tf:""` // Total amount of data sent over the network between executor nodes during // shuffle, in bytes. - NetworkSentBytes types.Int64 `tfsdk:"network_sent_bytes" tf:"optional"` + NetworkSentBytes types.Int64 `tfsdk:"network_sent_bytes" tf:""` // Timestamp of when the query was enqueued waiting while the warehouse was // at max load. This field is optional and will not appear if the query // skipped the overloading queue. - OverloadingQueueStartTimestamp types.Int64 `tfsdk:"overloading_queue_start_timestamp" tf:"optional"` + OverloadingQueueStartTimestamp types.Int64 `tfsdk:"overloading_queue_start_timestamp" tf:""` // Total execution time for all individual Photon query engine tasks in the // query, in milliseconds. - PhotonTotalTimeMs types.Int64 `tfsdk:"photon_total_time_ms" tf:"optional"` + PhotonTotalTimeMs types.Int64 `tfsdk:"photon_total_time_ms" tf:""` // Timestamp of when the query was enqueued waiting for a cluster to be // provisioned for the warehouse. This field is optional and will not appear // if the query skipped the provisioning queue. - ProvisioningQueueStartTimestamp types.Int64 `tfsdk:"provisioning_queue_start_timestamp" tf:"optional"` + ProvisioningQueueStartTimestamp types.Int64 `tfsdk:"provisioning_queue_start_timestamp" tf:""` // Total number of bytes in all tables not read due to pruning - PrunedBytes types.Int64 `tfsdk:"pruned_bytes" tf:"optional"` + PrunedBytes types.Int64 `tfsdk:"pruned_bytes" tf:""` // Total number of files from all tables not read due to pruning - PrunedFilesCount types.Int64 `tfsdk:"pruned_files_count" tf:"optional"` + PrunedFilesCount types.Int64 `tfsdk:"pruned_files_count" tf:""` // Timestamp of when the underlying compute started compilation of the // query. - QueryCompilationStartTimestamp types.Int64 `tfsdk:"query_compilation_start_timestamp" tf:"optional"` + QueryCompilationStartTimestamp types.Int64 `tfsdk:"query_compilation_start_timestamp" tf:""` // Total size of data read by the query, in bytes. - ReadBytes types.Int64 `tfsdk:"read_bytes" tf:"optional"` + ReadBytes types.Int64 `tfsdk:"read_bytes" tf:""` // Size of persistent data read from the cache, in bytes. - ReadCacheBytes types.Int64 `tfsdk:"read_cache_bytes" tf:"optional"` + ReadCacheBytes types.Int64 `tfsdk:"read_cache_bytes" tf:""` // Number of files read after pruning - ReadFilesCount types.Int64 `tfsdk:"read_files_count" tf:"optional"` + ReadFilesCount types.Int64 `tfsdk:"read_files_count" tf:""` // Number of partitions read after pruning. - ReadPartitionsCount types.Int64 `tfsdk:"read_partitions_count" tf:"optional"` + ReadPartitionsCount types.Int64 `tfsdk:"read_partitions_count" tf:""` // Size of persistent data read from cloud object storage on your cloud // tenant, in bytes. - ReadRemoteBytes types.Int64 `tfsdk:"read_remote_bytes" tf:"optional"` + ReadRemoteBytes types.Int64 `tfsdk:"read_remote_bytes" tf:""` // Time spent fetching the query results after the execution finished, in // milliseconds. - ResultFetchTimeMs types.Int64 `tfsdk:"result_fetch_time_ms" tf:"optional"` + ResultFetchTimeMs types.Int64 `tfsdk:"result_fetch_time_ms" tf:""` // `true` if the query result was fetched from cache, `false` otherwise. - ResultFromCache types.Bool `tfsdk:"result_from_cache" tf:"optional"` + ResultFromCache types.Bool `tfsdk:"result_from_cache" tf:""` // Total number of rows returned by the query. - RowsProducedCount types.Int64 `tfsdk:"rows_produced_count" tf:"optional"` + RowsProducedCount types.Int64 `tfsdk:"rows_produced_count" tf:""` // Total number of rows read by the query. - RowsReadCount types.Int64 `tfsdk:"rows_read_count" tf:"optional"` + RowsReadCount types.Int64 `tfsdk:"rows_read_count" tf:""` // Size of data temporarily written to disk while executing the query, in // bytes. - SpillToDiskBytes types.Int64 `tfsdk:"spill_to_disk_bytes" tf:"optional"` + SpillToDiskBytes types.Int64 `tfsdk:"spill_to_disk_bytes" tf:""` // Sum of execution time for all of the query’s tasks, in milliseconds. - TaskTotalTimeMs types.Int64 `tfsdk:"task_total_time_ms" tf:"optional"` + TaskTotalTimeMs types.Int64 `tfsdk:"task_total_time_ms" tf:""` // Total execution time of the query from the client’s point of view, in // milliseconds. - TotalTimeMs types.Int64 `tfsdk:"total_time_ms" tf:"optional"` + TotalTimeMs types.Int64 `tfsdk:"total_time_ms" tf:""` // Size pf persistent data written to cloud object storage in your cloud // tenant, in bytes. - WriteRemoteBytes types.Int64 `tfsdk:"write_remote_bytes" tf:"optional"` + WriteRemoteBytes types.Int64 `tfsdk:"write_remote_bytes" tf:""` } func (newState *QueryMetrics_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryMetrics_SdkV2) { @@ -8568,6 +8803,11 @@ func (newState *QueryMetrics_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *QueryMetrics_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryMetrics_SdkV2) { } +func (c QueryMetrics_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryMetrics. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8643,15 +8883,15 @@ func (o QueryMetrics_SdkV2) Type(ctx context.Context) attr.Type { type QueryOptions_SdkV2 struct { // The name of the catalog to execute this query in. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // The timestamp when this query was moved to trash. Only present when the // `is_archived` property is `true`. Trashed items are deleted after thirty // days. - MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:"optional"` + MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:""` - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // The name of the schema to execute this query in. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` } func (newState *QueryOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryOptions_SdkV2) { @@ -8660,6 +8900,12 @@ func (newState *QueryOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *QueryOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryOptions_SdkV2) { } +func (c QueryOptions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Parameter_SdkV2{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8730,23 +8976,23 @@ func (o *QueryOptions_SdkV2) SetParameters(ctx context.Context, v []Parameter_Sd type QueryParameter_SdkV2 struct { // Date-range query parameter value. Can only specify one of // `dynamic_date_range_value` or `date_range_value`. - DateRangeValue types.List `tfsdk:"date_range_value" tf:"optional,object"` + DateRangeValue types.List `tfsdk:"date_range_value" tf:"object"` // Date query parameter value. Can only specify one of `dynamic_date_value` // or `date_value`. - DateValue types.List `tfsdk:"date_value" tf:"optional,object"` + DateValue types.List `tfsdk:"date_value" tf:"object"` // Dropdown query parameter value. - EnumValue types.List `tfsdk:"enum_value" tf:"optional,object"` + EnumValue types.List `tfsdk:"enum_value" tf:"object"` // Literal parameter marker that appears between double curly braces in the // query text. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Numeric query parameter value. - NumericValue types.List `tfsdk:"numeric_value" tf:"optional,object"` + NumericValue types.List `tfsdk:"numeric_value" tf:"object"` // Query-based dropdown query parameter value. - QueryBackedValue types.List `tfsdk:"query_backed_value" tf:"optional,object"` + QueryBackedValue types.List `tfsdk:"query_backed_value" tf:"object"` // Text query parameter value. - TextValue types.List `tfsdk:"text_value" tf:"optional,object"` + TextValue types.List `tfsdk:"text_value" tf:"object"` // Text displayed in the user-facing parameter widget in the UI. - Title types.String `tfsdk:"title" tf:"optional"` + Title types.String `tfsdk:"title" tf:""` } func (newState *QueryParameter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryParameter_SdkV2) { @@ -8755,6 +9001,17 @@ func (newState *QueryParameter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *QueryParameter_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryParameter_SdkV2) { } +func (c QueryParameter_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DateRangeValue_SdkV2{}.ToSchema(cs, append(path, "date_range_value")...) + DateValue_SdkV2{}.ToSchema(cs, append(path, "date_value")...) + EnumValue_SdkV2{}.ToSchema(cs, append(path, "enum_value")...) + NumericValue_SdkV2{}.ToSchema(cs, append(path, "numeric_value")...) + QueryBackedValue_SdkV2{}.ToSchema(cs, append(path, "query_backed_value")...) + TextValue_SdkV2{}.ToSchema(cs, append(path, "text_value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryParameter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8980,27 +9237,27 @@ type QueryPostContent_SdkV2 struct { // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + DataSourceId types.String `tfsdk:"data_source_id" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The title of this query that appears in list views, widget headings, and // on the query page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Exclusively used for storing a list parameter definitions. A parameter is // an object with `title`, `name`, `type`, and `value` properties. The // `value` field here is the default value. It can be overridden at runtime. - Options types.Object `tfsdk:"options" tf:"optional"` + Options types.Object `tfsdk:"options" tf:""` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // The text of the query to be run. - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *QueryPostContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryPostContent_SdkV2) { @@ -9009,6 +9266,11 @@ func (newState *QueryPostContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *QueryPostContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryPostContent_SdkV2) { } +func (c QueryPostContent_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryPostContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9086,9 +9348,9 @@ func (o *QueryPostContent_SdkV2) SetTags(ctx context.Context, v []types.String) type RepeatedEndpointConfPairs_SdkV2 struct { // Deprecated: Use configuration_pairs - ConfigPair types.List `tfsdk:"config_pair" tf:"optional"` + ConfigPair types.List `tfsdk:"config_pair" tf:""` - ConfigurationPairs types.List `tfsdk:"configuration_pairs" tf:"optional"` + ConfigurationPairs types.List `tfsdk:"configuration_pairs" tf:""` } func (newState *RepeatedEndpointConfPairs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepeatedEndpointConfPairs_SdkV2) { @@ -9097,6 +9359,13 @@ func (newState *RepeatedEndpointConfPairs_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *RepeatedEndpointConfPairs_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepeatedEndpointConfPairs_SdkV2) { } +func (c RepeatedEndpointConfPairs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointConfPair_SdkV2{}.ToSchema(cs, append(path, "config_pair")...) + EndpointConfPair_SdkV2{}.ToSchema(cs, append(path, "configuration_pairs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepeatedEndpointConfPairs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9194,12 +9463,6 @@ type RestoreDashboardRequest_SdkV2 struct { DashboardId types.String `tfsdk:"-"` } -func (newState *RestoreDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreDashboardRequest_SdkV2) { -} - -func (newState *RestoreDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreDashboardRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9236,12 +9499,6 @@ type RestoreQueriesLegacyRequest_SdkV2 struct { QueryId types.String `tfsdk:"-"` } -func (newState *RestoreQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreQueriesLegacyRequest_SdkV2) { -} - -func (newState *RestoreQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreQueriesLegacyRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreQueriesLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9276,12 +9533,6 @@ func (o RestoreQueriesLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { type RestoreResponse_SdkV2 struct { } -func (newState *RestoreResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreResponse_SdkV2) { -} - -func (newState *RestoreResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9312,28 +9563,28 @@ func (o RestoreResponse_SdkV2) Type(ctx context.Context) attr.Type { type ResultData_SdkV2 struct { // The number of bytes in the result chunk. This field is not available when // using `INLINE` disposition. - ByteCount types.Int64 `tfsdk:"byte_count" tf:"optional"` + ByteCount types.Int64 `tfsdk:"byte_count" tf:""` // The position within the sequence of result set chunks. - ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:"optional"` + ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:""` // The `JSON_ARRAY` format is an array of arrays of values, where each // non-null value is formatted as a string. Null values are encoded as JSON // `null`. - DataArray types.List `tfsdk:"data_array" tf:"optional"` + DataArray types.List `tfsdk:"data_array" tf:""` - ExternalLinks types.List `tfsdk:"external_links" tf:"optional"` + ExternalLinks types.List `tfsdk:"external_links" tf:""` // When fetching, provides the `chunk_index` for the _next_ chunk. If // absent, indicates there are no more chunks. The next chunk can be fetched // with a :method:statementexecution/getStatementResultChunkN request. - NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:"optional"` + NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:""` // When fetching, provides a link to fetch the _next_ chunk. If absent, // indicates there are no more chunks. This link is an absolute `path` to be // joined with your `$DATABRICKS_HOST`, and should be treated as an opaque // link. This is an alternative to using `next_chunk_index`. - NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:"optional"` + NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:""` // The number of rows within the result chunk. - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` // The starting row offset within the result set. - RowOffset types.Int64 `tfsdk:"row_offset" tf:"optional"` + RowOffset types.Int64 `tfsdk:"row_offset" tf:""` } func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultData_SdkV2) { @@ -9342,6 +9593,12 @@ func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan R func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultData_SdkV2) { } +func (c ResultData_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalLink_SdkV2{}.ToSchema(cs, append(path, "external_links")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultData. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9451,21 +9708,21 @@ func (o *ResultData_SdkV2) SetExternalLinks(ctx context.Context, v []ExternalLin // The result manifest provides schema and metadata for the result set. type ResultManifest_SdkV2 struct { // Array of result set chunk metadata. - Chunks types.List `tfsdk:"chunks" tf:"optional"` + Chunks types.List `tfsdk:"chunks" tf:""` - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // The schema is an ordered list of column descriptions. - Schema types.List `tfsdk:"schema" tf:"optional,object"` + Schema types.List `tfsdk:"schema" tf:"object"` // The total number of bytes in the result set. This field is not available // when using `INLINE` disposition. - TotalByteCount types.Int64 `tfsdk:"total_byte_count" tf:"optional"` + TotalByteCount types.Int64 `tfsdk:"total_byte_count" tf:""` // The total number of chunks that the result set has been divided into. - TotalChunkCount types.Int64 `tfsdk:"total_chunk_count" tf:"optional"` + TotalChunkCount types.Int64 `tfsdk:"total_chunk_count" tf:""` // The total number of rows in the result set. - TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:"optional"` + TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:""` // Indicates whether the result is truncated due to `row_limit` or // `byte_limit`. - Truncated types.Bool `tfsdk:"truncated" tf:"optional"` + Truncated types.Bool `tfsdk:"truncated" tf:""` } func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultManifest_SdkV2) { @@ -9474,6 +9731,13 @@ func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultManifest_SdkV2) { } +func (c ResultManifest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BaseChunkInfo_SdkV2{}.ToSchema(cs, append(path, "chunks")...) + ResultSchema_SdkV2{}.ToSchema(cs, append(path, "schema")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultManifest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9578,9 +9842,9 @@ func (o *ResultManifest_SdkV2) SetSchema(ctx context.Context, v ResultSchema_Sdk // The schema is an ordered list of column descriptions. type ResultSchema_SdkV2 struct { - ColumnCount types.Int64 `tfsdk:"column_count" tf:"optional"` + ColumnCount types.Int64 `tfsdk:"column_count" tf:""` - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *ResultSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultSchema_SdkV2) { @@ -9589,6 +9853,12 @@ func (newState *ResultSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ResultSchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultSchema_SdkV2) { } +func (c ResultSchema_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ColumnInfo_SdkV2{}.ToSchema(cs, append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultSchema. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9653,9 +9923,9 @@ func (o *ResultSchema_SdkV2) SetColumns(ctx context.Context, v []ColumnInfo_SdkV } type ServiceError_SdkV2 struct { - ErrorCode types.String `tfsdk:"error_code" tf:"optional"` + ErrorCode types.String `tfsdk:"error_code" tf:""` // A brief summary of the error condition. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *ServiceError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServiceError_SdkV2) { @@ -9664,6 +9934,11 @@ func (newState *ServiceError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ServiceError_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServiceError_SdkV2) { } +func (c ServiceError_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServiceError. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9699,7 +9974,7 @@ func (o ServiceError_SdkV2) Type(ctx context.Context) attr.Type { // Set object ACL type SetRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // Object ID. The ACL for the object with this UUID is overwritten by this // request's POST content. ObjectId types.String `tfsdk:"-"` @@ -9707,12 +9982,6 @@ type SetRequest_SdkV2 struct { ObjectType types.String `tfsdk:"-"` } -func (newState *SetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetRequest_SdkV2) { -} - -func (newState *SetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9779,17 +10048,11 @@ func (o *SetRequest_SdkV2) SetAccessControlList(ctx context.Context, v []AccessC } type SetResponse_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // An object's type and UUID, separated by a forward slash (/) character. - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` // A singular noun object type. - ObjectType types.String `tfsdk:"object_type" tf:"optional"` -} - -func (newState *SetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetResponse_SdkV2) { -} - -func (newState *SetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetResponse_SdkV2) { + ObjectType types.String `tfsdk:"object_type" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetResponse. @@ -9859,30 +10122,30 @@ func (o *SetResponse_SdkV2) SetAccessControlList(ctx context.Context, v []Access type SetWorkspaceWarehouseConfigRequest_SdkV2 struct { // Optional: Channel selection details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.List `tfsdk:"channel" tf:"object"` // Deprecated: Use sql_configuration_parameters - ConfigParam types.List `tfsdk:"config_param" tf:"optional,object"` + ConfigParam types.List `tfsdk:"config_param" tf:"object"` // Spark confs for external hive metastore configuration JSON serialized // size must be less than <= 512K - DataAccessConfig types.List `tfsdk:"data_access_config" tf:"optional"` + DataAccessConfig types.List `tfsdk:"data_access_config" tf:""` // List of Warehouse Types allowed in this workspace (limits allowed value // of the type field in CreateWarehouse and EditWarehouse). Note: Some types // cannot be disabled, they don't need to be specified in // SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing // warehouses to be converted to another type. Used by frontend to save // specific type availability in the warehouse create and edit form UI. - EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:"optional"` + EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:""` // Deprecated: Use sql_configuration_parameters - GlobalParam types.List `tfsdk:"global_param" tf:"optional,object"` + GlobalParam types.List `tfsdk:"global_param" tf:"object"` // GCP only: Google Service Account used to pass to cluster to access Google // Cloud Storage - GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` + GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:""` // AWS Only: Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // Security policy for warehouses - SecurityPolicy types.String `tfsdk:"security_policy" tf:"optional"` + SecurityPolicy types.String `tfsdk:"security_policy" tf:""` // SQL configuration parameters - SqlConfigurationParameters types.List `tfsdk:"sql_configuration_parameters" tf:"optional,object"` + SqlConfigurationParameters types.List `tfsdk:"sql_configuration_parameters" tf:"object"` } func (newState *SetWorkspaceWarehouseConfigRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetWorkspaceWarehouseConfigRequest_SdkV2) { @@ -9891,6 +10154,17 @@ func (newState *SetWorkspaceWarehouseConfigRequest_SdkV2) SyncEffectiveFieldsDur func (newState *SetWorkspaceWarehouseConfigRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetWorkspaceWarehouseConfigRequest_SdkV2) { } +func (c SetWorkspaceWarehouseConfigRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel_SdkV2{}.ToSchema(cs, append(path, "channel")...) + RepeatedEndpointConfPairs_SdkV2{}.ToSchema(cs, append(path, "config_param")...) + EndpointConfPair_SdkV2{}.ToSchema(cs, append(path, "data_access_config")...) + WarehouseTypePair_SdkV2{}.ToSchema(cs, append(path, "enabled_warehouse_types")...) + RepeatedEndpointConfPairs_SdkV2{}.ToSchema(cs, append(path, "global_param")...) + RepeatedEndpointConfPairs_SdkV2{}.ToSchema(cs, append(path, "sql_configuration_parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetWorkspaceWarehouseConfigRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10122,6 +10396,11 @@ func (newState *SetWorkspaceWarehouseConfigResponse_SdkV2) SyncEffectiveFieldsDu func (newState *SetWorkspaceWarehouseConfigResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetWorkspaceWarehouseConfigResponse_SdkV2) { } +func (c SetWorkspaceWarehouseConfigResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetWorkspaceWarehouseConfigResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10155,12 +10434,6 @@ type StartRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *StartRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartRequest_SdkV2) { -} - -func (newState *StartRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10201,6 +10474,11 @@ func (newState *StartWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *StartWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartWarehouseResponse_SdkV2) { } +func (c StartWarehouseResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10238,10 +10516,10 @@ type StatementParameterListItem_SdkV2 struct { // reference. // // [Data types]: https://docs.databricks.com/sql/language-manual/functions/cast.html - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` // The value to substitute, represented as a string. If omitted, the value // is interpreted as NULL. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *StatementParameterListItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementParameterListItem_SdkV2) { @@ -10250,6 +10528,12 @@ func (newState *StatementParameterListItem_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *StatementParameterListItem_SdkV2) SyncEffectiveFieldsDuringRead(existingState StatementParameterListItem_SdkV2) { } +func (c StatementParameterListItem_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StatementParameterListItem. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10287,15 +10571,15 @@ func (o StatementParameterListItem_SdkV2) Type(ctx context.Context) attr.Type { type StatementResponse_SdkV2 struct { // The result manifest provides schema and metadata for the result set. - Manifest types.List `tfsdk:"manifest" tf:"optional,object"` + Manifest types.List `tfsdk:"manifest" tf:"object"` - Result types.List `tfsdk:"result" tf:"optional,object"` + Result types.List `tfsdk:"result" tf:"object"` // The statement ID is returned upon successfully submitting a SQL // statement, and is a required reference for all subsequent calls. - StatementId types.String `tfsdk:"statement_id" tf:"optional"` + StatementId types.String `tfsdk:"statement_id" tf:""` // The status response includes execution state and if relevant, error // information. - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.List `tfsdk:"status" tf:"object"` } func (newState *StatementResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementResponse_SdkV2) { @@ -10304,6 +10588,14 @@ func (newState *StatementResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *StatementResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StatementResponse_SdkV2) { } +func (c StatementResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ResultManifest_SdkV2{}.ToSchema(cs, append(path, "manifest")...) + ResultData_SdkV2{}.ToSchema(cs, append(path, "result")...) + StatementStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StatementResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10432,7 +10724,7 @@ func (o *StatementResponse_SdkV2) SetStatus(ctx context.Context, v StatementStat // The status response includes execution state and if relevant, error // information. type StatementStatus_SdkV2 struct { - Error types.List `tfsdk:"error" tf:"optional,object"` + Error types.List `tfsdk:"error" tf:"object"` // Statement execution state: - `PENDING`: waiting for warehouse - // `RUNNING`: running - `SUCCEEDED`: execution was successful, result data // available for fetch - `FAILED`: execution failed; reason for failure @@ -10440,7 +10732,7 @@ type StatementStatus_SdkV2 struct { // come from explicit cancel call, or timeout with `on_wait_timeout=CANCEL` // - `CLOSED`: execution successful, and statement closed; result no longer // available for fetch - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *StatementStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementStatus_SdkV2) { @@ -10449,6 +10741,12 @@ func (newState *StatementStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *StatementStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState StatementStatus_SdkV2) { } +func (c StatementStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServiceError_SdkV2{}.ToSchema(cs, append(path, "error")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StatementStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10518,12 +10816,6 @@ type StopRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *StopRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopRequest_SdkV2) { -} - -func (newState *StopRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10564,6 +10856,11 @@ func (newState *StopWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *StopWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopWarehouseResponse_SdkV2) { } +func (c StopWarehouseResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10592,7 +10889,7 @@ func (o StopWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { } type Success_SdkV2 struct { - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *Success_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Success_SdkV2) { @@ -10601,6 +10898,11 @@ func (newState *Success_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Succ func (newState *Success_SdkV2) SyncEffectiveFieldsDuringRead(existingState Success_SdkV2) { } +func (c Success_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Success. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10634,12 +10936,12 @@ func (o Success_SdkV2) Type(ctx context.Context) attr.Type { type TerminationReason_SdkV2 struct { // status code indicating why the cluster was terminated - Code types.String `tfsdk:"code" tf:"optional"` + Code types.String `tfsdk:"code" tf:""` // list of parameters that provide additional information about why the // cluster was terminated - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` // type of the termination - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TerminationReason_SdkV2) { @@ -10648,6 +10950,11 @@ func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringRead(existingState TerminationReason_SdkV2) { } +func (c TerminationReason_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TerminationReason. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10714,7 +11021,7 @@ func (o *TerminationReason_SdkV2) SetParameters(ctx context.Context, v map[strin } type TextValue_SdkV2 struct { - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *TextValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TextValue_SdkV2) { @@ -10723,6 +11030,11 @@ func (newState *TextValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Te func (newState *TextValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState TextValue_SdkV2) { } +func (c TextValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TextValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10756,9 +11068,9 @@ func (o TextValue_SdkV2) Type(ctx context.Context) attr.Type { type TimeRange_SdkV2 struct { // The end time in milliseconds. - EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:"optional"` + EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:""` // The start time in milliseconds. - StartTimeMs types.Int64 `tfsdk:"start_time_ms" tf:"optional"` + StartTimeMs types.Int64 `tfsdk:"start_time_ms" tf:""` } func (newState *TimeRange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TimeRange_SdkV2) { @@ -10767,6 +11079,11 @@ func (newState *TimeRange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ti func (newState *TimeRange_SdkV2) SyncEffectiveFieldsDuringRead(existingState TimeRange_SdkV2) { } +func (c TimeRange_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TimeRange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10802,7 +11119,7 @@ func (o TimeRange_SdkV2) Type(ctx context.Context) attr.Type { type TransferOwnershipObjectId_SdkV2 struct { // Email address for the new owner, who must exist in the workspace. - NewOwner types.String `tfsdk:"new_owner" tf:"optional"` + NewOwner types.String `tfsdk:"new_owner" tf:""` } func (newState *TransferOwnershipObjectId_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransferOwnershipObjectId_SdkV2) { @@ -10811,6 +11128,11 @@ func (newState *TransferOwnershipObjectId_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *TransferOwnershipObjectId_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransferOwnershipObjectId_SdkV2) { } +func (c TransferOwnershipObjectId_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransferOwnershipObjectId. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10845,19 +11167,13 @@ func (o TransferOwnershipObjectId_SdkV2) Type(ctx context.Context) attr.Type { // Transfer object ownership type TransferOwnershipRequest_SdkV2 struct { // Email address for the new owner, who must exist in the workspace. - NewOwner types.String `tfsdk:"new_owner" tf:"optional"` + NewOwner types.String `tfsdk:"new_owner" tf:""` // The ID of the object on which to change ownership. ObjectId types.List `tfsdk:"-"` // The type of object on which to change ownership. ObjectType types.String `tfsdk:"-"` } -func (newState *TransferOwnershipRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransferOwnershipRequest_SdkV2) { -} - -func (newState *TransferOwnershipRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransferOwnershipRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransferOwnershipRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10928,12 +11244,6 @@ type TrashAlertRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *TrashAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashAlertRequest_SdkV2) { -} - -func (newState *TrashAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrashAlertRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashAlertRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10970,12 +11280,6 @@ type TrashQueryRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *TrashQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashQueryRequest_SdkV2) { -} - -func (newState *TrashQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrashQueryRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11008,7 +11312,7 @@ func (o TrashQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { } type UpdateAlertRequest_SdkV2 struct { - Alert types.List `tfsdk:"alert" tf:"optional,object"` + Alert types.List `tfsdk:"alert" tf:"object"` Id types.String `tfsdk:"-"` // Field mask is required to be passed into the PATCH request. Field mask @@ -11024,6 +11328,14 @@ func (newState *UpdateAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *UpdateAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAlertRequest_SdkV2) { } +func (c UpdateAlertRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateAlertRequestAlert_SdkV2{}.ToSchema(cs, append(path, "alert")...) + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "update_mask")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAlertRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11091,31 +11403,31 @@ func (o *UpdateAlertRequest_SdkV2) SetAlert(ctx context.Context, v UpdateAlertRe type UpdateAlertRequestAlert_SdkV2 struct { // Trigger conditions of the alert. - Condition types.List `tfsdk:"condition" tf:"optional,object"` + Condition types.List `tfsdk:"condition" tf:"object"` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This can include // email subject entries and Slack notification headers, for example. See // [here] for custom templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The display name of the alert. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Whether to notify alert subscribers when alert returns back to normal. - NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:""` // The owner's username. This field is set to "Unavailable" if the user has // been deleted. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // UUID of the query attached to the alert. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds an alert must wait after being triggered to rearm // itself. After rearming, it can be triggered again. If 0 or not specified, // the alert will not be triggered again. - SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:""` } func (newState *UpdateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAlertRequestAlert_SdkV2) { @@ -11124,6 +11436,12 @@ func (newState *UpdateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *UpdateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAlertRequestAlert_SdkV2) { } +func (c UpdateAlertRequestAlert_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertCondition_SdkV2{}.ToSchema(cs, append(path, "condition")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAlertRequestAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11202,7 +11520,7 @@ func (o *UpdateAlertRequestAlert_SdkV2) SetCondition(ctx context.Context, v Aler type UpdateQueryRequest_SdkV2 struct { Id types.String `tfsdk:"-"` - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.List `tfsdk:"query" tf:"object"` // Field mask is required to be passed into the PATCH request. Field mask // specifies which fields of the setting payload will be updated. The field // mask needs to be supplied as single string. To specify multiple fields in @@ -11216,6 +11534,14 @@ func (newState *UpdateQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *UpdateQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateQueryRequest_SdkV2) { } +func (c UpdateQueryRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + UpdateQueryRequestQuery_SdkV2{}.ToSchema(cs, append(path, "query")...) + cs.SetRequired(append(path, "update_mask")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11283,29 +11609,29 @@ func (o *UpdateQueryRequest_SdkV2) SetQuery(ctx context.Context, v UpdateQueryRe type UpdateQueryRequestQuery_SdkV2 struct { // Whether to apply a 1000 row limit to the query result. - ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:""` // Name of the catalog where this query will be executed. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Display name of the query that appears in list views, widget headings, // and on the query page. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Username of the user that owns the query. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // List of query parameter definitions. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Text of the query to be run. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Sets the "Run as" role for the object. - RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + RunAsMode types.String `tfsdk:"run_as_mode" tf:""` // Name of the schema where this query will be executed. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // ID of the SQL warehouse attached to the query. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *UpdateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateQueryRequestQuery_SdkV2) { @@ -11314,6 +11640,12 @@ func (newState *UpdateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *UpdateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateQueryRequestQuery_SdkV2) { } +func (c UpdateQueryRequestQuery_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryParameter_SdkV2{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateQueryRequestQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11427,12 +11759,6 @@ func (o *UpdateQueryRequestQuery_SdkV2) SetTags(ctx context.Context, v []types.S type UpdateResponse_SdkV2 struct { } -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { -} - -func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11468,7 +11794,7 @@ type UpdateVisualizationRequest_SdkV2 struct { // the field mask, use comma as the separator (no space). UpdateMask types.String `tfsdk:"update_mask" tf:""` - Visualization types.List `tfsdk:"visualization" tf:"optional,object"` + Visualization types.List `tfsdk:"visualization" tf:"object"` } func (newState *UpdateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVisualizationRequest_SdkV2) { @@ -11477,6 +11803,14 @@ func (newState *UpdateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *UpdateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateVisualizationRequest_SdkV2) { } +func (c UpdateVisualizationRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "update_mask")...) + UpdateVisualizationRequestVisualization_SdkV2{}.ToSchema(cs, append(path, "visualization")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateVisualizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11544,17 +11878,17 @@ func (o *UpdateVisualizationRequest_SdkV2) SetVisualization(ctx context.Context, type UpdateVisualizationRequestVisualization_SdkV2 struct { // The display name of the visualization. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The visualization options varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying // visualization options directly. - SerializedOptions types.String `tfsdk:"serialized_options" tf:"optional"` + SerializedOptions types.String `tfsdk:"serialized_options" tf:""` // The visualization query plan varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying the // visualization query plan directly. - SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:"optional"` + SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:""` // The type of visualization: counter, table, funnel, and so on. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *UpdateVisualizationRequestVisualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVisualizationRequestVisualization_SdkV2) { @@ -11563,6 +11897,11 @@ func (newState *UpdateVisualizationRequestVisualization_SdkV2) SyncEffectiveFiel func (newState *UpdateVisualizationRequestVisualization_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateVisualizationRequestVisualization_SdkV2) { } +func (c UpdateVisualizationRequestVisualization_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateVisualizationRequestVisualization. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11601,11 +11940,11 @@ func (o UpdateVisualizationRequestVisualization_SdkV2) Type(ctx context.Context) } type User_SdkV2 struct { - Email types.String `tfsdk:"email" tf:"optional"` + Email types.String `tfsdk:"email" tf:""` - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *User_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan User_SdkV2) { @@ -11614,6 +11953,11 @@ func (newState *User_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan User_Sd func (newState *User_SdkV2) SyncEffectiveFieldsDuringRead(existingState User_SdkV2) { } +func (c User_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in User. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11651,25 +11995,25 @@ func (o User_SdkV2) Type(ctx context.Context) attr.Type { type Visualization_SdkV2 struct { // The timestamp indicating when the visualization was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // The display name of the visualization. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the visualization. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // UUID of the query that the visualization is attached to. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // The visualization options varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying // visualization options directly. - SerializedOptions types.String `tfsdk:"serialized_options" tf:"optional"` + SerializedOptions types.String `tfsdk:"serialized_options" tf:""` // The visualization query plan varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying the // visualization query plan directly. - SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:"optional"` + SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:""` // The type of visualization: counter, table, funnel, and so on. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` // The timestamp indicating when the visualization was updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *Visualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Visualization_SdkV2) { @@ -11678,6 +12022,11 @@ func (newState *Visualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *Visualization_SdkV2) SyncEffectiveFieldsDuringRead(existingState Visualization_SdkV2) { } +func (c Visualization_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Visualization. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11725,13 +12074,13 @@ func (o Visualization_SdkV2) Type(ctx context.Context) attr.Type { type WarehouseAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *WarehouseAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehouseAccessControlRequest_SdkV2) { @@ -11740,6 +12089,11 @@ func (newState *WarehouseAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCr func (newState *WarehouseAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehouseAccessControlRequest_SdkV2) { } +func (c WarehouseAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehouseAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11779,15 +12133,15 @@ func (o WarehouseAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type type WarehouseAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *WarehouseAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehouseAccessControlResponse_SdkV2) { @@ -11796,6 +12150,12 @@ func (newState *WarehouseAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringC func (newState *WarehouseAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehouseAccessControlResponse_SdkV2) { } +func (c WarehouseAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WarehousePermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehouseAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11866,11 +12226,11 @@ func (o *WarehouseAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Con } type WarehousePermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *WarehousePermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermission_SdkV2) { @@ -11879,6 +12239,11 @@ func (newState *WarehousePermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *WarehousePermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehousePermission_SdkV2) { } +func (c WarehousePermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11945,11 +12310,11 @@ func (o *WarehousePermission_SdkV2) SetInheritedFromObject(ctx context.Context, } type WarehousePermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *WarehousePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermissions_SdkV2) { @@ -11958,6 +12323,12 @@ func (newState *WarehousePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *WarehousePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehousePermissions_SdkV2) { } +func (c WarehousePermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WarehouseAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12024,9 +12395,9 @@ func (o *WarehousePermissions_SdkV2) SetAccessControlList(ctx context.Context, v } type WarehousePermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *WarehousePermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermissionsDescription_SdkV2) { @@ -12035,6 +12406,11 @@ func (newState *WarehousePermissionsDescription_SdkV2) SyncEffectiveFieldsDuring func (newState *WarehousePermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehousePermissionsDescription_SdkV2) { } +func (c WarehousePermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12069,7 +12445,7 @@ func (o WarehousePermissionsDescription_SdkV2) Type(ctx context.Context) attr.Ty } type WarehousePermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The SQL warehouse for which to get or manage permissions. WarehouseId types.String `tfsdk:"-"` } @@ -12080,6 +12456,13 @@ func (newState *WarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *WarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehousePermissionsRequest_SdkV2) { } +func (c WarehousePermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WarehouseAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "warehouse_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12146,9 +12529,9 @@ func (o *WarehousePermissionsRequest_SdkV2) SetAccessControlList(ctx context.Con type WarehouseTypePair_SdkV2 struct { // If set to false the specific warehouse type will not be be allowed as a // value for warehouse_type in CreateWarehouse and EditWarehouse - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // Warehouse type: `PRO` or `CLASSIC`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *WarehouseTypePair_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehouseTypePair_SdkV2) { @@ -12157,6 +12540,11 @@ func (newState *WarehouseTypePair_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *WarehouseTypePair_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehouseTypePair_SdkV2) { } +func (c WarehouseTypePair_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehouseTypePair. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12192,17 +12580,17 @@ func (o WarehouseTypePair_SdkV2) Type(ctx context.Context) attr.Type { type Widget_SdkV2 struct { // The unique ID for this widget. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.List `tfsdk:"options" tf:"object"` // The visualization description API changes frequently and is unsupported. // You can duplicate a visualization by copying description objects received // _from the API_ and then using them to create a new one with a POST // request to the same endpoint. Databricks does not recommend constructing // ad-hoc visualizations entirely in JSON. - Visualization types.List `tfsdk:"visualization" tf:"optional,object"` + Visualization types.List `tfsdk:"visualization" tf:"object"` // Unused field. - Width types.Int64 `tfsdk:"width" tf:"optional"` + Width types.Int64 `tfsdk:"width" tf:""` } func (newState *Widget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Widget_SdkV2) { @@ -12211,6 +12599,13 @@ func (newState *Widget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Widge func (newState *Widget_SdkV2) SyncEffectiveFieldsDuringRead(existingState Widget_SdkV2) { } +func (c Widget_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WidgetOptions_SdkV2{}.ToSchema(cs, append(path, "options")...) + LegacyVisualization_SdkV2{}.ToSchema(cs, append(path, "visualization")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Widget. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12309,22 +12704,22 @@ func (o *Widget_SdkV2) SetVisualization(ctx context.Context, v LegacyVisualizati type WidgetOptions_SdkV2 struct { // Timestamp when this object was created - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // Custom description of the widget - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Whether this widget is hidden on the dashboard. - IsHidden types.Bool `tfsdk:"isHidden" tf:"optional"` + IsHidden types.Bool `tfsdk:"isHidden" tf:""` // How parameters used by the visualization in this widget relate to other // widgets on the dashboard. Databricks does not recommend modifying this // definition in JSON. - ParameterMappings types.Object `tfsdk:"parameterMappings" tf:"optional"` + ParameterMappings types.Object `tfsdk:"parameterMappings" tf:""` // Coordinates of this widget on a dashboard. This portion of the API // changes frequently and is unsupported. - Position types.List `tfsdk:"position" tf:"optional,object"` + Position types.List `tfsdk:"position" tf:"object"` // Custom title of the widget - Title types.String `tfsdk:"title" tf:"optional"` + Title types.String `tfsdk:"title" tf:""` // Timestamp of the last time this object was updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` } func (newState *WidgetOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WidgetOptions_SdkV2) { @@ -12333,6 +12728,12 @@ func (newState *WidgetOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *WidgetOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState WidgetOptions_SdkV2) { } +func (c WidgetOptions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WidgetPosition_SdkV2{}.ToSchema(cs, append(path, "position")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WidgetOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12410,15 +12811,15 @@ func (o *WidgetOptions_SdkV2) SetPosition(ctx context.Context, v WidgetPosition_ // frequently and is unsupported. type WidgetPosition_SdkV2 struct { // reserved for internal use - AutoHeight types.Bool `tfsdk:"autoHeight" tf:"optional"` + AutoHeight types.Bool `tfsdk:"autoHeight" tf:""` // column in the dashboard grid. Values start with 0 - Col types.Int64 `tfsdk:"col" tf:"optional"` + Col types.Int64 `tfsdk:"col" tf:""` // row in the dashboard grid. Values start with 0 - Row types.Int64 `tfsdk:"row" tf:"optional"` + Row types.Int64 `tfsdk:"row" tf:""` // width of the widget measured in dashboard grid cells - SizeX types.Int64 `tfsdk:"sizeX" tf:"optional"` + SizeX types.Int64 `tfsdk:"sizeX" tf:""` // height of the widget measured in dashboard grid cells - SizeY types.Int64 `tfsdk:"sizeY" tf:"optional"` + SizeY types.Int64 `tfsdk:"sizeY" tf:""` } func (newState *WidgetPosition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WidgetPosition_SdkV2) { @@ -12427,6 +12828,11 @@ func (newState *WidgetPosition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *WidgetPosition_SdkV2) SyncEffectiveFieldsDuringRead(existingState WidgetPosition_SdkV2) { } +func (c WidgetPosition_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WidgetPosition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/sql_tf/model.go b/internal/service/sql_tf/model.go index e204a761c..b33d5b45f 100755 --- a/internal/service/sql_tf/model.go +++ b/internal/service/sql_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -22,12 +23,12 @@ import ( ) type AccessControl struct { - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * // `CAN_EDIT`: Can edit the query * `CAN_MANAGE`: Can manage the query - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *AccessControl) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccessControl) { @@ -36,6 +37,11 @@ func (newState *AccessControl) SyncEffectiveFieldsDuringCreateOrUpdate(plan Acce func (newState *AccessControl) SyncEffectiveFieldsDuringRead(existingState AccessControl) { } +func (c AccessControl) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AccessControl. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -73,48 +79,48 @@ func (o AccessControl) Type(ctx context.Context) attr.Type { type Alert struct { // Trigger conditions of the alert. - Condition types.Object `tfsdk:"condition" tf:"optional,object"` + Condition types.Object `tfsdk:"condition" tf:"object"` // The timestamp indicating when the alert was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This can include // email subject entries and Slack notification headers, for example. See // [here] for custom templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The display name of the alert. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the alert. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The workspace state of the alert. Used for tracking trashed status. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // Whether to notify alert subscribers when alert returns back to normal. - NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:""` // The owner's username. This field is set to "Unavailable" if the user has // been deleted. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // The workspace path of the folder containing the alert. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // UUID of the query attached to the alert. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds an alert must wait after being triggered to rearm // itself. After rearming, it can be triggered again. If 0 or not specified, // the alert will not be triggered again. - SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:""` // Current state of the alert's trigger status. This field is set to UNKNOWN // if the alert has not yet been evaluated or ran into an error during the // last evaluation. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Timestamp when the alert was last triggered, if the alert has been // triggered before. - TriggerTime types.String `tfsdk:"trigger_time" tf:"optional"` + TriggerTime types.String `tfsdk:"trigger_time" tf:""` // The timestamp indicating when the alert was updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *Alert) SyncEffectiveFieldsDuringCreateOrUpdate(plan Alert) { @@ -123,6 +129,12 @@ func (newState *Alert) SyncEffectiveFieldsDuringCreateOrUpdate(plan Alert) { func (newState *Alert) SyncEffectiveFieldsDuringRead(existingState Alert) { } +func (c Alert) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertCondition{}.ToSchema(cs, append(path, "condition")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Alert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -214,14 +226,14 @@ func (o *Alert) SetCondition(ctx context.Context, v AlertCondition) { type AlertCondition struct { // Alert state if result is empty. - EmptyResultState types.String `tfsdk:"empty_result_state" tf:"optional"` + EmptyResultState types.String `tfsdk:"empty_result_state" tf:""` // Operator used for comparison in alert evaluation. - Op types.String `tfsdk:"op" tf:"optional"` + Op types.String `tfsdk:"op" tf:""` // Name of the column from the query result to use for comparison in alert // evaluation. - Operand types.Object `tfsdk:"operand" tf:"optional,object"` + Operand types.Object `tfsdk:"operand" tf:"object"` // Threshold value used for comparison in alert evaluation. - Threshold types.Object `tfsdk:"threshold" tf:"optional,object"` + Threshold types.Object `tfsdk:"threshold" tf:"object"` } func (newState *AlertCondition) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertCondition) { @@ -230,6 +242,13 @@ func (newState *AlertCondition) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ale func (newState *AlertCondition) SyncEffectiveFieldsDuringRead(existingState AlertCondition) { } +func (c AlertCondition) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertConditionOperand{}.ToSchema(cs, append(path, "operand")...) + AlertConditionThreshold{}.ToSchema(cs, append(path, "threshold")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertCondition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -327,7 +346,7 @@ func (o *AlertCondition) SetThreshold(ctx context.Context, v AlertConditionThres } type AlertConditionOperand struct { - Column types.Object `tfsdk:"column" tf:"optional,object"` + Column types.Object `tfsdk:"column" tf:"object"` } func (newState *AlertConditionOperand) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConditionOperand) { @@ -336,6 +355,12 @@ func (newState *AlertConditionOperand) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *AlertConditionOperand) SyncEffectiveFieldsDuringRead(existingState AlertConditionOperand) { } +func (c AlertConditionOperand) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertOperandColumn{}.ToSchema(cs, append(path, "column")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertConditionOperand. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -398,7 +423,7 @@ func (o *AlertConditionOperand) SetColumn(ctx context.Context, v AlertOperandCol } type AlertConditionThreshold struct { - Value types.Object `tfsdk:"value" tf:"optional,object"` + Value types.Object `tfsdk:"value" tf:"object"` } func (newState *AlertConditionThreshold) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConditionThreshold) { @@ -407,6 +432,12 @@ func (newState *AlertConditionThreshold) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *AlertConditionThreshold) SyncEffectiveFieldsDuringRead(existingState AlertConditionThreshold) { } +func (c AlertConditionThreshold) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertOperandValue{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertConditionThreshold. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -469,7 +500,7 @@ func (o *AlertConditionThreshold) SetValue(ctx context.Context, v AlertOperandVa } type AlertOperandColumn struct { - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *AlertOperandColumn) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertOperandColumn) { @@ -478,6 +509,11 @@ func (newState *AlertOperandColumn) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AlertOperandColumn) SyncEffectiveFieldsDuringRead(existingState AlertOperandColumn) { } +func (c AlertOperandColumn) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertOperandColumn. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -510,11 +546,11 @@ func (o AlertOperandColumn) Type(ctx context.Context) attr.Type { } type AlertOperandValue struct { - BoolValue types.Bool `tfsdk:"bool_value" tf:"optional"` + BoolValue types.Bool `tfsdk:"bool_value" tf:""` - DoubleValue types.Float64 `tfsdk:"double_value" tf:"optional"` + DoubleValue types.Float64 `tfsdk:"double_value" tf:""` - StringValue types.String `tfsdk:"string_value" tf:"optional"` + StringValue types.String `tfsdk:"string_value" tf:""` } func (newState *AlertOperandValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertOperandValue) { @@ -523,6 +559,11 @@ func (newState *AlertOperandValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *AlertOperandValue) SyncEffectiveFieldsDuringRead(existingState AlertOperandValue) { } +func (c AlertOperandValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertOperandValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -566,18 +607,18 @@ type AlertOptions struct { // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This includes email // subject, Slack notification header, etc. See [here] for custom templating // instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // State that alert evaluates to when query result is empty. - EmptyResultState types.String `tfsdk:"empty_result_state" tf:"optional"` + EmptyResultState types.String `tfsdk:"empty_result_state" tf:""` // Whether or not the alert is muted. If an alert is muted, it will not // notify users and notification destinations when triggered. - Muted types.Bool `tfsdk:"muted" tf:"optional"` + Muted types.Bool `tfsdk:"muted" tf:""` // Operator used to compare in alert evaluation: `>`, `>=`, `<`, `<=`, `==`, // `!=` Op types.String `tfsdk:"op" tf:""` @@ -592,6 +633,14 @@ func (newState *AlertOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan Alert func (newState *AlertOptions) SyncEffectiveFieldsDuringRead(existingState AlertOptions) { } +func (c AlertOptions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "column")...) + cs.SetRequired(append(path, "op")...) + cs.SetRequired(append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -637,44 +686,44 @@ func (o AlertOptions) Type(ctx context.Context) attr.Type { type AlertQuery struct { // The timestamp when this query was created. - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // Data source ID maps to the ID of the data source used by the resource and // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + DataSourceId types.String `tfsdk:"data_source_id" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Query ID. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Indicates whether the query is trashed. Trashed queries can't be used in // dashboards, or appear in search results. If this boolean is `true`, the // `options` property for this query includes a `moved_to_trash_at` // timestamp. Trashed queries are permanently deleted after 30 days. - IsArchived types.Bool `tfsdk:"is_archived" tf:"optional"` + IsArchived types.Bool `tfsdk:"is_archived" tf:""` // Whether the query is a draft. Draft queries only appear in list views for // their owners. Visualizations from draft queries cannot appear on // dashboards. - IsDraft types.Bool `tfsdk:"is_draft" tf:"optional"` + IsDraft types.Bool `tfsdk:"is_draft" tf:""` // Text parameter types are not safe from SQL injection for all types of // data source. Set this Boolean parameter to `true` if a query either does // not use any text type parameters or uses a data source type where text // type parameters are handled safely. - IsSafe types.Bool `tfsdk:"is_safe" tf:"optional"` + IsSafe types.Bool `tfsdk:"is_safe" tf:""` // The title of this query that appears in list views, widget headings, and // on the query page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` - Options types.Object `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"object"` // The text of the query to be run. - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The timestamp at which this query was last updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` // The ID of the user who owns the query. - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` } func (newState *AlertQuery) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertQuery) { @@ -683,6 +732,12 @@ func (newState *AlertQuery) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertQu func (newState *AlertQuery) SyncEffectiveFieldsDuringRead(existingState AlertQuery) { } +func (c AlertQuery) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryOptions{}.ToSchema(cs, append(path, "options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -803,13 +858,13 @@ func (o *AlertQuery) SetTags(ctx context.Context, v []types.String) { type BaseChunkInfo struct { // The number of bytes in the result chunk. This field is not available when // using `INLINE` disposition. - ByteCount types.Int64 `tfsdk:"byte_count" tf:"optional"` + ByteCount types.Int64 `tfsdk:"byte_count" tf:""` // The position within the sequence of result set chunks. - ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:"optional"` + ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:""` // The number of rows within the result chunk. - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` // The starting row offset within the result set. - RowOffset types.Int64 `tfsdk:"row_offset" tf:"optional"` + RowOffset types.Int64 `tfsdk:"row_offset" tf:""` } func (newState *BaseChunkInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseChunkInfo) { @@ -818,6 +873,11 @@ func (newState *BaseChunkInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Base func (newState *BaseChunkInfo) SyncEffectiveFieldsDuringRead(existingState BaseChunkInfo) { } +func (c BaseChunkInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in BaseChunkInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -862,12 +922,6 @@ type CancelExecutionRequest struct { StatementId types.String `tfsdk:"-"` } -func (newState *CancelExecutionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelExecutionRequest) { -} - -func (newState *CancelExecutionRequest) SyncEffectiveFieldsDuringRead(existingState CancelExecutionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelExecutionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -902,12 +956,6 @@ func (o CancelExecutionRequest) Type(ctx context.Context) attr.Type { type CancelExecutionResponse struct { } -func (newState *CancelExecutionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelExecutionResponse) { -} - -func (newState *CancelExecutionResponse) SyncEffectiveFieldsDuringRead(existingState CancelExecutionResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelExecutionResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -938,9 +986,9 @@ func (o CancelExecutionResponse) Type(ctx context.Context) attr.Type { // Configures the channel name and DBSQL version of the warehouse. // CHANNEL_NAME_CUSTOM should be chosen only when `dbsql_version` is specified. type Channel struct { - DbsqlVersion types.String `tfsdk:"dbsql_version" tf:"optional"` + DbsqlVersion types.String `tfsdk:"dbsql_version" tf:""` - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *Channel) SyncEffectiveFieldsDuringCreateOrUpdate(plan Channel) { @@ -949,6 +997,11 @@ func (newState *Channel) SyncEffectiveFieldsDuringCreateOrUpdate(plan Channel) { func (newState *Channel) SyncEffectiveFieldsDuringRead(existingState Channel) { } +func (c Channel) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Channel. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -985,9 +1038,9 @@ func (o Channel) Type(ctx context.Context) attr.Type { // Details about a Channel. type ChannelInfo struct { // DB SQL Version the Channel is mapped to. - DbsqlVersion types.String `tfsdk:"dbsql_version" tf:"optional"` + DbsqlVersion types.String `tfsdk:"dbsql_version" tf:""` // Name of the channel - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ChannelInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChannelInfo) { @@ -996,6 +1049,11 @@ func (newState *ChannelInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Channe func (newState *ChannelInfo) SyncEffectiveFieldsDuringRead(existingState ChannelInfo) { } +func (c ChannelInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ChannelInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1031,22 +1089,22 @@ func (o ChannelInfo) Type(ctx context.Context) attr.Type { type ColumnInfo struct { // The name of the column. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The ordinal position of the column (starting at position 0). - Position types.Int64 `tfsdk:"position" tf:"optional"` + Position types.Int64 `tfsdk:"position" tf:""` // The format of the interval type. - TypeIntervalType types.String `tfsdk:"type_interval_type" tf:"optional"` + TypeIntervalType types.String `tfsdk:"type_interval_type" tf:""` // The name of the base data type. This doesn't include details for complex // types such as STRUCT, MAP or ARRAY. - TypeName types.String `tfsdk:"type_name" tf:"optional"` + TypeName types.String `tfsdk:"type_name" tf:""` // Specifies the number of digits in a number. This applies to the DECIMAL // type. - TypePrecision types.Int64 `tfsdk:"type_precision" tf:"optional"` + TypePrecision types.Int64 `tfsdk:"type_precision" tf:""` // Specifies the number of digits to the right of the decimal point in a // number. This applies to the DECIMAL type. - TypeScale types.Int64 `tfsdk:"type_scale" tf:"optional"` + TypeScale types.Int64 `tfsdk:"type_scale" tf:""` // The full SQL type specification. - TypeText types.String `tfsdk:"type_text" tf:"optional"` + TypeText types.String `tfsdk:"type_text" tf:""` } func (newState *ColumnInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnInfo) { @@ -1055,6 +1113,11 @@ func (newState *ColumnInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnI func (newState *ColumnInfo) SyncEffectiveFieldsDuringRead(existingState ColumnInfo) { } +func (c ColumnInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1104,13 +1167,13 @@ type CreateAlert struct { // Alert configuration options. Options types.Object `tfsdk:"options" tf:"object"` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // Query ID. QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds after being triggered before the alert rearms itself // and can be triggered again. If `null`, alert will never be triggered // again. - Rearm types.Int64 `tfsdk:"rearm" tf:"optional"` + Rearm types.Int64 `tfsdk:"rearm" tf:""` } func (newState *CreateAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlert) { @@ -1119,6 +1182,15 @@ func (newState *CreateAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan Create func (newState *CreateAlert) SyncEffectiveFieldsDuringRead(existingState CreateAlert) { } +func (c CreateAlert) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "options")...) + AlertOptions{}.ToSchema(cs, append(path, "options")...) + cs.SetRequired(append(path, "query_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1189,7 +1261,7 @@ func (o *CreateAlert) SetOptions(ctx context.Context, v AlertOptions) { } type CreateAlertRequest struct { - Alert types.Object `tfsdk:"alert" tf:"optional,object"` + Alert types.Object `tfsdk:"alert" tf:"object"` } func (newState *CreateAlertRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlertRequest) { @@ -1198,6 +1270,12 @@ func (newState *CreateAlertRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateAlertRequest) SyncEffectiveFieldsDuringRead(existingState CreateAlertRequest) { } +func (c CreateAlertRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateAlertRequestAlert{}.ToSchema(cs, append(path, "alert")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAlertRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1261,30 +1339,30 @@ func (o *CreateAlertRequest) SetAlert(ctx context.Context, v CreateAlertRequestA type CreateAlertRequestAlert struct { // Trigger conditions of the alert. - Condition types.Object `tfsdk:"condition" tf:"optional,object"` + Condition types.Object `tfsdk:"condition" tf:"object"` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This can include // email subject entries and Slack notification headers, for example. See // [here] for custom templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The display name of the alert. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Whether to notify alert subscribers when alert returns back to normal. - NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:""` // The workspace path of the folder containing the alert. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // UUID of the query attached to the alert. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds an alert must wait after being triggered to rearm // itself. After rearming, it can be triggered again. If 0 or not specified, // the alert will not be triggered again. - SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:""` } func (newState *CreateAlertRequestAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlertRequestAlert) { @@ -1293,6 +1371,12 @@ func (newState *CreateAlertRequestAlert) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateAlertRequestAlert) SyncEffectiveFieldsDuringRead(existingState CreateAlertRequestAlert) { } +func (c CreateAlertRequestAlert) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertCondition{}.ToSchema(cs, append(path, "condition")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAlertRequestAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1369,7 +1453,7 @@ func (o *CreateAlertRequestAlert) SetCondition(ctx context.Context, v AlertCondi } type CreateQueryRequest struct { - Query types.Object `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"object"` } func (newState *CreateQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryRequest) { @@ -1378,6 +1462,12 @@ func (newState *CreateQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateQueryRequest) SyncEffectiveFieldsDuringRead(existingState CreateQueryRequest) { } +func (c CreateQueryRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateQueryRequestQuery{}.ToSchema(cs, append(path, "query")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1441,29 +1531,29 @@ func (o *CreateQueryRequest) SetQuery(ctx context.Context, v CreateQueryRequestQ type CreateQueryRequestQuery struct { // Whether to apply a 1000 row limit to the query result. - ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:""` // Name of the catalog where this query will be executed. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Display name of the query that appears in list views, widget headings, // and on the query page. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // List of query parameter definitions. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Workspace path of the workspace folder containing the object. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // Text of the query to be run. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Sets the "Run as" role for the object. - RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + RunAsMode types.String `tfsdk:"run_as_mode" tf:""` // Name of the schema where this query will be executed. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // ID of the SQL warehouse attached to the query. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *CreateQueryRequestQuery) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryRequestQuery) { @@ -1472,6 +1562,12 @@ func (newState *CreateQueryRequestQuery) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateQueryRequestQuery) SyncEffectiveFieldsDuringRead(existingState CreateQueryRequestQuery) { } +func (c CreateQueryRequestQuery) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryParameter{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateQueryRequestQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1586,10 +1682,10 @@ func (o *CreateQueryRequestQuery) SetTags(ctx context.Context, v []types.String) type CreateQueryVisualizationsLegacyRequest struct { // A short description of this visualization. This is not displayed in the // UI. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The name of the visualization that appears on dashboards and the query // screen. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The options object varies widely from one visualization type to the next // and is unsupported. Databricks does not recommend modifying visualization // settings in JSON. @@ -1600,12 +1696,6 @@ type CreateQueryVisualizationsLegacyRequest struct { Type_ types.String `tfsdk:"type" tf:""` } -func (newState *CreateQueryVisualizationsLegacyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryVisualizationsLegacyRequest) { -} - -func (newState *CreateQueryVisualizationsLegacyRequest) SyncEffectiveFieldsDuringRead(existingState CreateQueryVisualizationsLegacyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateQueryVisualizationsLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1646,7 +1736,7 @@ func (o CreateQueryVisualizationsLegacyRequest) Type(ctx context.Context) attr.T } type CreateVisualizationRequest struct { - Visualization types.Object `tfsdk:"visualization" tf:"optional,object"` + Visualization types.Object `tfsdk:"visualization" tf:"object"` } func (newState *CreateVisualizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVisualizationRequest) { @@ -1655,6 +1745,12 @@ func (newState *CreateVisualizationRequest) SyncEffectiveFieldsDuringCreateOrUpd func (newState *CreateVisualizationRequest) SyncEffectiveFieldsDuringRead(existingState CreateVisualizationRequest) { } +func (c CreateVisualizationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CreateVisualizationRequestVisualization{}.ToSchema(cs, append(path, "visualization")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVisualizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1718,19 +1814,19 @@ func (o *CreateVisualizationRequest) SetVisualization(ctx context.Context, v Cre type CreateVisualizationRequestVisualization struct { // The display name of the visualization. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID of the query that the visualization is attached to. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // The visualization options varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying // visualization options directly. - SerializedOptions types.String `tfsdk:"serialized_options" tf:"optional"` + SerializedOptions types.String `tfsdk:"serialized_options" tf:""` // The visualization query plan varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying the // visualization query plan directly. - SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:"optional"` + SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:""` // The type of visualization: counter, table, funnel, and so on. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *CreateVisualizationRequestVisualization) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVisualizationRequestVisualization) { @@ -1739,6 +1835,11 @@ func (newState *CreateVisualizationRequestVisualization) SyncEffectiveFieldsDuri func (newState *CreateVisualizationRequestVisualization) SyncEffectiveFieldsDuringRead(existingState CreateVisualizationRequestVisualization) { } +func (c CreateVisualizationRequestVisualization) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVisualizationRequestVisualization. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1787,33 +1888,33 @@ type CreateWarehouseRequest struct { // autostop. // // Defaults to 120 mins - AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:""` // Channel Details - Channel types.Object `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. // // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large // - 2X-Large - 3X-Large - 4X-Large - ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + ClusterSize types.String `tfsdk:"cluster_size" tf:""` // warehouse creator name - CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + CreatorName types.String `tfsdk:"creator_name" tf:""` // Configures whether the warehouse should use Photon optimized clusters. // // Defaults to false. - EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:""` // Configures whether the warehouse should use serverless compute - EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:""` // Deprecated. Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // Maximum number of clusters that the autoscaler will create to handle // concurrent queries. // // Supported values: - Must be >= min_num_clusters - Must be <= 30. // // Defaults to min_clusters if unset. - MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:""` // Minimum number of available clusters that will be maintained for this SQL // warehouse. Increasing this will ensure that a larger number of clusters // are always running and therefore may reduce the cold start time for new @@ -1823,23 +1924,23 @@ type CreateWarehouseRequest struct { // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) // // Defaults to 1 - MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:""` // Logical name for the cluster. // // Supported values: - Must be unique within an org. - Must be less than 100 // characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Configurations whether the warehouse should use spot instances. - SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:""` // A set of key-value pairs that will be tagged on all resources (e.g., AWS // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.Object `tfsdk:"tags" tf:"optional,object"` + Tags types.Object `tfsdk:"tags" tf:"object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *CreateWarehouseRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWarehouseRequest) { @@ -1848,6 +1949,13 @@ func (newState *CreateWarehouseRequest) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *CreateWarehouseRequest) SyncEffectiveFieldsDuringRead(existingState CreateWarehouseRequest) { } +func (c CreateWarehouseRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel{}.ToSchema(cs, append(path, "channel")...) + EndpointTags{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWarehouseRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1964,7 +2072,7 @@ func (o *CreateWarehouseRequest) SetTags(ctx context.Context, v EndpointTags) { type CreateWarehouseResponse struct { // Id for the SQL warehouse. This value is unique across all SQL warehouses. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` } func (newState *CreateWarehouseResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWarehouseResponse) { @@ -1973,6 +2081,11 @@ func (newState *CreateWarehouseResponse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateWarehouseResponse) SyncEffectiveFieldsDuringRead(existingState CreateWarehouseResponse) { } +func (c CreateWarehouseResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2014,9 +2127,9 @@ type CreateWidget struct { // If this is a textbox widget, the application displays this text. This // field is ignored if the widget contains a visualization in the // `visualization` field. - Text types.String `tfsdk:"text" tf:"optional"` + Text types.String `tfsdk:"text" tf:""` // Query Vizualization ID returned by :method:queryvisualizations/create. - VisualizationId types.String `tfsdk:"visualization_id" tf:"optional"` + VisualizationId types.String `tfsdk:"visualization_id" tf:""` // Width of a widget Width types.Int64 `tfsdk:"width" tf:""` } @@ -2027,6 +2140,16 @@ func (newState *CreateWidget) SyncEffectiveFieldsDuringCreateOrUpdate(plan Creat func (newState *CreateWidget) SyncEffectiveFieldsDuringRead(existingState CreateWidget) { } +func (c CreateWidget) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "options")...) + WidgetOptions{}.ToSchema(cs, append(path, "options")...) + cs.SetRequired(append(path, "width")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWidget. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2102,49 +2225,49 @@ func (o *CreateWidget) SetOptions(ctx context.Context, v WidgetOptions) { // boxes. type Dashboard struct { // Whether the authenticated user can edit the query definition. - CanEdit types.Bool `tfsdk:"can_edit" tf:"optional"` + CanEdit types.Bool `tfsdk:"can_edit" tf:""` // Timestamp when this dashboard was created. - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // In the web application, query filters that share a name are coupled to a // single selection box if this value is `true`. - DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:"optional"` + DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:""` // The ID for this dashboard. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Indicates whether a dashboard is trashed. Trashed dashboards won't appear // in list views. If this boolean is `true`, the `options` property for this // dashboard includes a `moved_to_trash_at` timestamp. Items in trash are // permanently deleted after 30 days. - IsArchived types.Bool `tfsdk:"is_archived" tf:"optional"` + IsArchived types.Bool `tfsdk:"is_archived" tf:""` // Whether a dashboard is a draft. Draft dashboards only appear in list // views for their owners. - IsDraft types.Bool `tfsdk:"is_draft" tf:"optional"` + IsDraft types.Bool `tfsdk:"is_draft" tf:""` // Indicates whether this query object appears in the current user's // favorites list. This flag determines whether the star icon for favorites // is selected. - IsFavorite types.Bool `tfsdk:"is_favorite" tf:"optional"` + IsFavorite types.Bool `tfsdk:"is_favorite" tf:""` // The title of the dashboard that appears in list views and at the top of // the dashboard page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` - Options types.Object `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"object"` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * // `CAN_EDIT`: Can edit the query * `CAN_MANAGE`: Can manage the query - PermissionTier types.String `tfsdk:"permission_tier" tf:"optional"` + PermissionTier types.String `tfsdk:"permission_tier" tf:""` // URL slug. Usually mirrors the query name with dashes (`-`) instead of // spaces. Appears in the URL for this query. - Slug types.String `tfsdk:"slug" tf:"optional"` + Slug types.String `tfsdk:"slug" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // Timestamp when this dashboard was last updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` - User types.Object `tfsdk:"user" tf:"optional,object"` + User types.Object `tfsdk:"user" tf:"object"` // The ID of the user who owns the dashboard. - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` - Widgets types.List `tfsdk:"widgets" tf:"optional"` + Widgets types.List `tfsdk:"widgets" tf:""` } func (newState *Dashboard) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dashboard) { @@ -2153,6 +2276,14 @@ func (newState *Dashboard) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dashboar func (newState *Dashboard) SyncEffectiveFieldsDuringRead(existingState Dashboard) { } +func (c Dashboard) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DashboardOptions{}.ToSchema(cs, append(path, "options")...) + User{}.ToSchema(cs, append(path, "user")...) + Widget{}.ToSchema(cs, append(path, "widgets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Dashboard. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2337,13 +2468,13 @@ type DashboardEditContent struct { DashboardId types.String `tfsdk:"-"` // The title of this dashboard that appears in list views and at the top of // the dashboard page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *DashboardEditContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardEditContent) { @@ -2352,6 +2483,12 @@ func (newState *DashboardEditContent) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DashboardEditContent) SyncEffectiveFieldsDuringRead(existingState DashboardEditContent) { } +func (c DashboardEditContent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dashboard_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DashboardEditContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2423,7 +2560,7 @@ type DashboardOptions struct { // The timestamp when this dashboard was moved to trash. Only present when // the `is_archived` property is `true`. Trashed items are deleted after // thirty days. - MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:"optional"` + MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:""` } func (newState *DashboardOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardOptions) { @@ -2432,6 +2569,11 @@ func (newState *DashboardOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan D func (newState *DashboardOptions) SyncEffectiveFieldsDuringRead(existingState DashboardOptions) { } +func (c DashboardOptions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DashboardOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2465,21 +2607,21 @@ func (o DashboardOptions) Type(ctx context.Context) attr.Type { type DashboardPostContent struct { // Indicates whether the dashboard filters are enabled - DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:"optional"` + DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:""` // Indicates whether this dashboard object should appear in the current // user's favorites list. - IsFavorite types.Bool `tfsdk:"is_favorite" tf:"optional"` + IsFavorite types.Bool `tfsdk:"is_favorite" tf:""` // The title of this dashboard that appears in list views and at the top of // the dashboard page. Name types.String `tfsdk:"name" tf:""` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *DashboardPostContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardPostContent) { @@ -2488,6 +2630,12 @@ func (newState *DashboardPostContent) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DashboardPostContent) SyncEffectiveFieldsDuringRead(existingState DashboardPostContent) { } +func (c DashboardPostContent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DashboardPostContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2565,26 +2713,26 @@ type DataSource struct { // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The string name of this data source / SQL warehouse as it appears in the // Databricks SQL web application. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Reserved for internal use. - PauseReason types.String `tfsdk:"pause_reason" tf:"optional"` + PauseReason types.String `tfsdk:"pause_reason" tf:""` // Reserved for internal use. - Paused types.Int64 `tfsdk:"paused" tf:"optional"` + Paused types.Int64 `tfsdk:"paused" tf:""` // Reserved for internal use. - SupportsAutoLimit types.Bool `tfsdk:"supports_auto_limit" tf:"optional"` + SupportsAutoLimit types.Bool `tfsdk:"supports_auto_limit" tf:""` // Reserved for internal use. - Syntax types.String `tfsdk:"syntax" tf:"optional"` + Syntax types.String `tfsdk:"syntax" tf:""` // The type of data source. For SQL warehouses, this will be // `databricks_internal`. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` // Reserved for internal use. - ViewOnly types.Bool `tfsdk:"view_only" tf:"optional"` + ViewOnly types.Bool `tfsdk:"view_only" tf:""` // The ID of the associated SQL warehouse, if this data source is backed by // a SQL warehouse. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *DataSource) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataSource) { @@ -2593,6 +2741,11 @@ func (newState *DataSource) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataSou func (newState *DataSource) SyncEffectiveFieldsDuringRead(existingState DataSource) { } +func (c DataSource) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DataSource. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2652,6 +2805,13 @@ func (newState *DateRange) SyncEffectiveFieldsDuringCreateOrUpdate(plan DateRang func (newState *DateRange) SyncEffectiveFieldsDuringRead(existingState DateRange) { } +func (c DateRange) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "end")...) + cs.SetRequired(append(path, "start")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DateRange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2687,14 +2847,14 @@ func (o DateRange) Type(ctx context.Context) attr.Type { type DateRangeValue struct { // Manually specified date-time range value. - DateRangeValue types.Object `tfsdk:"date_range_value" tf:"optional,object"` + DateRangeValue types.Object `tfsdk:"date_range_value" tf:"object"` // Dynamic date-time range value based on current date-time. - DynamicDateRangeValue types.String `tfsdk:"dynamic_date_range_value" tf:"optional"` + DynamicDateRangeValue types.String `tfsdk:"dynamic_date_range_value" tf:""` // Date-time precision to format the value into when the query is run. // Defaults to DAY_PRECISION (YYYY-MM-DD). - Precision types.String `tfsdk:"precision" tf:"optional"` + Precision types.String `tfsdk:"precision" tf:""` - StartDayOfWeek types.Int64 `tfsdk:"start_day_of_week" tf:"optional"` + StartDayOfWeek types.Int64 `tfsdk:"start_day_of_week" tf:""` } func (newState *DateRangeValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan DateRangeValue) { @@ -2703,6 +2863,12 @@ func (newState *DateRangeValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dat func (newState *DateRangeValue) SyncEffectiveFieldsDuringRead(existingState DateRangeValue) { } +func (c DateRangeValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DateRange{}.ToSchema(cs, append(path, "date_range_value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DateRangeValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2772,12 +2938,12 @@ func (o *DateRangeValue) SetDateRangeValue(ctx context.Context, v DateRange) { type DateValue struct { // Manually specified date-time value. - DateValue types.String `tfsdk:"date_value" tf:"optional"` + DateValue types.String `tfsdk:"date_value" tf:""` // Dynamic date-time value based on current date-time. - DynamicDateValue types.String `tfsdk:"dynamic_date_value" tf:"optional"` + DynamicDateValue types.String `tfsdk:"dynamic_date_value" tf:""` // Date-time precision to format the value into when the query is run. // Defaults to DAY_PRECISION (YYYY-MM-DD). - Precision types.String `tfsdk:"precision" tf:"optional"` + Precision types.String `tfsdk:"precision" tf:""` } func (newState *DateValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan DateValue) { @@ -2786,6 +2952,11 @@ func (newState *DateValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan DateValu func (newState *DateValue) SyncEffectiveFieldsDuringRead(existingState DateValue) { } +func (c DateValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DateValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2826,12 +2997,6 @@ type DeleteAlertsLegacyRequest struct { AlertId types.String `tfsdk:"-"` } -func (newState *DeleteAlertsLegacyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAlertsLegacyRequest) { -} - -func (newState *DeleteAlertsLegacyRequest) SyncEffectiveFieldsDuringRead(existingState DeleteAlertsLegacyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAlertsLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2868,12 +3033,6 @@ type DeleteDashboardRequest struct { DashboardId types.String `tfsdk:"-"` } -func (newState *DeleteDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDashboardRequest) { -} - -func (newState *DeleteDashboardRequest) SyncEffectiveFieldsDuringRead(existingState DeleteDashboardRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2911,12 +3070,6 @@ type DeleteDashboardWidgetRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteDashboardWidgetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDashboardWidgetRequest) { -} - -func (newState *DeleteDashboardWidgetRequest) SyncEffectiveFieldsDuringRead(existingState DeleteDashboardWidgetRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDashboardWidgetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2953,12 +3106,6 @@ type DeleteQueriesLegacyRequest struct { QueryId types.String `tfsdk:"-"` } -func (newState *DeleteQueriesLegacyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteQueriesLegacyRequest) { -} - -func (newState *DeleteQueriesLegacyRequest) SyncEffectiveFieldsDuringRead(existingState DeleteQueriesLegacyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQueriesLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2996,12 +3143,6 @@ type DeleteQueryVisualizationsLegacyRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteQueryVisualizationsLegacyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteQueryVisualizationsLegacyRequest) { -} - -func (newState *DeleteQueryVisualizationsLegacyRequest) SyncEffectiveFieldsDuringRead(existingState DeleteQueryVisualizationsLegacyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQueryVisualizationsLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3036,12 +3177,6 @@ func (o DeleteQueryVisualizationsLegacyRequest) Type(ctx context.Context) attr.T type DeleteResponse struct { } -func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { -} - -func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3074,12 +3209,6 @@ type DeleteVisualizationRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteVisualizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteVisualizationRequest) { -} - -func (newState *DeleteVisualizationRequest) SyncEffectiveFieldsDuringRead(existingState DeleteVisualizationRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteVisualizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3117,12 +3246,6 @@ type DeleteWarehouseRequest struct { Id types.String `tfsdk:"-"` } -func (newState *DeleteWarehouseRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWarehouseRequest) { -} - -func (newState *DeleteWarehouseRequest) SyncEffectiveFieldsDuringRead(existingState DeleteWarehouseRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWarehouseRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3163,6 +3286,11 @@ func (newState *DeleteWarehouseResponse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *DeleteWarehouseResponse) SyncEffectiveFieldsDuringRead(existingState DeleteWarehouseResponse) { } +func (c DeleteWarehouseResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3201,7 +3329,7 @@ type EditAlert struct { // Number of seconds after being triggered before the alert rearms itself // and can be triggered again. If `null`, alert will never be triggered // again. - Rearm types.Int64 `tfsdk:"rearm" tf:"optional"` + Rearm types.Int64 `tfsdk:"rearm" tf:""` } func (newState *EditAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditAlert) { @@ -3210,6 +3338,16 @@ func (newState *EditAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditAler func (newState *EditAlert) SyncEffectiveFieldsDuringRead(existingState EditAlert) { } +func (c EditAlert) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "alert_id")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "options")...) + AlertOptions{}.ToSchema(cs, append(path, "options")...) + cs.SetRequired(append(path, "query_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3286,35 +3424,35 @@ type EditWarehouseRequest struct { // Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. // // Defaults to 120 mins - AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:""` // Channel Details - Channel types.Object `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. // // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large // - 2X-Large - 3X-Large - 4X-Large - ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + ClusterSize types.String `tfsdk:"cluster_size" tf:""` // warehouse creator name - CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + CreatorName types.String `tfsdk:"creator_name" tf:""` // Configures whether the warehouse should use Photon optimized clusters. // // Defaults to false. - EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:""` // Configures whether the warehouse should use serverless compute. - EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:""` // Required. Id of the warehouse to configure. Id types.String `tfsdk:"-"` // Deprecated. Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // Maximum number of clusters that the autoscaler will create to handle // concurrent queries. // // Supported values: - Must be >= min_num_clusters - Must be <= 30. // // Defaults to min_clusters if unset. - MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:""` // Minimum number of available clusters that will be maintained for this SQL // warehouse. Increasing this will ensure that a larger number of clusters // are always running and therefore may reduce the cold start time for new @@ -3324,23 +3462,23 @@ type EditWarehouseRequest struct { // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) // // Defaults to 1 - MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:""` // Logical name for the cluster. // // Supported values: - Must be unique within an org. - Must be less than 100 // characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Configurations whether the warehouse should use spot instances. - SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:""` // A set of key-value pairs that will be tagged on all resources (e.g., AWS // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.Object `tfsdk:"tags" tf:"optional,object"` + Tags types.Object `tfsdk:"tags" tf:"object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *EditWarehouseRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditWarehouseRequest) { @@ -3349,6 +3487,14 @@ func (newState *EditWarehouseRequest) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *EditWarehouseRequest) SyncEffectiveFieldsDuringRead(existingState EditWarehouseRequest) { } +func (c EditWarehouseRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel{}.ToSchema(cs, append(path, "channel")...) + cs.SetRequired(append(path, "id")...) + EndpointTags{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditWarehouseRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3474,6 +3620,11 @@ func (newState *EditWarehouseResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *EditWarehouseResponse) SyncEffectiveFieldsDuringRead(existingState EditWarehouseResponse) { } +func (c EditWarehouseResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3512,6 +3663,11 @@ func (newState *Empty) SyncEffectiveFieldsDuringCreateOrUpdate(plan Empty) { func (newState *Empty) SyncEffectiveFieldsDuringRead(existingState Empty) { } +func (c Empty) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Empty. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3540,9 +3696,9 @@ func (o Empty) Type(ctx context.Context) attr.Type { } type EndpointConfPair struct { - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *EndpointConfPair) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointConfPair) { @@ -3551,6 +3707,11 @@ func (newState *EndpointConfPair) SyncEffectiveFieldsDuringCreateOrUpdate(plan E func (newState *EndpointConfPair) SyncEffectiveFieldsDuringRead(existingState EndpointConfPair) { } +func (c EndpointConfPair) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointConfPair. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3586,17 +3747,17 @@ func (o EndpointConfPair) Type(ctx context.Context) attr.Type { type EndpointHealth struct { // Details about errors that are causing current degraded/failed status. - Details types.String `tfsdk:"details" tf:"optional"` + Details types.String `tfsdk:"details" tf:""` // The reason for failure to bring up clusters for this warehouse. This is // available when status is 'FAILED' and sometimes when it is DEGRADED. - FailureReason types.Object `tfsdk:"failure_reason" tf:"optional,object"` + FailureReason types.Object `tfsdk:"failure_reason" tf:"object"` // Deprecated. split into summary and details for security - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Health status of the warehouse. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // A short summary of the health status in case of degraded/failed // warehouses. - Summary types.String `tfsdk:"summary" tf:"optional"` + Summary types.String `tfsdk:"summary" tf:""` } func (newState *EndpointHealth) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointHealth) { @@ -3605,6 +3766,12 @@ func (newState *EndpointHealth) SyncEffectiveFieldsDuringCreateOrUpdate(plan End func (newState *EndpointHealth) SyncEffectiveFieldsDuringRead(existingState EndpointHealth) { } +func (c EndpointHealth) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TerminationReason{}.ToSchema(cs, append(path, "failure_reason")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointHealth. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3681,40 +3848,40 @@ type EndpointInfo struct { // Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. // // Defaults to 120 mins - AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:""` // Channel Details - Channel types.Object `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. // // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large // - 2X-Large - 3X-Large - 4X-Large - ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + ClusterSize types.String `tfsdk:"cluster_size" tf:""` // warehouse creator name - CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + CreatorName types.String `tfsdk:"creator_name" tf:""` // Configures whether the warehouse should use Photon optimized clusters. // // Defaults to false. - EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:""` // Configures whether the warehouse should use serverless compute - EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:""` // Optional health status. Assume the warehouse is healthy if this field is // not set. - Health types.Object `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"object"` // unique identifier for warehouse - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Deprecated. Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // the jdbc connection string for this warehouse - JdbcUrl types.String `tfsdk:"jdbc_url" tf:"optional"` + JdbcUrl types.String `tfsdk:"jdbc_url" tf:""` // Maximum number of clusters that the autoscaler will create to handle // concurrent queries. // // Supported values: - Must be >= min_num_clusters - Must be <= 30. // // Defaults to min_clusters if unset. - MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:""` // Minimum number of available clusters that will be maintained for this SQL // warehouse. Increasing this will ensure that a larger number of clusters // are always running and therefore may reduce the cold start time for new @@ -3724,31 +3891,31 @@ type EndpointInfo struct { // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) // // Defaults to 1 - MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:""` // Logical name for the cluster. // // Supported values: - Must be unique within an org. - Must be less than 100 // characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // current number of active sessions for the warehouse - NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:"optional"` + NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:""` // current number of clusters running for the service - NumClusters types.Int64 `tfsdk:"num_clusters" tf:"optional"` + NumClusters types.Int64 `tfsdk:"num_clusters" tf:""` // ODBC parameters for the SQL warehouse - OdbcParams types.Object `tfsdk:"odbc_params" tf:"optional,object"` + OdbcParams types.Object `tfsdk:"odbc_params" tf:"object"` // Configurations whether the warehouse should use spot instances. - SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:""` // State of the warehouse - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // A set of key-value pairs that will be tagged on all resources (e.g., AWS // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.Object `tfsdk:"tags" tf:"optional,object"` + Tags types.Object `tfsdk:"tags" tf:"object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *EndpointInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointInfo) { @@ -3757,6 +3924,15 @@ func (newState *EndpointInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Endpo func (newState *EndpointInfo) SyncEffectiveFieldsDuringRead(existingState EndpointInfo) { } +func (c EndpointInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel{}.ToSchema(cs, append(path, "channel")...) + EndpointHealth{}.ToSchema(cs, append(path, "health")...) + OdbcParams{}.ToSchema(cs, append(path, "odbc_params")...) + EndpointTags{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3944,9 +4120,9 @@ func (o *EndpointInfo) SetTags(ctx context.Context, v EndpointTags) { } type EndpointTagPair struct { - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *EndpointTagPair) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointTagPair) { @@ -3955,6 +4131,11 @@ func (newState *EndpointTagPair) SyncEffectiveFieldsDuringCreateOrUpdate(plan En func (newState *EndpointTagPair) SyncEffectiveFieldsDuringRead(existingState EndpointTagPair) { } +func (c EndpointTagPair) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointTagPair. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3989,7 +4170,7 @@ func (o EndpointTagPair) Type(ctx context.Context) attr.Type { } type EndpointTags struct { - CustomTags types.List `tfsdk:"custom_tags" tf:"optional"` + CustomTags types.List `tfsdk:"custom_tags" tf:""` } func (newState *EndpointTags) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointTags) { @@ -3998,6 +4179,12 @@ func (newState *EndpointTags) SyncEffectiveFieldsDuringCreateOrUpdate(plan Endpo func (newState *EndpointTags) SyncEffectiveFieldsDuringRead(existingState EndpointTags) { } +func (c EndpointTags) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointTagPair{}.ToSchema(cs, append(path, "custom_tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointTags. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4061,11 +4248,11 @@ func (o *EndpointTags) SetCustomTags(ctx context.Context, v []EndpointTagPair) { type EnumValue struct { // List of valid query parameter values, newline delimited. - EnumOptions types.String `tfsdk:"enum_options" tf:"optional"` + EnumOptions types.String `tfsdk:"enum_options" tf:""` // If specified, allows multiple values to be selected for this parameter. - MultiValuesOptions types.Object `tfsdk:"multi_values_options" tf:"optional,object"` + MultiValuesOptions types.Object `tfsdk:"multi_values_options" tf:"object"` // List of selected query parameter values. - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *EnumValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnumValue) { @@ -4074,6 +4261,12 @@ func (newState *EnumValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnumValu func (newState *EnumValue) SyncEffectiveFieldsDuringRead(existingState EnumValue) { } +func (c EnumValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MultiValuesOptions{}.ToSchema(cs, append(path, "multi_values_options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EnumValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4175,14 +4368,14 @@ type ExecuteStatementRequest struct { // byte limit, then `truncated` in the response is set to `true`. When using // `EXTERNAL_LINKS` disposition, a default `byte_limit` of 100 GiB is // applied if `byte_limit` is not explcitly set. - ByteLimit types.Int64 `tfsdk:"byte_limit" tf:"optional"` + ByteLimit types.Int64 `tfsdk:"byte_limit" tf:""` // Sets default catalog for statement execution, similar to [`USE CATALOG`] // in SQL. // // [`USE CATALOG`]: https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-catalog.html - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` - Disposition types.String `tfsdk:"disposition" tf:"optional"` + Disposition types.String `tfsdk:"disposition" tf:""` // Statement execution supports three result formats: `JSON_ARRAY` // (default), `ARROW_STREAM`, and `CSV`. // @@ -4219,7 +4412,7 @@ type ExecuteStatementRequest struct { // // [Apache Arrow streaming format]: https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format // [RFC 4180]: https://www.rfc-editor.org/rfc/rfc4180 - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // When `wait_timeout > 0s`, the call will block up to the specified time. // If the statement execution doesn't finish within this time, // `on_wait_timeout` determines whether the execution should continue or be @@ -4228,7 +4421,7 @@ type ExecuteStatementRequest struct { // polling with :method:statementexecution/getStatement. When set to // `CANCEL`, the statement execution is canceled and the call returns with a // `CANCELED` state. - OnWaitTimeout types.String `tfsdk:"on_wait_timeout" tf:"optional"` + OnWaitTimeout types.String `tfsdk:"on_wait_timeout" tf:""` // A list of parameters to pass into a SQL statement containing parameter // markers. A parameter consists of a name, a value, and optionally a type. // To represent a NULL value, the `value` field may be omitted or set to @@ -4259,16 +4452,16 @@ type ExecuteStatementRequest struct { // // [Parameter markers]: https://docs.databricks.com/sql/language-manual/sql-ref-parameter-marker.html // [`cast` function]: https://docs.databricks.com/sql/language-manual/functions/cast.html - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Applies the given row limit to the statement's result set, but unlike the // `LIMIT` clause in SQL, it also sets the `truncated` field in the response // to indicate whether the result was trimmed due to the limit or not. - RowLimit types.Int64 `tfsdk:"row_limit" tf:"optional"` + RowLimit types.Int64 `tfsdk:"row_limit" tf:""` // Sets default schema for statement execution, similar to [`USE SCHEMA`] in // SQL. // // [`USE SCHEMA`]: https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-schema.html - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` // The SQL statement to execute. The statement can optionally be // parameterized, see `parameters`. Statement types.String `tfsdk:"statement" tf:""` @@ -4286,7 +4479,7 @@ type ExecuteStatementRequest struct { // manifest and result data (or a `FAILED` state in case of an execution // error). If the statement takes longer to execute, `on_wait_timeout` // determines what should happen after the timeout is reached. - WaitTimeout types.String `tfsdk:"wait_timeout" tf:"optional"` + WaitTimeout types.String `tfsdk:"wait_timeout" tf:""` // Warehouse upon which to execute a statement. See also [What are SQL // warehouses?] // @@ -4300,6 +4493,14 @@ func (newState *ExecuteStatementRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ExecuteStatementRequest) SyncEffectiveFieldsDuringRead(existingState ExecuteStatementRequest) { } +func (c ExecuteStatementRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + StatementParameterListItem{}.ToSchema(cs, append(path, "parameters")...) + cs.SetRequired(append(path, "statement")...) + cs.SetRequired(append(path, "warehouse_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExecuteStatementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4384,34 +4585,34 @@ func (o *ExecuteStatementRequest) SetParameters(ctx context.Context, v []Stateme type ExternalLink struct { // The number of bytes in the result chunk. This field is not available when // using `INLINE` disposition. - ByteCount types.Int64 `tfsdk:"byte_count" tf:"optional"` + ByteCount types.Int64 `tfsdk:"byte_count" tf:""` // The position within the sequence of result set chunks. - ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:"optional"` + ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:""` // Indicates the date-time that the given external link will expire and // becomes invalid, after which point a new `external_link` must be // requested. - Expiration types.String `tfsdk:"expiration" tf:"optional"` + Expiration types.String `tfsdk:"expiration" tf:""` - ExternalLink types.String `tfsdk:"external_link" tf:"optional"` + ExternalLink types.String `tfsdk:"external_link" tf:""` // HTTP headers that must be included with a GET request to the // `external_link`. Each header is provided as a key-value pair. Headers are // typically used to pass a decryption key to the external service. The // values of these headers should be considered sensitive and the client // should not expose these values in a log. - HttpHeaders types.Map `tfsdk:"http_headers" tf:"optional"` + HttpHeaders types.Map `tfsdk:"http_headers" tf:""` // When fetching, provides the `chunk_index` for the _next_ chunk. If // absent, indicates there are no more chunks. The next chunk can be fetched // with a :method:statementexecution/getStatementResultChunkN request. - NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:"optional"` + NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:""` // When fetching, provides a link to fetch the _next_ chunk. If absent, // indicates there are no more chunks. This link is an absolute `path` to be // joined with your `$DATABRICKS_HOST`, and should be treated as an opaque // link. This is an alternative to using `next_chunk_index`. - NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:"optional"` + NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:""` // The number of rows within the result chunk. - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` // The starting row offset within the result set. - RowOffset types.Int64 `tfsdk:"row_offset" tf:"optional"` + RowOffset types.Int64 `tfsdk:"row_offset" tf:""` } func (newState *ExternalLink) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLink) { @@ -4420,6 +4621,11 @@ func (newState *ExternalLink) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exter func (newState *ExternalLink) SyncEffectiveFieldsDuringRead(existingState ExternalLink) { } +func (c ExternalLink) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLink. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4502,12 +4708,6 @@ type GetAlertRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetAlertRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAlertRequest) { -} - -func (newState *GetAlertRequest) SyncEffectiveFieldsDuringRead(existingState GetAlertRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAlertRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4544,12 +4744,6 @@ type GetAlertsLegacyRequest struct { AlertId types.String `tfsdk:"-"` } -func (newState *GetAlertsLegacyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAlertsLegacyRequest) { -} - -func (newState *GetAlertsLegacyRequest) SyncEffectiveFieldsDuringRead(existingState GetAlertsLegacyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAlertsLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4586,12 +4780,6 @@ type GetDashboardRequest struct { DashboardId types.String `tfsdk:"-"` } -func (newState *GetDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDashboardRequest) { -} - -func (newState *GetDashboardRequest) SyncEffectiveFieldsDuringRead(existingState GetDashboardRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4631,12 +4819,6 @@ type GetDbsqlPermissionRequest struct { ObjectType types.String `tfsdk:"-"` } -func (newState *GetDbsqlPermissionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDbsqlPermissionRequest) { -} - -func (newState *GetDbsqlPermissionRequest) SyncEffectiveFieldsDuringRead(existingState GetDbsqlPermissionRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDbsqlPermissionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4675,12 +4857,6 @@ type GetQueriesLegacyRequest struct { QueryId types.String `tfsdk:"-"` } -func (newState *GetQueriesLegacyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQueriesLegacyRequest) { -} - -func (newState *GetQueriesLegacyRequest) SyncEffectiveFieldsDuringRead(existingState GetQueriesLegacyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQueriesLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4717,12 +4893,6 @@ type GetQueryRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQueryRequest) { -} - -func (newState *GetQueryRequest) SyncEffectiveFieldsDuringRead(existingState GetQueryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4755,17 +4925,11 @@ func (o GetQueryRequest) Type(ctx context.Context) attr.Type { } type GetResponse struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // An object's type and UUID, separated by a forward slash (/) character. - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` // A singular noun object type. - ObjectType types.String `tfsdk:"object_type" tf:"optional"` -} - -func (newState *GetResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetResponse) { -} - -func (newState *GetResponse) SyncEffectiveFieldsDuringRead(existingState GetResponse) { + ObjectType types.String `tfsdk:"object_type" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetResponse. @@ -4840,12 +5004,6 @@ type GetStatementRequest struct { StatementId types.String `tfsdk:"-"` } -func (newState *GetStatementRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatementRequest) { -} - -func (newState *GetStatementRequest) SyncEffectiveFieldsDuringRead(existingState GetStatementRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatementRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4885,12 +5043,6 @@ type GetStatementResultChunkNRequest struct { StatementId types.String `tfsdk:"-"` } -func (newState *GetStatementResultChunkNRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatementResultChunkNRequest) { -} - -func (newState *GetStatementResultChunkNRequest) SyncEffectiveFieldsDuringRead(existingState GetStatementResultChunkNRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatementResultChunkNRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4930,12 +5082,6 @@ type GetWarehousePermissionLevelsRequest struct { WarehouseId types.String `tfsdk:"-"` } -func (newState *GetWarehousePermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehousePermissionLevelsRequest) { -} - -func (newState *GetWarehousePermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetWarehousePermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehousePermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4969,7 +5115,7 @@ func (o GetWarehousePermissionLevelsRequest) Type(ctx context.Context) attr.Type type GetWarehousePermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetWarehousePermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehousePermissionLevelsResponse) { @@ -4978,6 +5124,12 @@ func (newState *GetWarehousePermissionLevelsResponse) SyncEffectiveFieldsDuringC func (newState *GetWarehousePermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetWarehousePermissionLevelsResponse) { } +func (c GetWarehousePermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WarehousePermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehousePermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5045,12 +5197,6 @@ type GetWarehousePermissionsRequest struct { WarehouseId types.String `tfsdk:"-"` } -func (newState *GetWarehousePermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehousePermissionsRequest) { -} - -func (newState *GetWarehousePermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetWarehousePermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehousePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5088,12 +5234,6 @@ type GetWarehouseRequest struct { Id types.String `tfsdk:"-"` } -func (newState *GetWarehouseRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehouseRequest) { -} - -func (newState *GetWarehouseRequest) SyncEffectiveFieldsDuringRead(existingState GetWarehouseRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehouseRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5132,40 +5272,40 @@ type GetWarehouseResponse struct { // Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. // // Defaults to 120 mins - AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:""` // Channel Details - Channel types.Object `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. // // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large // - 2X-Large - 3X-Large - 4X-Large - ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + ClusterSize types.String `tfsdk:"cluster_size" tf:""` // warehouse creator name - CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + CreatorName types.String `tfsdk:"creator_name" tf:""` // Configures whether the warehouse should use Photon optimized clusters. // // Defaults to false. - EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:""` // Configures whether the warehouse should use serverless compute - EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:""` // Optional health status. Assume the warehouse is healthy if this field is // not set. - Health types.Object `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"object"` // unique identifier for warehouse - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Deprecated. Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // the jdbc connection string for this warehouse - JdbcUrl types.String `tfsdk:"jdbc_url" tf:"optional"` + JdbcUrl types.String `tfsdk:"jdbc_url" tf:""` // Maximum number of clusters that the autoscaler will create to handle // concurrent queries. // // Supported values: - Must be >= min_num_clusters - Must be <= 30. // // Defaults to min_clusters if unset. - MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:""` // Minimum number of available clusters that will be maintained for this SQL // warehouse. Increasing this will ensure that a larger number of clusters // are always running and therefore may reduce the cold start time for new @@ -5175,31 +5315,31 @@ type GetWarehouseResponse struct { // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) // // Defaults to 1 - MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:""` // Logical name for the cluster. // // Supported values: - Must be unique within an org. - Must be less than 100 // characters. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // current number of active sessions for the warehouse - NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:"optional"` + NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:""` // current number of clusters running for the service - NumClusters types.Int64 `tfsdk:"num_clusters" tf:"optional"` + NumClusters types.Int64 `tfsdk:"num_clusters" tf:""` // ODBC parameters for the SQL warehouse - OdbcParams types.Object `tfsdk:"odbc_params" tf:"optional,object"` + OdbcParams types.Object `tfsdk:"odbc_params" tf:"object"` // Configurations whether the warehouse should use spot instances. - SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:""` // State of the warehouse - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // A set of key-value pairs that will be tagged on all resources (e.g., AWS // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.Object `tfsdk:"tags" tf:"optional,object"` + Tags types.Object `tfsdk:"tags" tf:"object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *GetWarehouseResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehouseResponse) { @@ -5208,6 +5348,15 @@ func (newState *GetWarehouseResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *GetWarehouseResponse) SyncEffectiveFieldsDuringRead(existingState GetWarehouseResponse) { } +func (c GetWarehouseResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel{}.ToSchema(cs, append(path, "channel")...) + EndpointHealth{}.ToSchema(cs, append(path, "health")...) + OdbcParams{}.ToSchema(cs, append(path, "odbc_params")...) + EndpointTags{}.ToSchema(cs, append(path, "tags")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5396,30 +5545,30 @@ func (o *GetWarehouseResponse) SetTags(ctx context.Context, v EndpointTags) { type GetWorkspaceWarehouseConfigResponse struct { // Optional: Channel selection details - Channel types.Object `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"object"` // Deprecated: Use sql_configuration_parameters - ConfigParam types.Object `tfsdk:"config_param" tf:"optional,object"` + ConfigParam types.Object `tfsdk:"config_param" tf:"object"` // Spark confs for external hive metastore configuration JSON serialized // size must be less than <= 512K - DataAccessConfig types.List `tfsdk:"data_access_config" tf:"optional"` + DataAccessConfig types.List `tfsdk:"data_access_config" tf:""` // List of Warehouse Types allowed in this workspace (limits allowed value // of the type field in CreateWarehouse and EditWarehouse). Note: Some types // cannot be disabled, they don't need to be specified in // SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing // warehouses to be converted to another type. Used by frontend to save // specific type availability in the warehouse create and edit form UI. - EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:"optional"` + EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:""` // Deprecated: Use sql_configuration_parameters - GlobalParam types.Object `tfsdk:"global_param" tf:"optional,object"` + GlobalParam types.Object `tfsdk:"global_param" tf:"object"` // GCP only: Google Service Account used to pass to cluster to access Google // Cloud Storage - GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` + GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:""` // AWS Only: Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // Security policy for warehouses - SecurityPolicy types.String `tfsdk:"security_policy" tf:"optional"` + SecurityPolicy types.String `tfsdk:"security_policy" tf:""` // SQL configuration parameters - SqlConfigurationParameters types.Object `tfsdk:"sql_configuration_parameters" tf:"optional,object"` + SqlConfigurationParameters types.Object `tfsdk:"sql_configuration_parameters" tf:"object"` } func (newState *GetWorkspaceWarehouseConfigResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceWarehouseConfigResponse) { @@ -5428,6 +5577,17 @@ func (newState *GetWorkspaceWarehouseConfigResponse) SyncEffectiveFieldsDuringCr func (newState *GetWorkspaceWarehouseConfigResponse) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceWarehouseConfigResponse) { } +func (c GetWorkspaceWarehouseConfigResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel{}.ToSchema(cs, append(path, "channel")...) + RepeatedEndpointConfPairs{}.ToSchema(cs, append(path, "config_param")...) + EndpointConfPair{}.ToSchema(cs, append(path, "data_access_config")...) + WarehouseTypePair{}.ToSchema(cs, append(path, "enabled_warehouse_types")...) + RepeatedEndpointConfPairs{}.ToSchema(cs, append(path, "global_param")...) + RepeatedEndpointConfPairs{}.ToSchema(cs, append(path, "sql_configuration_parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceWarehouseConfigResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5652,31 +5812,31 @@ func (o *GetWorkspaceWarehouseConfigResponse) SetSqlConfigurationParameters(ctx type LegacyAlert struct { // Timestamp when the alert was created. - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // Alert ID. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Timestamp when the alert was last triggered. - LastTriggeredAt types.String `tfsdk:"last_triggered_at" tf:"optional"` + LastTriggeredAt types.String `tfsdk:"last_triggered_at" tf:""` // Name of the alert. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Alert configuration options. - Options types.Object `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"object"` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` - Query types.Object `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"object"` // Number of seconds after being triggered before the alert rearms itself // and can be triggered again. If `null`, alert will never be triggered // again. - Rearm types.Int64 `tfsdk:"rearm" tf:"optional"` + Rearm types.Int64 `tfsdk:"rearm" tf:""` // State of the alert. Possible values are: `unknown` (yet to be evaluated), // `triggered` (evaluated and fulfilled trigger conditions), or `ok` // (evaluated and did not fulfill trigger conditions). - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Timestamp when the alert was last updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` - User types.Object `tfsdk:"user" tf:"optional,object"` + User types.Object `tfsdk:"user" tf:"object"` } func (newState *LegacyAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyAlert) { @@ -5685,6 +5845,14 @@ func (newState *LegacyAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan Legacy func (newState *LegacyAlert) SyncEffectiveFieldsDuringRead(existingState LegacyAlert) { } +func (c LegacyAlert) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertOptions{}.ToSchema(cs, append(path, "options")...) + AlertQuery{}.ToSchema(cs, append(path, "query")...) + User{}.ToSchema(cs, append(path, "user")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LegacyAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5827,72 +5995,72 @@ func (o *LegacyAlert) SetUser(ctx context.Context, v User) { type LegacyQuery struct { // Describes whether the authenticated user is allowed to edit the // definition of this query. - CanEdit types.Bool `tfsdk:"can_edit" tf:"optional"` + CanEdit types.Bool `tfsdk:"can_edit" tf:""` // The timestamp when this query was created. - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // Data source ID maps to the ID of the data source used by the resource and // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + DataSourceId types.String `tfsdk:"data_source_id" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Query ID. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Indicates whether the query is trashed. Trashed queries can't be used in // dashboards, or appear in search results. If this boolean is `true`, the // `options` property for this query includes a `moved_to_trash_at` // timestamp. Trashed queries are permanently deleted after 30 days. - IsArchived types.Bool `tfsdk:"is_archived" tf:"optional"` + IsArchived types.Bool `tfsdk:"is_archived" tf:""` // Whether the query is a draft. Draft queries only appear in list views for // their owners. Visualizations from draft queries cannot appear on // dashboards. - IsDraft types.Bool `tfsdk:"is_draft" tf:"optional"` + IsDraft types.Bool `tfsdk:"is_draft" tf:""` // Whether this query object appears in the current user's favorites list. // This flag determines whether the star icon for favorites is selected. - IsFavorite types.Bool `tfsdk:"is_favorite" tf:"optional"` + IsFavorite types.Bool `tfsdk:"is_favorite" tf:""` // Text parameter types are not safe from SQL injection for all types of // data source. Set this Boolean parameter to `true` if a query either does // not use any text type parameters or uses a data source type where text // type parameters are handled safely. - IsSafe types.Bool `tfsdk:"is_safe" tf:"optional"` + IsSafe types.Bool `tfsdk:"is_safe" tf:""` - LastModifiedBy types.Object `tfsdk:"last_modified_by" tf:"optional,object"` + LastModifiedBy types.Object `tfsdk:"last_modified_by" tf:"object"` // The ID of the user who last saved changes to this query. - LastModifiedById types.Int64 `tfsdk:"last_modified_by_id" tf:"optional"` + LastModifiedById types.Int64 `tfsdk:"last_modified_by_id" tf:""` // If there is a cached result for this query and user, this field includes // the query result ID. If this query uses parameters, this field is always // null. - LatestQueryDataId types.String `tfsdk:"latest_query_data_id" tf:"optional"` + LatestQueryDataId types.String `tfsdk:"latest_query_data_id" tf:""` // The title of this query that appears in list views, widget headings, and // on the query page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` - Options types.Object `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"object"` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * // `CAN_EDIT`: Can edit the query * `CAN_MANAGE`: Can manage the query - PermissionTier types.String `tfsdk:"permission_tier" tf:"optional"` + PermissionTier types.String `tfsdk:"permission_tier" tf:""` // The text of the query to be run. - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` // A SHA-256 hash of the query text along with the authenticated user ID. - QueryHash types.String `tfsdk:"query_hash" tf:"optional"` + QueryHash types.String `tfsdk:"query_hash" tf:""` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // The timestamp at which this query was last updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` - User types.Object `tfsdk:"user" tf:"optional,object"` + User types.Object `tfsdk:"user" tf:"object"` // The ID of the user who owns the query. - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` - Visualizations types.List `tfsdk:"visualizations" tf:"optional"` + Visualizations types.List `tfsdk:"visualizations" tf:""` } func (newState *LegacyQuery) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyQuery) { @@ -5901,6 +6069,15 @@ func (newState *LegacyQuery) SyncEffectiveFieldsDuringCreateOrUpdate(plan Legacy func (newState *LegacyQuery) SyncEffectiveFieldsDuringRead(existingState LegacyQuery) { } +func (c LegacyQuery) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + User{}.ToSchema(cs, append(path, "last_modified_by")...) + QueryOptions{}.ToSchema(cs, append(path, "options")...) + User{}.ToSchema(cs, append(path, "user")...) + LegacyVisualization{}.ToSchema(cs, append(path, "visualizations")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LegacyQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6130,25 +6307,25 @@ func (o *LegacyQuery) SetVisualizations(ctx context.Context, v []LegacyVisualiza // same endpoint. Databricks does not recommend constructing ad-hoc // visualizations entirely in JSON. type LegacyVisualization struct { - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // A short description of this visualization. This is not displayed in the // UI. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The UUID for this visualization. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The name of the visualization that appears on dashboards and the query // screen. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The options object varies widely from one visualization type to the next // and is unsupported. Databricks does not recommend modifying visualization // settings in JSON. - Options types.Object `tfsdk:"options" tf:"optional"` + Options types.Object `tfsdk:"options" tf:""` - Query types.Object `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"object"` // The type of visualization: chart, table, pivot table, and so on. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` } func (newState *LegacyVisualization) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyVisualization) { @@ -6157,6 +6334,12 @@ func (newState *LegacyVisualization) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *LegacyVisualization) SyncEffectiveFieldsDuringRead(existingState LegacyVisualization) { } +func (c LegacyVisualization) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LegacyQuery{}.ToSchema(cs, append(path, "query")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in LegacyVisualization. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6239,12 +6422,6 @@ type ListAlertsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListAlertsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAlertsRequest) { -} - -func (newState *ListAlertsRequest) SyncEffectiveFieldsDuringRead(existingState ListAlertsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAlertsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6279,9 +6456,9 @@ func (o ListAlertsRequest) Type(ctx context.Context) attr.Type { } type ListAlertsResponse struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ListAlertsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAlertsResponse) { @@ -6290,6 +6467,12 @@ func (newState *ListAlertsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListAlertsResponse) SyncEffectiveFieldsDuringRead(existingState ListAlertsResponse) { } +func (c ListAlertsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListAlertsResponseAlert{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAlertsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6355,46 +6538,46 @@ func (o *ListAlertsResponse) SetResults(ctx context.Context, v []ListAlertsRespo type ListAlertsResponseAlert struct { // Trigger conditions of the alert. - Condition types.Object `tfsdk:"condition" tf:"optional,object"` + Condition types.Object `tfsdk:"condition" tf:"object"` // The timestamp indicating when the alert was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This can include // email subject entries and Slack notification headers, for example. See // [here] for custom templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The display name of the alert. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the alert. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // The workspace state of the alert. Used for tracking trashed status. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // Whether to notify alert subscribers when alert returns back to normal. - NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:""` // The owner's username. This field is set to "Unavailable" if the user has // been deleted. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // UUID of the query attached to the alert. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds an alert must wait after being triggered to rearm // itself. After rearming, it can be triggered again. If 0 or not specified, // the alert will not be triggered again. - SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:""` // Current state of the alert's trigger status. This field is set to UNKNOWN // if the alert has not yet been evaluated or ran into an error during the // last evaluation. - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` // Timestamp when the alert was last triggered, if the alert has been // triggered before. - TriggerTime types.String `tfsdk:"trigger_time" tf:"optional"` + TriggerTime types.String `tfsdk:"trigger_time" tf:""` // The timestamp indicating when the alert was updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *ListAlertsResponseAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAlertsResponseAlert) { @@ -6403,6 +6586,12 @@ func (newState *ListAlertsResponseAlert) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ListAlertsResponseAlert) SyncEffectiveFieldsDuringRead(existingState ListAlertsResponseAlert) { } +func (c ListAlertsResponseAlert) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertCondition{}.ToSchema(cs, append(path, "condition")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAlertsResponseAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6497,15 +6686,9 @@ type ListDashboardsRequest struct { // Page number to retrieve. Page types.Int64 `tfsdk:"-"` // Number of dashboards to return per page. - PageSize types.Int64 `tfsdk:"-"` - // Full text search term. - Q types.String `tfsdk:"-"` -} - -func (newState *ListDashboardsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDashboardsRequest) { -} - -func (newState *ListDashboardsRequest) SyncEffectiveFieldsDuringRead(existingState ListDashboardsRequest) { + PageSize types.Int64 `tfsdk:"-"` + // Full text search term. + Q types.String `tfsdk:"-"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDashboardsRequest. @@ -6570,12 +6753,6 @@ type ListQueriesLegacyRequest struct { Q types.String `tfsdk:"-"` } -func (newState *ListQueriesLegacyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueriesLegacyRequest) { -} - -func (newState *ListQueriesLegacyRequest) SyncEffectiveFieldsDuringRead(existingState ListQueriesLegacyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueriesLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6620,12 +6797,6 @@ type ListQueriesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListQueriesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueriesRequest) { -} - -func (newState *ListQueriesRequest) SyncEffectiveFieldsDuringRead(existingState ListQueriesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueriesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6661,11 +6832,11 @@ func (o ListQueriesRequest) Type(ctx context.Context) attr.Type { type ListQueriesResponse struct { // Whether there is another page of results. - HasNextPage types.Bool `tfsdk:"has_next_page" tf:"optional"` + HasNextPage types.Bool `tfsdk:"has_next_page" tf:""` // A token that can be used to get the next page of results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Res types.List `tfsdk:"res" tf:"optional"` + Res types.List `tfsdk:"res" tf:""` } func (newState *ListQueriesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueriesResponse) { @@ -6674,6 +6845,12 @@ func (newState *ListQueriesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ListQueriesResponse) SyncEffectiveFieldsDuringRead(existingState ListQueriesResponse) { } +func (c ListQueriesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryInfo{}.ToSchema(cs, append(path, "res")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueriesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6756,12 +6933,6 @@ type ListQueryHistoryRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListQueryHistoryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueryHistoryRequest) { -} - -func (newState *ListQueryHistoryRequest) SyncEffectiveFieldsDuringRead(existingState ListQueryHistoryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueryHistoryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6830,9 +7001,9 @@ func (o *ListQueryHistoryRequest) SetFilterBy(ctx context.Context, v QueryFilter } type ListQueryObjectsResponse struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ListQueryObjectsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueryObjectsResponse) { @@ -6841,6 +7012,12 @@ func (newState *ListQueryObjectsResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListQueryObjectsResponse) SyncEffectiveFieldsDuringRead(existingState ListQueryObjectsResponse) { } +func (c ListQueryObjectsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListQueryObjectsResponseQuery{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueryObjectsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -6906,39 +7083,39 @@ func (o *ListQueryObjectsResponse) SetResults(ctx context.Context, v []ListQuery type ListQueryObjectsResponseQuery struct { // Whether to apply a 1000 row limit to the query result. - ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:""` // Name of the catalog where this query will be executed. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // Timestamp when this query was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Display name of the query that appears in list views, widget headings, // and on the query page. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the query. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Username of the user who last saved changes to this query. - LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:"optional"` + LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:""` // Indicates whether the query is trashed. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // Username of the user that owns the query. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // List of query parameter definitions. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Text of the query to be run. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Sets the "Run as" role for the object. - RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + RunAsMode types.String `tfsdk:"run_as_mode" tf:""` // Name of the schema where this query will be executed. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // Timestamp when this query was last updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // ID of the SQL warehouse attached to the query. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *ListQueryObjectsResponseQuery) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueryObjectsResponseQuery) { @@ -6947,6 +7124,12 @@ func (newState *ListQueryObjectsResponseQuery) SyncEffectiveFieldsDuringCreateOr func (newState *ListQueryObjectsResponseQuery) SyncEffectiveFieldsDuringRead(existingState ListQueryObjectsResponseQuery) { } +func (c ListQueryObjectsResponseQuery) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryParameter{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueryObjectsResponseQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7069,19 +7252,13 @@ func (o *ListQueryObjectsResponseQuery) SetTags(ctx context.Context, v []types.S type ListResponse struct { // The total number of dashboards. - Count types.Int64 `tfsdk:"count" tf:"optional"` + Count types.Int64 `tfsdk:"count" tf:""` // The current page being displayed. - Page types.Int64 `tfsdk:"page" tf:"optional"` + Page types.Int64 `tfsdk:"page" tf:""` // The number of dashboards per page. - PageSize types.Int64 `tfsdk:"page_size" tf:"optional"` + PageSize types.Int64 `tfsdk:"page_size" tf:""` // List of dashboards returned. - Results types.List `tfsdk:"results" tf:"optional"` -} - -func (newState *ListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListResponse) { -} - -func (newState *ListResponse) SyncEffectiveFieldsDuringRead(existingState ListResponse) { + Results types.List `tfsdk:"results" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListResponse. @@ -7160,12 +7337,6 @@ type ListVisualizationsForQueryRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListVisualizationsForQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVisualizationsForQueryRequest) { -} - -func (newState *ListVisualizationsForQueryRequest) SyncEffectiveFieldsDuringRead(existingState ListVisualizationsForQueryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVisualizationsForQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7202,9 +7373,9 @@ func (o ListVisualizationsForQueryRequest) Type(ctx context.Context) attr.Type { } type ListVisualizationsForQueryResponse struct { - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *ListVisualizationsForQueryResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVisualizationsForQueryResponse) { @@ -7213,6 +7384,12 @@ func (newState *ListVisualizationsForQueryResponse) SyncEffectiveFieldsDuringCre func (newState *ListVisualizationsForQueryResponse) SyncEffectiveFieldsDuringRead(existingState ListVisualizationsForQueryResponse) { } +func (c ListVisualizationsForQueryResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Visualization{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVisualizationsForQueryResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7283,12 +7460,6 @@ type ListWarehousesRequest struct { RunAsUserId types.Int64 `tfsdk:"-"` } -func (newState *ListWarehousesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWarehousesRequest) { -} - -func (newState *ListWarehousesRequest) SyncEffectiveFieldsDuringRead(existingState ListWarehousesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWarehousesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7322,7 +7493,7 @@ func (o ListWarehousesRequest) Type(ctx context.Context) attr.Type { type ListWarehousesResponse struct { // A list of warehouses and their configurations. - Warehouses types.List `tfsdk:"warehouses" tf:"optional"` + Warehouses types.List `tfsdk:"warehouses" tf:""` } func (newState *ListWarehousesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWarehousesResponse) { @@ -7331,6 +7502,12 @@ func (newState *ListWarehousesResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ListWarehousesResponse) SyncEffectiveFieldsDuringRead(existingState ListWarehousesResponse) { } +func (c ListWarehousesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointInfo{}.ToSchema(cs, append(path, "warehouses")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWarehousesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7394,12 +7571,12 @@ func (o *ListWarehousesResponse) SetWarehouses(ctx context.Context, v []Endpoint type MultiValuesOptions struct { // Character that prefixes each selected parameter value. - Prefix types.String `tfsdk:"prefix" tf:"optional"` + Prefix types.String `tfsdk:"prefix" tf:""` // Character that separates each selected parameter value. Defaults to a // comma. - Separator types.String `tfsdk:"separator" tf:"optional"` + Separator types.String `tfsdk:"separator" tf:""` // Character that suffixes each selected parameter value. - Suffix types.String `tfsdk:"suffix" tf:"optional"` + Suffix types.String `tfsdk:"suffix" tf:""` } func (newState *MultiValuesOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan MultiValuesOptions) { @@ -7408,6 +7585,11 @@ func (newState *MultiValuesOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *MultiValuesOptions) SyncEffectiveFieldsDuringRead(existingState MultiValuesOptions) { } +func (c MultiValuesOptions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MultiValuesOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7444,7 +7626,7 @@ func (o MultiValuesOptions) Type(ctx context.Context) attr.Type { } type NumericValue struct { - Value types.Float64 `tfsdk:"value" tf:"optional"` + Value types.Float64 `tfsdk:"value" tf:""` } func (newState *NumericValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan NumericValue) { @@ -7453,6 +7635,11 @@ func (newState *NumericValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan Numer func (newState *NumericValue) SyncEffectiveFieldsDuringRead(existingState NumericValue) { } +func (c NumericValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in NumericValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7485,13 +7672,13 @@ func (o NumericValue) Type(ctx context.Context) attr.Type { } type OdbcParams struct { - Hostname types.String `tfsdk:"hostname" tf:"optional"` + Hostname types.String `tfsdk:"hostname" tf:""` - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` - Port types.Int64 `tfsdk:"port" tf:"optional"` + Port types.Int64 `tfsdk:"port" tf:""` - Protocol types.String `tfsdk:"protocol" tf:"optional"` + Protocol types.String `tfsdk:"protocol" tf:""` } func (newState *OdbcParams) SyncEffectiveFieldsDuringCreateOrUpdate(plan OdbcParams) { @@ -7500,6 +7687,11 @@ func (newState *OdbcParams) SyncEffectiveFieldsDuringCreateOrUpdate(plan OdbcPar func (newState *OdbcParams) SyncEffectiveFieldsDuringRead(existingState OdbcParams) { } +func (c OdbcParams) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in OdbcParams. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7540,22 +7732,22 @@ func (o OdbcParams) Type(ctx context.Context) attr.Type { type Parameter struct { // List of valid parameter values, newline delimited. Only applies for // dropdown list parameters. - EnumOptions types.String `tfsdk:"enumOptions" tf:"optional"` + EnumOptions types.String `tfsdk:"enumOptions" tf:""` // If specified, allows multiple values to be selected for this parameter. // Only applies to dropdown list and query-based dropdown list parameters. - MultiValuesOptions types.Object `tfsdk:"multiValuesOptions" tf:"optional,object"` + MultiValuesOptions types.Object `tfsdk:"multiValuesOptions" tf:"object"` // The literal parameter marker that appears between double curly braces in // the query text. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // The UUID of the query that provides the parameter values. Only applies // for query-based dropdown list parameters. - QueryId types.String `tfsdk:"queryId" tf:"optional"` + QueryId types.String `tfsdk:"queryId" tf:""` // The text displayed in a parameter picking widget. - Title types.String `tfsdk:"title" tf:"optional"` + Title types.String `tfsdk:"title" tf:""` // Parameters can have several different types. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` // The default value for this parameter. - Value types.Object `tfsdk:"value" tf:"optional"` + Value types.Object `tfsdk:"value" tf:""` } func (newState *Parameter) SyncEffectiveFieldsDuringCreateOrUpdate(plan Parameter) { @@ -7564,6 +7756,12 @@ func (newState *Parameter) SyncEffectiveFieldsDuringCreateOrUpdate(plan Paramete func (newState *Parameter) SyncEffectiveFieldsDuringRead(existingState Parameter) { } +func (c Parameter) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MultiValuesOptions{}.ToSchema(cs, append(path, "multiValuesOptions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Parameter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7639,41 +7837,41 @@ func (o *Parameter) SetMultiValuesOptions(ctx context.Context, v MultiValuesOpti type Query struct { // Whether to apply a 1000 row limit to the query result. - ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:""` // Name of the catalog where this query will be executed. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // Timestamp when this query was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Display name of the query that appears in list views, widget headings, // and on the query page. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the query. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Username of the user who last saved changes to this query. - LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:"optional"` + LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:""` // Indicates whether the query is trashed. - LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + LifecycleState types.String `tfsdk:"lifecycle_state" tf:""` // Username of the user that owns the query. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // List of query parameter definitions. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Workspace path of the workspace folder containing the object. - ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + ParentPath types.String `tfsdk:"parent_path" tf:""` // Text of the query to be run. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Sets the "Run as" role for the object. - RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + RunAsMode types.String `tfsdk:"run_as_mode" tf:""` // Name of the schema where this query will be executed. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // Timestamp when this query was last updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` // ID of the SQL warehouse attached to the query. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *Query) SyncEffectiveFieldsDuringCreateOrUpdate(plan Query) { @@ -7682,6 +7880,12 @@ func (newState *Query) SyncEffectiveFieldsDuringCreateOrUpdate(plan Query) { func (newState *Query) SyncEffectiveFieldsDuringRead(existingState Query) { } +func (c Query) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryParameter{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Query. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7806,11 +8010,11 @@ func (o *Query) SetTags(ctx context.Context, v []types.String) { type QueryBackedValue struct { // If specified, allows multiple values to be selected for this parameter. - MultiValuesOptions types.Object `tfsdk:"multi_values_options" tf:"optional,object"` + MultiValuesOptions types.Object `tfsdk:"multi_values_options" tf:"object"` // UUID of the query that provides the parameter values. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // List of selected query parameter values. - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *QueryBackedValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryBackedValue) { @@ -7819,6 +8023,12 @@ func (newState *QueryBackedValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan Q func (newState *QueryBackedValue) SyncEffectiveFieldsDuringRead(existingState QueryBackedValue) { } +func (c QueryBackedValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MultiValuesOptions{}.ToSchema(cs, append(path, "multi_values_options")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryBackedValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7918,27 +8128,27 @@ type QueryEditContent struct { // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + DataSourceId types.String `tfsdk:"data_source_id" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The title of this query that appears in list views, widget headings, and // on the query page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Exclusively used for storing a list parameter definitions. A parameter is // an object with `title`, `name`, `type`, and `value` properties. The // `value` field here is the default value. It can be overridden at runtime. - Options types.Object `tfsdk:"options" tf:"optional"` + Options types.Object `tfsdk:"options" tf:""` // The text of the query to be run. - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` QueryId types.String `tfsdk:"-"` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *QueryEditContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEditContent) { @@ -7947,6 +8157,12 @@ func (newState *QueryEditContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan Q func (newState *QueryEditContent) SyncEffectiveFieldsDuringRead(existingState QueryEditContent) { } +func (c QueryEditContent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "query_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryEditContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8025,15 +8241,15 @@ func (o *QueryEditContent) SetTags(ctx context.Context, v []types.String) { type QueryFilter struct { // A range filter for query submitted time. The time range must be <= 30 // days. - QueryStartTimeRange types.Object `tfsdk:"query_start_time_range" tf:"optional,object"` + QueryStartTimeRange types.Object `tfsdk:"query_start_time_range" tf:"object"` // A list of statement IDs. - StatementIds types.List `tfsdk:"statement_ids" tf:"optional"` + StatementIds types.List `tfsdk:"statement_ids" tf:""` - Statuses types.List `tfsdk:"statuses" tf:"optional"` + Statuses types.List `tfsdk:"statuses" tf:""` // A list of user IDs who ran the queries. - UserIds types.List `tfsdk:"user_ids" tf:"optional"` + UserIds types.List `tfsdk:"user_ids" tf:""` // A list of warehouse IDs. - WarehouseIds types.List `tfsdk:"warehouse_ids" tf:"optional"` + WarehouseIds types.List `tfsdk:"warehouse_ids" tf:""` } func (newState *QueryFilter) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryFilter) { @@ -8042,6 +8258,12 @@ func (newState *QueryFilter) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryF func (newState *QueryFilter) SyncEffectiveFieldsDuringRead(existingState QueryFilter) { } +func (c QueryFilter) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + TimeRange{}.ToSchema(cs, append(path, "query_start_time_range")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryFilter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8229,54 +8451,54 @@ func (o *QueryFilter) SetWarehouseIds(ctx context.Context, v []types.String) { type QueryInfo struct { // SQL Warehouse channel information at the time of query execution - ChannelUsed types.Object `tfsdk:"channel_used" tf:"optional,object"` + ChannelUsed types.Object `tfsdk:"channel_used" tf:"object"` // Total execution time of the statement ( excluding result fetch time ). - Duration types.Int64 `tfsdk:"duration" tf:"optional"` + Duration types.Int64 `tfsdk:"duration" tf:""` // Alias for `warehouse_id`. - EndpointId types.String `tfsdk:"endpoint_id" tf:"optional"` + EndpointId types.String `tfsdk:"endpoint_id" tf:""` // Message describing why the query could not complete. - ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + ErrorMessage types.String `tfsdk:"error_message" tf:""` // The ID of the user whose credentials were used to run the query. - ExecutedAsUserId types.Int64 `tfsdk:"executed_as_user_id" tf:"optional"` + ExecutedAsUserId types.Int64 `tfsdk:"executed_as_user_id" tf:""` // The email address or username of the user whose credentials were used to // run the query. - ExecutedAsUserName types.String `tfsdk:"executed_as_user_name" tf:"optional"` + ExecutedAsUserName types.String `tfsdk:"executed_as_user_name" tf:""` // The time execution of the query ended. - ExecutionEndTimeMs types.Int64 `tfsdk:"execution_end_time_ms" tf:"optional"` + ExecutionEndTimeMs types.Int64 `tfsdk:"execution_end_time_ms" tf:""` // Whether more updates for the query are expected. - IsFinal types.Bool `tfsdk:"is_final" tf:"optional"` + IsFinal types.Bool `tfsdk:"is_final" tf:""` // A key that can be used to look up query details. - LookupKey types.String `tfsdk:"lookup_key" tf:"optional"` + LookupKey types.String `tfsdk:"lookup_key" tf:""` // Metrics about query execution. - Metrics types.Object `tfsdk:"metrics" tf:"optional,object"` + Metrics types.Object `tfsdk:"metrics" tf:"object"` // Whether plans exist for the execution, or the reason why they are missing - PlansState types.String `tfsdk:"plans_state" tf:"optional"` + PlansState types.String `tfsdk:"plans_state" tf:""` // The time the query ended. - QueryEndTimeMs types.Int64 `tfsdk:"query_end_time_ms" tf:"optional"` + QueryEndTimeMs types.Int64 `tfsdk:"query_end_time_ms" tf:""` // The query ID. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // The time the query started. - QueryStartTimeMs types.Int64 `tfsdk:"query_start_time_ms" tf:"optional"` + QueryStartTimeMs types.Int64 `tfsdk:"query_start_time_ms" tf:""` // The text of the query. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // The number of results returned by the query. - RowsProduced types.Int64 `tfsdk:"rows_produced" tf:"optional"` + RowsProduced types.Int64 `tfsdk:"rows_produced" tf:""` // URL to the Spark UI query plan. - SparkUiUrl types.String `tfsdk:"spark_ui_url" tf:"optional"` + SparkUiUrl types.String `tfsdk:"spark_ui_url" tf:""` // Type of statement for this query - StatementType types.String `tfsdk:"statement_type" tf:"optional"` + StatementType types.String `tfsdk:"statement_type" tf:""` // Query status with one the following values: // // - `QUEUED`: Query has been received and queued. - `RUNNING`: Query has // started. - `CANCELED`: Query has been cancelled by the user. - `FAILED`: // Query has failed. - `FINISHED`: Query has completed. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` // The ID of the user who ran the query. - UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + UserId types.Int64 `tfsdk:"user_id" tf:""` // The email address or username of the user who ran the query. - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` // Warehouse ID. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *QueryInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryInfo) { @@ -8285,6 +8507,13 @@ func (newState *QueryInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryInf func (newState *QueryInfo) SyncEffectiveFieldsDuringRead(existingState QueryInfo) { } +func (c QueryInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ChannelInfo{}.ToSchema(cs, append(path, "channel_used")...) + QueryMetrics{}.ToSchema(cs, append(path, "metrics")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8419,13 +8648,13 @@ func (o *QueryInfo) SetMetrics(ctx context.Context, v QueryMetrics) { type QueryList struct { // The total number of queries. - Count types.Int64 `tfsdk:"count" tf:"optional"` + Count types.Int64 `tfsdk:"count" tf:""` // The page number that is currently displayed. - Page types.Int64 `tfsdk:"page" tf:"optional"` + Page types.Int64 `tfsdk:"page" tf:""` // The number of queries per page. - PageSize types.Int64 `tfsdk:"page_size" tf:"optional"` + PageSize types.Int64 `tfsdk:"page_size" tf:""` // List of queries returned. - Results types.List `tfsdk:"results" tf:"optional"` + Results types.List `tfsdk:"results" tf:""` } func (newState *QueryList) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryList) { @@ -8434,6 +8663,12 @@ func (newState *QueryList) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryLis func (newState *QueryList) SyncEffectiveFieldsDuringRead(existingState QueryList) { } +func (c QueryList) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + LegacyQuery{}.ToSchema(cs, append(path, "results")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryList. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8505,61 +8740,61 @@ func (o *QueryList) SetResults(ctx context.Context, v []LegacyQuery) { // Metrics come from the driver and are stored in the history service database. type QueryMetrics struct { // Time spent loading metadata and optimizing the query, in milliseconds. - CompilationTimeMs types.Int64 `tfsdk:"compilation_time_ms" tf:"optional"` + CompilationTimeMs types.Int64 `tfsdk:"compilation_time_ms" tf:""` // Time spent executing the query, in milliseconds. - ExecutionTimeMs types.Int64 `tfsdk:"execution_time_ms" tf:"optional"` + ExecutionTimeMs types.Int64 `tfsdk:"execution_time_ms" tf:""` // Total amount of data sent over the network between executor nodes during // shuffle, in bytes. - NetworkSentBytes types.Int64 `tfsdk:"network_sent_bytes" tf:"optional"` + NetworkSentBytes types.Int64 `tfsdk:"network_sent_bytes" tf:""` // Timestamp of when the query was enqueued waiting while the warehouse was // at max load. This field is optional and will not appear if the query // skipped the overloading queue. - OverloadingQueueStartTimestamp types.Int64 `tfsdk:"overloading_queue_start_timestamp" tf:"optional"` + OverloadingQueueStartTimestamp types.Int64 `tfsdk:"overloading_queue_start_timestamp" tf:""` // Total execution time for all individual Photon query engine tasks in the // query, in milliseconds. - PhotonTotalTimeMs types.Int64 `tfsdk:"photon_total_time_ms" tf:"optional"` + PhotonTotalTimeMs types.Int64 `tfsdk:"photon_total_time_ms" tf:""` // Timestamp of when the query was enqueued waiting for a cluster to be // provisioned for the warehouse. This field is optional and will not appear // if the query skipped the provisioning queue. - ProvisioningQueueStartTimestamp types.Int64 `tfsdk:"provisioning_queue_start_timestamp" tf:"optional"` + ProvisioningQueueStartTimestamp types.Int64 `tfsdk:"provisioning_queue_start_timestamp" tf:""` // Total number of bytes in all tables not read due to pruning - PrunedBytes types.Int64 `tfsdk:"pruned_bytes" tf:"optional"` + PrunedBytes types.Int64 `tfsdk:"pruned_bytes" tf:""` // Total number of files from all tables not read due to pruning - PrunedFilesCount types.Int64 `tfsdk:"pruned_files_count" tf:"optional"` + PrunedFilesCount types.Int64 `tfsdk:"pruned_files_count" tf:""` // Timestamp of when the underlying compute started compilation of the // query. - QueryCompilationStartTimestamp types.Int64 `tfsdk:"query_compilation_start_timestamp" tf:"optional"` + QueryCompilationStartTimestamp types.Int64 `tfsdk:"query_compilation_start_timestamp" tf:""` // Total size of data read by the query, in bytes. - ReadBytes types.Int64 `tfsdk:"read_bytes" tf:"optional"` + ReadBytes types.Int64 `tfsdk:"read_bytes" tf:""` // Size of persistent data read from the cache, in bytes. - ReadCacheBytes types.Int64 `tfsdk:"read_cache_bytes" tf:"optional"` + ReadCacheBytes types.Int64 `tfsdk:"read_cache_bytes" tf:""` // Number of files read after pruning - ReadFilesCount types.Int64 `tfsdk:"read_files_count" tf:"optional"` + ReadFilesCount types.Int64 `tfsdk:"read_files_count" tf:""` // Number of partitions read after pruning. - ReadPartitionsCount types.Int64 `tfsdk:"read_partitions_count" tf:"optional"` + ReadPartitionsCount types.Int64 `tfsdk:"read_partitions_count" tf:""` // Size of persistent data read from cloud object storage on your cloud // tenant, in bytes. - ReadRemoteBytes types.Int64 `tfsdk:"read_remote_bytes" tf:"optional"` + ReadRemoteBytes types.Int64 `tfsdk:"read_remote_bytes" tf:""` // Time spent fetching the query results after the execution finished, in // milliseconds. - ResultFetchTimeMs types.Int64 `tfsdk:"result_fetch_time_ms" tf:"optional"` + ResultFetchTimeMs types.Int64 `tfsdk:"result_fetch_time_ms" tf:""` // `true` if the query result was fetched from cache, `false` otherwise. - ResultFromCache types.Bool `tfsdk:"result_from_cache" tf:"optional"` + ResultFromCache types.Bool `tfsdk:"result_from_cache" tf:""` // Total number of rows returned by the query. - RowsProducedCount types.Int64 `tfsdk:"rows_produced_count" tf:"optional"` + RowsProducedCount types.Int64 `tfsdk:"rows_produced_count" tf:""` // Total number of rows read by the query. - RowsReadCount types.Int64 `tfsdk:"rows_read_count" tf:"optional"` + RowsReadCount types.Int64 `tfsdk:"rows_read_count" tf:""` // Size of data temporarily written to disk while executing the query, in // bytes. - SpillToDiskBytes types.Int64 `tfsdk:"spill_to_disk_bytes" tf:"optional"` + SpillToDiskBytes types.Int64 `tfsdk:"spill_to_disk_bytes" tf:""` // Sum of execution time for all of the query’s tasks, in milliseconds. - TaskTotalTimeMs types.Int64 `tfsdk:"task_total_time_ms" tf:"optional"` + TaskTotalTimeMs types.Int64 `tfsdk:"task_total_time_ms" tf:""` // Total execution time of the query from the client’s point of view, in // milliseconds. - TotalTimeMs types.Int64 `tfsdk:"total_time_ms" tf:"optional"` + TotalTimeMs types.Int64 `tfsdk:"total_time_ms" tf:""` // Size pf persistent data written to cloud object storage in your cloud // tenant, in bytes. - WriteRemoteBytes types.Int64 `tfsdk:"write_remote_bytes" tf:"optional"` + WriteRemoteBytes types.Int64 `tfsdk:"write_remote_bytes" tf:""` } func (newState *QueryMetrics) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryMetrics) { @@ -8568,6 +8803,11 @@ func (newState *QueryMetrics) SyncEffectiveFieldsDuringCreateOrUpdate(plan Query func (newState *QueryMetrics) SyncEffectiveFieldsDuringRead(existingState QueryMetrics) { } +func (c QueryMetrics) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryMetrics. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8643,15 +8883,15 @@ func (o QueryMetrics) Type(ctx context.Context) attr.Type { type QueryOptions struct { // The name of the catalog to execute this query in. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // The timestamp when this query was moved to trash. Only present when the // `is_archived` property is `true`. Trashed items are deleted after thirty // days. - MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:"optional"` + MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:""` - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // The name of the schema to execute this query in. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` } func (newState *QueryOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryOptions) { @@ -8660,6 +8900,12 @@ func (newState *QueryOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan Query func (newState *QueryOptions) SyncEffectiveFieldsDuringRead(existingState QueryOptions) { } +func (c QueryOptions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Parameter{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8730,23 +8976,23 @@ func (o *QueryOptions) SetParameters(ctx context.Context, v []Parameter) { type QueryParameter struct { // Date-range query parameter value. Can only specify one of // `dynamic_date_range_value` or `date_range_value`. - DateRangeValue types.Object `tfsdk:"date_range_value" tf:"optional,object"` + DateRangeValue types.Object `tfsdk:"date_range_value" tf:"object"` // Date query parameter value. Can only specify one of `dynamic_date_value` // or `date_value`. - DateValue types.Object `tfsdk:"date_value" tf:"optional,object"` + DateValue types.Object `tfsdk:"date_value" tf:"object"` // Dropdown query parameter value. - EnumValue types.Object `tfsdk:"enum_value" tf:"optional,object"` + EnumValue types.Object `tfsdk:"enum_value" tf:"object"` // Literal parameter marker that appears between double curly braces in the // query text. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Numeric query parameter value. - NumericValue types.Object `tfsdk:"numeric_value" tf:"optional,object"` + NumericValue types.Object `tfsdk:"numeric_value" tf:"object"` // Query-based dropdown query parameter value. - QueryBackedValue types.Object `tfsdk:"query_backed_value" tf:"optional,object"` + QueryBackedValue types.Object `tfsdk:"query_backed_value" tf:"object"` // Text query parameter value. - TextValue types.Object `tfsdk:"text_value" tf:"optional,object"` + TextValue types.Object `tfsdk:"text_value" tf:"object"` // Text displayed in the user-facing parameter widget in the UI. - Title types.String `tfsdk:"title" tf:"optional"` + Title types.String `tfsdk:"title" tf:""` } func (newState *QueryParameter) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryParameter) { @@ -8755,6 +9001,17 @@ func (newState *QueryParameter) SyncEffectiveFieldsDuringCreateOrUpdate(plan Que func (newState *QueryParameter) SyncEffectiveFieldsDuringRead(existingState QueryParameter) { } +func (c QueryParameter) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DateRangeValue{}.ToSchema(cs, append(path, "date_range_value")...) + DateValue{}.ToSchema(cs, append(path, "date_value")...) + EnumValue{}.ToSchema(cs, append(path, "enum_value")...) + NumericValue{}.ToSchema(cs, append(path, "numeric_value")...) + QueryBackedValue{}.ToSchema(cs, append(path, "query_backed_value")...) + TextValue{}.ToSchema(cs, append(path, "text_value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryParameter. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -8980,27 +9237,27 @@ type QueryPostContent struct { // is distinct from the warehouse ID. [Learn more] // // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list - DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + DataSourceId types.String `tfsdk:"data_source_id" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // The title of this query that appears in list views, widget headings, and // on the query page. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Exclusively used for storing a list parameter definitions. A parameter is // an object with `title`, `name`, `type`, and `value` properties. The // `value` field here is the default value. It can be overridden at runtime. - Options types.Object `tfsdk:"options" tf:"optional"` + Options types.Object `tfsdk:"options" tf:""` // The identifier of the workspace folder containing the object. - Parent types.String `tfsdk:"parent" tf:"optional"` + Parent types.String `tfsdk:"parent" tf:""` // The text of the query to be run. - Query types.String `tfsdk:"query" tf:"optional"` + Query types.String `tfsdk:"query" tf:""` // Sets the **Run as** role for the object. Must be set to one of `"viewer"` // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as // owner" behavior) - RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + RunAsRole types.String `tfsdk:"run_as_role" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` } func (newState *QueryPostContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryPostContent) { @@ -9009,6 +9266,11 @@ func (newState *QueryPostContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan Q func (newState *QueryPostContent) SyncEffectiveFieldsDuringRead(existingState QueryPostContent) { } +func (c QueryPostContent) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryPostContent. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9086,9 +9348,9 @@ func (o *QueryPostContent) SetTags(ctx context.Context, v []types.String) { type RepeatedEndpointConfPairs struct { // Deprecated: Use configuration_pairs - ConfigPair types.List `tfsdk:"config_pair" tf:"optional"` + ConfigPair types.List `tfsdk:"config_pair" tf:""` - ConfigurationPairs types.List `tfsdk:"configuration_pairs" tf:"optional"` + ConfigurationPairs types.List `tfsdk:"configuration_pairs" tf:""` } func (newState *RepeatedEndpointConfPairs) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepeatedEndpointConfPairs) { @@ -9097,6 +9359,13 @@ func (newState *RepeatedEndpointConfPairs) SyncEffectiveFieldsDuringCreateOrUpda func (newState *RepeatedEndpointConfPairs) SyncEffectiveFieldsDuringRead(existingState RepeatedEndpointConfPairs) { } +func (c RepeatedEndpointConfPairs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointConfPair{}.ToSchema(cs, append(path, "config_pair")...) + EndpointConfPair{}.ToSchema(cs, append(path, "configuration_pairs")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepeatedEndpointConfPairs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9194,12 +9463,6 @@ type RestoreDashboardRequest struct { DashboardId types.String `tfsdk:"-"` } -func (newState *RestoreDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreDashboardRequest) { -} - -func (newState *RestoreDashboardRequest) SyncEffectiveFieldsDuringRead(existingState RestoreDashboardRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreDashboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9236,12 +9499,6 @@ type RestoreQueriesLegacyRequest struct { QueryId types.String `tfsdk:"-"` } -func (newState *RestoreQueriesLegacyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreQueriesLegacyRequest) { -} - -func (newState *RestoreQueriesLegacyRequest) SyncEffectiveFieldsDuringRead(existingState RestoreQueriesLegacyRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreQueriesLegacyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9276,12 +9533,6 @@ func (o RestoreQueriesLegacyRequest) Type(ctx context.Context) attr.Type { type RestoreResponse struct { } -func (newState *RestoreResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreResponse) { -} - -func (newState *RestoreResponse) SyncEffectiveFieldsDuringRead(existingState RestoreResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9312,28 +9563,28 @@ func (o RestoreResponse) Type(ctx context.Context) attr.Type { type ResultData struct { // The number of bytes in the result chunk. This field is not available when // using `INLINE` disposition. - ByteCount types.Int64 `tfsdk:"byte_count" tf:"optional"` + ByteCount types.Int64 `tfsdk:"byte_count" tf:""` // The position within the sequence of result set chunks. - ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:"optional"` + ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:""` // The `JSON_ARRAY` format is an array of arrays of values, where each // non-null value is formatted as a string. Null values are encoded as JSON // `null`. - DataArray types.List `tfsdk:"data_array" tf:"optional"` + DataArray types.List `tfsdk:"data_array" tf:""` - ExternalLinks types.List `tfsdk:"external_links" tf:"optional"` + ExternalLinks types.List `tfsdk:"external_links" tf:""` // When fetching, provides the `chunk_index` for the _next_ chunk. If // absent, indicates there are no more chunks. The next chunk can be fetched // with a :method:statementexecution/getStatementResultChunkN request. - NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:"optional"` + NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:""` // When fetching, provides a link to fetch the _next_ chunk. If absent, // indicates there are no more chunks. This link is an absolute `path` to be // joined with your `$DATABRICKS_HOST`, and should be treated as an opaque // link. This is an alternative to using `next_chunk_index`. - NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:"optional"` + NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:""` // The number of rows within the result chunk. - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` // The starting row offset within the result set. - RowOffset types.Int64 `tfsdk:"row_offset" tf:"optional"` + RowOffset types.Int64 `tfsdk:"row_offset" tf:""` } func (newState *ResultData) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultData) { @@ -9342,6 +9593,12 @@ func (newState *ResultData) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultD func (newState *ResultData) SyncEffectiveFieldsDuringRead(existingState ResultData) { } +func (c ResultData) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ExternalLink{}.ToSchema(cs, append(path, "external_links")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultData. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9451,21 +9708,21 @@ func (o *ResultData) SetExternalLinks(ctx context.Context, v []ExternalLink) { // The result manifest provides schema and metadata for the result set. type ResultManifest struct { // Array of result set chunk metadata. - Chunks types.List `tfsdk:"chunks" tf:"optional"` + Chunks types.List `tfsdk:"chunks" tf:""` - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // The schema is an ordered list of column descriptions. - Schema types.Object `tfsdk:"schema" tf:"optional,object"` + Schema types.Object `tfsdk:"schema" tf:"object"` // The total number of bytes in the result set. This field is not available // when using `INLINE` disposition. - TotalByteCount types.Int64 `tfsdk:"total_byte_count" tf:"optional"` + TotalByteCount types.Int64 `tfsdk:"total_byte_count" tf:""` // The total number of chunks that the result set has been divided into. - TotalChunkCount types.Int64 `tfsdk:"total_chunk_count" tf:"optional"` + TotalChunkCount types.Int64 `tfsdk:"total_chunk_count" tf:""` // The total number of rows in the result set. - TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:"optional"` + TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:""` // Indicates whether the result is truncated due to `row_limit` or // `byte_limit`. - Truncated types.Bool `tfsdk:"truncated" tf:"optional"` + Truncated types.Bool `tfsdk:"truncated" tf:""` } func (newState *ResultManifest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultManifest) { @@ -9474,6 +9731,13 @@ func (newState *ResultManifest) SyncEffectiveFieldsDuringCreateOrUpdate(plan Res func (newState *ResultManifest) SyncEffectiveFieldsDuringRead(existingState ResultManifest) { } +func (c ResultManifest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + BaseChunkInfo{}.ToSchema(cs, append(path, "chunks")...) + ResultSchema{}.ToSchema(cs, append(path, "schema")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultManifest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9578,9 +9842,9 @@ func (o *ResultManifest) SetSchema(ctx context.Context, v ResultSchema) { // The schema is an ordered list of column descriptions. type ResultSchema struct { - ColumnCount types.Int64 `tfsdk:"column_count" tf:"optional"` + ColumnCount types.Int64 `tfsdk:"column_count" tf:""` - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *ResultSchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultSchema) { @@ -9589,6 +9853,12 @@ func (newState *ResultSchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan Resul func (newState *ResultSchema) SyncEffectiveFieldsDuringRead(existingState ResultSchema) { } +func (c ResultSchema) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ColumnInfo{}.ToSchema(cs, append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultSchema. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9653,9 +9923,9 @@ func (o *ResultSchema) SetColumns(ctx context.Context, v []ColumnInfo) { } type ServiceError struct { - ErrorCode types.String `tfsdk:"error_code" tf:"optional"` + ErrorCode types.String `tfsdk:"error_code" tf:""` // A brief summary of the error condition. - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *ServiceError) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServiceError) { @@ -9664,6 +9934,11 @@ func (newState *ServiceError) SyncEffectiveFieldsDuringCreateOrUpdate(plan Servi func (newState *ServiceError) SyncEffectiveFieldsDuringRead(existingState ServiceError) { } +func (c ServiceError) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ServiceError. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9699,7 +9974,7 @@ func (o ServiceError) Type(ctx context.Context) attr.Type { // Set object ACL type SetRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // Object ID. The ACL for the object with this UUID is overwritten by this // request's POST content. ObjectId types.String `tfsdk:"-"` @@ -9707,12 +9982,6 @@ type SetRequest struct { ObjectType types.String `tfsdk:"-"` } -func (newState *SetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetRequest) { -} - -func (newState *SetRequest) SyncEffectiveFieldsDuringRead(existingState SetRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9779,17 +10048,11 @@ func (o *SetRequest) SetAccessControlList(ctx context.Context, v []AccessControl } type SetResponse struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // An object's type and UUID, separated by a forward slash (/) character. - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` // A singular noun object type. - ObjectType types.String `tfsdk:"object_type" tf:"optional"` -} - -func (newState *SetResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetResponse) { -} - -func (newState *SetResponse) SyncEffectiveFieldsDuringRead(existingState SetResponse) { + ObjectType types.String `tfsdk:"object_type" tf:""` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetResponse. @@ -9859,30 +10122,30 @@ func (o *SetResponse) SetAccessControlList(ctx context.Context, v []AccessContro type SetWorkspaceWarehouseConfigRequest struct { // Optional: Channel selection details - Channel types.Object `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"object"` // Deprecated: Use sql_configuration_parameters - ConfigParam types.Object `tfsdk:"config_param" tf:"optional,object"` + ConfigParam types.Object `tfsdk:"config_param" tf:"object"` // Spark confs for external hive metastore configuration JSON serialized // size must be less than <= 512K - DataAccessConfig types.List `tfsdk:"data_access_config" tf:"optional"` + DataAccessConfig types.List `tfsdk:"data_access_config" tf:""` // List of Warehouse Types allowed in this workspace (limits allowed value // of the type field in CreateWarehouse and EditWarehouse). Note: Some types // cannot be disabled, they don't need to be specified in // SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing // warehouses to be converted to another type. Used by frontend to save // specific type availability in the warehouse create and edit form UI. - EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:"optional"` + EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:""` // Deprecated: Use sql_configuration_parameters - GlobalParam types.Object `tfsdk:"global_param" tf:"optional,object"` + GlobalParam types.Object `tfsdk:"global_param" tf:"object"` // GCP only: Google Service Account used to pass to cluster to access Google // Cloud Storage - GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` + GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:""` // AWS Only: Instance profile used to pass IAM role to the cluster - InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` // Security policy for warehouses - SecurityPolicy types.String `tfsdk:"security_policy" tf:"optional"` + SecurityPolicy types.String `tfsdk:"security_policy" tf:""` // SQL configuration parameters - SqlConfigurationParameters types.Object `tfsdk:"sql_configuration_parameters" tf:"optional,object"` + SqlConfigurationParameters types.Object `tfsdk:"sql_configuration_parameters" tf:"object"` } func (newState *SetWorkspaceWarehouseConfigRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetWorkspaceWarehouseConfigRequest) { @@ -9891,6 +10154,17 @@ func (newState *SetWorkspaceWarehouseConfigRequest) SyncEffectiveFieldsDuringCre func (newState *SetWorkspaceWarehouseConfigRequest) SyncEffectiveFieldsDuringRead(existingState SetWorkspaceWarehouseConfigRequest) { } +func (c SetWorkspaceWarehouseConfigRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Channel{}.ToSchema(cs, append(path, "channel")...) + RepeatedEndpointConfPairs{}.ToSchema(cs, append(path, "config_param")...) + EndpointConfPair{}.ToSchema(cs, append(path, "data_access_config")...) + WarehouseTypePair{}.ToSchema(cs, append(path, "enabled_warehouse_types")...) + RepeatedEndpointConfPairs{}.ToSchema(cs, append(path, "global_param")...) + RepeatedEndpointConfPairs{}.ToSchema(cs, append(path, "sql_configuration_parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetWorkspaceWarehouseConfigRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10122,6 +10396,11 @@ func (newState *SetWorkspaceWarehouseConfigResponse) SyncEffectiveFieldsDuringCr func (newState *SetWorkspaceWarehouseConfigResponse) SyncEffectiveFieldsDuringRead(existingState SetWorkspaceWarehouseConfigResponse) { } +func (c SetWorkspaceWarehouseConfigResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetWorkspaceWarehouseConfigResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10155,12 +10434,6 @@ type StartRequest struct { Id types.String `tfsdk:"-"` } -func (newState *StartRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartRequest) { -} - -func (newState *StartRequest) SyncEffectiveFieldsDuringRead(existingState StartRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10201,6 +10474,11 @@ func (newState *StartWarehouseResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *StartWarehouseResponse) SyncEffectiveFieldsDuringRead(existingState StartWarehouseResponse) { } +func (c StartWarehouseResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10238,10 +10516,10 @@ type StatementParameterListItem struct { // reference. // // [Data types]: https://docs.databricks.com/sql/language-manual/functions/cast.html - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` // The value to substitute, represented as a string. If omitted, the value // is interpreted as NULL. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *StatementParameterListItem) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementParameterListItem) { @@ -10250,6 +10528,12 @@ func (newState *StatementParameterListItem) SyncEffectiveFieldsDuringCreateOrUpd func (newState *StatementParameterListItem) SyncEffectiveFieldsDuringRead(existingState StatementParameterListItem) { } +func (c StatementParameterListItem) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StatementParameterListItem. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10287,15 +10571,15 @@ func (o StatementParameterListItem) Type(ctx context.Context) attr.Type { type StatementResponse struct { // The result manifest provides schema and metadata for the result set. - Manifest types.Object `tfsdk:"manifest" tf:"optional,object"` + Manifest types.Object `tfsdk:"manifest" tf:"object"` - Result types.Object `tfsdk:"result" tf:"optional,object"` + Result types.Object `tfsdk:"result" tf:"object"` // The statement ID is returned upon successfully submitting a SQL // statement, and is a required reference for all subsequent calls. - StatementId types.String `tfsdk:"statement_id" tf:"optional"` + StatementId types.String `tfsdk:"statement_id" tf:""` // The status response includes execution state and if relevant, error // information. - Status types.Object `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"object"` } func (newState *StatementResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementResponse) { @@ -10304,6 +10588,14 @@ func (newState *StatementResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *StatementResponse) SyncEffectiveFieldsDuringRead(existingState StatementResponse) { } +func (c StatementResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ResultManifest{}.ToSchema(cs, append(path, "manifest")...) + ResultData{}.ToSchema(cs, append(path, "result")...) + StatementStatus{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StatementResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10432,7 +10724,7 @@ func (o *StatementResponse) SetStatus(ctx context.Context, v StatementStatus) { // The status response includes execution state and if relevant, error // information. type StatementStatus struct { - Error types.Object `tfsdk:"error" tf:"optional,object"` + Error types.Object `tfsdk:"error" tf:"object"` // Statement execution state: - `PENDING`: waiting for warehouse - // `RUNNING`: running - `SUCCEEDED`: execution was successful, result data // available for fetch - `FAILED`: execution failed; reason for failure @@ -10440,7 +10732,7 @@ type StatementStatus struct { // come from explicit cancel call, or timeout with `on_wait_timeout=CANCEL` // - `CLOSED`: execution successful, and statement closed; result no longer // available for fetch - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *StatementStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementStatus) { @@ -10449,6 +10741,12 @@ func (newState *StatementStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan St func (newState *StatementStatus) SyncEffectiveFieldsDuringRead(existingState StatementStatus) { } +func (c StatementStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ServiceError{}.ToSchema(cs, append(path, "error")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StatementStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10518,12 +10816,6 @@ type StopRequest struct { Id types.String `tfsdk:"-"` } -func (newState *StopRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopRequest) { -} - -func (newState *StopRequest) SyncEffectiveFieldsDuringRead(existingState StopRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10564,6 +10856,11 @@ func (newState *StopWarehouseResponse) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *StopWarehouseResponse) SyncEffectiveFieldsDuringRead(existingState StopWarehouseResponse) { } +func (c StopWarehouseResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in StopWarehouseResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10592,7 +10889,7 @@ func (o StopWarehouseResponse) Type(ctx context.Context) attr.Type { } type Success struct { - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` } func (newState *Success) SyncEffectiveFieldsDuringCreateOrUpdate(plan Success) { @@ -10601,6 +10898,11 @@ func (newState *Success) SyncEffectiveFieldsDuringCreateOrUpdate(plan Success) { func (newState *Success) SyncEffectiveFieldsDuringRead(existingState Success) { } +func (c Success) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Success. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10634,12 +10936,12 @@ func (o Success) Type(ctx context.Context) attr.Type { type TerminationReason struct { // status code indicating why the cluster was terminated - Code types.String `tfsdk:"code" tf:"optional"` + Code types.String `tfsdk:"code" tf:""` // list of parameters that provide additional information about why the // cluster was terminated - Parameters types.Map `tfsdk:"parameters" tf:"optional"` + Parameters types.Map `tfsdk:"parameters" tf:""` // type of the termination - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *TerminationReason) SyncEffectiveFieldsDuringCreateOrUpdate(plan TerminationReason) { @@ -10648,6 +10950,11 @@ func (newState *TerminationReason) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *TerminationReason) SyncEffectiveFieldsDuringRead(existingState TerminationReason) { } +func (c TerminationReason) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TerminationReason. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10714,7 +11021,7 @@ func (o *TerminationReason) SetParameters(ctx context.Context, v map[string]type } type TextValue struct { - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *TextValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan TextValue) { @@ -10723,6 +11030,11 @@ func (newState *TextValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan TextValu func (newState *TextValue) SyncEffectiveFieldsDuringRead(existingState TextValue) { } +func (c TextValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TextValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10756,9 +11068,9 @@ func (o TextValue) Type(ctx context.Context) attr.Type { type TimeRange struct { // The end time in milliseconds. - EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:"optional"` + EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:""` // The start time in milliseconds. - StartTimeMs types.Int64 `tfsdk:"start_time_ms" tf:"optional"` + StartTimeMs types.Int64 `tfsdk:"start_time_ms" tf:""` } func (newState *TimeRange) SyncEffectiveFieldsDuringCreateOrUpdate(plan TimeRange) { @@ -10767,6 +11079,11 @@ func (newState *TimeRange) SyncEffectiveFieldsDuringCreateOrUpdate(plan TimeRang func (newState *TimeRange) SyncEffectiveFieldsDuringRead(existingState TimeRange) { } +func (c TimeRange) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TimeRange. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10802,7 +11119,7 @@ func (o TimeRange) Type(ctx context.Context) attr.Type { type TransferOwnershipObjectId struct { // Email address for the new owner, who must exist in the workspace. - NewOwner types.String `tfsdk:"new_owner" tf:"optional"` + NewOwner types.String `tfsdk:"new_owner" tf:""` } func (newState *TransferOwnershipObjectId) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransferOwnershipObjectId) { @@ -10811,6 +11128,11 @@ func (newState *TransferOwnershipObjectId) SyncEffectiveFieldsDuringCreateOrUpda func (newState *TransferOwnershipObjectId) SyncEffectiveFieldsDuringRead(existingState TransferOwnershipObjectId) { } +func (c TransferOwnershipObjectId) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransferOwnershipObjectId. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10845,19 +11167,13 @@ func (o TransferOwnershipObjectId) Type(ctx context.Context) attr.Type { // Transfer object ownership type TransferOwnershipRequest struct { // Email address for the new owner, who must exist in the workspace. - NewOwner types.String `tfsdk:"new_owner" tf:"optional"` + NewOwner types.String `tfsdk:"new_owner" tf:""` // The ID of the object on which to change ownership. ObjectId types.Object `tfsdk:"-"` // The type of object on which to change ownership. ObjectType types.String `tfsdk:"-"` } -func (newState *TransferOwnershipRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransferOwnershipRequest) { -} - -func (newState *TransferOwnershipRequest) SyncEffectiveFieldsDuringRead(existingState TransferOwnershipRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in TransferOwnershipRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10928,12 +11244,6 @@ type TrashAlertRequest struct { Id types.String `tfsdk:"-"` } -func (newState *TrashAlertRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashAlertRequest) { -} - -func (newState *TrashAlertRequest) SyncEffectiveFieldsDuringRead(existingState TrashAlertRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashAlertRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -10970,12 +11280,6 @@ type TrashQueryRequest struct { Id types.String `tfsdk:"-"` } -func (newState *TrashQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashQueryRequest) { -} - -func (newState *TrashQueryRequest) SyncEffectiveFieldsDuringRead(existingState TrashQueryRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11008,7 +11312,7 @@ func (o TrashQueryRequest) Type(ctx context.Context) attr.Type { } type UpdateAlertRequest struct { - Alert types.Object `tfsdk:"alert" tf:"optional,object"` + Alert types.Object `tfsdk:"alert" tf:"object"` Id types.String `tfsdk:"-"` // Field mask is required to be passed into the PATCH request. Field mask @@ -11024,6 +11328,14 @@ func (newState *UpdateAlertRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UpdateAlertRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAlertRequest) { } +func (c UpdateAlertRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpdateAlertRequestAlert{}.ToSchema(cs, append(path, "alert")...) + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "update_mask")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAlertRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11091,31 +11403,31 @@ func (o *UpdateAlertRequest) SetAlert(ctx context.Context, v UpdateAlertRequestA type UpdateAlertRequestAlert struct { // Trigger conditions of the alert. - Condition types.Object `tfsdk:"condition" tf:"optional,object"` + Condition types.Object `tfsdk:"condition" tf:"object"` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + CustomBody types.String `tfsdk:"custom_body" tf:""` // Custom subject of alert notification, if it exists. This can include // email subject entries and Slack notification headers, for example. See // [here] for custom templating instructions. // // [here]: https://docs.databricks.com/sql/user/alerts/index.html - CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + CustomSubject types.String `tfsdk:"custom_subject" tf:""` // The display name of the alert. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Whether to notify alert subscribers when alert returns back to normal. - NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:""` // The owner's username. This field is set to "Unavailable" if the user has // been deleted. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // UUID of the query attached to the alert. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds an alert must wait after being triggered to rearm // itself. After rearming, it can be triggered again. If 0 or not specified, // the alert will not be triggered again. - SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:""` } func (newState *UpdateAlertRequestAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAlertRequestAlert) { @@ -11124,6 +11436,12 @@ func (newState *UpdateAlertRequestAlert) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *UpdateAlertRequestAlert) SyncEffectiveFieldsDuringRead(existingState UpdateAlertRequestAlert) { } +func (c UpdateAlertRequestAlert) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AlertCondition{}.ToSchema(cs, append(path, "condition")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAlertRequestAlert. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11202,7 +11520,7 @@ func (o *UpdateAlertRequestAlert) SetCondition(ctx context.Context, v AlertCondi type UpdateQueryRequest struct { Id types.String `tfsdk:"-"` - Query types.Object `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"object"` // Field mask is required to be passed into the PATCH request. Field mask // specifies which fields of the setting payload will be updated. The field // mask needs to be supplied as single string. To specify multiple fields in @@ -11216,6 +11534,14 @@ func (newState *UpdateQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UpdateQueryRequest) SyncEffectiveFieldsDuringRead(existingState UpdateQueryRequest) { } +func (c UpdateQueryRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + UpdateQueryRequestQuery{}.ToSchema(cs, append(path, "query")...) + cs.SetRequired(append(path, "update_mask")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateQueryRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11283,29 +11609,29 @@ func (o *UpdateQueryRequest) SetQuery(ctx context.Context, v UpdateQueryRequestQ type UpdateQueryRequestQuery struct { // Whether to apply a 1000 row limit to the query result. - ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:""` // Name of the catalog where this query will be executed. - Catalog types.String `tfsdk:"catalog" tf:"optional"` + Catalog types.String `tfsdk:"catalog" tf:""` // General description that conveys additional information about this query // such as usage notes. - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Display name of the query that appears in list views, widget headings, // and on the query page. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // Username of the user that owns the query. - OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + OwnerUserName types.String `tfsdk:"owner_user_name" tf:""` // List of query parameter definitions. - Parameters types.List `tfsdk:"parameters" tf:"optional"` + Parameters types.List `tfsdk:"parameters" tf:""` // Text of the query to be run. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // Sets the "Run as" role for the object. - RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + RunAsMode types.String `tfsdk:"run_as_mode" tf:""` // Name of the schema where this query will be executed. - Schema types.String `tfsdk:"schema" tf:"optional"` + Schema types.String `tfsdk:"schema" tf:""` - Tags types.List `tfsdk:"tags" tf:"optional"` + Tags types.List `tfsdk:"tags" tf:""` // ID of the SQL warehouse attached to the query. - WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` } func (newState *UpdateQueryRequestQuery) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateQueryRequestQuery) { @@ -11314,6 +11640,12 @@ func (newState *UpdateQueryRequestQuery) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *UpdateQueryRequestQuery) SyncEffectiveFieldsDuringRead(existingState UpdateQueryRequestQuery) { } +func (c UpdateQueryRequestQuery) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + QueryParameter{}.ToSchema(cs, append(path, "parameters")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateQueryRequestQuery. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11427,12 +11759,6 @@ func (o *UpdateQueryRequestQuery) SetTags(ctx context.Context, v []types.String) type UpdateResponse struct { } -func (newState *UpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse) { -} - -func (newState *UpdateResponse) SyncEffectiveFieldsDuringRead(existingState UpdateResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11468,7 +11794,7 @@ type UpdateVisualizationRequest struct { // the field mask, use comma as the separator (no space). UpdateMask types.String `tfsdk:"update_mask" tf:""` - Visualization types.Object `tfsdk:"visualization" tf:"optional,object"` + Visualization types.Object `tfsdk:"visualization" tf:"object"` } func (newState *UpdateVisualizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVisualizationRequest) { @@ -11477,6 +11803,14 @@ func (newState *UpdateVisualizationRequest) SyncEffectiveFieldsDuringCreateOrUpd func (newState *UpdateVisualizationRequest) SyncEffectiveFieldsDuringRead(existingState UpdateVisualizationRequest) { } +func (c UpdateVisualizationRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "id")...) + cs.SetRequired(append(path, "update_mask")...) + UpdateVisualizationRequestVisualization{}.ToSchema(cs, append(path, "visualization")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateVisualizationRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11544,17 +11878,17 @@ func (o *UpdateVisualizationRequest) SetVisualization(ctx context.Context, v Upd type UpdateVisualizationRequestVisualization struct { // The display name of the visualization. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // The visualization options varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying // visualization options directly. - SerializedOptions types.String `tfsdk:"serialized_options" tf:"optional"` + SerializedOptions types.String `tfsdk:"serialized_options" tf:""` // The visualization query plan varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying the // visualization query plan directly. - SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:"optional"` + SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:""` // The type of visualization: counter, table, funnel, and so on. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` } func (newState *UpdateVisualizationRequestVisualization) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVisualizationRequestVisualization) { @@ -11563,6 +11897,11 @@ func (newState *UpdateVisualizationRequestVisualization) SyncEffectiveFieldsDuri func (newState *UpdateVisualizationRequestVisualization) SyncEffectiveFieldsDuringRead(existingState UpdateVisualizationRequestVisualization) { } +func (c UpdateVisualizationRequestVisualization) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateVisualizationRequestVisualization. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11601,11 +11940,11 @@ func (o UpdateVisualizationRequestVisualization) Type(ctx context.Context) attr. } type User struct { - Email types.String `tfsdk:"email" tf:"optional"` + Email types.String `tfsdk:"email" tf:""` - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *User) SyncEffectiveFieldsDuringCreateOrUpdate(plan User) { @@ -11614,6 +11953,11 @@ func (newState *User) SyncEffectiveFieldsDuringCreateOrUpdate(plan User) { func (newState *User) SyncEffectiveFieldsDuringRead(existingState User) { } +func (c User) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in User. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11651,25 +11995,25 @@ func (o User) Type(ctx context.Context) attr.Type { type Visualization struct { // The timestamp indicating when the visualization was created. - CreateTime types.String `tfsdk:"create_time" tf:"optional"` + CreateTime types.String `tfsdk:"create_time" tf:""` // The display name of the visualization. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // UUID identifying the visualization. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // UUID of the query that the visualization is attached to. - QueryId types.String `tfsdk:"query_id" tf:"optional"` + QueryId types.String `tfsdk:"query_id" tf:""` // The visualization options varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying // visualization options directly. - SerializedOptions types.String `tfsdk:"serialized_options" tf:"optional"` + SerializedOptions types.String `tfsdk:"serialized_options" tf:""` // The visualization query plan varies widely from one visualization type to // the next and is unsupported. Databricks does not recommend modifying the // visualization query plan directly. - SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:"optional"` + SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:""` // The type of visualization: counter, table, funnel, and so on. - Type_ types.String `tfsdk:"type" tf:"optional"` + Type_ types.String `tfsdk:"type" tf:""` // The timestamp indicating when the visualization was updated. - UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + UpdateTime types.String `tfsdk:"update_time" tf:""` } func (newState *Visualization) SyncEffectiveFieldsDuringCreateOrUpdate(plan Visualization) { @@ -11678,6 +12022,11 @@ func (newState *Visualization) SyncEffectiveFieldsDuringCreateOrUpdate(plan Visu func (newState *Visualization) SyncEffectiveFieldsDuringRead(existingState Visualization) { } +func (c Visualization) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Visualization. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11725,13 +12074,13 @@ func (o Visualization) Type(ctx context.Context) attr.Type { type WarehouseAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *WarehouseAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehouseAccessControlRequest) { @@ -11740,6 +12089,11 @@ func (newState *WarehouseAccessControlRequest) SyncEffectiveFieldsDuringCreateOr func (newState *WarehouseAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState WarehouseAccessControlRequest) { } +func (c WarehouseAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehouseAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11779,15 +12133,15 @@ func (o WarehouseAccessControlRequest) Type(ctx context.Context) attr.Type { type WarehouseAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *WarehouseAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehouseAccessControlResponse) { @@ -11796,6 +12150,12 @@ func (newState *WarehouseAccessControlResponse) SyncEffectiveFieldsDuringCreateO func (newState *WarehouseAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState WarehouseAccessControlResponse) { } +func (c WarehouseAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WarehousePermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehouseAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11866,11 +12226,11 @@ func (o *WarehouseAccessControlResponse) SetAllPermissions(ctx context.Context, } type WarehousePermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *WarehousePermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermission) { @@ -11879,6 +12239,11 @@ func (newState *WarehousePermission) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *WarehousePermission) SyncEffectiveFieldsDuringRead(existingState WarehousePermission) { } +func (c WarehousePermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -11945,11 +12310,11 @@ func (o *WarehousePermission) SetInheritedFromObject(ctx context.Context, v []ty } type WarehousePermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *WarehousePermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermissions) { @@ -11958,6 +12323,12 @@ func (newState *WarehousePermissions) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *WarehousePermissions) SyncEffectiveFieldsDuringRead(existingState WarehousePermissions) { } +func (c WarehousePermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WarehouseAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12024,9 +12395,9 @@ func (o *WarehousePermissions) SetAccessControlList(ctx context.Context, v []War } type WarehousePermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *WarehousePermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermissionsDescription) { @@ -12035,6 +12406,11 @@ func (newState *WarehousePermissionsDescription) SyncEffectiveFieldsDuringCreate func (newState *WarehousePermissionsDescription) SyncEffectiveFieldsDuringRead(existingState WarehousePermissionsDescription) { } +func (c WarehousePermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12069,7 +12445,7 @@ func (o WarehousePermissionsDescription) Type(ctx context.Context) attr.Type { } type WarehousePermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The SQL warehouse for which to get or manage permissions. WarehouseId types.String `tfsdk:"-"` } @@ -12080,6 +12456,13 @@ func (newState *WarehousePermissionsRequest) SyncEffectiveFieldsDuringCreateOrUp func (newState *WarehousePermissionsRequest) SyncEffectiveFieldsDuringRead(existingState WarehousePermissionsRequest) { } +func (c WarehousePermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WarehouseAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "warehouse_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12146,9 +12529,9 @@ func (o *WarehousePermissionsRequest) SetAccessControlList(ctx context.Context, type WarehouseTypePair struct { // If set to false the specific warehouse type will not be be allowed as a // value for warehouse_type in CreateWarehouse and EditWarehouse - Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + Enabled types.Bool `tfsdk:"enabled" tf:""` // Warehouse type: `PRO` or `CLASSIC`. - WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` + WarehouseType types.String `tfsdk:"warehouse_type" tf:""` } func (newState *WarehouseTypePair) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehouseTypePair) { @@ -12157,6 +12540,11 @@ func (newState *WarehouseTypePair) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *WarehouseTypePair) SyncEffectiveFieldsDuringRead(existingState WarehouseTypePair) { } +func (c WarehouseTypePair) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehouseTypePair. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12192,17 +12580,17 @@ func (o WarehouseTypePair) Type(ctx context.Context) attr.Type { type Widget struct { // The unique ID for this widget. - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` - Options types.Object `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"object"` // The visualization description API changes frequently and is unsupported. // You can duplicate a visualization by copying description objects received // _from the API_ and then using them to create a new one with a POST // request to the same endpoint. Databricks does not recommend constructing // ad-hoc visualizations entirely in JSON. - Visualization types.Object `tfsdk:"visualization" tf:"optional,object"` + Visualization types.Object `tfsdk:"visualization" tf:"object"` // Unused field. - Width types.Int64 `tfsdk:"width" tf:"optional"` + Width types.Int64 `tfsdk:"width" tf:""` } func (newState *Widget) SyncEffectiveFieldsDuringCreateOrUpdate(plan Widget) { @@ -12211,6 +12599,13 @@ func (newState *Widget) SyncEffectiveFieldsDuringCreateOrUpdate(plan Widget) { func (newState *Widget) SyncEffectiveFieldsDuringRead(existingState Widget) { } +func (c Widget) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WidgetOptions{}.ToSchema(cs, append(path, "options")...) + LegacyVisualization{}.ToSchema(cs, append(path, "visualization")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Widget. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12309,22 +12704,22 @@ func (o *Widget) SetVisualization(ctx context.Context, v LegacyVisualization) { type WidgetOptions struct { // Timestamp when this object was created - CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + CreatedAt types.String `tfsdk:"created_at" tf:""` // Custom description of the widget - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Whether this widget is hidden on the dashboard. - IsHidden types.Bool `tfsdk:"isHidden" tf:"optional"` + IsHidden types.Bool `tfsdk:"isHidden" tf:""` // How parameters used by the visualization in this widget relate to other // widgets on the dashboard. Databricks does not recommend modifying this // definition in JSON. - ParameterMappings types.Object `tfsdk:"parameterMappings" tf:"optional"` + ParameterMappings types.Object `tfsdk:"parameterMappings" tf:""` // Coordinates of this widget on a dashboard. This portion of the API // changes frequently and is unsupported. - Position types.Object `tfsdk:"position" tf:"optional,object"` + Position types.Object `tfsdk:"position" tf:"object"` // Custom title of the widget - Title types.String `tfsdk:"title" tf:"optional"` + Title types.String `tfsdk:"title" tf:""` // Timestamp of the last time this object was updated. - UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + UpdatedAt types.String `tfsdk:"updated_at" tf:""` } func (newState *WidgetOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan WidgetOptions) { @@ -12333,6 +12728,12 @@ func (newState *WidgetOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan Widg func (newState *WidgetOptions) SyncEffectiveFieldsDuringRead(existingState WidgetOptions) { } +func (c WidgetOptions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WidgetPosition{}.ToSchema(cs, append(path, "position")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WidgetOptions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12410,15 +12811,15 @@ func (o *WidgetOptions) SetPosition(ctx context.Context, v WidgetPosition) { // frequently and is unsupported. type WidgetPosition struct { // reserved for internal use - AutoHeight types.Bool `tfsdk:"autoHeight" tf:"optional"` + AutoHeight types.Bool `tfsdk:"autoHeight" tf:""` // column in the dashboard grid. Values start with 0 - Col types.Int64 `tfsdk:"col" tf:"optional"` + Col types.Int64 `tfsdk:"col" tf:""` // row in the dashboard grid. Values start with 0 - Row types.Int64 `tfsdk:"row" tf:"optional"` + Row types.Int64 `tfsdk:"row" tf:""` // width of the widget measured in dashboard grid cells - SizeX types.Int64 `tfsdk:"sizeX" tf:"optional"` + SizeX types.Int64 `tfsdk:"sizeX" tf:""` // height of the widget measured in dashboard grid cells - SizeY types.Int64 `tfsdk:"sizeY" tf:"optional"` + SizeY types.Int64 `tfsdk:"sizeY" tf:""` } func (newState *WidgetPosition) SyncEffectiveFieldsDuringCreateOrUpdate(plan WidgetPosition) { @@ -12427,6 +12828,11 @@ func (newState *WidgetPosition) SyncEffectiveFieldsDuringCreateOrUpdate(plan Wid func (newState *WidgetPosition) SyncEffectiveFieldsDuringRead(existingState WidgetPosition) { } +func (c WidgetPosition) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WidgetPosition. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/vectorsearch_tf/legacy_model.go b/internal/service/vectorsearch_tf/legacy_model.go index 27e70adf8..ab95ed751 100755 --- a/internal/service/vectorsearch_tf/legacy_model.go +++ b/internal/service/vectorsearch_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -23,7 +24,7 @@ import ( type ColumnInfo_SdkV2 struct { // Name of the column. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnInfo_SdkV2) { @@ -32,6 +33,11 @@ func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan C func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ColumnInfo_SdkV2) { } +func (c ColumnInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -76,6 +82,13 @@ func (newState *CreateEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CreateEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateEndpoint_SdkV2) { } +func (c CreateEndpoint_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "endpoint_type")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -112,10 +125,10 @@ func (o CreateEndpoint_SdkV2) Type(ctx context.Context) attr.Type { type CreateVectorIndexRequest_SdkV2 struct { // Specification for Delta Sync Index. Required if `index_type` is // `DELTA_SYNC`. - DeltaSyncIndexSpec types.List `tfsdk:"delta_sync_index_spec" tf:"optional,object"` + DeltaSyncIndexSpec types.List `tfsdk:"delta_sync_index_spec" tf:"object"` // Specification for Direct Vector Access Index. Required if `index_type` is // `DIRECT_ACCESS`. - DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec" tf:"optional,object"` + DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec" tf:"object"` // Name of the endpoint to be used for serving the index EndpointName types.String `tfsdk:"endpoint_name" tf:""` // There are 2 types of Vector Search indexes: @@ -138,6 +151,17 @@ func (newState *CreateVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *CreateVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVectorIndexRequest_SdkV2) { } +func (c CreateVectorIndexRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DeltaSyncVectorIndexSpecRequest_SdkV2{}.ToSchema(cs, append(path, "delta_sync_index_spec")...) + DirectAccessVectorIndexSpec_SdkV2{}.ToSchema(cs, append(path, "direct_access_index_spec")...) + cs.SetRequired(append(path, "endpoint_name")...) + cs.SetRequired(append(path, "index_type")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "primary_key")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -239,7 +263,7 @@ func (o *CreateVectorIndexRequest_SdkV2) SetDirectAccessIndexSpec(ctx context.Co } type CreateVectorIndexResponse_SdkV2 struct { - VectorIndex types.List `tfsdk:"vector_index" tf:"optional,object"` + VectorIndex types.List `tfsdk:"vector_index" tf:"object"` } func (newState *CreateVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVectorIndexResponse_SdkV2) { @@ -248,6 +272,12 @@ func (newState *CreateVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *CreateVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVectorIndexResponse_SdkV2) { } +func (c CreateVectorIndexResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + VectorIndex_SdkV2{}.ToSchema(cs, append(path, "vector_index")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -312,9 +342,9 @@ func (o *CreateVectorIndexResponse_SdkV2) SetVectorIndex(ctx context.Context, v // Result of the upsert or delete operation. type DeleteDataResult_SdkV2 struct { // List of primary keys for rows that failed to process. - FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:"optional"` + FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:""` // Count of successfully processed rows. - SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:"optional"` + SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:""` } func (newState *DeleteDataResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDataResult_SdkV2) { @@ -323,6 +353,11 @@ func (newState *DeleteDataResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *DeleteDataResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDataResult_SdkV2) { } +func (c DeleteDataResult_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDataResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -401,6 +436,13 @@ func (newState *DeleteDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCre func (newState *DeleteDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDataVectorIndexRequest_SdkV2) { } +func (c DeleteDataVectorIndexRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "index_name")...) + cs.SetRequired(append(path, "primary_keys")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDataVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -467,9 +509,9 @@ func (o *DeleteDataVectorIndexRequest_SdkV2) SetPrimaryKeys(ctx context.Context, // Response to a delete data vector index request. type DeleteDataVectorIndexResponse_SdkV2 struct { // Result of the upsert or delete operation. - Result types.List `tfsdk:"result" tf:"optional,object"` + Result types.List `tfsdk:"result" tf:"object"` // Status of the delete operation. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *DeleteDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDataVectorIndexResponse_SdkV2) { @@ -478,6 +520,12 @@ func (newState *DeleteDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCr func (newState *DeleteDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDataVectorIndexResponse_SdkV2) { } +func (c DeleteDataVectorIndexResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DeleteDataResult_SdkV2{}.ToSchema(cs, append(path, "result")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDataVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -547,12 +595,6 @@ type DeleteEndpointRequest_SdkV2 struct { EndpointName types.String `tfsdk:"-"` } -func (newState *DeleteEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteEndpointRequest_SdkV2) { -} - -func (newState *DeleteEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteEndpointRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -587,12 +629,6 @@ func (o DeleteEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteEndpointResponse_SdkV2 struct { } -func (newState *DeleteEndpointResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteEndpointResponse_SdkV2) { -} - -func (newState *DeleteEndpointResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteEndpointResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteEndpointResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -626,12 +662,6 @@ type DeleteIndexRequest_SdkV2 struct { IndexName types.String `tfsdk:"-"` } -func (newState *DeleteIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteIndexRequest_SdkV2) { -} - -func (newState *DeleteIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteIndexRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -666,12 +696,6 @@ func (o DeleteIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { type DeleteIndexResponse_SdkV2 struct { } -func (newState *DeleteIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteIndexResponse_SdkV2) { -} - -func (newState *DeleteIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteIndexResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -704,16 +728,16 @@ type DeltaSyncVectorIndexSpecRequest_SdkV2 struct { // this field blank, all columns from the source table are synced with the // index. The primary key column and embedding source column or embedding // vector column are always synced. - ColumnsToSync types.List `tfsdk:"columns_to_sync" tf:"optional"` + ColumnsToSync types.List `tfsdk:"columns_to_sync" tf:""` // The columns that contain the embedding source. - EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:"optional"` + EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:""` // The columns that contain the embedding vectors. The format should be // array[double]. - EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:"optional"` + EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:""` // [Optional] Automatically sync the vector index contents and computed // embeddings to the specified Delta table. The only supported table name is // the index name with the suffix `_writeback_table`. - EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:"optional"` + EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:""` // Pipeline execution mode. // // - `TRIGGERED`: If the pipeline uses the triggered execution mode, the @@ -722,9 +746,9 @@ type DeltaSyncVectorIndexSpecRequest_SdkV2 struct { // available when the update started. - `CONTINUOUS`: If the pipeline uses // continuous execution, the pipeline processes new data as it arrives in // the source table to keep vector index fresh. - PipelineType types.String `tfsdk:"pipeline_type" tf:"optional"` + PipelineType types.String `tfsdk:"pipeline_type" tf:""` // The name of the source table. - SourceTable types.String `tfsdk:"source_table" tf:"optional"` + SourceTable types.String `tfsdk:"source_table" tf:""` } func (newState *DeltaSyncVectorIndexSpecRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeltaSyncVectorIndexSpecRequest_SdkV2) { @@ -733,6 +757,13 @@ func (newState *DeltaSyncVectorIndexSpecRequest_SdkV2) SyncEffectiveFieldsDuring func (newState *DeltaSyncVectorIndexSpecRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeltaSyncVectorIndexSpecRequest_SdkV2) { } +func (c DeltaSyncVectorIndexSpecRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EmbeddingSourceColumn_SdkV2{}.ToSchema(cs, append(path, "embedding_source_columns")...) + EmbeddingVectorColumn_SdkV2{}.ToSchema(cs, append(path, "embedding_vector_columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaSyncVectorIndexSpecRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -864,14 +895,14 @@ func (o *DeltaSyncVectorIndexSpecRequest_SdkV2) SetEmbeddingVectorColumns(ctx co type DeltaSyncVectorIndexSpecResponse_SdkV2 struct { // The columns that contain the embedding source. - EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:"optional"` + EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:""` // The columns that contain the embedding vectors. - EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:"optional"` + EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:""` // [Optional] Name of the Delta table to sync the vector index contents and // computed embeddings to. - EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:"optional"` + EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:""` // The ID of the pipeline that is used to sync the index. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // Pipeline execution mode. // // - `TRIGGERED`: If the pipeline uses the triggered execution mode, the @@ -880,9 +911,9 @@ type DeltaSyncVectorIndexSpecResponse_SdkV2 struct { // available when the update started. - `CONTINUOUS`: If the pipeline uses // continuous execution, the pipeline processes new data as it arrives in // the source table to keep vector index fresh. - PipelineType types.String `tfsdk:"pipeline_type" tf:"optional"` + PipelineType types.String `tfsdk:"pipeline_type" tf:""` // The name of the source table. - SourceTable types.String `tfsdk:"source_table" tf:"optional"` + SourceTable types.String `tfsdk:"source_table" tf:""` } func (newState *DeltaSyncVectorIndexSpecResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeltaSyncVectorIndexSpecResponse_SdkV2) { @@ -891,6 +922,13 @@ func (newState *DeltaSyncVectorIndexSpecResponse_SdkV2) SyncEffectiveFieldsDurin func (newState *DeltaSyncVectorIndexSpecResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeltaSyncVectorIndexSpecResponse_SdkV2) { } +func (c DeltaSyncVectorIndexSpecResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EmbeddingSourceColumn_SdkV2{}.ToSchema(cs, append(path, "embedding_source_columns")...) + EmbeddingVectorColumn_SdkV2{}.ToSchema(cs, append(path, "embedding_vector_columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaSyncVectorIndexSpecResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -993,16 +1031,16 @@ func (o *DeltaSyncVectorIndexSpecResponse_SdkV2) SetEmbeddingVectorColumns(ctx c type DirectAccessVectorIndexSpec_SdkV2 struct { // Contains the optional model endpoint to use during query time. - EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:"optional"` + EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:""` - EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:"optional"` + EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:""` // The schema of the index in JSON format. // // Supported types are `integer`, `long`, `float`, `double`, `boolean`, // `string`, `date`, `timestamp`. // // Supported types for vector column: `array`, `array`,`. - SchemaJson types.String `tfsdk:"schema_json" tf:"optional"` + SchemaJson types.String `tfsdk:"schema_json" tf:""` } func (newState *DirectAccessVectorIndexSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DirectAccessVectorIndexSpec_SdkV2) { @@ -1011,6 +1049,13 @@ func (newState *DirectAccessVectorIndexSpec_SdkV2) SyncEffectiveFieldsDuringCrea func (newState *DirectAccessVectorIndexSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState DirectAccessVectorIndexSpec_SdkV2) { } +func (c DirectAccessVectorIndexSpec_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EmbeddingSourceColumn_SdkV2{}.ToSchema(cs, append(path, "embedding_source_columns")...) + EmbeddingVectorColumn_SdkV2{}.ToSchema(cs, append(path, "embedding_vector_columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DirectAccessVectorIndexSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1107,9 +1152,9 @@ func (o *DirectAccessVectorIndexSpec_SdkV2) SetEmbeddingVectorColumns(ctx contex type EmbeddingSourceColumn_SdkV2 struct { // Name of the embedding model endpoint - EmbeddingModelEndpointName types.String `tfsdk:"embedding_model_endpoint_name" tf:"optional"` + EmbeddingModelEndpointName types.String `tfsdk:"embedding_model_endpoint_name" tf:""` // Name of the column - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *EmbeddingSourceColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmbeddingSourceColumn_SdkV2) { @@ -1118,6 +1163,11 @@ func (newState *EmbeddingSourceColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *EmbeddingSourceColumn_SdkV2) SyncEffectiveFieldsDuringRead(existingState EmbeddingSourceColumn_SdkV2) { } +func (c EmbeddingSourceColumn_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EmbeddingSourceColumn. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1153,9 +1203,9 @@ func (o EmbeddingSourceColumn_SdkV2) Type(ctx context.Context) attr.Type { type EmbeddingVectorColumn_SdkV2 struct { // Dimension of the embedding vector - EmbeddingDimension types.Int64 `tfsdk:"embedding_dimension" tf:"optional"` + EmbeddingDimension types.Int64 `tfsdk:"embedding_dimension" tf:""` // Name of the column - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *EmbeddingVectorColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmbeddingVectorColumn_SdkV2) { @@ -1164,6 +1214,11 @@ func (newState *EmbeddingVectorColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUp func (newState *EmbeddingVectorColumn_SdkV2) SyncEffectiveFieldsDuringRead(existingState EmbeddingVectorColumn_SdkV2) { } +func (c EmbeddingVectorColumn_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EmbeddingVectorColumn. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1199,23 +1254,23 @@ func (o EmbeddingVectorColumn_SdkV2) Type(ctx context.Context) attr.Type { type EndpointInfo_SdkV2 struct { // Timestamp of endpoint creation - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Creator of the endpoint - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // Current status of the endpoint - EndpointStatus types.List `tfsdk:"endpoint_status" tf:"optional,object"` + EndpointStatus types.List `tfsdk:"endpoint_status" tf:"object"` // Type of endpoint. - EndpointType types.String `tfsdk:"endpoint_type" tf:"optional"` + EndpointType types.String `tfsdk:"endpoint_type" tf:""` // Unique identifier of the endpoint - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Timestamp of last update to the endpoint - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // User who last updated the endpoint - LastUpdatedUser types.String `tfsdk:"last_updated_user" tf:"optional"` + LastUpdatedUser types.String `tfsdk:"last_updated_user" tf:""` // Name of endpoint - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Number of indexes on the endpoint - NumIndexes types.Int64 `tfsdk:"num_indexes" tf:"optional"` + NumIndexes types.Int64 `tfsdk:"num_indexes" tf:""` } func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointInfo_SdkV2) { @@ -1224,6 +1279,12 @@ func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointInfo_SdkV2) { } +func (c EndpointInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointStatus_SdkV2{}.ToSchema(cs, append(path, "endpoint_status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1304,9 +1365,9 @@ func (o *EndpointInfo_SdkV2) SetEndpointStatus(ctx context.Context, v EndpointSt // Status information of an endpoint type EndpointStatus_SdkV2 struct { // Additional status message - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Current state of the endpoint - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *EndpointStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointStatus_SdkV2) { @@ -1315,6 +1376,11 @@ func (newState *EndpointStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *EndpointStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointStatus_SdkV2) { } +func (c EndpointStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1354,12 +1420,6 @@ type GetEndpointRequest_SdkV2 struct { EndpointName types.String `tfsdk:"-"` } -func (newState *GetEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEndpointRequest_SdkV2) { -} - -func (newState *GetEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEndpointRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1397,12 +1457,6 @@ type GetIndexRequest_SdkV2 struct { IndexName types.String `tfsdk:"-"` } -func (newState *GetIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIndexRequest_SdkV2) { -} - -func (newState *GetIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetIndexRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1436,10 +1490,10 @@ func (o GetIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListEndpointResponse_SdkV2 struct { // An array of Endpoint objects - Endpoints types.List `tfsdk:"endpoints" tf:"optional"` + Endpoints types.List `tfsdk:"endpoints" tf:""` // A token that can be used to get the next page of results. If not present, // there are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListEndpointResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListEndpointResponse_SdkV2) { @@ -1448,6 +1502,12 @@ func (newState *ListEndpointResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *ListEndpointResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListEndpointResponse_SdkV2) { } +func (c ListEndpointResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointInfo_SdkV2{}.ToSchema(cs, append(path, "endpoints")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEndpointResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1517,12 +1577,6 @@ type ListEndpointsRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListEndpointsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListEndpointsRequest_SdkV2) { -} - -func (newState *ListEndpointsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListEndpointsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEndpointsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1562,12 +1616,6 @@ type ListIndexesRequest_SdkV2 struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListIndexesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListIndexesRequest_SdkV2) { -} - -func (newState *ListIndexesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListIndexesRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListIndexesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1602,7 +1650,7 @@ func (o ListIndexesRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ListValue_SdkV2 struct { - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *ListValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListValue_SdkV2) { @@ -1611,6 +1659,12 @@ func (newState *ListValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Li func (newState *ListValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListValue_SdkV2) { } +func (c ListValue_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Value_SdkV2{}.ToSchema(cs, append(path, "values")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1675,9 +1729,9 @@ func (o *ListValue_SdkV2) SetValues(ctx context.Context, v []Value_SdkV2) { type ListVectorIndexesResponse_SdkV2 struct { // A token that can be used to get the next page of results. If not present, // there are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - VectorIndexes types.List `tfsdk:"vector_indexes" tf:"optional"` + VectorIndexes types.List `tfsdk:"vector_indexes" tf:""` } func (newState *ListVectorIndexesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVectorIndexesResponse_SdkV2) { @@ -1686,6 +1740,12 @@ func (newState *ListVectorIndexesResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *ListVectorIndexesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVectorIndexesResponse_SdkV2) { } +func (c ListVectorIndexesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MiniVectorIndex_SdkV2{}.ToSchema(cs, append(path, "vector_indexes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVectorIndexesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1752,9 +1812,9 @@ func (o *ListVectorIndexesResponse_SdkV2) SetVectorIndexes(ctx context.Context, // Key-value pair. type MapStringValueEntry_SdkV2 struct { // Column name. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Column value, nullable. - Value types.List `tfsdk:"value" tf:"optional,object"` + Value types.List `tfsdk:"value" tf:"object"` } func (newState *MapStringValueEntry_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MapStringValueEntry_SdkV2) { @@ -1763,6 +1823,12 @@ func (newState *MapStringValueEntry_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *MapStringValueEntry_SdkV2) SyncEffectiveFieldsDuringRead(existingState MapStringValueEntry_SdkV2) { } +func (c MapStringValueEntry_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Value_SdkV2{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MapStringValueEntry. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1828,9 +1894,9 @@ func (o *MapStringValueEntry_SdkV2) SetValue(ctx context.Context, v Value_SdkV2) type MiniVectorIndex_SdkV2 struct { // The user who created the index. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // Name of the endpoint associated with the index - EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` + EndpointName types.String `tfsdk:"endpoint_name" tf:""` // There are 2 types of Vector Search indexes: // // - `DELTA_SYNC`: An index that automatically syncs with a source Delta @@ -1838,11 +1904,11 @@ type MiniVectorIndex_SdkV2 struct { // underlying data in the Delta Table changes. - `DIRECT_ACCESS`: An index // that supports direct read and write of vectors and metadata through our // REST and SDK APIs. With this model, the user manages index updates. - IndexType types.String `tfsdk:"index_type" tf:"optional"` + IndexType types.String `tfsdk:"index_type" tf:""` // Name of the index - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Primary key of the index - PrimaryKey types.String `tfsdk:"primary_key" tf:"optional"` + PrimaryKey types.String `tfsdk:"primary_key" tf:""` } func (newState *MiniVectorIndex_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MiniVectorIndex_SdkV2) { @@ -1851,6 +1917,11 @@ func (newState *MiniVectorIndex_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *MiniVectorIndex_SdkV2) SyncEffectiveFieldsDuringRead(existingState MiniVectorIndex_SdkV2) { } +func (c MiniVectorIndex_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MiniVectorIndex. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1893,12 +1964,12 @@ func (o MiniVectorIndex_SdkV2) Type(ctx context.Context) attr.Type { // Request payload for getting next page of results. type QueryVectorIndexNextPageRequest_SdkV2 struct { // Name of the endpoint. - EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` + EndpointName types.String `tfsdk:"endpoint_name" tf:""` // Name of the vector index to query. IndexName types.String `tfsdk:"-"` // Page token returned from previous `QueryVectorIndex` or // `QueryVectorIndexNextPage` API. - PageToken types.String `tfsdk:"page_token" tf:"optional"` + PageToken types.String `tfsdk:"page_token" tf:""` } func (newState *QueryVectorIndexNextPageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexNextPageRequest_SdkV2) { @@ -1907,6 +1978,12 @@ func (newState *QueryVectorIndexNextPageRequest_SdkV2) SyncEffectiveFieldsDuring func (newState *QueryVectorIndexNextPageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexNextPageRequest_SdkV2) { } +func (c QueryVectorIndexNextPageRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "index_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryVectorIndexNextPageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1951,20 +2028,20 @@ type QueryVectorIndexRequest_SdkV2 struct { // 5}`: Filter for id greater than 5. - `{"id <=": 5}`: Filter for id less // than equal to 5. - `{"id >=": 5}`: Filter for id greater than equal to 5. // - `{"id": 5}`: Filter for id equal to 5. - FiltersJson types.String `tfsdk:"filters_json" tf:"optional"` + FiltersJson types.String `tfsdk:"filters_json" tf:""` // Name of the vector index to query. IndexName types.String `tfsdk:"-"` // Number of results to return. Defaults to 10. - NumResults types.Int64 `tfsdk:"num_results" tf:"optional"` + NumResults types.Int64 `tfsdk:"num_results" tf:""` // Query text. Required for Delta Sync Index using model endpoint. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // The query type to use. Choices are `ANN` and `HYBRID`. Defaults to `ANN`. - QueryType types.String `tfsdk:"query_type" tf:"optional"` + QueryType types.String `tfsdk:"query_type" tf:""` // Query vector. Required for Direct Vector Access Index and Delta Sync // Index using self-managed vectors. - QueryVector types.List `tfsdk:"query_vector" tf:"optional"` + QueryVector types.List `tfsdk:"query_vector" tf:""` // Threshold for the approximate nearest neighbor search. Defaults to 0.0. - ScoreThreshold types.Float64 `tfsdk:"score_threshold" tf:"optional"` + ScoreThreshold types.Float64 `tfsdk:"score_threshold" tf:""` } func (newState *QueryVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexRequest_SdkV2) { @@ -1973,6 +2050,13 @@ func (newState *QueryVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *QueryVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexRequest_SdkV2) { } +func (c QueryVectorIndexRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "columns")...) + cs.SetRequired(append(path, "index_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2079,13 +2163,13 @@ func (o *QueryVectorIndexRequest_SdkV2) SetQueryVector(ctx context.Context, v [] type QueryVectorIndexResponse_SdkV2 struct { // Metadata about the result set. - Manifest types.List `tfsdk:"manifest" tf:"optional,object"` + Manifest types.List `tfsdk:"manifest" tf:"object"` // [Optional] Token that can be used in `QueryVectorIndexNextPage` API to // get next page of results. If more than 1000 results satisfy the query, // they are returned in groups of 1000. Empty value means no more results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Data returned in the query result. - Result types.List `tfsdk:"result" tf:"optional,object"` + Result types.List `tfsdk:"result" tf:"object"` } func (newState *QueryVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexResponse_SdkV2) { @@ -2094,6 +2178,13 @@ func (newState *QueryVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *QueryVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexResponse_SdkV2) { } +func (c QueryVectorIndexResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ResultManifest_SdkV2{}.ToSchema(cs, append(path, "manifest")...) + ResultData_SdkV2{}.ToSchema(cs, append(path, "result")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2191,9 +2282,9 @@ func (o *QueryVectorIndexResponse_SdkV2) SetResult(ctx context.Context, v Result // Data returned in the query result. type ResultData_SdkV2 struct { // Data rows returned in the query. - DataArray types.List `tfsdk:"data_array" tf:"optional"` + DataArray types.List `tfsdk:"data_array" tf:""` // Number of rows in the result set. - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` } func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultData_SdkV2) { @@ -2202,6 +2293,11 @@ func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan R func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultData_SdkV2) { } +func (c ResultData_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultData. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2270,9 +2366,9 @@ func (o *ResultData_SdkV2) SetDataArray(ctx context.Context, v []types.String) { // Metadata about the result set. type ResultManifest_SdkV2 struct { // Number of columns in the result set. - ColumnCount types.Int64 `tfsdk:"column_count" tf:"optional"` + ColumnCount types.Int64 `tfsdk:"column_count" tf:""` // Information about each column in the result set. - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultManifest_SdkV2) { @@ -2281,6 +2377,12 @@ func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultManifest_SdkV2) { } +func (c ResultManifest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ColumnInfo_SdkV2{}.ToSchema(cs, append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultManifest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2349,9 +2451,9 @@ type ScanVectorIndexRequest_SdkV2 struct { // Name of the vector index to scan. IndexName types.String `tfsdk:"-"` // Primary key of the last entry returned in the previous scan. - LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:"optional"` + LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:""` // Number of results to return. Defaults to 10. - NumResults types.Int64 `tfsdk:"num_results" tf:"optional"` + NumResults types.Int64 `tfsdk:"num_results" tf:""` } func (newState *ScanVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ScanVectorIndexRequest_SdkV2) { @@ -2360,6 +2462,12 @@ func (newState *ScanVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *ScanVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ScanVectorIndexRequest_SdkV2) { } +func (c ScanVectorIndexRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "index_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ScanVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2398,9 +2506,9 @@ func (o ScanVectorIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { // Response to a scan vector index request. type ScanVectorIndexResponse_SdkV2 struct { // List of data entries - Data types.List `tfsdk:"data" tf:"optional"` + Data types.List `tfsdk:"data" tf:""` // Primary key of the last entry. - LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:"optional"` + LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:""` } func (newState *ScanVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ScanVectorIndexResponse_SdkV2) { @@ -2409,6 +2517,12 @@ func (newState *ScanVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ScanVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ScanVectorIndexResponse_SdkV2) { } +func (c ScanVectorIndexResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Struct_SdkV2{}.ToSchema(cs, append(path, "data")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ScanVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2474,7 +2588,7 @@ func (o *ScanVectorIndexResponse_SdkV2) SetData(ctx context.Context, v []Struct_ type Struct_SdkV2 struct { // Data entry, corresponding to a row in a vector index. - Fields types.List `tfsdk:"fields" tf:"optional"` + Fields types.List `tfsdk:"fields" tf:""` } func (newState *Struct_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Struct_SdkV2) { @@ -2483,6 +2597,12 @@ func (newState *Struct_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Struc func (newState *Struct_SdkV2) SyncEffectiveFieldsDuringRead(existingState Struct_SdkV2) { } +func (c Struct_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MapStringValueEntry_SdkV2{}.ToSchema(cs, append(path, "fields")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Struct. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2550,12 +2670,6 @@ type SyncIndexRequest_SdkV2 struct { IndexName types.String `tfsdk:"-"` } -func (newState *SyncIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SyncIndexRequest_SdkV2) { -} - -func (newState *SyncIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SyncIndexRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SyncIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2590,12 +2704,6 @@ func (o SyncIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { type SyncIndexResponse_SdkV2 struct { } -func (newState *SyncIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SyncIndexResponse_SdkV2) { -} - -func (newState *SyncIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SyncIndexResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SyncIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2626,9 +2734,9 @@ func (o SyncIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { // Result of the upsert or delete operation. type UpsertDataResult_SdkV2 struct { // List of primary keys for rows that failed to process. - FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:"optional"` + FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:""` // Count of successfully processed rows. - SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:"optional"` + SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:""` } func (newState *UpsertDataResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertDataResult_SdkV2) { @@ -2637,6 +2745,11 @@ func (newState *UpsertDataResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *UpsertDataResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertDataResult_SdkV2) { } +func (c UpsertDataResult_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertDataResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2715,6 +2828,13 @@ func (newState *UpsertDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCre func (newState *UpsertDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertDataVectorIndexRequest_SdkV2) { } +func (c UpsertDataVectorIndexRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "index_name")...) + cs.SetRequired(append(path, "inputs_json")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertDataVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2751,9 +2871,9 @@ func (o UpsertDataVectorIndexRequest_SdkV2) Type(ctx context.Context) attr.Type // Response to an upsert data vector index request. type UpsertDataVectorIndexResponse_SdkV2 struct { // Result of the upsert or delete operation. - Result types.List `tfsdk:"result" tf:"optional,object"` + Result types.List `tfsdk:"result" tf:"object"` // Status of the upsert operation. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *UpsertDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertDataVectorIndexResponse_SdkV2) { @@ -2762,6 +2882,12 @@ func (newState *UpsertDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCr func (newState *UpsertDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertDataVectorIndexResponse_SdkV2) { } +func (c UpsertDataVectorIndexResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpsertDataResult_SdkV2{}.ToSchema(cs, append(path, "result")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertDataVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2826,17 +2952,17 @@ func (o *UpsertDataVectorIndexResponse_SdkV2) SetResult(ctx context.Context, v U } type Value_SdkV2 struct { - BoolValue types.Bool `tfsdk:"bool_value" tf:"optional"` + BoolValue types.Bool `tfsdk:"bool_value" tf:""` - ListValue types.List `tfsdk:"list_value" tf:"optional,object"` + ListValue types.List `tfsdk:"list_value" tf:"object"` - NullValue types.String `tfsdk:"null_value" tf:"optional"` + NullValue types.String `tfsdk:"null_value" tf:""` - NumberValue types.Float64 `tfsdk:"number_value" tf:"optional"` + NumberValue types.Float64 `tfsdk:"number_value" tf:""` - StringValue types.String `tfsdk:"string_value" tf:"optional"` + StringValue types.String `tfsdk:"string_value" tf:""` - StructValue types.List `tfsdk:"struct_value" tf:"optional,object"` + StructValue types.List `tfsdk:"struct_value" tf:"object"` } func (newState *Value_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Value_SdkV2) { @@ -2845,6 +2971,13 @@ func (newState *Value_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Value_ func (newState *Value_SdkV2) SyncEffectiveFieldsDuringRead(existingState Value_SdkV2) { } +func (c Value_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListValue_SdkV2{}.ToSchema(cs, append(path, "list_value")...) + Struct_SdkV2{}.ToSchema(cs, append(path, "struct_value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Value. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2947,13 +3080,13 @@ func (o *Value_SdkV2) SetStructValue(ctx context.Context, v Struct_SdkV2) { type VectorIndex_SdkV2 struct { // The user who created the index. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` - DeltaSyncIndexSpec types.List `tfsdk:"delta_sync_index_spec" tf:"optional,object"` + DeltaSyncIndexSpec types.List `tfsdk:"delta_sync_index_spec" tf:"object"` - DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec" tf:"optional,object"` + DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec" tf:"object"` // Name of the endpoint associated with the index - EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` + EndpointName types.String `tfsdk:"endpoint_name" tf:""` // There are 2 types of Vector Search indexes: // // - `DELTA_SYNC`: An index that automatically syncs with a source Delta @@ -2961,13 +3094,13 @@ type VectorIndex_SdkV2 struct { // underlying data in the Delta Table changes. - `DIRECT_ACCESS`: An index // that supports direct read and write of vectors and metadata through our // REST and SDK APIs. With this model, the user manages index updates. - IndexType types.String `tfsdk:"index_type" tf:"optional"` + IndexType types.String `tfsdk:"index_type" tf:""` // Name of the index - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Primary key of the index - PrimaryKey types.String `tfsdk:"primary_key" tf:"optional"` + PrimaryKey types.String `tfsdk:"primary_key" tf:""` - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.List `tfsdk:"status" tf:"object"` } func (newState *VectorIndex_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan VectorIndex_SdkV2) { @@ -2976,6 +3109,14 @@ func (newState *VectorIndex_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *VectorIndex_SdkV2) SyncEffectiveFieldsDuringRead(existingState VectorIndex_SdkV2) { } +func (c VectorIndex_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DeltaSyncVectorIndexSpecResponse_SdkV2{}.ToSchema(cs, append(path, "delta_sync_index_spec")...) + DirectAccessVectorIndexSpec_SdkV2{}.ToSchema(cs, append(path, "direct_access_index_spec")...) + VectorIndexStatus_SdkV2{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VectorIndex. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3111,13 +3252,13 @@ func (o *VectorIndex_SdkV2) SetStatus(ctx context.Context, v VectorIndexStatus_S type VectorIndexStatus_SdkV2 struct { // Index API Url to be used to perform operations on the index - IndexUrl types.String `tfsdk:"index_url" tf:"optional"` + IndexUrl types.String `tfsdk:"index_url" tf:""` // Number of rows indexed - IndexedRowCount types.Int64 `tfsdk:"indexed_row_count" tf:"optional"` + IndexedRowCount types.Int64 `tfsdk:"indexed_row_count" tf:""` // Message associated with the index status - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Whether the index is ready for search - Ready types.Bool `tfsdk:"ready" tf:"optional"` + Ready types.Bool `tfsdk:"ready" tf:""` } func (newState *VectorIndexStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan VectorIndexStatus_SdkV2) { @@ -3126,6 +3267,11 @@ func (newState *VectorIndexStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *VectorIndexStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState VectorIndexStatus_SdkV2) { } +func (c VectorIndexStatus_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VectorIndexStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/vectorsearch_tf/model.go b/internal/service/vectorsearch_tf/model.go index ae0141c7f..be4bd6627 100755 --- a/internal/service/vectorsearch_tf/model.go +++ b/internal/service/vectorsearch_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -23,7 +24,7 @@ import ( type ColumnInfo struct { // Name of the column. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *ColumnInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnInfo) { @@ -32,6 +33,11 @@ func (newState *ColumnInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnI func (newState *ColumnInfo) SyncEffectiveFieldsDuringRead(existingState ColumnInfo) { } +func (c ColumnInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -76,6 +82,13 @@ func (newState *CreateEndpoint) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cre func (newState *CreateEndpoint) SyncEffectiveFieldsDuringRead(existingState CreateEndpoint) { } +func (c CreateEndpoint) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "endpoint_type")...) + cs.SetRequired(append(path, "name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateEndpoint. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -112,10 +125,10 @@ func (o CreateEndpoint) Type(ctx context.Context) attr.Type { type CreateVectorIndexRequest struct { // Specification for Delta Sync Index. Required if `index_type` is // `DELTA_SYNC`. - DeltaSyncIndexSpec types.Object `tfsdk:"delta_sync_index_spec" tf:"optional,object"` + DeltaSyncIndexSpec types.Object `tfsdk:"delta_sync_index_spec" tf:"object"` // Specification for Direct Vector Access Index. Required if `index_type` is // `DIRECT_ACCESS`. - DirectAccessIndexSpec types.Object `tfsdk:"direct_access_index_spec" tf:"optional,object"` + DirectAccessIndexSpec types.Object `tfsdk:"direct_access_index_spec" tf:"object"` // Name of the endpoint to be used for serving the index EndpointName types.String `tfsdk:"endpoint_name" tf:""` // There are 2 types of Vector Search indexes: @@ -138,6 +151,17 @@ func (newState *CreateVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateVectorIndexRequest) SyncEffectiveFieldsDuringRead(existingState CreateVectorIndexRequest) { } +func (c CreateVectorIndexRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DeltaSyncVectorIndexSpecRequest{}.ToSchema(cs, append(path, "delta_sync_index_spec")...) + DirectAccessVectorIndexSpec{}.ToSchema(cs, append(path, "direct_access_index_spec")...) + cs.SetRequired(append(path, "endpoint_name")...) + cs.SetRequired(append(path, "index_type")...) + cs.SetRequired(append(path, "name")...) + cs.SetRequired(append(path, "primary_key")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -239,7 +263,7 @@ func (o *CreateVectorIndexRequest) SetDirectAccessIndexSpec(ctx context.Context, } type CreateVectorIndexResponse struct { - VectorIndex types.Object `tfsdk:"vector_index" tf:"optional,object"` + VectorIndex types.Object `tfsdk:"vector_index" tf:"object"` } func (newState *CreateVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVectorIndexResponse) { @@ -248,6 +272,12 @@ func (newState *CreateVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *CreateVectorIndexResponse) SyncEffectiveFieldsDuringRead(existingState CreateVectorIndexResponse) { } +func (c CreateVectorIndexResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + VectorIndex{}.ToSchema(cs, append(path, "vector_index")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -312,9 +342,9 @@ func (o *CreateVectorIndexResponse) SetVectorIndex(ctx context.Context, v Vector // Result of the upsert or delete operation. type DeleteDataResult struct { // List of primary keys for rows that failed to process. - FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:"optional"` + FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:""` // Count of successfully processed rows. - SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:"optional"` + SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:""` } func (newState *DeleteDataResult) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDataResult) { @@ -323,6 +353,11 @@ func (newState *DeleteDataResult) SyncEffectiveFieldsDuringCreateOrUpdate(plan D func (newState *DeleteDataResult) SyncEffectiveFieldsDuringRead(existingState DeleteDataResult) { } +func (c DeleteDataResult) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDataResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -401,6 +436,13 @@ func (newState *DeleteDataVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrU func (newState *DeleteDataVectorIndexRequest) SyncEffectiveFieldsDuringRead(existingState DeleteDataVectorIndexRequest) { } +func (c DeleteDataVectorIndexRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "index_name")...) + cs.SetRequired(append(path, "primary_keys")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDataVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -467,9 +509,9 @@ func (o *DeleteDataVectorIndexRequest) SetPrimaryKeys(ctx context.Context, v []t // Response to a delete data vector index request. type DeleteDataVectorIndexResponse struct { // Result of the upsert or delete operation. - Result types.Object `tfsdk:"result" tf:"optional,object"` + Result types.Object `tfsdk:"result" tf:"object"` // Status of the delete operation. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *DeleteDataVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDataVectorIndexResponse) { @@ -478,6 +520,12 @@ func (newState *DeleteDataVectorIndexResponse) SyncEffectiveFieldsDuringCreateOr func (newState *DeleteDataVectorIndexResponse) SyncEffectiveFieldsDuringRead(existingState DeleteDataVectorIndexResponse) { } +func (c DeleteDataVectorIndexResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DeleteDataResult{}.ToSchema(cs, append(path, "result")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDataVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -547,12 +595,6 @@ type DeleteEndpointRequest struct { EndpointName types.String `tfsdk:"-"` } -func (newState *DeleteEndpointRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteEndpointRequest) { -} - -func (newState *DeleteEndpointRequest) SyncEffectiveFieldsDuringRead(existingState DeleteEndpointRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -587,12 +629,6 @@ func (o DeleteEndpointRequest) Type(ctx context.Context) attr.Type { type DeleteEndpointResponse struct { } -func (newState *DeleteEndpointResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteEndpointResponse) { -} - -func (newState *DeleteEndpointResponse) SyncEffectiveFieldsDuringRead(existingState DeleteEndpointResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteEndpointResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -626,12 +662,6 @@ type DeleteIndexRequest struct { IndexName types.String `tfsdk:"-"` } -func (newState *DeleteIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteIndexRequest) { -} - -func (newState *DeleteIndexRequest) SyncEffectiveFieldsDuringRead(existingState DeleteIndexRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -666,12 +696,6 @@ func (o DeleteIndexRequest) Type(ctx context.Context) attr.Type { type DeleteIndexResponse struct { } -func (newState *DeleteIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteIndexResponse) { -} - -func (newState *DeleteIndexResponse) SyncEffectiveFieldsDuringRead(existingState DeleteIndexResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -704,16 +728,16 @@ type DeltaSyncVectorIndexSpecRequest struct { // this field blank, all columns from the source table are synced with the // index. The primary key column and embedding source column or embedding // vector column are always synced. - ColumnsToSync types.List `tfsdk:"columns_to_sync" tf:"optional"` + ColumnsToSync types.List `tfsdk:"columns_to_sync" tf:""` // The columns that contain the embedding source. - EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:"optional"` + EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:""` // The columns that contain the embedding vectors. The format should be // array[double]. - EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:"optional"` + EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:""` // [Optional] Automatically sync the vector index contents and computed // embeddings to the specified Delta table. The only supported table name is // the index name with the suffix `_writeback_table`. - EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:"optional"` + EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:""` // Pipeline execution mode. // // - `TRIGGERED`: If the pipeline uses the triggered execution mode, the @@ -722,9 +746,9 @@ type DeltaSyncVectorIndexSpecRequest struct { // available when the update started. - `CONTINUOUS`: If the pipeline uses // continuous execution, the pipeline processes new data as it arrives in // the source table to keep vector index fresh. - PipelineType types.String `tfsdk:"pipeline_type" tf:"optional"` + PipelineType types.String `tfsdk:"pipeline_type" tf:""` // The name of the source table. - SourceTable types.String `tfsdk:"source_table" tf:"optional"` + SourceTable types.String `tfsdk:"source_table" tf:""` } func (newState *DeltaSyncVectorIndexSpecRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeltaSyncVectorIndexSpecRequest) { @@ -733,6 +757,13 @@ func (newState *DeltaSyncVectorIndexSpecRequest) SyncEffectiveFieldsDuringCreate func (newState *DeltaSyncVectorIndexSpecRequest) SyncEffectiveFieldsDuringRead(existingState DeltaSyncVectorIndexSpecRequest) { } +func (c DeltaSyncVectorIndexSpecRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EmbeddingSourceColumn{}.ToSchema(cs, append(path, "embedding_source_columns")...) + EmbeddingVectorColumn{}.ToSchema(cs, append(path, "embedding_vector_columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaSyncVectorIndexSpecRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -864,14 +895,14 @@ func (o *DeltaSyncVectorIndexSpecRequest) SetEmbeddingVectorColumns(ctx context. type DeltaSyncVectorIndexSpecResponse struct { // The columns that contain the embedding source. - EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:"optional"` + EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:""` // The columns that contain the embedding vectors. - EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:"optional"` + EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:""` // [Optional] Name of the Delta table to sync the vector index contents and // computed embeddings to. - EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:"optional"` + EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:""` // The ID of the pipeline that is used to sync the index. - PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + PipelineId types.String `tfsdk:"pipeline_id" tf:""` // Pipeline execution mode. // // - `TRIGGERED`: If the pipeline uses the triggered execution mode, the @@ -880,9 +911,9 @@ type DeltaSyncVectorIndexSpecResponse struct { // available when the update started. - `CONTINUOUS`: If the pipeline uses // continuous execution, the pipeline processes new data as it arrives in // the source table to keep vector index fresh. - PipelineType types.String `tfsdk:"pipeline_type" tf:"optional"` + PipelineType types.String `tfsdk:"pipeline_type" tf:""` // The name of the source table. - SourceTable types.String `tfsdk:"source_table" tf:"optional"` + SourceTable types.String `tfsdk:"source_table" tf:""` } func (newState *DeltaSyncVectorIndexSpecResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeltaSyncVectorIndexSpecResponse) { @@ -891,6 +922,13 @@ func (newState *DeltaSyncVectorIndexSpecResponse) SyncEffectiveFieldsDuringCreat func (newState *DeltaSyncVectorIndexSpecResponse) SyncEffectiveFieldsDuringRead(existingState DeltaSyncVectorIndexSpecResponse) { } +func (c DeltaSyncVectorIndexSpecResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EmbeddingSourceColumn{}.ToSchema(cs, append(path, "embedding_source_columns")...) + EmbeddingVectorColumn{}.ToSchema(cs, append(path, "embedding_vector_columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaSyncVectorIndexSpecResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -993,16 +1031,16 @@ func (o *DeltaSyncVectorIndexSpecResponse) SetEmbeddingVectorColumns(ctx context type DirectAccessVectorIndexSpec struct { // Contains the optional model endpoint to use during query time. - EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:"optional"` + EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:""` - EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:"optional"` + EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:""` // The schema of the index in JSON format. // // Supported types are `integer`, `long`, `float`, `double`, `boolean`, // `string`, `date`, `timestamp`. // // Supported types for vector column: `array`, `array`,`. - SchemaJson types.String `tfsdk:"schema_json" tf:"optional"` + SchemaJson types.String `tfsdk:"schema_json" tf:""` } func (newState *DirectAccessVectorIndexSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan DirectAccessVectorIndexSpec) { @@ -1011,6 +1049,13 @@ func (newState *DirectAccessVectorIndexSpec) SyncEffectiveFieldsDuringCreateOrUp func (newState *DirectAccessVectorIndexSpec) SyncEffectiveFieldsDuringRead(existingState DirectAccessVectorIndexSpec) { } +func (c DirectAccessVectorIndexSpec) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EmbeddingSourceColumn{}.ToSchema(cs, append(path, "embedding_source_columns")...) + EmbeddingVectorColumn{}.ToSchema(cs, append(path, "embedding_vector_columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DirectAccessVectorIndexSpec. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1107,9 +1152,9 @@ func (o *DirectAccessVectorIndexSpec) SetEmbeddingVectorColumns(ctx context.Cont type EmbeddingSourceColumn struct { // Name of the embedding model endpoint - EmbeddingModelEndpointName types.String `tfsdk:"embedding_model_endpoint_name" tf:"optional"` + EmbeddingModelEndpointName types.String `tfsdk:"embedding_model_endpoint_name" tf:""` // Name of the column - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *EmbeddingSourceColumn) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmbeddingSourceColumn) { @@ -1118,6 +1163,11 @@ func (newState *EmbeddingSourceColumn) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *EmbeddingSourceColumn) SyncEffectiveFieldsDuringRead(existingState EmbeddingSourceColumn) { } +func (c EmbeddingSourceColumn) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EmbeddingSourceColumn. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1153,9 +1203,9 @@ func (o EmbeddingSourceColumn) Type(ctx context.Context) attr.Type { type EmbeddingVectorColumn struct { // Dimension of the embedding vector - EmbeddingDimension types.Int64 `tfsdk:"embedding_dimension" tf:"optional"` + EmbeddingDimension types.Int64 `tfsdk:"embedding_dimension" tf:""` // Name of the column - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *EmbeddingVectorColumn) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmbeddingVectorColumn) { @@ -1164,6 +1214,11 @@ func (newState *EmbeddingVectorColumn) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *EmbeddingVectorColumn) SyncEffectiveFieldsDuringRead(existingState EmbeddingVectorColumn) { } +func (c EmbeddingVectorColumn) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EmbeddingVectorColumn. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1199,23 +1254,23 @@ func (o EmbeddingVectorColumn) Type(ctx context.Context) attr.Type { type EndpointInfo struct { // Timestamp of endpoint creation - CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:""` // Creator of the endpoint - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // Current status of the endpoint - EndpointStatus types.Object `tfsdk:"endpoint_status" tf:"optional,object"` + EndpointStatus types.Object `tfsdk:"endpoint_status" tf:"object"` // Type of endpoint. - EndpointType types.String `tfsdk:"endpoint_type" tf:"optional"` + EndpointType types.String `tfsdk:"endpoint_type" tf:""` // Unique identifier of the endpoint - Id types.String `tfsdk:"id" tf:"optional"` + Id types.String `tfsdk:"id" tf:""` // Timestamp of last update to the endpoint - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` // User who last updated the endpoint - LastUpdatedUser types.String `tfsdk:"last_updated_user" tf:"optional"` + LastUpdatedUser types.String `tfsdk:"last_updated_user" tf:""` // Name of endpoint - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Number of indexes on the endpoint - NumIndexes types.Int64 `tfsdk:"num_indexes" tf:"optional"` + NumIndexes types.Int64 `tfsdk:"num_indexes" tf:""` } func (newState *EndpointInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointInfo) { @@ -1224,6 +1279,12 @@ func (newState *EndpointInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Endpo func (newState *EndpointInfo) SyncEffectiveFieldsDuringRead(existingState EndpointInfo) { } +func (c EndpointInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointStatus{}.ToSchema(cs, append(path, "endpoint_status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1304,9 +1365,9 @@ func (o *EndpointInfo) SetEndpointStatus(ctx context.Context, v EndpointStatus) // Status information of an endpoint type EndpointStatus struct { // Additional status message - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Current state of the endpoint - State types.String `tfsdk:"state" tf:"optional"` + State types.String `tfsdk:"state" tf:""` } func (newState *EndpointStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointStatus) { @@ -1315,6 +1376,11 @@ func (newState *EndpointStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan End func (newState *EndpointStatus) SyncEffectiveFieldsDuringRead(existingState EndpointStatus) { } +func (c EndpointStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1354,12 +1420,6 @@ type GetEndpointRequest struct { EndpointName types.String `tfsdk:"-"` } -func (newState *GetEndpointRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEndpointRequest) { -} - -func (newState *GetEndpointRequest) SyncEffectiveFieldsDuringRead(existingState GetEndpointRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEndpointRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1397,12 +1457,6 @@ type GetIndexRequest struct { IndexName types.String `tfsdk:"-"` } -func (newState *GetIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIndexRequest) { -} - -func (newState *GetIndexRequest) SyncEffectiveFieldsDuringRead(existingState GetIndexRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1436,10 +1490,10 @@ func (o GetIndexRequest) Type(ctx context.Context) attr.Type { type ListEndpointResponse struct { // An array of Endpoint objects - Endpoints types.List `tfsdk:"endpoints" tf:"optional"` + Endpoints types.List `tfsdk:"endpoints" tf:""` // A token that can be used to get the next page of results. If not present, // there are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` } func (newState *ListEndpointResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListEndpointResponse) { @@ -1448,6 +1502,12 @@ func (newState *ListEndpointResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ListEndpointResponse) SyncEffectiveFieldsDuringRead(existingState ListEndpointResponse) { } +func (c ListEndpointResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + EndpointInfo{}.ToSchema(cs, append(path, "endpoints")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEndpointResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1517,12 +1577,6 @@ type ListEndpointsRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListEndpointsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListEndpointsRequest) { -} - -func (newState *ListEndpointsRequest) SyncEffectiveFieldsDuringRead(existingState ListEndpointsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEndpointsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1562,12 +1616,6 @@ type ListIndexesRequest struct { PageToken types.String `tfsdk:"-"` } -func (newState *ListIndexesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListIndexesRequest) { -} - -func (newState *ListIndexesRequest) SyncEffectiveFieldsDuringRead(existingState ListIndexesRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListIndexesRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1602,7 +1650,7 @@ func (o ListIndexesRequest) Type(ctx context.Context) attr.Type { } type ListValue struct { - Values types.List `tfsdk:"values" tf:"optional"` + Values types.List `tfsdk:"values" tf:""` } func (newState *ListValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListValue) { @@ -1611,6 +1659,12 @@ func (newState *ListValue) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListValu func (newState *ListValue) SyncEffectiveFieldsDuringRead(existingState ListValue) { } +func (c ListValue) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Value{}.ToSchema(cs, append(path, "values")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListValue. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1675,9 +1729,9 @@ func (o *ListValue) SetValues(ctx context.Context, v []Value) { type ListVectorIndexesResponse struct { // A token that can be used to get the next page of results. If not present, // there are no more results to show. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` - VectorIndexes types.List `tfsdk:"vector_indexes" tf:"optional"` + VectorIndexes types.List `tfsdk:"vector_indexes" tf:""` } func (newState *ListVectorIndexesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVectorIndexesResponse) { @@ -1686,6 +1740,12 @@ func (newState *ListVectorIndexesResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ListVectorIndexesResponse) SyncEffectiveFieldsDuringRead(existingState ListVectorIndexesResponse) { } +func (c ListVectorIndexesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MiniVectorIndex{}.ToSchema(cs, append(path, "vector_indexes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVectorIndexesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1752,9 +1812,9 @@ func (o *ListVectorIndexesResponse) SetVectorIndexes(ctx context.Context, v []Mi // Key-value pair. type MapStringValueEntry struct { // Column name. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // Column value, nullable. - Value types.Object `tfsdk:"value" tf:"optional,object"` + Value types.Object `tfsdk:"value" tf:"object"` } func (newState *MapStringValueEntry) SyncEffectiveFieldsDuringCreateOrUpdate(plan MapStringValueEntry) { @@ -1763,6 +1823,12 @@ func (newState *MapStringValueEntry) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *MapStringValueEntry) SyncEffectiveFieldsDuringRead(existingState MapStringValueEntry) { } +func (c MapStringValueEntry) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Value{}.ToSchema(cs, append(path, "value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MapStringValueEntry. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1828,9 +1894,9 @@ func (o *MapStringValueEntry) SetValue(ctx context.Context, v Value) { type MiniVectorIndex struct { // The user who created the index. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` // Name of the endpoint associated with the index - EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` + EndpointName types.String `tfsdk:"endpoint_name" tf:""` // There are 2 types of Vector Search indexes: // // - `DELTA_SYNC`: An index that automatically syncs with a source Delta @@ -1838,11 +1904,11 @@ type MiniVectorIndex struct { // underlying data in the Delta Table changes. - `DIRECT_ACCESS`: An index // that supports direct read and write of vectors and metadata through our // REST and SDK APIs. With this model, the user manages index updates. - IndexType types.String `tfsdk:"index_type" tf:"optional"` + IndexType types.String `tfsdk:"index_type" tf:""` // Name of the index - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Primary key of the index - PrimaryKey types.String `tfsdk:"primary_key" tf:"optional"` + PrimaryKey types.String `tfsdk:"primary_key" tf:""` } func (newState *MiniVectorIndex) SyncEffectiveFieldsDuringCreateOrUpdate(plan MiniVectorIndex) { @@ -1851,6 +1917,11 @@ func (newState *MiniVectorIndex) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mi func (newState *MiniVectorIndex) SyncEffectiveFieldsDuringRead(existingState MiniVectorIndex) { } +func (c MiniVectorIndex) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MiniVectorIndex. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1893,12 +1964,12 @@ func (o MiniVectorIndex) Type(ctx context.Context) attr.Type { // Request payload for getting next page of results. type QueryVectorIndexNextPageRequest struct { // Name of the endpoint. - EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` + EndpointName types.String `tfsdk:"endpoint_name" tf:""` // Name of the vector index to query. IndexName types.String `tfsdk:"-"` // Page token returned from previous `QueryVectorIndex` or // `QueryVectorIndexNextPage` API. - PageToken types.String `tfsdk:"page_token" tf:"optional"` + PageToken types.String `tfsdk:"page_token" tf:""` } func (newState *QueryVectorIndexNextPageRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexNextPageRequest) { @@ -1907,6 +1978,12 @@ func (newState *QueryVectorIndexNextPageRequest) SyncEffectiveFieldsDuringCreate func (newState *QueryVectorIndexNextPageRequest) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexNextPageRequest) { } +func (c QueryVectorIndexNextPageRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "index_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryVectorIndexNextPageRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1951,20 +2028,20 @@ type QueryVectorIndexRequest struct { // 5}`: Filter for id greater than 5. - `{"id <=": 5}`: Filter for id less // than equal to 5. - `{"id >=": 5}`: Filter for id greater than equal to 5. // - `{"id": 5}`: Filter for id equal to 5. - FiltersJson types.String `tfsdk:"filters_json" tf:"optional"` + FiltersJson types.String `tfsdk:"filters_json" tf:""` // Name of the vector index to query. IndexName types.String `tfsdk:"-"` // Number of results to return. Defaults to 10. - NumResults types.Int64 `tfsdk:"num_results" tf:"optional"` + NumResults types.Int64 `tfsdk:"num_results" tf:""` // Query text. Required for Delta Sync Index using model endpoint. - QueryText types.String `tfsdk:"query_text" tf:"optional"` + QueryText types.String `tfsdk:"query_text" tf:""` // The query type to use. Choices are `ANN` and `HYBRID`. Defaults to `ANN`. - QueryType types.String `tfsdk:"query_type" tf:"optional"` + QueryType types.String `tfsdk:"query_type" tf:""` // Query vector. Required for Direct Vector Access Index and Delta Sync // Index using self-managed vectors. - QueryVector types.List `tfsdk:"query_vector" tf:"optional"` + QueryVector types.List `tfsdk:"query_vector" tf:""` // Threshold for the approximate nearest neighbor search. Defaults to 0.0. - ScoreThreshold types.Float64 `tfsdk:"score_threshold" tf:"optional"` + ScoreThreshold types.Float64 `tfsdk:"score_threshold" tf:""` } func (newState *QueryVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexRequest) { @@ -1973,6 +2050,13 @@ func (newState *QueryVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *QueryVectorIndexRequest) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexRequest) { } +func (c QueryVectorIndexRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "columns")...) + cs.SetRequired(append(path, "index_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2079,13 +2163,13 @@ func (o *QueryVectorIndexRequest) SetQueryVector(ctx context.Context, v []types. type QueryVectorIndexResponse struct { // Metadata about the result set. - Manifest types.Object `tfsdk:"manifest" tf:"optional,object"` + Manifest types.Object `tfsdk:"manifest" tf:"object"` // [Optional] Token that can be used in `QueryVectorIndexNextPage` API to // get next page of results. If more than 1000 results satisfy the query, // they are returned in groups of 1000. Empty value means no more results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // Data returned in the query result. - Result types.Object `tfsdk:"result" tf:"optional,object"` + Result types.Object `tfsdk:"result" tf:"object"` } func (newState *QueryVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexResponse) { @@ -2094,6 +2178,13 @@ func (newState *QueryVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *QueryVectorIndexResponse) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexResponse) { } +func (c QueryVectorIndexResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ResultManifest{}.ToSchema(cs, append(path, "manifest")...) + ResultData{}.ToSchema(cs, append(path, "result")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2191,9 +2282,9 @@ func (o *QueryVectorIndexResponse) SetResult(ctx context.Context, v ResultData) // Data returned in the query result. type ResultData struct { // Data rows returned in the query. - DataArray types.List `tfsdk:"data_array" tf:"optional"` + DataArray types.List `tfsdk:"data_array" tf:""` // Number of rows in the result set. - RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + RowCount types.Int64 `tfsdk:"row_count" tf:""` } func (newState *ResultData) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultData) { @@ -2202,6 +2293,11 @@ func (newState *ResultData) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultD func (newState *ResultData) SyncEffectiveFieldsDuringRead(existingState ResultData) { } +func (c ResultData) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultData. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2270,9 +2366,9 @@ func (o *ResultData) SetDataArray(ctx context.Context, v []types.String) { // Metadata about the result set. type ResultManifest struct { // Number of columns in the result set. - ColumnCount types.Int64 `tfsdk:"column_count" tf:"optional"` + ColumnCount types.Int64 `tfsdk:"column_count" tf:""` // Information about each column in the result set. - Columns types.List `tfsdk:"columns" tf:"optional"` + Columns types.List `tfsdk:"columns" tf:""` } func (newState *ResultManifest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultManifest) { @@ -2281,6 +2377,12 @@ func (newState *ResultManifest) SyncEffectiveFieldsDuringCreateOrUpdate(plan Res func (newState *ResultManifest) SyncEffectiveFieldsDuringRead(existingState ResultManifest) { } +func (c ResultManifest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ColumnInfo{}.ToSchema(cs, append(path, "columns")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultManifest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2349,9 +2451,9 @@ type ScanVectorIndexRequest struct { // Name of the vector index to scan. IndexName types.String `tfsdk:"-"` // Primary key of the last entry returned in the previous scan. - LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:"optional"` + LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:""` // Number of results to return. Defaults to 10. - NumResults types.Int64 `tfsdk:"num_results" tf:"optional"` + NumResults types.Int64 `tfsdk:"num_results" tf:""` } func (newState *ScanVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ScanVectorIndexRequest) { @@ -2360,6 +2462,12 @@ func (newState *ScanVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ScanVectorIndexRequest) SyncEffectiveFieldsDuringRead(existingState ScanVectorIndexRequest) { } +func (c ScanVectorIndexRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "index_name")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ScanVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2398,9 +2506,9 @@ func (o ScanVectorIndexRequest) Type(ctx context.Context) attr.Type { // Response to a scan vector index request. type ScanVectorIndexResponse struct { // List of data entries - Data types.List `tfsdk:"data" tf:"optional"` + Data types.List `tfsdk:"data" tf:""` // Primary key of the last entry. - LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:"optional"` + LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:""` } func (newState *ScanVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ScanVectorIndexResponse) { @@ -2409,6 +2517,12 @@ func (newState *ScanVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ScanVectorIndexResponse) SyncEffectiveFieldsDuringRead(existingState ScanVectorIndexResponse) { } +func (c ScanVectorIndexResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + Struct{}.ToSchema(cs, append(path, "data")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ScanVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2474,7 +2588,7 @@ func (o *ScanVectorIndexResponse) SetData(ctx context.Context, v []Struct) { type Struct struct { // Data entry, corresponding to a row in a vector index. - Fields types.List `tfsdk:"fields" tf:"optional"` + Fields types.List `tfsdk:"fields" tf:""` } func (newState *Struct) SyncEffectiveFieldsDuringCreateOrUpdate(plan Struct) { @@ -2483,6 +2597,12 @@ func (newState *Struct) SyncEffectiveFieldsDuringCreateOrUpdate(plan Struct) { func (newState *Struct) SyncEffectiveFieldsDuringRead(existingState Struct) { } +func (c Struct) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + MapStringValueEntry{}.ToSchema(cs, append(path, "fields")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Struct. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2550,12 +2670,6 @@ type SyncIndexRequest struct { IndexName types.String `tfsdk:"-"` } -func (newState *SyncIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SyncIndexRequest) { -} - -func (newState *SyncIndexRequest) SyncEffectiveFieldsDuringRead(existingState SyncIndexRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SyncIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2590,12 +2704,6 @@ func (o SyncIndexRequest) Type(ctx context.Context) attr.Type { type SyncIndexResponse struct { } -func (newState *SyncIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan SyncIndexResponse) { -} - -func (newState *SyncIndexResponse) SyncEffectiveFieldsDuringRead(existingState SyncIndexResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SyncIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2626,9 +2734,9 @@ func (o SyncIndexResponse) Type(ctx context.Context) attr.Type { // Result of the upsert or delete operation. type UpsertDataResult struct { // List of primary keys for rows that failed to process. - FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:"optional"` + FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:""` // Count of successfully processed rows. - SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:"optional"` + SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:""` } func (newState *UpsertDataResult) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertDataResult) { @@ -2637,6 +2745,11 @@ func (newState *UpsertDataResult) SyncEffectiveFieldsDuringCreateOrUpdate(plan U func (newState *UpsertDataResult) SyncEffectiveFieldsDuringRead(existingState UpsertDataResult) { } +func (c UpsertDataResult) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertDataResult. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2715,6 +2828,13 @@ func (newState *UpsertDataVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrU func (newState *UpsertDataVectorIndexRequest) SyncEffectiveFieldsDuringRead(existingState UpsertDataVectorIndexRequest) { } +func (c UpsertDataVectorIndexRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "index_name")...) + cs.SetRequired(append(path, "inputs_json")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertDataVectorIndexRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2751,9 +2871,9 @@ func (o UpsertDataVectorIndexRequest) Type(ctx context.Context) attr.Type { // Response to an upsert data vector index request. type UpsertDataVectorIndexResponse struct { // Result of the upsert or delete operation. - Result types.Object `tfsdk:"result" tf:"optional,object"` + Result types.Object `tfsdk:"result" tf:"object"` // Status of the upsert operation. - Status types.String `tfsdk:"status" tf:"optional"` + Status types.String `tfsdk:"status" tf:""` } func (newState *UpsertDataVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertDataVectorIndexResponse) { @@ -2762,6 +2882,12 @@ func (newState *UpsertDataVectorIndexResponse) SyncEffectiveFieldsDuringCreateOr func (newState *UpsertDataVectorIndexResponse) SyncEffectiveFieldsDuringRead(existingState UpsertDataVectorIndexResponse) { } +func (c UpsertDataVectorIndexResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + UpsertDataResult{}.ToSchema(cs, append(path, "result")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertDataVectorIndexResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2826,17 +2952,17 @@ func (o *UpsertDataVectorIndexResponse) SetResult(ctx context.Context, v UpsertD } type Value struct { - BoolValue types.Bool `tfsdk:"bool_value" tf:"optional"` + BoolValue types.Bool `tfsdk:"bool_value" tf:""` - ListValue types.Object `tfsdk:"list_value" tf:"optional,object"` + ListValue types.Object `tfsdk:"list_value" tf:"object"` - NullValue types.String `tfsdk:"null_value" tf:"optional"` + NullValue types.String `tfsdk:"null_value" tf:""` - NumberValue types.Float64 `tfsdk:"number_value" tf:"optional"` + NumberValue types.Float64 `tfsdk:"number_value" tf:""` - StringValue types.String `tfsdk:"string_value" tf:"optional"` + StringValue types.String `tfsdk:"string_value" tf:""` - StructValue types.Object `tfsdk:"struct_value" tf:"optional,object"` + StructValue types.Object `tfsdk:"struct_value" tf:"object"` } func (newState *Value) SyncEffectiveFieldsDuringCreateOrUpdate(plan Value) { @@ -2845,6 +2971,13 @@ func (newState *Value) SyncEffectiveFieldsDuringCreateOrUpdate(plan Value) { func (newState *Value) SyncEffectiveFieldsDuringRead(existingState Value) { } +func (c Value) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ListValue{}.ToSchema(cs, append(path, "list_value")...) + Struct{}.ToSchema(cs, append(path, "struct_value")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Value. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2947,13 +3080,13 @@ func (o *Value) SetStructValue(ctx context.Context, v Struct) { type VectorIndex struct { // The user who created the index. - Creator types.String `tfsdk:"creator" tf:"optional"` + Creator types.String `tfsdk:"creator" tf:""` - DeltaSyncIndexSpec types.Object `tfsdk:"delta_sync_index_spec" tf:"optional,object"` + DeltaSyncIndexSpec types.Object `tfsdk:"delta_sync_index_spec" tf:"object"` - DirectAccessIndexSpec types.Object `tfsdk:"direct_access_index_spec" tf:"optional,object"` + DirectAccessIndexSpec types.Object `tfsdk:"direct_access_index_spec" tf:"object"` // Name of the endpoint associated with the index - EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` + EndpointName types.String `tfsdk:"endpoint_name" tf:""` // There are 2 types of Vector Search indexes: // // - `DELTA_SYNC`: An index that automatically syncs with a source Delta @@ -2961,13 +3094,13 @@ type VectorIndex struct { // underlying data in the Delta Table changes. - `DIRECT_ACCESS`: An index // that supports direct read and write of vectors and metadata through our // REST and SDK APIs. With this model, the user manages index updates. - IndexType types.String `tfsdk:"index_type" tf:"optional"` + IndexType types.String `tfsdk:"index_type" tf:""` // Name of the index - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` // Primary key of the index - PrimaryKey types.String `tfsdk:"primary_key" tf:"optional"` + PrimaryKey types.String `tfsdk:"primary_key" tf:""` - Status types.Object `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"object"` } func (newState *VectorIndex) SyncEffectiveFieldsDuringCreateOrUpdate(plan VectorIndex) { @@ -2976,6 +3109,14 @@ func (newState *VectorIndex) SyncEffectiveFieldsDuringCreateOrUpdate(plan Vector func (newState *VectorIndex) SyncEffectiveFieldsDuringRead(existingState VectorIndex) { } +func (c VectorIndex) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + DeltaSyncVectorIndexSpecResponse{}.ToSchema(cs, append(path, "delta_sync_index_spec")...) + DirectAccessVectorIndexSpec{}.ToSchema(cs, append(path, "direct_access_index_spec")...) + VectorIndexStatus{}.ToSchema(cs, append(path, "status")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VectorIndex. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3111,13 +3252,13 @@ func (o *VectorIndex) SetStatus(ctx context.Context, v VectorIndexStatus) { type VectorIndexStatus struct { // Index API Url to be used to perform operations on the index - IndexUrl types.String `tfsdk:"index_url" tf:"optional"` + IndexUrl types.String `tfsdk:"index_url" tf:""` // Number of rows indexed - IndexedRowCount types.Int64 `tfsdk:"indexed_row_count" tf:"optional"` + IndexedRowCount types.Int64 `tfsdk:"indexed_row_count" tf:""` // Message associated with the index status - Message types.String `tfsdk:"message" tf:"optional"` + Message types.String `tfsdk:"message" tf:""` // Whether the index is ready for search - Ready types.Bool `tfsdk:"ready" tf:"optional"` + Ready types.Bool `tfsdk:"ready" tf:""` } func (newState *VectorIndexStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan VectorIndexStatus) { @@ -3126,6 +3267,11 @@ func (newState *VectorIndexStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *VectorIndexStatus) SyncEffectiveFieldsDuringRead(existingState VectorIndexStatus) { } +func (c VectorIndexStatus) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in VectorIndexStatus. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/workspace_tf/legacy_model.go b/internal/service/workspace_tf/legacy_model.go index 676ad91b7..9e8fe5e92 100755 --- a/internal/service/workspace_tf/legacy_model.go +++ b/internal/service/workspace_tf/legacy_model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -34,6 +35,13 @@ func (newState *AclItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AclI func (newState *AclItem_SdkV2) SyncEffectiveFieldsDuringRead(existingState AclItem_SdkV2) { } +func (c AclItem_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "permission")...) + cs.SetRequired(append(path, "principal")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AclItem. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -81,6 +89,13 @@ func (newState *AzureKeyVaultSecretScopeMetadata_SdkV2) SyncEffectiveFieldsDurin func (newState *AzureKeyVaultSecretScopeMetadata_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureKeyVaultSecretScopeMetadata_SdkV2) { } +func (c AzureKeyVaultSecretScopeMetadata_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dns_name")...) + cs.SetRequired(append(path, "resource_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureKeyVaultSecretScopeMetadata. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -127,13 +142,13 @@ type CreateCredentialsRequest_SdkV2 struct { // BitBucket or BitBucket Server, username must be used. For all other // providers please see your provider's Personal Access Token authentication // documentation to see what is supported. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` // The personal access token used to authenticate to the corresponding Git // provider. For certain providers, support may exist for other types of // scoped access tokens. [Learn more]. // // [Learn more]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html - PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:"optional"` + PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:""` } func (newState *CreateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialsRequest_SdkV2) { @@ -142,6 +157,12 @@ func (newState *CreateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *CreateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialsRequest_SdkV2) { } +func (c CreateCredentialsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "git_provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -184,7 +205,7 @@ type CreateCredentialsResponse_SdkV2 struct { GitProvider types.String `tfsdk:"git_provider" tf:""` // The username or email provided with your Git provider account and // associated with the credential. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` } func (newState *CreateCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialsResponse_SdkV2) { @@ -193,6 +214,13 @@ func (newState *CreateCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *CreateCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialsResponse_SdkV2) { } +func (c CreateCredentialsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_id")...) + cs.SetRequired(append(path, "git_provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -232,7 +260,7 @@ type CreateRepoRequest_SdkV2 struct { // Desired path for the repo in the workspace. Almost any path in the // workspace can be chosen. If repo is created in `/Repos`, path must be in // the format `/Repos/{folder}/{repo-name}`. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Git provider. This field is case-insensitive. The available Git providers // are `gitHub`, `bitbucketCloud`, `gitLab`, `azureDevOpsServices`, // `gitHubEnterprise`, `bitbucketServer`, `gitLabEnterpriseEdition` and @@ -240,7 +268,7 @@ type CreateRepoRequest_SdkV2 struct { Provider types.String `tfsdk:"provider" tf:""` // If specified, the repo will be created with sparse checkout enabled. You // cannot enable/disable sparse checkout after the repo is created. - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"object"` // URL of the Git repository to be linked. Url types.String `tfsdk:"url" tf:""` } @@ -251,6 +279,14 @@ func (newState *CreateRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *CreateRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRepoRequest_SdkV2) { } +func (c CreateRepoRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "provider")...) + SparseCheckout_SdkV2{}.ToSchema(cs, append(path, "sparse_checkout")...) + cs.SetRequired(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRepoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -320,20 +356,20 @@ func (o *CreateRepoRequest_SdkV2) SetSparseCheckout(ctx context.Context, v Spars type CreateRepoResponse_SdkV2 struct { // Branch that the Git folder (repo) is checked out to. - Branch types.String `tfsdk:"branch" tf:"optional"` + Branch types.String `tfsdk:"branch" tf:""` // SHA-1 hash representing the commit ID of the current HEAD of the Git // folder (repo). - HeadCommitId types.String `tfsdk:"head_commit_id" tf:"optional"` + HeadCommitId types.String `tfsdk:"head_commit_id" tf:""` // ID of the Git folder (repo) object in the workspace. - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` // Path of the Git folder (repo) in the workspace. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Git provider of the linked Git repository. - Provider types.String `tfsdk:"provider" tf:"optional"` + Provider types.String `tfsdk:"provider" tf:""` // Sparse checkout settings for the Git folder (repo). - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"object"` // URL of the linked Git repository. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *CreateRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRepoResponse_SdkV2) { @@ -342,6 +378,12 @@ func (newState *CreateRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateRepoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRepoResponse_SdkV2) { } +func (c CreateRepoResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparseCheckout_SdkV2{}.ToSchema(cs, append(path, "sparse_checkout")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRepoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -417,15 +459,15 @@ func (o *CreateRepoResponse_SdkV2) SetSparseCheckout(ctx context.Context, v Spar type CreateScope_SdkV2 struct { // The metadata for the secret scope if the type is `AZURE_KEYVAULT` - BackendAzureKeyvault types.List `tfsdk:"backend_azure_keyvault" tf:"optional,object"` + BackendAzureKeyvault types.List `tfsdk:"backend_azure_keyvault" tf:"object"` // The principal that is initially granted `MANAGE` permission to the // created scope. - InitialManagePrincipal types.String `tfsdk:"initial_manage_principal" tf:"optional"` + InitialManagePrincipal types.String `tfsdk:"initial_manage_principal" tf:""` // Scope name requested by the user. Scope names are unique. Scope types.String `tfsdk:"scope" tf:""` // The backend type the scope will be created with. If not specified, will // default to `DATABRICKS` - ScopeBackendType types.String `tfsdk:"scope_backend_type" tf:"optional"` + ScopeBackendType types.String `tfsdk:"scope_backend_type" tf:""` } func (newState *CreateScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScope_SdkV2) { @@ -434,6 +476,13 @@ func (newState *CreateScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateScope_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateScope_SdkV2) { } +func (c CreateScope_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AzureKeyVaultSecretScopeMetadata_SdkV2{}.ToSchema(cs, append(path, "backend_azure_keyvault")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateScope. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -504,12 +553,6 @@ func (o *CreateScope_SdkV2) SetBackendAzureKeyvault(ctx context.Context, v Azure type CreateScopeResponse_SdkV2 struct { } -func (newState *CreateScopeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScopeResponse_SdkV2) { -} - -func (newState *CreateScopeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateScopeResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateScopeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -541,10 +584,10 @@ type CredentialInfo_SdkV2 struct { // ID of the credential object in the workspace. CredentialId types.Int64 `tfsdk:"credential_id" tf:""` // The Git provider associated with the credential. - GitProvider types.String `tfsdk:"git_provider" tf:"optional"` + GitProvider types.String `tfsdk:"git_provider" tf:""` // The username or email provided with your Git provider account and // associated with the credential. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` } func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialInfo_SdkV2) { @@ -553,6 +596,12 @@ func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CredentialInfo_SdkV2) { } +func (c CredentialInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -595,7 +644,7 @@ type Delete_SdkV2 struct { // `false` by default. Please note this deleting directory is not atomic. If // it fails in the middle, some of objects under this directory may be // deleted and cannot be undone. - Recursive types.Bool `tfsdk:"recursive" tf:"optional"` + Recursive types.Bool `tfsdk:"recursive" tf:""` } func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete_SdkV2) { @@ -604,6 +653,12 @@ func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delet func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringRead(existingState Delete_SdkV2) { } +func (c Delete_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Delete. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -650,6 +705,13 @@ func (newState *DeleteAcl_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan De func (newState *DeleteAcl_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAcl_SdkV2) { } +func (c DeleteAcl_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "principal")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAcl. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -686,12 +748,6 @@ func (o DeleteAcl_SdkV2) Type(ctx context.Context) attr.Type { type DeleteAclResponse_SdkV2 struct { } -func (newState *DeleteAclResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAclResponse_SdkV2) { -} - -func (newState *DeleteAclResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAclResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAclResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -725,12 +781,6 @@ type DeleteCredentialsRequest_SdkV2 struct { CredentialId types.Int64 `tfsdk:"-"` } -func (newState *DeleteCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialsRequest_SdkV2) { -} - -func (newState *DeleteCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -771,6 +821,11 @@ func (newState *DeleteCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *DeleteCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialsResponse_SdkV2) { } +func (c DeleteCredentialsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -804,12 +859,6 @@ type DeleteRepoRequest_SdkV2 struct { RepoId types.Int64 `tfsdk:"-"` } -func (newState *DeleteRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRepoRequest_SdkV2) { -} - -func (newState *DeleteRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRepoRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRepoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -850,6 +899,11 @@ func (newState *DeleteRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *DeleteRepoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRepoResponse_SdkV2) { } +func (c DeleteRepoResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRepoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -886,6 +940,11 @@ func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { } +func (c DeleteResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -924,6 +983,12 @@ func (newState *DeleteScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DeleteScope_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteScope_SdkV2) { } +func (c DeleteScope_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScope. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -958,12 +1023,6 @@ func (o DeleteScope_SdkV2) Type(ctx context.Context) attr.Type { type DeleteScopeResponse_SdkV2 struct { } -func (newState *DeleteScopeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScopeResponse_SdkV2) { -} - -func (newState *DeleteScopeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteScopeResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScopeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1004,6 +1063,13 @@ func (newState *DeleteSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DeleteSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSecret_SdkV2) { } +func (c DeleteSecret_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1046,6 +1112,11 @@ func (newState *DeleteSecretResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *DeleteSecretResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSecretResponse_SdkV2) { } +func (c DeleteSecretResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSecretResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1095,12 +1166,6 @@ type ExportRequest_SdkV2 struct { Path types.String `tfsdk:"-"` } -func (newState *ExportRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportRequest_SdkV2) { -} - -func (newState *ExportRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1137,9 +1202,9 @@ func (o ExportRequest_SdkV2) Type(ctx context.Context) attr.Type { type ExportResponse_SdkV2 struct { // The base64-encoded content. If the limit (10MB) is exceeded, exception // with error code **MAX_NOTEBOOK_SIZE_EXCEEDED** is thrown. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // The file type of the exported file. - FileType types.String `tfsdk:"file_type" tf:"optional"` + FileType types.String `tfsdk:"file_type" tf:""` } func (newState *ExportResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportResponse_SdkV2) { @@ -1148,6 +1213,11 @@ func (newState *ExportResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ExportResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportResponse_SdkV2) { } +func (c ExportResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1189,12 +1259,6 @@ type GetAclRequest_SdkV2 struct { Scope types.String `tfsdk:"-"` } -func (newState *GetAclRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAclRequest_SdkV2) { -} - -func (newState *GetAclRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAclRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAclRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1234,12 +1298,6 @@ type GetCredentialsRequest_SdkV2 struct { CredentialId types.Int64 `tfsdk:"-"` } -func (newState *GetCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialsRequest_SdkV2) { -} - -func (newState *GetCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCredentialsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1275,10 +1333,10 @@ type GetCredentialsResponse_SdkV2 struct { // ID of the credential object in the workspace. CredentialId types.Int64 `tfsdk:"credential_id" tf:""` // The Git provider associated with the credential. - GitProvider types.String `tfsdk:"git_provider" tf:"optional"` + GitProvider types.String `tfsdk:"git_provider" tf:""` // The username or email provided with your Git provider account and // associated with the credential. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` } func (newState *GetCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialsResponse_SdkV2) { @@ -1287,6 +1345,12 @@ func (newState *GetCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *GetCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCredentialsResponse_SdkV2) { } +func (c GetCredentialsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1328,12 +1392,6 @@ type GetRepoPermissionLevelsRequest_SdkV2 struct { RepoId types.String `tfsdk:"-"` } -func (newState *GetRepoPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetRepoPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1367,7 +1425,7 @@ func (o GetRepoPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Typ type GetRepoPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetRepoPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoPermissionLevelsResponse_SdkV2) { @@ -1376,6 +1434,12 @@ func (newState *GetRepoPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuring func (newState *GetRepoPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoPermissionLevelsResponse_SdkV2) { } +func (c GetRepoPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1443,12 +1507,6 @@ type GetRepoPermissionsRequest_SdkV2 struct { RepoId types.String `tfsdk:"-"` } -func (newState *GetRepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoPermissionsRequest_SdkV2) { -} - -func (newState *GetRepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1486,12 +1544,6 @@ type GetRepoRequest_SdkV2 struct { RepoId types.Int64 `tfsdk:"-"` } -func (newState *GetRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoRequest_SdkV2) { -} - -func (newState *GetRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1525,19 +1577,19 @@ func (o GetRepoRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetRepoResponse_SdkV2 struct { // Branch that the local version of the repo is checked out to. - Branch types.String `tfsdk:"branch" tf:"optional"` + Branch types.String `tfsdk:"branch" tf:""` // SHA-1 hash representing the commit ID of the current HEAD of the repo. - HeadCommitId types.String `tfsdk:"head_commit_id" tf:"optional"` + HeadCommitId types.String `tfsdk:"head_commit_id" tf:""` // ID of the Git folder (repo) object in the workspace. - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` // Path of the Git folder (repo) in the workspace. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Git provider of the linked Git repository. - Provider types.String `tfsdk:"provider" tf:"optional"` + Provider types.String `tfsdk:"provider" tf:""` // Sparse checkout settings for the Git folder (repo). - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"object"` // URL of the linked Git repository. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *GetRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoResponse_SdkV2) { @@ -1546,6 +1598,12 @@ func (newState *GetRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *GetRepoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoResponse_SdkV2) { } +func (c GetRepoResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparseCheckout_SdkV2{}.ToSchema(cs, append(path, "sparse_checkout")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1627,12 +1685,6 @@ type GetSecretRequest_SdkV2 struct { Scope types.String `tfsdk:"-"` } -func (newState *GetSecretRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSecretRequest_SdkV2) { -} - -func (newState *GetSecretRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSecretRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSecretRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1668,9 +1720,9 @@ func (o GetSecretRequest_SdkV2) Type(ctx context.Context) attr.Type { type GetSecretResponse_SdkV2 struct { // A unique name to identify the secret. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The value of the secret in its byte representation. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *GetSecretResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSecretResponse_SdkV2) { @@ -1679,6 +1731,11 @@ func (newState *GetSecretResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *GetSecretResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSecretResponse_SdkV2) { } +func (c GetSecretResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSecretResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1718,12 +1775,6 @@ type GetStatusRequest_SdkV2 struct { Path types.String `tfsdk:"-"` } -func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatusRequest_SdkV2) { -} - -func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatusRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1763,12 +1814,6 @@ type GetWorkspaceObjectPermissionLevelsRequest_SdkV2 struct { WorkspaceObjectType types.String `tfsdk:"-"` } -func (newState *GetWorkspaceObjectPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceObjectPermissionLevelsRequest_SdkV2) { -} - -func (newState *GetWorkspaceObjectPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceObjectPermissionLevelsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceObjectPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1804,7 +1849,7 @@ func (o GetWorkspaceObjectPermissionLevelsRequest_SdkV2) Type(ctx context.Contex type GetWorkspaceObjectPermissionLevelsResponse_SdkV2 struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetWorkspaceObjectPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceObjectPermissionLevelsResponse_SdkV2) { @@ -1813,6 +1858,12 @@ func (newState *GetWorkspaceObjectPermissionLevelsResponse_SdkV2) SyncEffectiveF func (newState *GetWorkspaceObjectPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceObjectPermissionLevelsResponse_SdkV2) { } +func (c GetWorkspaceObjectPermissionLevelsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceObjectPermissionsDescription_SdkV2{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceObjectPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1882,12 +1933,6 @@ type GetWorkspaceObjectPermissionsRequest_SdkV2 struct { WorkspaceObjectType types.String `tfsdk:"-"` } -func (newState *GetWorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceObjectPermissionsRequest_SdkV2) { -} - -func (newState *GetWorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceObjectPermissionsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceObjectPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1927,7 +1972,7 @@ type Import_SdkV2 struct { // If the limit (10MB) is exceeded, exception with error code // **MAX_NOTEBOOK_SIZE_EXCEEDED** is thrown. This parameter might be absent, // and instead a posted file is used. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // This specifies the format of the file to be imported. // // The value is case sensitive. @@ -1941,14 +1986,14 @@ type Import_SdkV2 struct { // notebook is imported in Databricks archive format. Required for // directories. - `R_MARKDOWN`: The notebook is imported from R Markdown // format. - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // The language of the object. This value is set only if the object type is // `NOTEBOOK`. - Language types.String `tfsdk:"language" tf:"optional"` + Language types.String `tfsdk:"language" tf:""` // The flag that specifies whether to overwrite existing object. It is // `false` by default. For `DBC` format, `overwrite` is not supported since // it may contain a directory. - Overwrite types.Bool `tfsdk:"overwrite" tf:"optional"` + Overwrite types.Bool `tfsdk:"overwrite" tf:""` // The absolute path of the object or directory. Importing a directory is // only supported for the `DBC` and `SOURCE` formats. Path types.String `tfsdk:"path" tf:""` @@ -1960,6 +2005,12 @@ func (newState *Import_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Impor func (newState *Import_SdkV2) SyncEffectiveFieldsDuringRead(existingState Import_SdkV2) { } +func (c Import_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Import. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2008,6 +2059,11 @@ func (newState *ImportResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *ImportResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ImportResponse_SdkV2) { } +func (c ImportResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ImportResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2041,12 +2097,6 @@ type ListAclsRequest_SdkV2 struct { Scope types.String `tfsdk:"-"` } -func (newState *ListAclsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAclsRequest_SdkV2) { -} - -func (newState *ListAclsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAclsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAclsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2080,7 +2130,7 @@ func (o ListAclsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListAclsResponse_SdkV2 struct { // The associated ACLs rule applied to principals in the given scope. - Items types.List `tfsdk:"items" tf:"optional"` + Items types.List `tfsdk:"items" tf:""` } func (newState *ListAclsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAclsResponse_SdkV2) { @@ -2089,6 +2139,12 @@ func (newState *ListAclsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *ListAclsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAclsResponse_SdkV2) { } +func (c ListAclsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AclItem_SdkV2{}.ToSchema(cs, append(path, "items")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAclsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2152,7 +2208,7 @@ func (o *ListAclsResponse_SdkV2) SetItems(ctx context.Context, v []AclItem_SdkV2 type ListCredentialsResponse_SdkV2 struct { // List of credentials. - Credentials types.List `tfsdk:"credentials" tf:"optional"` + Credentials types.List `tfsdk:"credentials" tf:""` } func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCredentialsResponse_SdkV2) { @@ -2161,6 +2217,12 @@ func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOr func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCredentialsResponse_SdkV2) { } +func (c ListCredentialsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CredentialInfo_SdkV2{}.ToSchema(cs, append(path, "credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2234,12 +2296,6 @@ type ListReposRequest_SdkV2 struct { PathPrefix types.String `tfsdk:"-"` } -func (newState *ListReposRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListReposRequest_SdkV2) { -} - -func (newState *ListReposRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListReposRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListReposRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2276,9 +2332,9 @@ func (o ListReposRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListReposResponse_SdkV2 struct { // Token that can be specified as a query parameter to the `GET /repos` // endpoint to retrieve the next page of results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // List of Git folders (repos). - Repos types.List `tfsdk:"repos" tf:"optional"` + Repos types.List `tfsdk:"repos" tf:""` } func (newState *ListReposResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListReposResponse_SdkV2) { @@ -2287,6 +2343,12 @@ func (newState *ListReposResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ListReposResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListReposResponse_SdkV2) { } +func (c ListReposResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoInfo_SdkV2{}.ToSchema(cs, append(path, "repos")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListReposResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2352,7 +2414,7 @@ func (o *ListReposResponse_SdkV2) SetRepos(ctx context.Context, v []RepoInfo_Sdk type ListResponse_SdkV2 struct { // List of objects. - Objects types.List `tfsdk:"objects" tf:"optional"` + Objects types.List `tfsdk:"objects" tf:""` } func (newState *ListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListResponse_SdkV2) { @@ -2361,6 +2423,12 @@ func (newState *ListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListResponse_SdkV2) { } +func (c ListResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ObjectInfo_SdkV2{}.ToSchema(cs, append(path, "objects")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2424,7 +2492,7 @@ func (o *ListResponse_SdkV2) SetObjects(ctx context.Context, v []ObjectInfo_SdkV type ListScopesResponse_SdkV2 struct { // The available secret scopes. - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` } func (newState *ListScopesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListScopesResponse_SdkV2) { @@ -2433,6 +2501,12 @@ func (newState *ListScopesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *ListScopesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListScopesResponse_SdkV2) { } +func (c ListScopesResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SecretScope_SdkV2{}.ToSchema(cs, append(path, "scopes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListScopesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2500,12 +2574,6 @@ type ListSecretsRequest_SdkV2 struct { Scope types.String `tfsdk:"-"` } -func (newState *ListSecretsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSecretsRequest_SdkV2) { -} - -func (newState *ListSecretsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSecretsRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSecretsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2539,7 +2607,7 @@ func (o ListSecretsRequest_SdkV2) Type(ctx context.Context) attr.Type { type ListSecretsResponse_SdkV2 struct { // Metadata information of all secrets contained within the given scope. - Secrets types.List `tfsdk:"secrets" tf:"optional"` + Secrets types.List `tfsdk:"secrets" tf:""` } func (newState *ListSecretsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSecretsResponse_SdkV2) { @@ -2548,6 +2616,12 @@ func (newState *ListSecretsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpda func (newState *ListSecretsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSecretsResponse_SdkV2) { } +func (c ListSecretsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SecretMetadata_SdkV2{}.ToSchema(cs, append(path, "secrets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSecretsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2617,12 +2691,6 @@ type ListWorkspaceRequest_SdkV2 struct { Path types.String `tfsdk:"-"` } -func (newState *ListWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWorkspaceRequest_SdkV2) { -} - -func (newState *ListWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWorkspaceRequest_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2669,6 +2737,12 @@ func (newState *Mkdirs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mkdir func (newState *Mkdirs_SdkV2) SyncEffectiveFieldsDuringRead(existingState Mkdirs_SdkV2) { } +func (c Mkdirs_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Mkdirs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2709,6 +2783,11 @@ func (newState *MkdirsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *MkdirsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MkdirsResponse_SdkV2) { } +func (c MkdirsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MkdirsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2738,27 +2817,27 @@ func (o MkdirsResponse_SdkV2) Type(ctx context.Context) attr.Type { type ObjectInfo_SdkV2 struct { // Only applicable to files. The creation UTC timestamp. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The language of the object. This value is set only if the object type is // `NOTEBOOK`. - Language types.String `tfsdk:"language" tf:"optional"` + Language types.String `tfsdk:"language" tf:""` // Only applicable to files, the last modified UTC timestamp. - ModifiedAt types.Int64 `tfsdk:"modified_at" tf:"optional"` + ModifiedAt types.Int64 `tfsdk:"modified_at" tf:""` // Unique identifier for the object. - ObjectId types.Int64 `tfsdk:"object_id" tf:"optional"` + ObjectId types.Int64 `tfsdk:"object_id" tf:""` // The type of the object in workspace. // // - `NOTEBOOK`: document that contains runnable code, visualizations, and // explanatory text. - `DIRECTORY`: directory - `LIBRARY`: library - `FILE`: // file - `REPO`: repository - `DASHBOARD`: Lakeview dashboard - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` // The absolute path of the object. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // A unique identifier for the object that is consistent across all // Databricks APIs. - ResourceId types.String `tfsdk:"resource_id" tf:"optional"` + ResourceId types.String `tfsdk:"resource_id" tf:""` // Only applicable to files. The file size in bytes can be returned. - Size types.Int64 `tfsdk:"size" tf:"optional"` + Size types.Int64 `tfsdk:"size" tf:""` } func (newState *ObjectInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ObjectInfo_SdkV2) { @@ -2767,6 +2846,11 @@ func (newState *ObjectInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan O func (newState *ObjectInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ObjectInfo_SdkV2) { } +func (c ObjectInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ObjectInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2827,6 +2911,14 @@ func (newState *PutAcl_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAc func (newState *PutAcl_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAcl_SdkV2) { } +func (c PutAcl_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "permission")...) + cs.SetRequired(append(path, "principal")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAcl. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2865,12 +2957,6 @@ func (o PutAcl_SdkV2) Type(ctx context.Context) attr.Type { type PutAclResponse_SdkV2 struct { } -func (newState *PutAclResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAclResponse_SdkV2) { -} - -func (newState *PutAclResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAclResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAclResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2900,13 +2986,13 @@ func (o PutAclResponse_SdkV2) Type(ctx context.Context) attr.Type { type PutSecret_SdkV2 struct { // If specified, value will be stored as bytes. - BytesValue types.String `tfsdk:"bytes_value" tf:"optional"` + BytesValue types.String `tfsdk:"bytes_value" tf:""` // A unique name to identify the secret. Key types.String `tfsdk:"key" tf:""` // The name of the scope to which the secret will be associated with. Scope types.String `tfsdk:"scope" tf:""` // If specified, note that the value will be stored in UTF-8 (MB4) form. - StringValue types.String `tfsdk:"string_value" tf:"optional"` + StringValue types.String `tfsdk:"string_value" tf:""` } func (newState *PutSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutSecret_SdkV2) { @@ -2915,6 +3001,13 @@ func (newState *PutSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Pu func (newState *PutSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutSecret_SdkV2) { } +func (c PutSecret_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2955,12 +3048,6 @@ func (o PutSecret_SdkV2) Type(ctx context.Context) attr.Type { type PutSecretResponse_SdkV2 struct { } -func (newState *PutSecretResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutSecretResponse_SdkV2) { -} - -func (newState *PutSecretResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutSecretResponse_SdkV2) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutSecretResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2990,13 +3077,13 @@ func (o PutSecretResponse_SdkV2) Type(ctx context.Context) attr.Type { type RepoAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *RepoAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoAccessControlRequest_SdkV2) { @@ -3005,6 +3092,11 @@ func (newState *RepoAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *RepoAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoAccessControlRequest_SdkV2) { } +func (c RepoAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3044,15 +3136,15 @@ func (o RepoAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { type RepoAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *RepoAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoAccessControlResponse_SdkV2) { @@ -3061,6 +3153,12 @@ func (newState *RepoAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *RepoAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoAccessControlResponse_SdkV2) { } +func (c RepoAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3133,19 +3231,19 @@ func (o *RepoAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, // Git folder (repo) information. type RepoInfo_SdkV2 struct { // Name of the current git branch of the git folder (repo). - Branch types.String `tfsdk:"branch" tf:"optional"` + Branch types.String `tfsdk:"branch" tf:""` // Current git commit id of the git folder (repo). - HeadCommitId types.String `tfsdk:"head_commit_id" tf:"optional"` + HeadCommitId types.String `tfsdk:"head_commit_id" tf:""` // Id of the git folder (repo) in the Workspace. - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` // Root path of the git folder (repo) in the Workspace. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Git provider of the remote git repository, e.g. `gitHub`. - Provider types.String `tfsdk:"provider" tf:"optional"` + Provider types.String `tfsdk:"provider" tf:""` // Sparse checkout config for the git folder (repo). - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"object"` // URL of the remote git repository. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *RepoInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoInfo_SdkV2) { @@ -3154,6 +3252,12 @@ func (newState *RepoInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Rep func (newState *RepoInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoInfo_SdkV2) { } +func (c RepoInfo_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparseCheckout_SdkV2{}.ToSchema(cs, append(path, "sparse_checkout")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3228,11 +3332,11 @@ func (o *RepoInfo_SdkV2) SetSparseCheckout(ctx context.Context, v SparseCheckout } type RepoPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *RepoPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermission_SdkV2) { @@ -3241,6 +3345,11 @@ func (newState *RepoPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *RepoPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoPermission_SdkV2) { } +func (c RepoPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3307,11 +3416,11 @@ func (o *RepoPermission_SdkV2) SetInheritedFromObject(ctx context.Context, v []t } type RepoPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *RepoPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermissions_SdkV2) { @@ -3320,6 +3429,12 @@ func (newState *RepoPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(p func (newState *RepoPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoPermissions_SdkV2) { } +func (c RepoPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3386,9 +3501,9 @@ func (o *RepoPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []Re } type RepoPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *RepoPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermissionsDescription_SdkV2) { @@ -3397,6 +3512,11 @@ func (newState *RepoPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *RepoPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoPermissionsDescription_SdkV2) { } +func (c RepoPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3431,7 +3551,7 @@ func (o RepoPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { } type RepoPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The repo for which to get or manage permissions. RepoId types.String `tfsdk:"-"` } @@ -3442,6 +3562,13 @@ func (newState *RepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrU func (newState *RepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoPermissionsRequest_SdkV2) { } +func (c RepoPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "repo_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3507,9 +3634,9 @@ func (o *RepoPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, type SecretMetadata_SdkV2 struct { // A unique name to identify the secret. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The last updated timestamp (in milliseconds) for the secret. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` } func (newState *SecretMetadata_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretMetadata_SdkV2) { @@ -3518,6 +3645,11 @@ func (newState *SecretMetadata_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SecretMetadata_SdkV2) SyncEffectiveFieldsDuringRead(existingState SecretMetadata_SdkV2) { } +func (c SecretMetadata_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SecretMetadata. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3553,11 +3685,11 @@ func (o SecretMetadata_SdkV2) Type(ctx context.Context) attr.Type { type SecretScope_SdkV2 struct { // The type of secret scope backend. - BackendType types.String `tfsdk:"backend_type" tf:"optional"` + BackendType types.String `tfsdk:"backend_type" tf:""` // The metadata for the secret scope if the type is `AZURE_KEYVAULT` - KeyvaultMetadata types.List `tfsdk:"keyvault_metadata" tf:"optional,object"` + KeyvaultMetadata types.List `tfsdk:"keyvault_metadata" tf:"object"` // A unique name to identify the secret scope. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *SecretScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretScope_SdkV2) { @@ -3566,6 +3698,12 @@ func (newState *SecretScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *SecretScope_SdkV2) SyncEffectiveFieldsDuringRead(existingState SecretScope_SdkV2) { } +func (c SecretScope_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AzureKeyVaultSecretScopeMetadata_SdkV2{}.ToSchema(cs, append(path, "keyvault_metadata")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SecretScope. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3637,7 +3775,7 @@ type SparseCheckout_SdkV2 struct { // details. // // [cone mode handling]: https://git-scm.com/docs/git-sparse-checkout#_internalscone_mode_handling - Patterns types.List `tfsdk:"patterns" tf:"optional"` + Patterns types.List `tfsdk:"patterns" tf:""` } func (newState *SparseCheckout_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparseCheckout_SdkV2) { @@ -3646,6 +3784,11 @@ func (newState *SparseCheckout_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SparseCheckout_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparseCheckout_SdkV2) { } +func (c SparseCheckout_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparseCheckout. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3713,7 +3856,7 @@ type SparseCheckoutUpdate_SdkV2 struct { // details. // // [cone mode handling]: https://git-scm.com/docs/git-sparse-checkout#_internalscone_mode_handling - Patterns types.List `tfsdk:"patterns" tf:"optional"` + Patterns types.List `tfsdk:"patterns" tf:""` } func (newState *SparseCheckoutUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparseCheckoutUpdate_SdkV2) { @@ -3722,6 +3865,11 @@ func (newState *SparseCheckoutUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpd func (newState *SparseCheckoutUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparseCheckoutUpdate_SdkV2) { } +func (c SparseCheckoutUpdate_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparseCheckoutUpdate. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3798,13 +3946,13 @@ type UpdateCredentialsRequest_SdkV2 struct { // BitBucket or BitBucket Server, username must be used. For all other // providers please see your provider's Personal Access Token authentication // documentation to see what is supported. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` // The personal access token used to authenticate to the corresponding Git // provider. For certain providers, support may exist for other types of // scoped access tokens. [Learn more]. // // [Learn more]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html - PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:"optional"` + PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:""` } func (newState *UpdateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialsRequest_SdkV2) { @@ -3813,6 +3961,13 @@ func (newState *UpdateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateO func (newState *UpdateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialsRequest_SdkV2) { } +func (c UpdateCredentialsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_id")...) + cs.SetRequired(append(path, "git_provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3859,6 +4014,11 @@ func (newState *UpdateCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *UpdateCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialsResponse_SdkV2) { } +func (c UpdateCredentialsResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3888,17 +4048,17 @@ func (o UpdateCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { type UpdateRepoRequest_SdkV2 struct { // Branch that the local version of the repo is checked out to. - Branch types.String `tfsdk:"branch" tf:"optional"` + Branch types.String `tfsdk:"branch" tf:""` // ID of the Git folder (repo) object in the workspace. RepoId types.Int64 `tfsdk:"-"` // If specified, update the sparse checkout settings. The update will fail // if sparse checkout is not enabled for the repo. - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"object"` // Tag that the local version of the repo is checked out to. Updating the // repo to a tag puts the repo in a detached HEAD state. Before committing // new changes, you must update the repo to a branch instead of the detached // HEAD. - Tag types.String `tfsdk:"tag" tf:"optional"` + Tag types.String `tfsdk:"tag" tf:""` } func (newState *UpdateRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRepoRequest_SdkV2) { @@ -3907,6 +4067,13 @@ func (newState *UpdateRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *UpdateRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRepoRequest_SdkV2) { } +func (c UpdateRepoRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "repo_id")...) + SparseCheckoutUpdate_SdkV2{}.ToSchema(cs, append(path, "sparse_checkout")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRepoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3983,6 +4150,11 @@ func (newState *UpdateRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *UpdateRepoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRepoResponse_SdkV2) { } +func (c UpdateRepoResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRepoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4012,13 +4184,13 @@ func (o UpdateRepoResponse_SdkV2) Type(ctx context.Context) attr.Type { type WorkspaceObjectAccessControlRequest_SdkV2 struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *WorkspaceObjectAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectAccessControlRequest_SdkV2) { @@ -4027,6 +4199,11 @@ func (newState *WorkspaceObjectAccessControlRequest_SdkV2) SyncEffectiveFieldsDu func (newState *WorkspaceObjectAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectAccessControlRequest_SdkV2) { } +func (c WorkspaceObjectAccessControlRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4066,15 +4243,15 @@ func (o WorkspaceObjectAccessControlRequest_SdkV2) Type(ctx context.Context) att type WorkspaceObjectAccessControlResponse_SdkV2 struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *WorkspaceObjectAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectAccessControlResponse_SdkV2) { @@ -4083,6 +4260,12 @@ func (newState *WorkspaceObjectAccessControlResponse_SdkV2) SyncEffectiveFieldsD func (newState *WorkspaceObjectAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectAccessControlResponse_SdkV2) { } +func (c WorkspaceObjectAccessControlResponse_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceObjectPermission_SdkV2{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4153,11 +4336,11 @@ func (o *WorkspaceObjectAccessControlResponse_SdkV2) SetAllPermissions(ctx conte } type WorkspaceObjectPermission_SdkV2 struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *WorkspaceObjectPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermission_SdkV2) { @@ -4166,6 +4349,11 @@ func (newState *WorkspaceObjectPermission_SdkV2) SyncEffectiveFieldsDuringCreate func (newState *WorkspaceObjectPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermission_SdkV2) { } +func (c WorkspaceObjectPermission_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4232,11 +4420,11 @@ func (o *WorkspaceObjectPermission_SdkV2) SetInheritedFromObject(ctx context.Con } type WorkspaceObjectPermissions_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *WorkspaceObjectPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermissions_SdkV2) { @@ -4245,6 +4433,12 @@ func (newState *WorkspaceObjectPermissions_SdkV2) SyncEffectiveFieldsDuringCreat func (newState *WorkspaceObjectPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissions_SdkV2) { } +func (c WorkspaceObjectPermissions_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceObjectAccessControlResponse_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4311,9 +4505,9 @@ func (o *WorkspaceObjectPermissions_SdkV2) SetAccessControlList(ctx context.Cont } type WorkspaceObjectPermissionsDescription_SdkV2 struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *WorkspaceObjectPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermissionsDescription_SdkV2) { @@ -4322,6 +4516,11 @@ func (newState *WorkspaceObjectPermissionsDescription_SdkV2) SyncEffectiveFields func (newState *WorkspaceObjectPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissionsDescription_SdkV2) { } +func (c WorkspaceObjectPermissionsDescription_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4356,7 +4555,7 @@ func (o WorkspaceObjectPermissionsDescription_SdkV2) Type(ctx context.Context) a } type WorkspaceObjectPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The workspace object for which to get or manage permissions. WorkspaceObjectId types.String `tfsdk:"-"` // The workspace object type for which to get or manage permissions. @@ -4369,6 +4568,14 @@ func (newState *WorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuri func (newState *WorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissionsRequest_SdkV2) { } +func (c WorkspaceObjectPermissionsRequest_SdkV2) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceObjectAccessControlRequest_SdkV2{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "workspace_object_id")...) + cs.SetRequired(append(path, "workspace_object_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to diff --git a/internal/service/workspace_tf/model.go b/internal/service/workspace_tf/model.go index 17d354dc5..d6fa0b65e 100755 --- a/internal/service/workspace_tf/model.go +++ b/internal/service/workspace_tf/model.go @@ -15,6 +15,7 @@ import ( "reflect" pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" @@ -34,6 +35,13 @@ func (newState *AclItem) SyncEffectiveFieldsDuringCreateOrUpdate(plan AclItem) { func (newState *AclItem) SyncEffectiveFieldsDuringRead(existingState AclItem) { } +func (c AclItem) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "permission")...) + cs.SetRequired(append(path, "principal")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AclItem. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -81,6 +89,13 @@ func (newState *AzureKeyVaultSecretScopeMetadata) SyncEffectiveFieldsDuringCreat func (newState *AzureKeyVaultSecretScopeMetadata) SyncEffectiveFieldsDuringRead(existingState AzureKeyVaultSecretScopeMetadata) { } +func (c AzureKeyVaultSecretScopeMetadata) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "dns_name")...) + cs.SetRequired(append(path, "resource_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureKeyVaultSecretScopeMetadata. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -127,13 +142,13 @@ type CreateCredentialsRequest struct { // BitBucket or BitBucket Server, username must be used. For all other // providers please see your provider's Personal Access Token authentication // documentation to see what is supported. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` // The personal access token used to authenticate to the corresponding Git // provider. For certain providers, support may exist for other types of // scoped access tokens. [Learn more]. // // [Learn more]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html - PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:"optional"` + PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:""` } func (newState *CreateCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialsRequest) { @@ -142,6 +157,12 @@ func (newState *CreateCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *CreateCredentialsRequest) SyncEffectiveFieldsDuringRead(existingState CreateCredentialsRequest) { } +func (c CreateCredentialsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "git_provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -184,7 +205,7 @@ type CreateCredentialsResponse struct { GitProvider types.String `tfsdk:"git_provider" tf:""` // The username or email provided with your Git provider account and // associated with the credential. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` } func (newState *CreateCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialsResponse) { @@ -193,6 +214,13 @@ func (newState *CreateCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *CreateCredentialsResponse) SyncEffectiveFieldsDuringRead(existingState CreateCredentialsResponse) { } +func (c CreateCredentialsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_id")...) + cs.SetRequired(append(path, "git_provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -232,7 +260,7 @@ type CreateRepoRequest struct { // Desired path for the repo in the workspace. Almost any path in the // workspace can be chosen. If repo is created in `/Repos`, path must be in // the format `/Repos/{folder}/{repo-name}`. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Git provider. This field is case-insensitive. The available Git providers // are `gitHub`, `bitbucketCloud`, `gitLab`, `azureDevOpsServices`, // `gitHubEnterprise`, `bitbucketServer`, `gitLabEnterpriseEdition` and @@ -240,7 +268,7 @@ type CreateRepoRequest struct { Provider types.String `tfsdk:"provider" tf:""` // If specified, the repo will be created with sparse checkout enabled. You // cannot enable/disable sparse checkout after the repo is created. - SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"object"` // URL of the Git repository to be linked. Url types.String `tfsdk:"url" tf:""` } @@ -251,6 +279,14 @@ func (newState *CreateRepoRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateRepoRequest) SyncEffectiveFieldsDuringRead(existingState CreateRepoRequest) { } +func (c CreateRepoRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "provider")...) + SparseCheckout{}.ToSchema(cs, append(path, "sparse_checkout")...) + cs.SetRequired(append(path, "url")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRepoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -320,20 +356,20 @@ func (o *CreateRepoRequest) SetSparseCheckout(ctx context.Context, v SparseCheck type CreateRepoResponse struct { // Branch that the Git folder (repo) is checked out to. - Branch types.String `tfsdk:"branch" tf:"optional"` + Branch types.String `tfsdk:"branch" tf:""` // SHA-1 hash representing the commit ID of the current HEAD of the Git // folder (repo). - HeadCommitId types.String `tfsdk:"head_commit_id" tf:"optional"` + HeadCommitId types.String `tfsdk:"head_commit_id" tf:""` // ID of the Git folder (repo) object in the workspace. - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` // Path of the Git folder (repo) in the workspace. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Git provider of the linked Git repository. - Provider types.String `tfsdk:"provider" tf:"optional"` + Provider types.String `tfsdk:"provider" tf:""` // Sparse checkout settings for the Git folder (repo). - SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"object"` // URL of the linked Git repository. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *CreateRepoResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRepoResponse) { @@ -342,6 +378,12 @@ func (newState *CreateRepoResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *CreateRepoResponse) SyncEffectiveFieldsDuringRead(existingState CreateRepoResponse) { } +func (c CreateRepoResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparseCheckout{}.ToSchema(cs, append(path, "sparse_checkout")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRepoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -417,15 +459,15 @@ func (o *CreateRepoResponse) SetSparseCheckout(ctx context.Context, v SparseChec type CreateScope struct { // The metadata for the secret scope if the type is `AZURE_KEYVAULT` - BackendAzureKeyvault types.Object `tfsdk:"backend_azure_keyvault" tf:"optional,object"` + BackendAzureKeyvault types.Object `tfsdk:"backend_azure_keyvault" tf:"object"` // The principal that is initially granted `MANAGE` permission to the // created scope. - InitialManagePrincipal types.String `tfsdk:"initial_manage_principal" tf:"optional"` + InitialManagePrincipal types.String `tfsdk:"initial_manage_principal" tf:""` // Scope name requested by the user. Scope names are unique. Scope types.String `tfsdk:"scope" tf:""` // The backend type the scope will be created with. If not specified, will // default to `DATABRICKS` - ScopeBackendType types.String `tfsdk:"scope_backend_type" tf:"optional"` + ScopeBackendType types.String `tfsdk:"scope_backend_type" tf:""` } func (newState *CreateScope) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScope) { @@ -434,6 +476,13 @@ func (newState *CreateScope) SyncEffectiveFieldsDuringCreateOrUpdate(plan Create func (newState *CreateScope) SyncEffectiveFieldsDuringRead(existingState CreateScope) { } +func (c CreateScope) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AzureKeyVaultSecretScopeMetadata{}.ToSchema(cs, append(path, "backend_azure_keyvault")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateScope. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -504,12 +553,6 @@ func (o *CreateScope) SetBackendAzureKeyvault(ctx context.Context, v AzureKeyVau type CreateScopeResponse struct { } -func (newState *CreateScopeResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScopeResponse) { -} - -func (newState *CreateScopeResponse) SyncEffectiveFieldsDuringRead(existingState CreateScopeResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateScopeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -541,10 +584,10 @@ type CredentialInfo struct { // ID of the credential object in the workspace. CredentialId types.Int64 `tfsdk:"credential_id" tf:""` // The Git provider associated with the credential. - GitProvider types.String `tfsdk:"git_provider" tf:"optional"` + GitProvider types.String `tfsdk:"git_provider" tf:""` // The username or email provided with your Git provider account and // associated with the credential. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` } func (newState *CredentialInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialInfo) { @@ -553,6 +596,12 @@ func (newState *CredentialInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan Cre func (newState *CredentialInfo) SyncEffectiveFieldsDuringRead(existingState CredentialInfo) { } +func (c CredentialInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -595,7 +644,7 @@ type Delete struct { // `false` by default. Please note this deleting directory is not atomic. If // it fails in the middle, some of objects under this directory may be // deleted and cannot be undone. - Recursive types.Bool `tfsdk:"recursive" tf:"optional"` + Recursive types.Bool `tfsdk:"recursive" tf:""` } func (newState *Delete) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete) { @@ -604,6 +653,12 @@ func (newState *Delete) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete) { func (newState *Delete) SyncEffectiveFieldsDuringRead(existingState Delete) { } +func (c Delete) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Delete. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -650,6 +705,13 @@ func (newState *DeleteAcl) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAc func (newState *DeleteAcl) SyncEffectiveFieldsDuringRead(existingState DeleteAcl) { } +func (c DeleteAcl) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "principal")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAcl. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -686,12 +748,6 @@ func (o DeleteAcl) Type(ctx context.Context) attr.Type { type DeleteAclResponse struct { } -func (newState *DeleteAclResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAclResponse) { -} - -func (newState *DeleteAclResponse) SyncEffectiveFieldsDuringRead(existingState DeleteAclResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAclResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -725,12 +781,6 @@ type DeleteCredentialsRequest struct { CredentialId types.Int64 `tfsdk:"-"` } -func (newState *DeleteCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialsRequest) { -} - -func (newState *DeleteCredentialsRequest) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -771,6 +821,11 @@ func (newState *DeleteCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *DeleteCredentialsResponse) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialsResponse) { } +func (c DeleteCredentialsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -804,12 +859,6 @@ type DeleteRepoRequest struct { RepoId types.Int64 `tfsdk:"-"` } -func (newState *DeleteRepoRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRepoRequest) { -} - -func (newState *DeleteRepoRequest) SyncEffectiveFieldsDuringRead(existingState DeleteRepoRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRepoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -850,6 +899,11 @@ func (newState *DeleteRepoResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *DeleteRepoResponse) SyncEffectiveFieldsDuringRead(existingState DeleteRepoResponse) { } +func (c DeleteRepoResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRepoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -886,6 +940,11 @@ func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Del func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { } +func (c DeleteResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -924,6 +983,12 @@ func (newState *DeleteScope) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete func (newState *DeleteScope) SyncEffectiveFieldsDuringRead(existingState DeleteScope) { } +func (c DeleteScope) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScope. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -958,12 +1023,6 @@ func (o DeleteScope) Type(ctx context.Context) attr.Type { type DeleteScopeResponse struct { } -func (newState *DeleteScopeResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScopeResponse) { -} - -func (newState *DeleteScopeResponse) SyncEffectiveFieldsDuringRead(existingState DeleteScopeResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScopeResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1004,6 +1063,13 @@ func (newState *DeleteSecret) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delet func (newState *DeleteSecret) SyncEffectiveFieldsDuringRead(existingState DeleteSecret) { } +func (c DeleteSecret) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1046,6 +1112,11 @@ func (newState *DeleteSecretResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *DeleteSecretResponse) SyncEffectiveFieldsDuringRead(existingState DeleteSecretResponse) { } +func (c DeleteSecretResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSecretResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1095,12 +1166,6 @@ type ExportRequest struct { Path types.String `tfsdk:"-"` } -func (newState *ExportRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportRequest) { -} - -func (newState *ExportRequest) SyncEffectiveFieldsDuringRead(existingState ExportRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1137,9 +1202,9 @@ func (o ExportRequest) Type(ctx context.Context) attr.Type { type ExportResponse struct { // The base64-encoded content. If the limit (10MB) is exceeded, exception // with error code **MAX_NOTEBOOK_SIZE_EXCEEDED** is thrown. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // The file type of the exported file. - FileType types.String `tfsdk:"file_type" tf:"optional"` + FileType types.String `tfsdk:"file_type" tf:""` } func (newState *ExportResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportResponse) { @@ -1148,6 +1213,11 @@ func (newState *ExportResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exp func (newState *ExportResponse) SyncEffectiveFieldsDuringRead(existingState ExportResponse) { } +func (c ExportResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1189,12 +1259,6 @@ type GetAclRequest struct { Scope types.String `tfsdk:"-"` } -func (newState *GetAclRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAclRequest) { -} - -func (newState *GetAclRequest) SyncEffectiveFieldsDuringRead(existingState GetAclRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAclRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1234,12 +1298,6 @@ type GetCredentialsRequest struct { CredentialId types.Int64 `tfsdk:"-"` } -func (newState *GetCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialsRequest) { -} - -func (newState *GetCredentialsRequest) SyncEffectiveFieldsDuringRead(existingState GetCredentialsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1275,10 +1333,10 @@ type GetCredentialsResponse struct { // ID of the credential object in the workspace. CredentialId types.Int64 `tfsdk:"credential_id" tf:""` // The Git provider associated with the credential. - GitProvider types.String `tfsdk:"git_provider" tf:"optional"` + GitProvider types.String `tfsdk:"git_provider" tf:""` // The username or email provided with your Git provider account and // associated with the credential. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` } func (newState *GetCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialsResponse) { @@ -1287,6 +1345,12 @@ func (newState *GetCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *GetCredentialsResponse) SyncEffectiveFieldsDuringRead(existingState GetCredentialsResponse) { } +func (c GetCredentialsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1328,12 +1392,6 @@ type GetRepoPermissionLevelsRequest struct { RepoId types.String `tfsdk:"-"` } -func (newState *GetRepoPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoPermissionLevelsRequest) { -} - -func (newState *GetRepoPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetRepoPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1367,7 +1425,7 @@ func (o GetRepoPermissionLevelsRequest) Type(ctx context.Context) attr.Type { type GetRepoPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetRepoPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoPermissionLevelsResponse) { @@ -1376,6 +1434,12 @@ func (newState *GetRepoPermissionLevelsResponse) SyncEffectiveFieldsDuringCreate func (newState *GetRepoPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetRepoPermissionLevelsResponse) { } +func (c GetRepoPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1443,12 +1507,6 @@ type GetRepoPermissionsRequest struct { RepoId types.String `tfsdk:"-"` } -func (newState *GetRepoPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoPermissionsRequest) { -} - -func (newState *GetRepoPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetRepoPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1486,12 +1544,6 @@ type GetRepoRequest struct { RepoId types.Int64 `tfsdk:"-"` } -func (newState *GetRepoRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoRequest) { -} - -func (newState *GetRepoRequest) SyncEffectiveFieldsDuringRead(existingState GetRepoRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1525,19 +1577,19 @@ func (o GetRepoRequest) Type(ctx context.Context) attr.Type { type GetRepoResponse struct { // Branch that the local version of the repo is checked out to. - Branch types.String `tfsdk:"branch" tf:"optional"` + Branch types.String `tfsdk:"branch" tf:""` // SHA-1 hash representing the commit ID of the current HEAD of the repo. - HeadCommitId types.String `tfsdk:"head_commit_id" tf:"optional"` + HeadCommitId types.String `tfsdk:"head_commit_id" tf:""` // ID of the Git folder (repo) object in the workspace. - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` // Path of the Git folder (repo) in the workspace. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Git provider of the linked Git repository. - Provider types.String `tfsdk:"provider" tf:"optional"` + Provider types.String `tfsdk:"provider" tf:""` // Sparse checkout settings for the Git folder (repo). - SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"object"` // URL of the linked Git repository. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *GetRepoResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoResponse) { @@ -1546,6 +1598,12 @@ func (newState *GetRepoResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ge func (newState *GetRepoResponse) SyncEffectiveFieldsDuringRead(existingState GetRepoResponse) { } +func (c GetRepoResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparseCheckout{}.ToSchema(cs, append(path, "sparse_checkout")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1627,12 +1685,6 @@ type GetSecretRequest struct { Scope types.String `tfsdk:"-"` } -func (newState *GetSecretRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSecretRequest) { -} - -func (newState *GetSecretRequest) SyncEffectiveFieldsDuringRead(existingState GetSecretRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSecretRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1668,9 +1720,9 @@ func (o GetSecretRequest) Type(ctx context.Context) attr.Type { type GetSecretResponse struct { // A unique name to identify the secret. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The value of the secret in its byte representation. - Value types.String `tfsdk:"value" tf:"optional"` + Value types.String `tfsdk:"value" tf:""` } func (newState *GetSecretResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSecretResponse) { @@ -1679,6 +1731,11 @@ func (newState *GetSecretResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *GetSecretResponse) SyncEffectiveFieldsDuringRead(existingState GetSecretResponse) { } +func (c GetSecretResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSecretResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1718,12 +1775,6 @@ type GetStatusRequest struct { Path types.String `tfsdk:"-"` } -func (newState *GetStatusRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatusRequest) { -} - -func (newState *GetStatusRequest) SyncEffectiveFieldsDuringRead(existingState GetStatusRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatusRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1763,12 +1814,6 @@ type GetWorkspaceObjectPermissionLevelsRequest struct { WorkspaceObjectType types.String `tfsdk:"-"` } -func (newState *GetWorkspaceObjectPermissionLevelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceObjectPermissionLevelsRequest) { -} - -func (newState *GetWorkspaceObjectPermissionLevelsRequest) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceObjectPermissionLevelsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceObjectPermissionLevelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1804,7 +1849,7 @@ func (o GetWorkspaceObjectPermissionLevelsRequest) Type(ctx context.Context) att type GetWorkspaceObjectPermissionLevelsResponse struct { // Specific permission levels - PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` + PermissionLevels types.List `tfsdk:"permission_levels" tf:""` } func (newState *GetWorkspaceObjectPermissionLevelsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceObjectPermissionLevelsResponse) { @@ -1813,6 +1858,12 @@ func (newState *GetWorkspaceObjectPermissionLevelsResponse) SyncEffectiveFieldsD func (newState *GetWorkspaceObjectPermissionLevelsResponse) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceObjectPermissionLevelsResponse) { } +func (c GetWorkspaceObjectPermissionLevelsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceObjectPermissionsDescription{}.ToSchema(cs, append(path, "permission_levels")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceObjectPermissionLevelsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1882,12 +1933,6 @@ type GetWorkspaceObjectPermissionsRequest struct { WorkspaceObjectType types.String `tfsdk:"-"` } -func (newState *GetWorkspaceObjectPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceObjectPermissionsRequest) { -} - -func (newState *GetWorkspaceObjectPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceObjectPermissionsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceObjectPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1927,7 +1972,7 @@ type Import struct { // If the limit (10MB) is exceeded, exception with error code // **MAX_NOTEBOOK_SIZE_EXCEEDED** is thrown. This parameter might be absent, // and instead a posted file is used. - Content types.String `tfsdk:"content" tf:"optional"` + Content types.String `tfsdk:"content" tf:""` // This specifies the format of the file to be imported. // // The value is case sensitive. @@ -1941,14 +1986,14 @@ type Import struct { // notebook is imported in Databricks archive format. Required for // directories. - `R_MARKDOWN`: The notebook is imported from R Markdown // format. - Format types.String `tfsdk:"format" tf:"optional"` + Format types.String `tfsdk:"format" tf:""` // The language of the object. This value is set only if the object type is // `NOTEBOOK`. - Language types.String `tfsdk:"language" tf:"optional"` + Language types.String `tfsdk:"language" tf:""` // The flag that specifies whether to overwrite existing object. It is // `false` by default. For `DBC` format, `overwrite` is not supported since // it may contain a directory. - Overwrite types.Bool `tfsdk:"overwrite" tf:"optional"` + Overwrite types.Bool `tfsdk:"overwrite" tf:""` // The absolute path of the object or directory. Importing a directory is // only supported for the `DBC` and `SOURCE` formats. Path types.String `tfsdk:"path" tf:""` @@ -1960,6 +2005,12 @@ func (newState *Import) SyncEffectiveFieldsDuringCreateOrUpdate(plan Import) { func (newState *Import) SyncEffectiveFieldsDuringRead(existingState Import) { } +func (c Import) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Import. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2008,6 +2059,11 @@ func (newState *ImportResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Imp func (newState *ImportResponse) SyncEffectiveFieldsDuringRead(existingState ImportResponse) { } +func (c ImportResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ImportResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2041,12 +2097,6 @@ type ListAclsRequest struct { Scope types.String `tfsdk:"-"` } -func (newState *ListAclsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAclsRequest) { -} - -func (newState *ListAclsRequest) SyncEffectiveFieldsDuringRead(existingState ListAclsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAclsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2080,7 +2130,7 @@ func (o ListAclsRequest) Type(ctx context.Context) attr.Type { type ListAclsResponse struct { // The associated ACLs rule applied to principals in the given scope. - Items types.List `tfsdk:"items" tf:"optional"` + Items types.List `tfsdk:"items" tf:""` } func (newState *ListAclsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAclsResponse) { @@ -2089,6 +2139,12 @@ func (newState *ListAclsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan L func (newState *ListAclsResponse) SyncEffectiveFieldsDuringRead(existingState ListAclsResponse) { } +func (c ListAclsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AclItem{}.ToSchema(cs, append(path, "items")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAclsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2152,7 +2208,7 @@ func (o *ListAclsResponse) SetItems(ctx context.Context, v []AclItem) { type ListCredentialsResponse struct { // List of credentials. - Credentials types.List `tfsdk:"credentials" tf:"optional"` + Credentials types.List `tfsdk:"credentials" tf:""` } func (newState *ListCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCredentialsResponse) { @@ -2161,6 +2217,12 @@ func (newState *ListCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpdate func (newState *ListCredentialsResponse) SyncEffectiveFieldsDuringRead(existingState ListCredentialsResponse) { } +func (c ListCredentialsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + CredentialInfo{}.ToSchema(cs, append(path, "credentials")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2234,12 +2296,6 @@ type ListReposRequest struct { PathPrefix types.String `tfsdk:"-"` } -func (newState *ListReposRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListReposRequest) { -} - -func (newState *ListReposRequest) SyncEffectiveFieldsDuringRead(existingState ListReposRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListReposRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2276,9 +2332,9 @@ func (o ListReposRequest) Type(ctx context.Context) attr.Type { type ListReposResponse struct { // Token that can be specified as a query parameter to the `GET /repos` // endpoint to retrieve the next page of results. - NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + NextPageToken types.String `tfsdk:"next_page_token" tf:""` // List of Git folders (repos). - Repos types.List `tfsdk:"repos" tf:"optional"` + Repos types.List `tfsdk:"repos" tf:""` } func (newState *ListReposResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListReposResponse) { @@ -2287,6 +2343,12 @@ func (newState *ListReposResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListReposResponse) SyncEffectiveFieldsDuringRead(existingState ListReposResponse) { } +func (c ListReposResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoInfo{}.ToSchema(cs, append(path, "repos")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListReposResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2352,7 +2414,7 @@ func (o *ListReposResponse) SetRepos(ctx context.Context, v []RepoInfo) { type ListResponse struct { // List of objects. - Objects types.List `tfsdk:"objects" tf:"optional"` + Objects types.List `tfsdk:"objects" tf:""` } func (newState *ListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListResponse) { @@ -2361,6 +2423,12 @@ func (newState *ListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListR func (newState *ListResponse) SyncEffectiveFieldsDuringRead(existingState ListResponse) { } +func (c ListResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + ObjectInfo{}.ToSchema(cs, append(path, "objects")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2424,7 +2492,7 @@ func (o *ListResponse) SetObjects(ctx context.Context, v []ObjectInfo) { type ListScopesResponse struct { // The available secret scopes. - Scopes types.List `tfsdk:"scopes" tf:"optional"` + Scopes types.List `tfsdk:"scopes" tf:""` } func (newState *ListScopesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListScopesResponse) { @@ -2433,6 +2501,12 @@ func (newState *ListScopesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *ListScopesResponse) SyncEffectiveFieldsDuringRead(existingState ListScopesResponse) { } +func (c ListScopesResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SecretScope{}.ToSchema(cs, append(path, "scopes")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListScopesResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2500,12 +2574,6 @@ type ListSecretsRequest struct { Scope types.String `tfsdk:"-"` } -func (newState *ListSecretsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSecretsRequest) { -} - -func (newState *ListSecretsRequest) SyncEffectiveFieldsDuringRead(existingState ListSecretsRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSecretsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2539,7 +2607,7 @@ func (o ListSecretsRequest) Type(ctx context.Context) attr.Type { type ListSecretsResponse struct { // Metadata information of all secrets contained within the given scope. - Secrets types.List `tfsdk:"secrets" tf:"optional"` + Secrets types.List `tfsdk:"secrets" tf:""` } func (newState *ListSecretsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSecretsResponse) { @@ -2548,6 +2616,12 @@ func (newState *ListSecretsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(pla func (newState *ListSecretsResponse) SyncEffectiveFieldsDuringRead(existingState ListSecretsResponse) { } +func (c ListSecretsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SecretMetadata{}.ToSchema(cs, append(path, "secrets")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSecretsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2617,12 +2691,6 @@ type ListWorkspaceRequest struct { Path types.String `tfsdk:"-"` } -func (newState *ListWorkspaceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWorkspaceRequest) { -} - -func (newState *ListWorkspaceRequest) SyncEffectiveFieldsDuringRead(existingState ListWorkspaceRequest) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2669,6 +2737,12 @@ func (newState *Mkdirs) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mkdirs) { func (newState *Mkdirs) SyncEffectiveFieldsDuringRead(existingState Mkdirs) { } +func (c Mkdirs) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "path")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in Mkdirs. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2709,6 +2783,11 @@ func (newState *MkdirsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mkd func (newState *MkdirsResponse) SyncEffectiveFieldsDuringRead(existingState MkdirsResponse) { } +func (c MkdirsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in MkdirsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2738,27 +2817,27 @@ func (o MkdirsResponse) Type(ctx context.Context) attr.Type { type ObjectInfo struct { // Only applicable to files. The creation UTC timestamp. - CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + CreatedAt types.Int64 `tfsdk:"created_at" tf:""` // The language of the object. This value is set only if the object type is // `NOTEBOOK`. - Language types.String `tfsdk:"language" tf:"optional"` + Language types.String `tfsdk:"language" tf:""` // Only applicable to files, the last modified UTC timestamp. - ModifiedAt types.Int64 `tfsdk:"modified_at" tf:"optional"` + ModifiedAt types.Int64 `tfsdk:"modified_at" tf:""` // Unique identifier for the object. - ObjectId types.Int64 `tfsdk:"object_id" tf:"optional"` + ObjectId types.Int64 `tfsdk:"object_id" tf:""` // The type of the object in workspace. // // - `NOTEBOOK`: document that contains runnable code, visualizations, and // explanatory text. - `DIRECTORY`: directory - `LIBRARY`: library - `FILE`: // file - `REPO`: repository - `DASHBOARD`: Lakeview dashboard - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` // The absolute path of the object. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // A unique identifier for the object that is consistent across all // Databricks APIs. - ResourceId types.String `tfsdk:"resource_id" tf:"optional"` + ResourceId types.String `tfsdk:"resource_id" tf:""` // Only applicable to files. The file size in bytes can be returned. - Size types.Int64 `tfsdk:"size" tf:"optional"` + Size types.Int64 `tfsdk:"size" tf:""` } func (newState *ObjectInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ObjectInfo) { @@ -2767,6 +2846,11 @@ func (newState *ObjectInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ObjectI func (newState *ObjectInfo) SyncEffectiveFieldsDuringRead(existingState ObjectInfo) { } +func (c ObjectInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in ObjectInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2827,6 +2911,14 @@ func (newState *PutAcl) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAcl) { func (newState *PutAcl) SyncEffectiveFieldsDuringRead(existingState PutAcl) { } +func (c PutAcl) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "permission")...) + cs.SetRequired(append(path, "principal")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAcl. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2865,12 +2957,6 @@ func (o PutAcl) Type(ctx context.Context) attr.Type { type PutAclResponse struct { } -func (newState *PutAclResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAclResponse) { -} - -func (newState *PutAclResponse) SyncEffectiveFieldsDuringRead(existingState PutAclResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAclResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2900,13 +2986,13 @@ func (o PutAclResponse) Type(ctx context.Context) attr.Type { type PutSecret struct { // If specified, value will be stored as bytes. - BytesValue types.String `tfsdk:"bytes_value" tf:"optional"` + BytesValue types.String `tfsdk:"bytes_value" tf:""` // A unique name to identify the secret. Key types.String `tfsdk:"key" tf:""` // The name of the scope to which the secret will be associated with. Scope types.String `tfsdk:"scope" tf:""` // If specified, note that the value will be stored in UTF-8 (MB4) form. - StringValue types.String `tfsdk:"string_value" tf:"optional"` + StringValue types.String `tfsdk:"string_value" tf:""` } func (newState *PutSecret) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutSecret) { @@ -2915,6 +3001,13 @@ func (newState *PutSecret) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutSecre func (newState *PutSecret) SyncEffectiveFieldsDuringRead(existingState PutSecret) { } +func (c PutSecret) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "key")...) + cs.SetRequired(append(path, "scope")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutSecret. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2955,12 +3048,6 @@ func (o PutSecret) Type(ctx context.Context) attr.Type { type PutSecretResponse struct { } -func (newState *PutSecretResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutSecretResponse) { -} - -func (newState *PutSecretResponse) SyncEffectiveFieldsDuringRead(existingState PutSecretResponse) { -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutSecretResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2990,13 +3077,13 @@ func (o PutSecretResponse) Type(ctx context.Context) attr.Type { type RepoAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *RepoAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoAccessControlRequest) { @@ -3005,6 +3092,11 @@ func (newState *RepoAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *RepoAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState RepoAccessControlRequest) { } +func (c RepoAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3044,15 +3136,15 @@ func (o RepoAccessControlRequest) Type(ctx context.Context) attr.Type { type RepoAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *RepoAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoAccessControlResponse) { @@ -3061,6 +3153,12 @@ func (newState *RepoAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *RepoAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState RepoAccessControlResponse) { } +func (c RepoAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3133,19 +3231,19 @@ func (o *RepoAccessControlResponse) SetAllPermissions(ctx context.Context, v []R // Git folder (repo) information. type RepoInfo struct { // Name of the current git branch of the git folder (repo). - Branch types.String `tfsdk:"branch" tf:"optional"` + Branch types.String `tfsdk:"branch" tf:""` // Current git commit id of the git folder (repo). - HeadCommitId types.String `tfsdk:"head_commit_id" tf:"optional"` + HeadCommitId types.String `tfsdk:"head_commit_id" tf:""` // Id of the git folder (repo) in the Workspace. - Id types.Int64 `tfsdk:"id" tf:"optional"` + Id types.Int64 `tfsdk:"id" tf:""` // Root path of the git folder (repo) in the Workspace. - Path types.String `tfsdk:"path" tf:"optional"` + Path types.String `tfsdk:"path" tf:""` // Git provider of the remote git repository, e.g. `gitHub`. - Provider types.String `tfsdk:"provider" tf:"optional"` + Provider types.String `tfsdk:"provider" tf:""` // Sparse checkout config for the git folder (repo). - SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"object"` // URL of the remote git repository. - Url types.String `tfsdk:"url" tf:"optional"` + Url types.String `tfsdk:"url" tf:""` } func (newState *RepoInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoInfo) { @@ -3154,6 +3252,12 @@ func (newState *RepoInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoInfo) func (newState *RepoInfo) SyncEffectiveFieldsDuringRead(existingState RepoInfo) { } +func (c RepoInfo) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + SparseCheckout{}.ToSchema(cs, append(path, "sparse_checkout")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoInfo. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3228,11 +3332,11 @@ func (o *RepoInfo) SetSparseCheckout(ctx context.Context, v SparseCheckout) { } type RepoPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *RepoPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermission) { @@ -3241,6 +3345,11 @@ func (newState *RepoPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan Rep func (newState *RepoPermission) SyncEffectiveFieldsDuringRead(existingState RepoPermission) { } +func (c RepoPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3307,11 +3416,11 @@ func (o *RepoPermission) SetInheritedFromObject(ctx context.Context, v []types.S } type RepoPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *RepoPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermissions) { @@ -3320,6 +3429,12 @@ func (newState *RepoPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan Re func (newState *RepoPermissions) SyncEffectiveFieldsDuringRead(existingState RepoPermissions) { } +func (c RepoPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3386,9 +3501,9 @@ func (o *RepoPermissions) SetAccessControlList(ctx context.Context, v []RepoAcce } type RepoPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *RepoPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermissionsDescription) { @@ -3397,6 +3512,11 @@ func (newState *RepoPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpd func (newState *RepoPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState RepoPermissionsDescription) { } +func (c RepoPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3431,7 +3551,7 @@ func (o RepoPermissionsDescription) Type(ctx context.Context) attr.Type { } type RepoPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The repo for which to get or manage permissions. RepoId types.String `tfsdk:"-"` } @@ -3442,6 +3562,13 @@ func (newState *RepoPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate( func (newState *RepoPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState RepoPermissionsRequest) { } +func (c RepoPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + RepoAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "repo_id")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3507,9 +3634,9 @@ func (o *RepoPermissionsRequest) SetAccessControlList(ctx context.Context, v []R type SecretMetadata struct { // A unique name to identify the secret. - Key types.String `tfsdk:"key" tf:"optional"` + Key types.String `tfsdk:"key" tf:""` // The last updated timestamp (in milliseconds) for the secret. - LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:""` } func (newState *SecretMetadata) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretMetadata) { @@ -3518,6 +3645,11 @@ func (newState *SecretMetadata) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sec func (newState *SecretMetadata) SyncEffectiveFieldsDuringRead(existingState SecretMetadata) { } +func (c SecretMetadata) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SecretMetadata. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3553,11 +3685,11 @@ func (o SecretMetadata) Type(ctx context.Context) attr.Type { type SecretScope struct { // The type of secret scope backend. - BackendType types.String `tfsdk:"backend_type" tf:"optional"` + BackendType types.String `tfsdk:"backend_type" tf:""` // The metadata for the secret scope if the type is `AZURE_KEYVAULT` - KeyvaultMetadata types.Object `tfsdk:"keyvault_metadata" tf:"optional,object"` + KeyvaultMetadata types.Object `tfsdk:"keyvault_metadata" tf:"object"` // A unique name to identify the secret scope. - Name types.String `tfsdk:"name" tf:"optional"` + Name types.String `tfsdk:"name" tf:""` } func (newState *SecretScope) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretScope) { @@ -3566,6 +3698,12 @@ func (newState *SecretScope) SyncEffectiveFieldsDuringCreateOrUpdate(plan Secret func (newState *SecretScope) SyncEffectiveFieldsDuringRead(existingState SecretScope) { } +func (c SecretScope) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + AzureKeyVaultSecretScopeMetadata{}.ToSchema(cs, append(path, "keyvault_metadata")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SecretScope. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3637,7 +3775,7 @@ type SparseCheckout struct { // details. // // [cone mode handling]: https://git-scm.com/docs/git-sparse-checkout#_internalscone_mode_handling - Patterns types.List `tfsdk:"patterns" tf:"optional"` + Patterns types.List `tfsdk:"patterns" tf:""` } func (newState *SparseCheckout) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparseCheckout) { @@ -3646,6 +3784,11 @@ func (newState *SparseCheckout) SyncEffectiveFieldsDuringCreateOrUpdate(plan Spa func (newState *SparseCheckout) SyncEffectiveFieldsDuringRead(existingState SparseCheckout) { } +func (c SparseCheckout) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparseCheckout. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3713,7 +3856,7 @@ type SparseCheckoutUpdate struct { // details. // // [cone mode handling]: https://git-scm.com/docs/git-sparse-checkout#_internalscone_mode_handling - Patterns types.List `tfsdk:"patterns" tf:"optional"` + Patterns types.List `tfsdk:"patterns" tf:""` } func (newState *SparseCheckoutUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparseCheckoutUpdate) { @@ -3722,6 +3865,11 @@ func (newState *SparseCheckoutUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(pl func (newState *SparseCheckoutUpdate) SyncEffectiveFieldsDuringRead(existingState SparseCheckoutUpdate) { } +func (c SparseCheckoutUpdate) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in SparseCheckoutUpdate. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3798,13 +3946,13 @@ type UpdateCredentialsRequest struct { // BitBucket or BitBucket Server, username must be used. For all other // providers please see your provider's Personal Access Token authentication // documentation to see what is supported. - GitUsername types.String `tfsdk:"git_username" tf:"optional"` + GitUsername types.String `tfsdk:"git_username" tf:""` // The personal access token used to authenticate to the corresponding Git // provider. For certain providers, support may exist for other types of // scoped access tokens. [Learn more]. // // [Learn more]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html - PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:"optional"` + PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:""` } func (newState *UpdateCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialsRequest) { @@ -3813,6 +3961,13 @@ func (newState *UpdateCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdat func (newState *UpdateCredentialsRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialsRequest) { } +func (c UpdateCredentialsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "credential_id")...) + cs.SetRequired(append(path, "git_provider")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCredentialsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3859,6 +4014,11 @@ func (newState *UpdateCredentialsResponse) SyncEffectiveFieldsDuringCreateOrUpda func (newState *UpdateCredentialsResponse) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialsResponse) { } +func (c UpdateCredentialsResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCredentialsResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3888,17 +4048,17 @@ func (o UpdateCredentialsResponse) Type(ctx context.Context) attr.Type { type UpdateRepoRequest struct { // Branch that the local version of the repo is checked out to. - Branch types.String `tfsdk:"branch" tf:"optional"` + Branch types.String `tfsdk:"branch" tf:""` // ID of the Git folder (repo) object in the workspace. RepoId types.Int64 `tfsdk:"-"` // If specified, update the sparse checkout settings. The update will fail // if sparse checkout is not enabled for the repo. - SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"object"` // Tag that the local version of the repo is checked out to. Updating the // repo to a tag puts the repo in a detached HEAD state. Before committing // new changes, you must update the repo to a branch instead of the detached // HEAD. - Tag types.String `tfsdk:"tag" tf:"optional"` + Tag types.String `tfsdk:"tag" tf:""` } func (newState *UpdateRepoRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRepoRequest) { @@ -3907,6 +4067,13 @@ func (newState *UpdateRepoRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UpdateRepoRequest) SyncEffectiveFieldsDuringRead(existingState UpdateRepoRequest) { } +func (c UpdateRepoRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + cs.SetRequired(append(path, "repo_id")...) + SparseCheckoutUpdate{}.ToSchema(cs, append(path, "sparse_checkout")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRepoRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3983,6 +4150,11 @@ func (newState *UpdateRepoResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan func (newState *UpdateRepoResponse) SyncEffectiveFieldsDuringRead(existingState UpdateRepoResponse) { } +func (c UpdateRepoResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRepoResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4012,13 +4184,13 @@ func (o UpdateRepoResponse) Type(ctx context.Context) attr.Type { type WorkspaceObjectAccessControlRequest struct { // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` // application ID of a service principal - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *WorkspaceObjectAccessControlRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectAccessControlRequest) { @@ -4027,6 +4199,11 @@ func (newState *WorkspaceObjectAccessControlRequest) SyncEffectiveFieldsDuringCr func (newState *WorkspaceObjectAccessControlRequest) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectAccessControlRequest) { } +func (c WorkspaceObjectAccessControlRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectAccessControlRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4066,15 +4243,15 @@ func (o WorkspaceObjectAccessControlRequest) Type(ctx context.Context) attr.Type type WorkspaceObjectAccessControlResponse struct { // All permissions. - AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + AllPermissions types.List `tfsdk:"all_permissions" tf:""` // Display name of the user or service principal. - DisplayName types.String `tfsdk:"display_name" tf:"optional"` + DisplayName types.String `tfsdk:"display_name" tf:""` // name of the group - GroupName types.String `tfsdk:"group_name" tf:"optional"` + GroupName types.String `tfsdk:"group_name" tf:""` // Name of the service principal. - ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:""` // name of the user - UserName types.String `tfsdk:"user_name" tf:"optional"` + UserName types.String `tfsdk:"user_name" tf:""` } func (newState *WorkspaceObjectAccessControlResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectAccessControlResponse) { @@ -4083,6 +4260,12 @@ func (newState *WorkspaceObjectAccessControlResponse) SyncEffectiveFieldsDuringC func (newState *WorkspaceObjectAccessControlResponse) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectAccessControlResponse) { } +func (c WorkspaceObjectAccessControlResponse) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceObjectPermission{}.ToSchema(cs, append(path, "all_permissions")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectAccessControlResponse. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4153,11 +4336,11 @@ func (o *WorkspaceObjectAccessControlResponse) SetAllPermissions(ctx context.Con } type WorkspaceObjectPermission struct { - Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + Inherited types.Bool `tfsdk:"inherited" tf:""` - InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *WorkspaceObjectPermission) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermission) { @@ -4166,6 +4349,11 @@ func (newState *WorkspaceObjectPermission) SyncEffectiveFieldsDuringCreateOrUpda func (newState *WorkspaceObjectPermission) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermission) { } +func (c WorkspaceObjectPermission) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermission. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4232,11 +4420,11 @@ func (o *WorkspaceObjectPermission) SetInheritedFromObject(ctx context.Context, } type WorkspaceObjectPermissions struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` - ObjectId types.String `tfsdk:"object_id" tf:"optional"` + ObjectId types.String `tfsdk:"object_id" tf:""` - ObjectType types.String `tfsdk:"object_type" tf:"optional"` + ObjectType types.String `tfsdk:"object_type" tf:""` } func (newState *WorkspaceObjectPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermissions) { @@ -4245,6 +4433,12 @@ func (newState *WorkspaceObjectPermissions) SyncEffectiveFieldsDuringCreateOrUpd func (newState *WorkspaceObjectPermissions) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissions) { } +func (c WorkspaceObjectPermissions) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceObjectAccessControlResponse{}.ToSchema(cs, append(path, "access_control_list")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4311,9 +4505,9 @@ func (o *WorkspaceObjectPermissions) SetAccessControlList(ctx context.Context, v } type WorkspaceObjectPermissionsDescription struct { - Description types.String `tfsdk:"description" tf:"optional"` + Description types.String `tfsdk:"description" tf:""` // Permission level - PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + PermissionLevel types.String `tfsdk:"permission_level" tf:""` } func (newState *WorkspaceObjectPermissionsDescription) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermissionsDescription) { @@ -4322,6 +4516,11 @@ func (newState *WorkspaceObjectPermissionsDescription) SyncEffectiveFieldsDuring func (newState *WorkspaceObjectPermissionsDescription) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissionsDescription) { } +func (c WorkspaceObjectPermissionsDescription) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermissionsDescription. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4356,7 +4555,7 @@ func (o WorkspaceObjectPermissionsDescription) Type(ctx context.Context) attr.Ty } type WorkspaceObjectPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + AccessControlList types.List `tfsdk:"access_control_list" tf:""` // The workspace object for which to get or manage permissions. WorkspaceObjectId types.String `tfsdk:"-"` // The workspace object type for which to get or manage permissions. @@ -4369,6 +4568,14 @@ func (newState *WorkspaceObjectPermissionsRequest) SyncEffectiveFieldsDuringCrea func (newState *WorkspaceObjectPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissionsRequest) { } +func (c WorkspaceObjectPermissionsRequest) ToSchema(cs tfschema.CustomizableSchema, path ...string) tfschema.CustomizableSchema { + WorkspaceObjectAccessControlRequest{}.ToSchema(cs, append(path, "access_control_list")...) + cs.SetRequired(append(path, "workspace_object_id")...) + cs.SetRequired(append(path, "workspace_object_type")...) + + return cs +} + // GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermissionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to