diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 3fbd741428..79f2d92b60 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -033bcb9242b006001e2cf3956896711681de1a8c \ No newline at end of file +7aade78d7c1b9f56b56f546480acb516ee93d98d \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index b5d3f83b24..177f921949 100755 --- a/.gitattributes +++ b/.gitattributes @@ -13,8 +13,14 @@ docs/data-sources/alert_v2.md linguist-generated=true docs/data-sources/alerts_v2.md linguist-generated=true docs/data-sources/budget_policies.md linguist-generated=true docs/data-sources/budget_policy.md linguist-generated=true +docs/data-sources/clean_room.md linguist-generated=true +docs/data-sources/clean_rooms.md linguist-generated=true docs/data-sources/database_instance.md linguist-generated=true docs/data-sources/database_instances.md linguist-generated=true +docs/data-sources/external_metadata.md linguist-generated=true +docs/data-sources/external_metadatas.md linguist-generated=true +docs/data-sources/feature_tag.md linguist-generated=true +docs/data-sources/feature_tags.md linguist-generated=true docs/data-sources/online_store.md linguist-generated=true docs/data-sources/online_stores.md linguist-generated=true docs/data-sources/quality_monitor_v2.md linguist-generated=true @@ -25,7 +31,10 @@ docs/data-sources/workspace_network_option.md linguist-generated=true docs/resources/account_network_policy.md linguist-generated=true docs/resources/alert_v2.md linguist-generated=true docs/resources/budget_policy.md linguist-generated=true +docs/resources/clean_room.md linguist-generated=true docs/resources/database_instance.md linguist-generated=true +docs/resources/external_metadata.md linguist-generated=true +docs/resources/feature_tag.md linguist-generated=true docs/resources/online_store.md linguist-generated=true docs/resources/quality_monitor_v2.md linguist-generated=true docs/resources/recipient_federation_policy.md linguist-generated=true @@ -50,9 +59,18 @@ internal/providers/pluginfw/products/alert_v2/resource_alert_v2.go linguist-gene internal/providers/pluginfw/products/budget_policy/data_budget_policies.go linguist-generated=true internal/providers/pluginfw/products/budget_policy/data_budget_policy.go linguist-generated=true internal/providers/pluginfw/products/budget_policy/resource_budget_policy.go linguist-generated=true +internal/providers/pluginfw/products/clean_room/data_clean_room.go linguist-generated=true +internal/providers/pluginfw/products/clean_room/data_clean_rooms.go linguist-generated=true +internal/providers/pluginfw/products/clean_room/resource_clean_room.go linguist-generated=true internal/providers/pluginfw/products/database_instance/data_database_instance.go linguist-generated=true internal/providers/pluginfw/products/database_instance/data_database_instances.go linguist-generated=true internal/providers/pluginfw/products/database_instance/resource_database_instance.go linguist-generated=true +internal/providers/pluginfw/products/external_metadata/data_external_metadata.go linguist-generated=true +internal/providers/pluginfw/products/external_metadata/data_external_metadatas.go linguist-generated=true +internal/providers/pluginfw/products/external_metadata/resource_external_metadata.go linguist-generated=true +internal/providers/pluginfw/products/feature_tag/data_feature_tag.go linguist-generated=true +internal/providers/pluginfw/products/feature_tag/data_feature_tags.go linguist-generated=true +internal/providers/pluginfw/products/feature_tag/resource_feature_tag.go linguist-generated=true internal/providers/pluginfw/products/online_store/data_online_store.go linguist-generated=true internal/providers/pluginfw/products/online_store/data_online_stores.go linguist-generated=true internal/providers/pluginfw/products/online_store/resource_online_store.go linguist-generated=true diff --git a/docs/data-sources/alert_v2.md b/docs/data-sources/alert_v2.md index a311a415c5..16416c4918 100755 --- a/docs/data-sources/alert_v2.md +++ b/docs/data-sources/alert_v2.md @@ -37,7 +37,8 @@ The following attributes are exported: * `owner_user_name` (string) - The owner's username. This field is set to "Unavailable" if the user has been deleted * `parent_path` (string) - The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated * `query_text` (string) - Text of the query to be run -* `run_as_user_name` (string) - The run as username. This field is set to "Unavailable" if the user has been deleted +* `run_as_user_name` (string) - The run as username or application ID of service principal. This field is set to "Unavailable" if the user has been deleted. + On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. If not specified it'll default to be request user * `schedule` (CronSchedule) - * `update_time` (string) - The timestamp indicating when the alert was updated * `warehouse_id` (string) - ID of the SQL warehouse attached to the alert diff --git a/docs/data-sources/alerts_v2.md b/docs/data-sources/alerts_v2.md index d166a3a597..ed64d14884 100755 --- a/docs/data-sources/alerts_v2.md +++ b/docs/data-sources/alerts_v2.md @@ -38,7 +38,8 @@ This data source exports a single attribute, `results`. It is a list of resource * `owner_user_name` (string) - The owner's username. This field is set to "Unavailable" if the user has been deleted * `parent_path` (string) - The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated * `query_text` (string) - Text of the query to be run -* `run_as_user_name` (string) - The run as username. This field is set to "Unavailable" if the user has been deleted +* `run_as_user_name` (string) - The run as username or application ID of service principal. This field is set to "Unavailable" if the user has been deleted. + On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. If not specified it'll default to be request user * `schedule` (CronSchedule) - * `update_time` (string) - The timestamp indicating when the alert was updated * `warehouse_id` (string) - ID of the SQL warehouse attached to the alert diff --git a/docs/data-sources/clean_room.md b/docs/data-sources/clean_room.md new file mode 100755 index 0000000000..515d75ce86 --- /dev/null +++ b/docs/data-sources/clean_room.md @@ -0,0 +1,107 @@ +--- +subcategory: "Clean Rooms" +--- +# databricks_clean_room Data Source +# Datasource (Singular) Artifact + +A singular datasource artifact represents a single data source that can be used within a Clean Room for secure data collaboration and analysis. + +## Example Usage +# Example: Datasource (Singular) Artifact + +```hcl +data "databricks_clean_room" "example" { + name = "claire-test-clean-room" +} +``` + +## Arguments +The following arguments are supported: +* `name` (string, required) - The name of the clean room. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements) + +## Attributes +The following attributes are exported: +* `access_restricted` (string) - Whether clean room access is restricted due to [CSP](https://docs.databricks.com/en/security/privacy/security-profile.html). Possible values are: `CSP_MISMATCH`, `NO_RESTRICTION` +* `comment` (string) - +* `created_at` (integer) - When the clean room was created, in epoch milliseconds +* `local_collaborator_alias` (string) - The alias of the collaborator tied to the local clean room +* `name` (string) - The name of the clean room. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements) +* `output_catalog` (CleanRoomOutputCatalog) - Output catalog of the clean room. It is an output only field. Output catalog is manipulated + using the separate CreateCleanRoomOutputCatalog API +* `owner` (string) - This is Databricks username of the owner of the local clean room securable for permission management +* `remote_detailed_info` (CleanRoomRemoteDetail) - 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 +* `status` (string) - Clean room status. Possible values are: `ACTIVE`, `DELETED`, `FAILED`, `PROVISIONING` +* `updated_at` (integer) - When the clean room was last updated, in epoch milliseconds + +### CleanRoomCollaborator +* `collaborator_alias` (string) - Collaborator alias specified by the clean room creator. It is unique across all collaborators of this clean room, and used to derive + multiple values internally such as catalog alias and clean room name for single metastore clean rooms. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements) +* `display_name` (string) - 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 +* `global_metastore_id` (string) - The global Unity Catalog metastore id of the collaborator. The identifier is of format cloud:region:metastore-uuid +* `invite_recipient_email` (string) - 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 +* `invite_recipient_workspace_id` (integer) - 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 +* `organization_name` (string) - [Organization name](:method:metastores/list#metastores-delta_sharing_organization_name) + configured in the metastore + +### CleanRoomOutputCatalog +* `catalog_name` (string) - The name of the output catalog in UC. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements). + The field will always exist if status is CREATED +* `status` (string) - . Possible values are: `CREATED`, `NOT_CREATED`, `NOT_ELIGIBLE` + +### CleanRoomRemoteDetail +* `central_clean_room_id` (string) - Central clean room ID +* `cloud_vendor` (string) - Cloud vendor (aws,azure,gcp) of the central clean room +* `collaborators` (list of CleanRoomCollaborator) - Collaborators in the central clean room. There should one and only one collaborator + in the list that satisfies the owner condition: + + 1. It has the creator's global_metastore_id (determined by caller of CreateCleanRoom). + + 2. Its invite_recipient_email is empty +* `compliance_security_profile` (ComplianceSecurityProfile) - +* `creator` (CleanRoomCollaborator) - Collaborator who creates the clean room +* `egress_network_policy` (EgressNetworkPolicy) - Egress network policy to apply to the central clean room workspace +* `region` (string) - Region of the central clean room + +### ComplianceSecurityProfile +* `compliance_standards` (list of ComplianceStandard) - The list of compliance standards that the compliance security profile is configured to enforce +* `is_enabled` (boolean) - Whether the compliance security profile is enabled + +### EgressNetworkPolicy +* `internet_access` (EgressNetworkPolicyInternetAccessPolicy) - The access policy enforced for egress traffic to the internet + +### EgressNetworkPolicyInternetAccessPolicy +* `allowed_internet_destinations` (list of EgressNetworkPolicyInternetAccessPolicyInternetDestination) - +* `allowed_storage_destinations` (list of EgressNetworkPolicyInternetAccessPolicyStorageDestination) - +* `log_only_mode` (EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) - Optional. If not specified, assume the policy is enforced for all workloads +* `restriction_mode` (string) - . Possible values are: `FULL_ACCESS`, `PRIVATE_ACCESS_ONLY`, `RESTRICTED_ACCESS` + +### EgressNetworkPolicyInternetAccessPolicyInternetDestination +* `destination` (string) - +* `protocol` (string) - . Possible values are: `TCP` +* `type` (string) - . Possible values are: `FQDN` + +### EgressNetworkPolicyInternetAccessPolicyLogOnlyMode +* `log_only_mode_type` (string) - . Possible values are: `ALL_SERVICES`, `SELECTED_SERVICES` +* `workloads` (list of ) - + +### EgressNetworkPolicyInternetAccessPolicyStorageDestination +* `allowed_paths` (list of string) - +* `azure_container` (string) - +* `azure_dns_zone` (string) - +* `azure_storage_account` (string) - +* `azure_storage_service` (string) - +* `bucket_name` (string) - +* `region` (string) - +* `type` (string) - . Possible values are: `AWS_S3`, `AZURE_STORAGE`, `CLOUDFLARE_R2`, `GOOGLE_CLOUD_STORAGE` \ No newline at end of file diff --git a/docs/data-sources/clean_rooms.md b/docs/data-sources/clean_rooms.md new file mode 100755 index 0000000000..a628cd50e2 --- /dev/null +++ b/docs/data-sources/clean_rooms.md @@ -0,0 +1,107 @@ +--- +subcategory: "Clean Rooms" +--- +# databricks_clean_rooms Data Source +# Datasource (Plural) Artifact + +A plural datasource artifact represents a collection of data sources that can be used within a Clean Room for secure data collaboration and analysis. + + +## Example Usage +# Example: Clean Room Datasource (Plural) + +```hcl +data "databricks_clean_rooms" "all" {} +``` + +## Arguments +The following arguments are supported: +* `page_size` (integer, optional) - Maximum number of clean rooms to return (i.e., the page length). Defaults to 100 + + + +## Attributes +This data source exports a single attribute, `clean_rooms`. It is a list of resources, each with the following attributes: +* `access_restricted` (string) - Whether clean room access is restricted due to [CSP](https://docs.databricks.com/en/security/privacy/security-profile.html). Possible values are: `CSP_MISMATCH`, `NO_RESTRICTION` +* `comment` (string) - +* `created_at` (integer) - When the clean room was created, in epoch milliseconds +* `local_collaborator_alias` (string) - The alias of the collaborator tied to the local clean room +* `name` (string) - The name of the clean room. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements) +* `output_catalog` (CleanRoomOutputCatalog) - Output catalog of the clean room. It is an output only field. Output catalog is manipulated + using the separate CreateCleanRoomOutputCatalog API +* `owner` (string) - This is Databricks username of the owner of the local clean room securable for permission management +* `remote_detailed_info` (CleanRoomRemoteDetail) - 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 +* `status` (string) - Clean room status. Possible values are: `ACTIVE`, `DELETED`, `FAILED`, `PROVISIONING` +* `updated_at` (integer) - When the clean room was last updated, in epoch milliseconds + +### CleanRoomCollaborator +* `collaborator_alias` (string) - Collaborator alias specified by the clean room creator. It is unique across all collaborators of this clean room, and used to derive + multiple values internally such as catalog alias and clean room name for single metastore clean rooms. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements) +* `display_name` (string) - 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 +* `global_metastore_id` (string) - The global Unity Catalog metastore id of the collaborator. The identifier is of format cloud:region:metastore-uuid +* `invite_recipient_email` (string) - 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 +* `invite_recipient_workspace_id` (integer) - 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 +* `organization_name` (string) - [Organization name](:method:metastores/list#metastores-delta_sharing_organization_name) + configured in the metastore + +### CleanRoomOutputCatalog +* `catalog_name` (string) - The name of the output catalog in UC. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements). + The field will always exist if status is CREATED +* `status` (string) - . Possible values are: `CREATED`, `NOT_CREATED`, `NOT_ELIGIBLE` + +### CleanRoomRemoteDetail +* `central_clean_room_id` (string) - Central clean room ID +* `cloud_vendor` (string) - Cloud vendor (aws,azure,gcp) of the central clean room +* `collaborators` (list of CleanRoomCollaborator) - Collaborators in the central clean room. There should one and only one collaborator + in the list that satisfies the owner condition: + + 1. It has the creator's global_metastore_id (determined by caller of CreateCleanRoom). + + 2. Its invite_recipient_email is empty +* `compliance_security_profile` (ComplianceSecurityProfile) - +* `creator` (CleanRoomCollaborator) - Collaborator who creates the clean room +* `egress_network_policy` (EgressNetworkPolicy) - Egress network policy to apply to the central clean room workspace +* `region` (string) - Region of the central clean room + +### ComplianceSecurityProfile +* `compliance_standards` (list of ComplianceStandard) - The list of compliance standards that the compliance security profile is configured to enforce +* `is_enabled` (boolean) - Whether the compliance security profile is enabled + +### EgressNetworkPolicy +* `internet_access` (EgressNetworkPolicyInternetAccessPolicy) - The access policy enforced for egress traffic to the internet + +### EgressNetworkPolicyInternetAccessPolicy +* `allowed_internet_destinations` (list of EgressNetworkPolicyInternetAccessPolicyInternetDestination) - +* `allowed_storage_destinations` (list of EgressNetworkPolicyInternetAccessPolicyStorageDestination) - +* `log_only_mode` (EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) - Optional. If not specified, assume the policy is enforced for all workloads +* `restriction_mode` (string) - . Possible values are: `FULL_ACCESS`, `PRIVATE_ACCESS_ONLY`, `RESTRICTED_ACCESS` + +### EgressNetworkPolicyInternetAccessPolicyInternetDestination +* `destination` (string) - +* `protocol` (string) - . Possible values are: `TCP` +* `type` (string) - . Possible values are: `FQDN` + +### EgressNetworkPolicyInternetAccessPolicyLogOnlyMode +* `log_only_mode_type` (string) - . Possible values are: `ALL_SERVICES`, `SELECTED_SERVICES` +* `workloads` (list of ) - + +### EgressNetworkPolicyInternetAccessPolicyStorageDestination +* `allowed_paths` (list of string) - +* `azure_container` (string) - +* `azure_dns_zone` (string) - +* `azure_storage_account` (string) - +* `azure_storage_service` (string) - +* `bucket_name` (string) - +* `region` (string) - +* `type` (string) - . Possible values are: `AWS_S3`, `AZURE_STORAGE`, `CLOUDFLARE_R2`, `GOOGLE_CLOUD_STORAGE` \ No newline at end of file diff --git a/docs/data-sources/database_instance.md b/docs/data-sources/database_instance.md index 0cb1bfdb6f..979cb88ac7 100755 --- a/docs/data-sources/database_instance.md +++ b/docs/data-sources/database_instance.md @@ -22,14 +22,59 @@ The following arguments are supported: ## Attributes The following attributes are exported: * `capacity` (string) - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8" +* `child_instance_refs` (list of DatabaseInstanceRef) - The refs of the child instances. This is only available if the instance is + parent instance * `creation_time` (string) - The timestamp when the instance was created * `creator` (string) - The email of the creator of the instance +* `effective_enable_readable_secondaries` (boolean) - xref AIP-129. `enable_readable_secondaries` is owned by the client, while `effective_enable_readable_secondaries` is owned by the server. + `enable_readable_secondaries` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_enable_readable_secondaries` on the other hand will always bet set in all response messages (Create/Update/Get/List) +* `effective_node_count` (integer) - xref AIP-129. `node_count` is owned by the client, while `effective_node_count` is owned by the server. + `node_count` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_node_count` on the other hand will always bet set in all response messages (Create/Update/Get/List) +* `effective_retention_window_in_days` (integer) - xref AIP-129. `retention_window_in_days` is owned by the client, while `effective_retention_window_in_days` is owned by the server. + `retention_window_in_days` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_retention_window_in_days` on the other hand will always bet set in all response messages (Create/Update/Get/List) * `effective_stopped` (boolean) - xref AIP-129. `stopped` is owned by the client, while `effective_stopped` is owned by the server. `stopped` will only be set in Create/Update response messages if and only if the user provides the field via the request. `effective_stopped` on the other hand will always bet set in all response messages (Create/Update/Get/List) +* `enable_readable_secondaries` (boolean) - Whether to enable secondaries to serve read-only traffic. Defaults to false * `name` (string) - The name of the instance. This is the unique identifier for the instance +* `node_count` (integer) - The number of nodes in the instance, composed of 1 primary and 0 or more secondaries. Defaults to + 1 primary and 0 secondaries +* `parent_instance_ref` (DatabaseInstanceRef) - The ref of the parent instance. This is only available if the instance is + child instance. + Input: For specifying the parent instance to create a child instance. Optional. + Output: Only populated if provided as input to create a child instance * `pg_version` (string) - The version of Postgres running on the instance +* `read_only_dns` (string) - The DNS endpoint to connect to the instance for read only access. This is only available if + enable_readable_secondaries is true * `read_write_dns` (string) - The DNS endpoint to connect to the instance for read+write access +* `retention_window_in_days` (integer) - The retention window for the instance. This is the time window in days + for which the historical data is retained. The default value is 7 days. + Valid values are 2 to 35 days * `state` (string) - The current state of the instance. Possible values are: `AVAILABLE`, `DELETING`, `FAILING_OVER`, `STARTING`, `STOPPED`, `UPDATING` * `stopped` (boolean) - Whether the instance is stopped -* `uid` (string) - An immutable UUID identifier for the instance \ No newline at end of file +* `uid` (string) - An immutable UUID identifier for the instance + +### DatabaseInstanceRef +* `branch_time` (string) - Branch time of the ref database instance. + For a parent ref instance, this is the point in time on the parent instance from which the + instance was created. + For a child ref instance, this is the point in time on the instance from which the child + instance was created. + Input: For specifying the point in time to create a child instance. Optional. + Output: Only populated if provided as input to create a child instance +* `effective_lsn` (string) - xref AIP-129. `lsn` is owned by the client, while `effective_lsn` is owned by the server. + `lsn` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_lsn` on the other hand will always bet set in all response messages (Create/Update/Get/List). + For a parent ref instance, this is the LSN on the parent instance from which the + instance was created. + For a child ref instance, this is the LSN on the instance from which the child instance + was created +* `lsn` (string) - User-specified WAL LSN of the ref database instance. + + Input: For specifying the WAL LSN to create a child instance. Optional. + Output: Only populated if provided as input to create a child instance +* `name` (string) - Name of the ref database instance +* `uid` (string) - Id of the ref database instance \ No newline at end of file diff --git a/docs/data-sources/database_instances.md b/docs/data-sources/database_instances.md index ed28fb0087..992afcdd47 100755 --- a/docs/data-sources/database_instances.md +++ b/docs/data-sources/database_instances.md @@ -27,14 +27,59 @@ The following arguments are supported: ## Attributes This data source exports a single attribute, `database_instances`. It is a list of resources, each with the following attributes: * `capacity` (string) - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8" +* `child_instance_refs` (list of DatabaseInstanceRef) - The refs of the child instances. This is only available if the instance is + parent instance * `creation_time` (string) - The timestamp when the instance was created * `creator` (string) - The email of the creator of the instance +* `effective_enable_readable_secondaries` (boolean) - xref AIP-129. `enable_readable_secondaries` is owned by the client, while `effective_enable_readable_secondaries` is owned by the server. + `enable_readable_secondaries` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_enable_readable_secondaries` on the other hand will always bet set in all response messages (Create/Update/Get/List) +* `effective_node_count` (integer) - xref AIP-129. `node_count` is owned by the client, while `effective_node_count` is owned by the server. + `node_count` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_node_count` on the other hand will always bet set in all response messages (Create/Update/Get/List) +* `effective_retention_window_in_days` (integer) - xref AIP-129. `retention_window_in_days` is owned by the client, while `effective_retention_window_in_days` is owned by the server. + `retention_window_in_days` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_retention_window_in_days` on the other hand will always bet set in all response messages (Create/Update/Get/List) * `effective_stopped` (boolean) - xref AIP-129. `stopped` is owned by the client, while `effective_stopped` is owned by the server. `stopped` will only be set in Create/Update response messages if and only if the user provides the field via the request. `effective_stopped` on the other hand will always bet set in all response messages (Create/Update/Get/List) +* `enable_readable_secondaries` (boolean) - Whether to enable secondaries to serve read-only traffic. Defaults to false * `name` (string) - The name of the instance. This is the unique identifier for the instance +* `node_count` (integer) - The number of nodes in the instance, composed of 1 primary and 0 or more secondaries. Defaults to + 1 primary and 0 secondaries +* `parent_instance_ref` (DatabaseInstanceRef) - The ref of the parent instance. This is only available if the instance is + child instance. + Input: For specifying the parent instance to create a child instance. Optional. + Output: Only populated if provided as input to create a child instance * `pg_version` (string) - The version of Postgres running on the instance +* `read_only_dns` (string) - The DNS endpoint to connect to the instance for read only access. This is only available if + enable_readable_secondaries is true * `read_write_dns` (string) - The DNS endpoint to connect to the instance for read+write access +* `retention_window_in_days` (integer) - The retention window for the instance. This is the time window in days + for which the historical data is retained. The default value is 7 days. + Valid values are 2 to 35 days * `state` (string) - The current state of the instance. Possible values are: `AVAILABLE`, `DELETING`, `FAILING_OVER`, `STARTING`, `STOPPED`, `UPDATING` * `stopped` (boolean) - Whether the instance is stopped -* `uid` (string) - An immutable UUID identifier for the instance \ No newline at end of file +* `uid` (string) - An immutable UUID identifier for the instance + +### DatabaseInstanceRef +* `branch_time` (string) - Branch time of the ref database instance. + For a parent ref instance, this is the point in time on the parent instance from which the + instance was created. + For a child ref instance, this is the point in time on the instance from which the child + instance was created. + Input: For specifying the point in time to create a child instance. Optional. + Output: Only populated if provided as input to create a child instance +* `effective_lsn` (string) - xref AIP-129. `lsn` is owned by the client, while `effective_lsn` is owned by the server. + `lsn` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_lsn` on the other hand will always bet set in all response messages (Create/Update/Get/List). + For a parent ref instance, this is the LSN on the parent instance from which the + instance was created. + For a child ref instance, this is the LSN on the instance from which the child instance + was created +* `lsn` (string) - User-specified WAL LSN of the ref database instance. + + Input: For specifying the WAL LSN to create a child instance. Optional. + Output: Only populated if provided as input to create a child instance +* `name` (string) - Name of the ref database instance +* `uid` (string) - Id of the ref database instance \ No newline at end of file diff --git a/docs/data-sources/external_metadata.md b/docs/data-sources/external_metadata.md new file mode 100755 index 0000000000..e5cc5ffa6f --- /dev/null +++ b/docs/data-sources/external_metadata.md @@ -0,0 +1,37 @@ +--- +subcategory: "Unity Catalog" +--- +# databricks_external_metadata Data Source +This data source can be used to get a single external metadata object. + +-> **Note** This resource can only be used with an workspace-level provider! + +## Example Usage +Referring to an external metadata object by name: + +```hcl +data "databricks_external_metadata" "this" { + name = "security_events_stream" +} +``` + +## Arguments +The following arguments are supported: +* `name` (string, required) - Name of the external metadata object + +## Attributes +The following attributes are exported: +* `columns` (list of string) - List of columns associated with the external metadata object +* `create_time` (string) - Time at which this external metadata object was created +* `created_by` (string) - Username of external metadata object creator +* `description` (string) - User-provided free-form text description +* `entity_type` (string) - Type of entity within the external system +* `id` (string) - Unique identifier of the external metadata object +* `metastore_id` (string) - Unique identifier of parent metastore +* `name` (string) - Name of the external metadata object +* `owner` (string) - Owner of the external metadata object +* `properties` (object) - A map of key-value properties attached to the external metadata object +* `system_type` (string) - Type of external system. Possible values are: `AMAZON_REDSHIFT`, `AZURE_SYNAPSE`, `CONFLUENT`, `GOOGLE_BIGQUERY`, `KAFKA`, `LOOKER`, `MICROSOFT_FABRIC`, `MICROSOFT_SQL_SERVER`, `MONGODB`, `MYSQL`, `ORACLE`, `OTHER`, `POSTGRESQL`, `POWER_BI`, `SALESFORCE`, `SAP`, `SERVICENOW`, `SNOWFLAKE`, `TABLEAU`, `TERADATA`, `WORKDAY` +* `update_time` (string) - Time at which this external metadata object was last modified +* `updated_by` (string) - Username of user who last modified external metadata object +* `url` (string) - URL associated with the external metadata object \ No newline at end of file diff --git a/docs/data-sources/external_metadatas.md b/docs/data-sources/external_metadatas.md new file mode 100755 index 0000000000..93cab4a1d4 --- /dev/null +++ b/docs/data-sources/external_metadatas.md @@ -0,0 +1,38 @@ +--- +subcategory: "Unity Catalog" +--- +# databricks_external_metadatas Data Source +This data source can be used to fetch the list of external metadata objects. + +-> **Note** This resource can only be used with an workspace-level provider! + +## Example Usage +Getting a list of all external metadata objects: + +```hcl +data "databricks_external_metadata" "all" +} +``` + +## Arguments +The following arguments are supported: +* `page_size` (integer, optional) - + + + +## Attributes +This data source exports a single attribute, `external_metadata`. It is a list of resources, each with the following attributes: +* `columns` (list of string) - List of columns associated with the external metadata object +* `create_time` (string) - Time at which this external metadata object was created +* `created_by` (string) - Username of external metadata object creator +* `description` (string) - User-provided free-form text description +* `entity_type` (string) - Type of entity within the external system +* `id` (string) - Unique identifier of the external metadata object +* `metastore_id` (string) - Unique identifier of parent metastore +* `name` (string) - Name of the external metadata object +* `owner` (string) - Owner of the external metadata object +* `properties` (object) - A map of key-value properties attached to the external metadata object +* `system_type` (string) - Type of external system. Possible values are: `AMAZON_REDSHIFT`, `AZURE_SYNAPSE`, `CONFLUENT`, `GOOGLE_BIGQUERY`, `KAFKA`, `LOOKER`, `MICROSOFT_FABRIC`, `MICROSOFT_SQL_SERVER`, `MONGODB`, `MYSQL`, `ORACLE`, `OTHER`, `POSTGRESQL`, `POWER_BI`, `SALESFORCE`, `SAP`, `SERVICENOW`, `SNOWFLAKE`, `TABLEAU`, `TERADATA`, `WORKDAY` +* `update_time` (string) - Time at which this external metadata object was last modified +* `updated_by` (string) - Username of user who last modified external metadata object +* `url` (string) - URL associated with the external metadata object \ No newline at end of file diff --git a/docs/data-sources/feature_tag.md b/docs/data-sources/feature_tag.md new file mode 100755 index 0000000000..43118a3579 --- /dev/null +++ b/docs/data-sources/feature_tag.md @@ -0,0 +1,17 @@ +--- +subcategory: "Machine Learning" +--- +# databricks_feature_tag Data Source + + +## Example Usage + + +## Arguments +The following arguments are supported: +* `key` (string, required) - + +## Attributes +The following attributes are exported: +* `key` (string) - +* `value` (string) - \ No newline at end of file diff --git a/docs/data-sources/feature_tags.md b/docs/data-sources/feature_tags.md new file mode 100755 index 0000000000..fc734e2345 --- /dev/null +++ b/docs/data-sources/feature_tags.md @@ -0,0 +1,21 @@ +--- +subcategory: "Machine Learning" +--- +# databricks_feature_tags Data Source + + +## Example Usage + + +## Arguments +The following arguments are supported: +* `feature_name` (string, required) - +* `table_name` (string, required) - +* `page_size` (integer, optional) - The maximum number of results to return + + + +## Attributes +This data source exports a single attribute, `feature_tags`. It is a list of resources, each with the following attributes: +* `key` (string) - +* `value` (string) - \ No newline at end of file diff --git a/docs/resources/alert_v2.md b/docs/resources/alert_v2.md index dc97f85bc6..90f1ebfaa9 100755 --- a/docs/resources/alert_v2.md +++ b/docs/resources/alert_v2.md @@ -69,6 +69,8 @@ The following arguments are supported: * `evaluation` (AlertV2Evaluation, optional) - * `parent_path` (string, optional) - The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated * `query_text` (string, optional) - Text of the query to be run +* `run_as_user_name` (string, optional) - The run as username or application ID of service principal. This field is set to "Unavailable" if the user has been deleted. + On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. If not specified it'll default to be request user * `schedule` (CronSchedule, optional) - * `warehouse_id` (string, optional) - ID of the SQL warehouse attached to the alert @@ -116,7 +118,6 @@ In addition to the above arguments, the following attributes are exported: * `id` (string) - UUID identifying the alert * `lifecycle_state` (string) - Indicates whether the query is trashed. Possible values are: `ACTIVE`, `TRASHED` * `owner_user_name` (string) - The owner's username. This field is set to "Unavailable" if the user has been deleted -* `run_as_user_name` (string) - The run as username. This field is set to "Unavailable" if the user has been deleted * `update_time` (string) - The timestamp indicating when the alert was updated ### AlertV2Evaluation diff --git a/docs/resources/clean_room.md b/docs/resources/clean_room.md new file mode 100755 index 0000000000..edc9791967 --- /dev/null +++ b/docs/resources/clean_room.md @@ -0,0 +1,148 @@ +--- +subcategory: "Clean Rooms" +--- +# databricks_clean_room Resource +# Clean Room Resource + +A Clean Room is a secure environment for data collaboration that enables multiple organizations to analyze their data together while maintaining privacy and security. Clean Rooms provide a controlled environment where data can be shared and analyzed without exposing the underlying raw data. + + +## Example Usage +# Example: Clean Room Resource + +```hcl +resource "databricks_clean_room" "this" { + name = "claire-test-6-25-v2" + owner = "claire.chen@databricks.com" + remote_detailed_info = { + cloud_vendor = "aws" + region = "us-west-2" + collaborators = [ + { + collaborator_alias = "collaborator" + global_metastore_id = "aws:us-east-1:7746ae35-88c7-49e6-8965-2cc09882e727" + invite_recipient_email: "claire.chen@databricks.com" + invite_recipient_workspace_id = "653212377970039" + }, + { + global_metastore_id = "aws:us-east-1:7746ae35-88c7-49e6-8965-2cc09882e727" + collaborator_alias = "creator" + } + ] + egress_network_policy = { + internet_access = { + restriction_mode = "RESTRICTED_ACCESS" + } + } + } +} +``` + +## Arguments +The following arguments are supported: +* `comment` (string, optional) - +* `name` (string, optional) - The name of the clean room. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements) +* `owner` (string, optional) - This is Databricks username of the owner of the local clean room securable for permission management +* `remote_detailed_info` (CleanRoomRemoteDetail, optional) - 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 + +### CleanRoomCollaborator +* `collaborator_alias` (string, required) - Collaborator alias specified by the clean room creator. It is unique across all collaborators of this clean room, and used to derive + multiple values internally such as catalog alias and clean room name for single metastore clean rooms. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements) +* `global_metastore_id` (string, optional) - The global Unity Catalog metastore id of the collaborator. The identifier is of format cloud:region:metastore-uuid +* `invite_recipient_email` (string, optional) - 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 +* `invite_recipient_workspace_id` (integer, optional) - 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 + +### CleanRoomOutputCatalog +* `catalog_name` (string, optional) - The name of the output catalog in UC. + It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements). + The field will always exist if status is CREATED + +### CleanRoomRemoteDetail +* `cloud_vendor` (string, optional) - Cloud vendor (aws,azure,gcp) of the central clean room +* `collaborators` (list of CleanRoomCollaborator, optional) - Collaborators in the central clean room. There should one and only one collaborator + in the list that satisfies the owner condition: + + 1. It has the creator's global_metastore_id (determined by caller of CreateCleanRoom). + + 2. Its invite_recipient_email is empty +* `egress_network_policy` (EgressNetworkPolicy, optional) - Egress network policy to apply to the central clean room workspace +* `region` (string, optional) - Region of the central clean room + +### ComplianceSecurityProfile +* `compliance_standards` (list of ComplianceStandard, optional) - The list of compliance standards that the compliance security profile is configured to enforce +* `is_enabled` (boolean, optional) - Whether the compliance security profile is enabled + +### EgressNetworkPolicy +* `internet_access` (EgressNetworkPolicyInternetAccessPolicy, optional) - The access policy enforced for egress traffic to the internet + +### EgressNetworkPolicyInternetAccessPolicy +* `allowed_internet_destinations` (list of EgressNetworkPolicyInternetAccessPolicyInternetDestination, optional) - +* `allowed_storage_destinations` (list of EgressNetworkPolicyInternetAccessPolicyStorageDestination, optional) - +* `log_only_mode` (EgressNetworkPolicyInternetAccessPolicyLogOnlyMode, optional) - Optional. If not specified, assume the policy is enforced for all workloads +* `restriction_mode` (string, optional) - . Possible values are: `FULL_ACCESS`, `PRIVATE_ACCESS_ONLY`, `RESTRICTED_ACCESS` + +### EgressNetworkPolicyInternetAccessPolicyInternetDestination +* `destination` (string, optional) - +* `protocol` (string, optional) - . Possible values are: `TCP` +* `type` (string, optional) - . Possible values are: `FQDN` + +### EgressNetworkPolicyInternetAccessPolicyLogOnlyMode +* `log_only_mode_type` (string, optional) - . Possible values are: `ALL_SERVICES`, `SELECTED_SERVICES` +* `workloads` (list of , optional) - + +### EgressNetworkPolicyInternetAccessPolicyStorageDestination +* `allowed_paths` (list of string, optional) - +* `azure_container` (string, optional) - +* `azure_dns_zone` (string, optional) - +* `azure_storage_account` (string, optional) - +* `azure_storage_service` (string, optional) - +* `bucket_name` (string, optional) - +* `region` (string, optional) - +* `type` (string, optional) - . Possible values are: `AWS_S3`, `AZURE_STORAGE`, `CLOUDFLARE_R2`, `GOOGLE_CLOUD_STORAGE` + +## Attributes +In addition to the above arguments, the following attributes are exported: +* `access_restricted` (string) - Whether clean room access is restricted due to [CSP](https://docs.databricks.com/en/security/privacy/security-profile.html). Possible values are: `CSP_MISMATCH`, `NO_RESTRICTION` +* `created_at` (integer) - When the clean room was created, in epoch milliseconds +* `local_collaborator_alias` (string) - The alias of the collaborator tied to the local clean room +* `output_catalog` (CleanRoomOutputCatalog) - Output catalog of the clean room. It is an output only field. Output catalog is manipulated + using the separate CreateCleanRoomOutputCatalog API +* `status` (string) - Clean room status. Possible values are: `ACTIVE`, `DELETED`, `FAILED`, `PROVISIONING` +* `updated_at` (integer) - When the clean room was last updated, in epoch milliseconds + +### CleanRoomCollaborator +* `display_name` (string) - 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 +* `organization_name` (string) - [Organization name](:method:metastores/list#metastores-delta_sharing_organization_name) + configured in the metastore + +### CleanRoomOutputCatalog +* `status` (string) - . Possible values are: `CREATED`, `NOT_CREATED`, `NOT_ELIGIBLE` + +### CleanRoomRemoteDetail +* `central_clean_room_id` (string) - Central clean room ID +* `compliance_security_profile` (ComplianceSecurityProfile) - +* `creator` (CleanRoomCollaborator) - Collaborator who creates the clean room + +## Import +As of Terraform v1.5, resources can be imported through configuration. +```hcl +import { + id = name + to = databricks_clean_room.this +} +``` + +If you are using an older version of Terraform, import the resource using the `terraform import` command as follows: +```sh +terraform import databricks_clean_room name +``` \ No newline at end of file diff --git a/docs/resources/database_instance.md b/docs/resources/database_instance.md index efbaf86950..346b861811 100755 --- a/docs/resources/database_instance.md +++ b/docs/resources/database_instance.md @@ -2,7 +2,7 @@ subcategory: "Database Instances" --- # databricks_database_instance Resource -Database Instances are managed Postgres instances, composed of a primary Postgres compute instance and 0 or more read replica instances. +Lakebase Database Instances are managed Postgres instances, composed of a primary Postgres compute instance and 0 or more read replica instances. ### Use Cases @@ -25,14 +25,45 @@ Database Instances can be created with the following compute sizes in terms of C * 2 (medium) * 4 (large) -**Note:** Each workspace is limited to 5 Database Instances in total. +**Note:** Each workspace is limited to 10 Database Instances in total. ## Example Usage +### Basic Example + +This example creates a simple Database Instance with the specified name and capacity. + +```hcl +resource "databricks_database_instance" "this" { + name = "my-database-instance" + capacity = "CU_2" +} +``` + +### Example with Readable Secondaries + +This example creates a Database Instance with readable secondaries (and HA) enabled. + ```hcl resource "databricks_database_instance" "this" { name = "my-database-instance" capacity = "CU_2" + node_count = 2 + enable_readable_secondaries = true +} +``` + +### Example Child Instance Created From Parent + +This example creates a child Database Instance from a specified parent Database Instance at the current point in time. + +```hcl +resource "databricks_database_instance" "child" { + name = "my-database-instance" + capacity = "CU_2" + parent_instance_ref = { + name = "my-parent-instance" + } } ``` @@ -41,20 +72,67 @@ resource "databricks_database_instance" "this" { The following arguments are supported: * `name` (string, required) - The name of the instance. This is the unique identifier for the instance * `capacity` (string, optional) - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8" +* `enable_readable_secondaries` (boolean, optional) - Whether to enable secondaries to serve read-only traffic. Defaults to false +* `node_count` (integer, optional) - The number of nodes in the instance, composed of 1 primary and 0 or more secondaries. Defaults to + 1 primary and 0 secondaries +* `parent_instance_ref` (DatabaseInstanceRef, optional) - The ref of the parent instance. This is only available if the instance is + child instance. + Input: For specifying the parent instance to create a child instance. Optional. + Output: Only populated if provided as input to create a child instance +* `retention_window_in_days` (integer, optional) - The retention window for the instance. This is the time window in days + for which the historical data is retained. The default value is 7 days. + Valid values are 2 to 35 days * `stopped` (boolean, optional) - Whether the instance is stopped +### DatabaseInstanceRef +* `branch_time` (string, optional) - Branch time of the ref database instance. + For a parent ref instance, this is the point in time on the parent instance from which the + instance was created. + For a child ref instance, this is the point in time on the instance from which the child + instance was created. + Input: For specifying the point in time to create a child instance. Optional. + Output: Only populated if provided as input to create a child instance +* `lsn` (string, optional) - User-specified WAL LSN of the ref database instance. + + Input: For specifying the WAL LSN to create a child instance. Optional. + Output: Only populated if provided as input to create a child instance +* `name` (string, optional) - Name of the ref database instance + ## Attributes In addition to the above arguments, the following attributes are exported: +* `child_instance_refs` (list of DatabaseInstanceRef) - The refs of the child instances. This is only available if the instance is + parent instance * `creation_time` (string) - The timestamp when the instance was created * `creator` (string) - The email of the creator of the instance +* `effective_enable_readable_secondaries` (boolean) - xref AIP-129. `enable_readable_secondaries` is owned by the client, while `effective_enable_readable_secondaries` is owned by the server. + `enable_readable_secondaries` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_enable_readable_secondaries` on the other hand will always bet set in all response messages (Create/Update/Get/List) +* `effective_node_count` (integer) - xref AIP-129. `node_count` is owned by the client, while `effective_node_count` is owned by the server. + `node_count` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_node_count` on the other hand will always bet set in all response messages (Create/Update/Get/List) +* `effective_retention_window_in_days` (integer) - xref AIP-129. `retention_window_in_days` is owned by the client, while `effective_retention_window_in_days` is owned by the server. + `retention_window_in_days` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_retention_window_in_days` on the other hand will always bet set in all response messages (Create/Update/Get/List) * `effective_stopped` (boolean) - xref AIP-129. `stopped` is owned by the client, while `effective_stopped` is owned by the server. `stopped` will only be set in Create/Update response messages if and only if the user provides the field via the request. `effective_stopped` on the other hand will always bet set in all response messages (Create/Update/Get/List) * `pg_version` (string) - The version of Postgres running on the instance +* `read_only_dns` (string) - The DNS endpoint to connect to the instance for read only access. This is only available if + enable_readable_secondaries is true * `read_write_dns` (string) - The DNS endpoint to connect to the instance for read+write access * `state` (string) - The current state of the instance. Possible values are: `AVAILABLE`, `DELETING`, `FAILING_OVER`, `STARTING`, `STOPPED`, `UPDATING` * `uid` (string) - An immutable UUID identifier for the instance +### DatabaseInstanceRef +* `effective_lsn` (string) - xref AIP-129. `lsn` is owned by the client, while `effective_lsn` is owned by the server. + `lsn` will only be set in Create/Update response messages if and only if the user provides the field via the request. + `effective_lsn` on the other hand will always bet set in all response messages (Create/Update/Get/List). + For a parent ref instance, this is the LSN on the parent instance from which the + instance was created. + For a child ref instance, this is the LSN on the instance from which the child instance + was created +* `uid` (string) - Id of the ref database instance + ## Import As of Terraform v1.5, resources can be imported through configuration. ```hcl diff --git a/docs/resources/external_metadata.md b/docs/resources/external_metadata.md new file mode 100755 index 0000000000..b5e2c8ea5f --- /dev/null +++ b/docs/resources/external_metadata.md @@ -0,0 +1,66 @@ +--- +subcategory: "Unity Catalog" +--- +# databricks_external_metadata Resource +To enrich lineage with workloads that are run outside of Databricks (for example, first mile ETL or last mile BI), +Unity Catalog is introducing the external metadata object. UC lets you add external metadata objects to augment the data lineage it captures automatically, giving you an end-to-end lineage view in UC. +This is useful when you want to capture where data came from (for example, Salesforce or MySQL) before it was ingested into UC or where data is being consumed outside UC (for example, Tableau or PowerBI). + +-> **Note** This resource can only be used with an workspace-level provider! + +## Example Usage +```hcl +resource "databricks_external_metadata" "this" { + name = "security_events_stream" + system_type = "KAFKA" + entity_type = "Topic" + url = "https://kafka.com/12345" + description = "A stream of security related events in the critical services." + columns = [ + "type", + "message", + "details", + "date", + "time" + ] + properties = { + topic: "prod.security.events.raw", + compression.enabled: "true", + compression.format: "zstd" + } +} +``` + +## Arguments +The following arguments are supported: +* `entity_type` (string, required) - Type of entity within the external system +* `name` (string, required) - Name of the external metadata object +* `system_type` (string, required) - Type of external system. Possible values are: `AMAZON_REDSHIFT`, `AZURE_SYNAPSE`, `CONFLUENT`, `GOOGLE_BIGQUERY`, `KAFKA`, `LOOKER`, `MICROSOFT_FABRIC`, `MICROSOFT_SQL_SERVER`, `MONGODB`, `MYSQL`, `ORACLE`, `OTHER`, `POSTGRESQL`, `POWER_BI`, `SALESFORCE`, `SAP`, `SERVICENOW`, `SNOWFLAKE`, `TABLEAU`, `TERADATA`, `WORKDAY` +* `columns` (list of string, optional) - List of columns associated with the external metadata object +* `description` (string, optional) - User-provided free-form text description +* `owner` (string, optional) - Owner of the external metadata object +* `properties` (object, optional) - A map of key-value properties attached to the external metadata object +* `url` (string, optional) - URL associated with the external metadata object + +## Attributes +In addition to the above arguments, the following attributes are exported: +* `create_time` (string) - Time at which this external metadata object was created +* `created_by` (string) - Username of external metadata object creator +* `id` (string) - Unique identifier of the external metadata object +* `metastore_id` (string) - Unique identifier of parent metastore +* `update_time` (string) - Time at which this external metadata object was last modified +* `updated_by` (string) - Username of user who last modified external metadata object + +## Import +As of Terraform v1.5, resources can be imported through configuration. +```hcl +import { + id = name + to = databricks_external_metadata.this +} +``` + +If you are using an older version of Terraform, import the resource using the `terraform import` command as follows: +```sh +terraform import databricks_external_metadata name +``` \ No newline at end of file diff --git a/docs/resources/feature_tag.md b/docs/resources/feature_tag.md new file mode 100755 index 0000000000..52c568f6f7 --- /dev/null +++ b/docs/resources/feature_tag.md @@ -0,0 +1,30 @@ +--- +subcategory: "Machine Learning" +--- +# databricks_feature_tag Resource + + +## Example Usage + + +## Arguments +The following arguments are supported: +* `key` (string, required) - +* `value` (string, optional) - + +## Attributes +In addition to the above arguments, the following attributes are exported: + +## Import +As of Terraform v1.5, resources can be imported through configuration. +```hcl +import { + id = key + to = databricks_feature_tag.this +} +``` + +If you are using an older version of Terraform, import the resource using the `terraform import` command as follows: +```sh +terraform import databricks_feature_tag key +``` \ No newline at end of file diff --git a/docs/resources/online_store.md b/docs/resources/online_store.md index bd65953bf4..060e673ec0 100755 --- a/docs/resources/online_store.md +++ b/docs/resources/online_store.md @@ -9,8 +9,8 @@ subcategory: "Machine Learning" ## Arguments The following arguments are supported: +* `capacity` (string, required) - The capacity of the online store. Valid values are "CU_1", "CU_2", "CU_4", "CU_8" * `name` (string, required) - The name of the online store. This is the unique identifier for the online store -* `capacity` (string, optional) - The capacity of the online store. Valid values are "CU_1", "CU_2", "CU_4", "CU_8" ## Attributes In addition to the above arguments, the following attributes are exported: diff --git a/go.mod b/go.mod index 511134fd1c..2621a014b0 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/databricks/terraform-provider-databricks go 1.24.0 require ( - github.com/databricks/databricks-sdk-go v0.73.1 + github.com/databricks/databricks-sdk-go v0.74.0 github.com/golang-jwt/jwt/v4 v4.5.2 github.com/hashicorp/go-cty v1.5.0 github.com/hashicorp/hcl v1.0.0 @@ -18,13 +18,13 @@ require ( github.com/hashicorp/terraform-plugin-testing v1.13.2 github.com/stretchr/testify v1.10.0 github.com/zclconf/go-cty v1.16.3 - golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 + golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b ) require ( - cloud.google.com/go/auth v0.16.1 // indirect + cloud.google.com/go/auth v0.16.2 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect - cloud.google.com/go/compute/metadata v0.6.0 // indirect + cloud.google.com/go/compute/metadata v0.7.0 // indirect github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/ProtonMail/go-crypto v1.1.6 // indirect github.com/agext/levenshtein v1.2.3 // indirect @@ -36,7 +36,7 @@ require ( github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.8.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.7.0 // indirect @@ -45,7 +45,7 @@ require ( github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect - github.com/googleapis/gax-go/v2 v2.14.1 // indirect + github.com/googleapis/gax-go/v2 v2.14.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -76,25 +76,25 @@ require ( github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel v1.35.0 // indirect - go.opentelemetry.io/otel/metric v1.35.0 // indirect - go.opentelemetry.io/otel/trace v1.35.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect + go.opentelemetry.io/otel v1.37.0 // indirect + go.opentelemetry.io/otel/metric v1.37.0 // indirect + go.opentelemetry.io/otel/trace v1.37.0 // indirect golang.org/x/crypto v0.39.0 // indirect golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect golang.org/x/mod v0.25.0 // indirect - golang.org/x/net v0.40.0 // indirect + golang.org/x/net v0.41.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.15.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/term v0.32.0 // indirect golang.org/x/text v0.26.0 // indirect - golang.org/x/time v0.11.0 // indirect - golang.org/x/tools v0.33.0 // indirect - google.golang.org/api v0.232.0 // indirect + golang.org/x/time v0.12.0 // indirect + golang.org/x/tools v0.34.0 // indirect + google.golang.org/api v0.240.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 // indirect - google.golang.org/grpc v1.72.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect + google.golang.org/grpc v1.73.0 // indirect google.golang.org/protobuf v1.36.6 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 75f60e5124..0ca29ddc81 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ -cloud.google.com/go/auth v0.16.1 h1:XrXauHMd30LhQYVRHLGvJiYeczweKQXZxsTbV9TiguU= -cloud.google.com/go/auth v0.16.1/go.mod h1:1howDHJ5IETh/LwYs3ZxvlkXF48aSqqJUM+5o02dNOI= +cloud.google.com/go/auth v0.16.2 h1:QvBAGFPLrDeoiNjyfVunhQ10HKNYuOwZ5noee0M5df4= +cloud.google.com/go/auth v0.16.2/go.mod h1:sRBas2Y1fB1vZTdurouM0AzuYQBMZinrUYL8EufhtEA= cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= -cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= -cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= +cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= +cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= @@ -25,8 +25,8 @@ github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= -github.com/databricks/databricks-sdk-go v0.73.1 h1:c+o2J+l37WnQWqY4muokpFL1E2a5oJVC5J+Z8oFNCeU= -github.com/databricks/databricks-sdk-go v0.73.1/go.mod h1:xBtjeP9nq+6MgTewZW1EcbRkD7aDY9gZvcRPcwPhZjw= +github.com/databricks/databricks-sdk-go v0.74.0 h1:W4u6jEttmrmuA3FdEgWlK4omHidAUaV1S4eN/JsMO8E= +github.com/databricks/databricks-sdk-go v0.74.0/go.mod h1:xBtjeP9nq+6MgTewZW1EcbRkD7aDY9gZvcRPcwPhZjw= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -48,8 +48,8 @@ github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH github.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60= github.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= @@ -78,8 +78,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= -github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q= -github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA= +github.com/googleapis/gax-go/v2 v2.14.2 h1:eBLnkZ9635krYIPD+ag1USrOAI0Nr0QYF3+/3GqO0k0= +github.com/googleapis/gax-go/v2 v2.14.2/go.mod h1:ON64QhlJkhVtSqp4v1uaK92VyZ2gmvDQsweuyLV+8+w= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -203,26 +203,26 @@ github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6 github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= -go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= -go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= -go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= -go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= -go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= -go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= -go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 h1:Hf9xI/XLML9ElpiHVDNwvqI0hIFlzV8dgIr35kV1kRU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0/go.mod h1:NfchwuyNoMcZ5MLHwPrODwUF1HWCXWrL31s8gSAdIKY= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM= golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= -golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI= -golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ= golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -232,8 +232,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -266,24 +266,24 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= -golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= -golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= -golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.232.0 h1:qGnmaIMf7KcuwHOlF3mERVzChloDYwRfOJOrHt8YC3I= -google.golang.org/api v0.232.0/go.mod h1:p9QCfBWZk1IJETUdbTKloR5ToFdKbYh2fkjsUL6vNoY= +google.golang.org/api v0.240.0 h1:PxG3AA2UIqT1ofIzWV2COM3j3JagKTKSwy7L6RHNXNU= +google.golang.org/api v0.240.0/go.mod h1:cOVEm2TpdAGHL2z+UwyS+kmlGr3bVWQQ6sYEqkKje50= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 h1:IqsN8hx+lWLqlN+Sc3DoMy/watjofWiU8sRFgQ8fhKM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= -google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 h1:pFyd6EwwL2TqFf8emdthzeX+gZE1ElRq3iM8pui4KBY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok= +google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= diff --git a/internal/providers/pluginfw/auto_generation.go b/internal/providers/pluginfw/auto_generation.go index a6bb46fbe1..b0bf7a2600 100644 --- a/internal/providers/pluginfw/auto_generation.go +++ b/internal/providers/pluginfw/auto_generation.go @@ -7,6 +7,8 @@ import ( "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/products/budget_policy" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/products/clean_room" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/products/database_instance" "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/products/online_store" @@ -27,11 +29,12 @@ import ( var autoGeneratedResources = []func() resource.Resource{ alert_v2.ResourceAlertV2, budget_policy.ResourceBudgetPolicy, + clean_room.ResourceCleanRoom, database_instance.ResourceDatabaseInstance, online_store.ResourceOnlineStore, account_network_policy.ResourceAccountNetworkPolicy, - quality_monitor_v2.ResourceQualityMonitorV2, - recipient_federation_policy.ResourceRecipientFederationPolicy, + quality_monitor_v2.ResourceQualityMonitor, + recipient_federation_policy.ResourceFederationPolicy, workspace_network_option.ResourceWorkspaceNetworkOption, } @@ -39,6 +42,7 @@ var autoGeneratedResources = []func() resource.Resource{ var autoGeneratedDataSources = []func() datasource.DataSource{ alert_v2.DataSourceAlertV2, budget_policy.DataSourceBudgetPolicy, + clean_room.DataSourceCleanRoom, database_instance.DataSourceDatabaseInstance, online_store.DataSourceOnlineStore, account_network_policy.DataSourceAccountNetworkPolicy, @@ -47,9 +51,10 @@ var autoGeneratedDataSources = []func() datasource.DataSource{ workspace_network_option.DataSourceWorkspaceNetworkOption, alert_v2.DataSourceAlertsV2, budget_policy.DataSourceBudgetPolicies, + clean_room.DataSourceCleanRooms, database_instance.DataSourceDatabaseInstances, online_store.DataSourceOnlineStores, account_network_policy.DataSourceAccountNetworkPolicies, - quality_monitor_v2.DataSourceQualityMonitorsV2, - recipient_federation_policy.DataSourceRecipientFederationPolicies, + quality_monitor_v2.DataSourceQualityMonitors, + recipient_federation_policy.DataSourceFederationPolicies, } diff --git a/internal/providers/pluginfw/products/account_network_policy/data_account_network_policies.go b/internal/providers/pluginfw/products/account_network_policy/data_account_network_policies.go index a0f2c8e31b..b8696a206d 100755 --- a/internal/providers/pluginfw/products/account_network_policy/data_account_network_policies.go +++ b/internal/providers/pluginfw/products/account_network_policy/data_account_network_policies.go @@ -90,17 +90,17 @@ func (r *AccountNetworkPoliciesDataSource) Read(ctx context.Context, req datasou return } - var items = []attr.Value{} + var results = []attr.Value{} for _, item := range response { var account_network_policy settings_tf.AccountNetworkPolicy resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, item, &account_network_policy)...) if resp.Diagnostics.HasError() { return } - items = append(items, account_network_policy.ToObjectValue(ctx)) + results = append(results, account_network_policy.ToObjectValue(ctx)) } var newState AccountNetworkPoliciesList - newState.NetworkPolicies = types.ListValueMust(settings_tf.AccountNetworkPolicy{}.Type(ctx), items) + newState.NetworkPolicies = types.ListValueMust(settings_tf.AccountNetworkPolicy{}.Type(ctx), results) resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) } diff --git a/internal/providers/pluginfw/products/alert_v2/resource_alert_v2.go b/internal/providers/pluginfw/products/alert_v2/resource_alert_v2.go index 1d5616a570..17f3bfe7c2 100755 --- a/internal/providers/pluginfw/products/alert_v2/resource_alert_v2.go +++ b/internal/providers/pluginfw/products/alert_v2/resource_alert_v2.go @@ -70,7 +70,7 @@ func (r *AlertV2Resource) update(ctx context.Context, plan sql_tf.AlertV2, diags updateRequest := sql.UpdateAlertV2Request{ Alert: alert_v2, Id: plan.Id.ValueString(), - UpdateMask: "custom_description,custom_summary,display_name,evaluation,parent_path,query_text,schedule,warehouse_id", + UpdateMask: "custom_description,custom_summary,display_name,evaluation,parent_path,query_text,run_as_user_name,schedule,warehouse_id", } response, err := client.AlertsV2.UpdateAlert(ctx, updateRequest) diff --git a/internal/providers/pluginfw/products/budget_policy/data_budget_policies.go b/internal/providers/pluginfw/products/budget_policy/data_budget_policies.go index 945f08328c..3ff2475171 100755 --- a/internal/providers/pluginfw/products/budget_policy/data_budget_policies.go +++ b/internal/providers/pluginfw/products/budget_policy/data_budget_policies.go @@ -90,17 +90,17 @@ func (r *BudgetPoliciesDataSource) Read(ctx context.Context, req datasource.Read return } - var policies = []attr.Value{} + var results = []attr.Value{} for _, item := range response { var budget_policy billing_tf.BudgetPolicy resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, item, &budget_policy)...) if resp.Diagnostics.HasError() { return } - policies = append(policies, budget_policy.ToObjectValue(ctx)) + results = append(results, budget_policy.ToObjectValue(ctx)) } var newState BudgetPoliciesList - newState.BudgetPolicy = types.ListValueMust(billing_tf.BudgetPolicy{}.Type(ctx), policies) + newState.BudgetPolicy = types.ListValueMust(billing_tf.BudgetPolicy{}.Type(ctx), results) resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) } diff --git a/internal/providers/pluginfw/products/clean_room/data_clean_room.go b/internal/providers/pluginfw/products/clean_room/data_clean_room.go new file mode 100755 index 0000000000..725088c4b0 --- /dev/null +++ b/internal/providers/pluginfw/products/clean_room/data_clean_room.go @@ -0,0 +1,89 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package clean_room + +import ( + "context" + + "github.com/databricks/databricks-sdk-go/apierr" + "github.com/databricks/databricks-sdk-go/service/cleanrooms" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/autogen" + pluginfwcontext "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/context" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/converters" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" + "github.com/databricks/terraform-provider-databricks/internal/service/cleanrooms_tf" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" +) + +const dataSourceName = "clean_room" + +var _ datasource.DataSourceWithConfigure = &CleanRoomDataSource{} + +func DataSourceCleanRoom() datasource.DataSource { + return &CleanRoomDataSource{} +} + +type CleanRoomDataSource struct { + Client *autogen.DatabricksClient +} + +func (r *CleanRoomDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { + resp.TypeName = autogen.GetDatabricksProductionName(dataSourceName) +} + +func (r *CleanRoomDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + attrs, blocks := tfschema.DataSourceStructToSchemaMap(ctx, cleanrooms_tf.CleanRoom{}, nil) + resp.Schema = schema.Schema{ + Description: "Terraform schema for Databricks CleanRoom", + Attributes: attrs, + Blocks: blocks, + } +} + +func (r *CleanRoomDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { + r.Client = autogen.ConfigureDataSource(req, resp) +} + +func (r *CleanRoomDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + ctx = pluginfwcontext.SetUserAgentInDataSourceContext(ctx, dataSourceName) + + client, diags := r.Client.GetWorkspaceClient() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + var config cleanrooms_tf.CleanRoom + resp.Diagnostics.Append(req.Config.Get(ctx, &config)...) + if resp.Diagnostics.HasError() { + return + } + + var readRequest cleanrooms.GetCleanRoomRequest + resp.Diagnostics.Append(converters.TfSdkToGoSdkStruct(ctx, config, &readRequest)...) + if resp.Diagnostics.HasError() { + return + } + + response, err := client.CleanRooms.Get(ctx, readRequest) + if err != nil { + if apierr.IsMissing(err) { + resp.State.RemoveResource(ctx) + return + } + + resp.Diagnostics.AddError("failed to get clean_room", err.Error()) + return + } + + var newState cleanrooms_tf.CleanRoom + resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, response, &newState)...) + if resp.Diagnostics.HasError() { + return + } + + newState.SyncEffectiveFieldsDuringRead(config) + + resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) +} diff --git a/internal/providers/pluginfw/products/clean_room/data_clean_rooms.go b/internal/providers/pluginfw/products/clean_room/data_clean_rooms.go new file mode 100755 index 0000000000..bb58407d3c --- /dev/null +++ b/internal/providers/pluginfw/products/clean_room/data_clean_rooms.go @@ -0,0 +1,106 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package clean_room + +import ( + "context" + "reflect" + + "github.com/databricks/databricks-sdk-go/service/cleanrooms" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/autogen" + pluginfwcontext "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/context" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/converters" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" + "github.com/databricks/terraform-provider-databricks/internal/service/cleanrooms_tf" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +const dataSourcesName = "clean_rooms" + +var _ datasource.DataSourceWithConfigure = &CleanRoomsDataSource{} + +func DataSourceCleanRooms() datasource.DataSource { + return &CleanRoomsDataSource{} +} + +type CleanRoomsList struct { + cleanrooms_tf.ListCleanRoomsRequest + CleanRooms types.List `tfsdk:"clean_rooms"` +} + +func (c CleanRoomsList) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["clean_rooms"] = attrs["clean_rooms"].SetComputed() + return attrs +} + +func (CleanRoomsList) GetComplexFieldTypes(context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clean_rooms": reflect.TypeOf(cleanrooms_tf.CleanRoom{}), + } +} + +type CleanRoomsDataSource struct { + Client *autogen.DatabricksClient +} + +func (r *CleanRoomsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { + resp.TypeName = autogen.GetDatabricksProductionName(dataSourcesName) +} + +func (r *CleanRoomsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + attrs, blocks := tfschema.DataSourceStructToSchemaMap(ctx, CleanRoomsList{}, nil) + resp.Schema = schema.Schema{ + Description: "Terraform schema for Databricks CleanRoom", + Attributes: attrs, + Blocks: blocks, + } +} + +func (r *CleanRoomsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { + r.Client = autogen.ConfigureDataSource(req, resp) +} + +func (r *CleanRoomsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + ctx = pluginfwcontext.SetUserAgentInDataSourceContext(ctx, dataSourcesName) + + client, diags := r.Client.GetWorkspaceClient() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + var config CleanRoomsList + resp.Diagnostics.Append(req.Config.Get(ctx, &config)...) + if resp.Diagnostics.HasError() { + return + } + + var listRequest cleanrooms.ListCleanRoomsRequest + resp.Diagnostics.Append(converters.TfSdkToGoSdkStruct(ctx, config, &listRequest)...) + if resp.Diagnostics.HasError() { + return + } + + response, err := client.CleanRooms.ListAll(ctx, listRequest) + if err != nil { + resp.Diagnostics.AddError("failed to list clean_rooms", err.Error()) + return + } + + var results = []attr.Value{} + for _, item := range response { + var clean_room cleanrooms_tf.CleanRoom + resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, item, &clean_room)...) + if resp.Diagnostics.HasError() { + return + } + results = append(results, clean_room.ToObjectValue(ctx)) + } + + var newState CleanRoomsList + newState.CleanRooms = types.ListValueMust(cleanrooms_tf.CleanRoom{}.Type(ctx), results) + resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) +} diff --git a/internal/providers/pluginfw/products/clean_room/resource_clean_room.go b/internal/providers/pluginfw/products/clean_room/resource_clean_room.go new file mode 100755 index 0000000000..eaa4364bb4 --- /dev/null +++ b/internal/providers/pluginfw/products/clean_room/resource_clean_room.go @@ -0,0 +1,239 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package clean_room + +import ( + "context" + "fmt" + "strings" + + "github.com/databricks/databricks-sdk-go/apierr" + "github.com/databricks/databricks-sdk-go/service/cleanrooms" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/autogen" + pluginfwcontext "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/context" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/converters" + "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/tfschema" + "github.com/databricks/terraform-provider-databricks/internal/service/cleanrooms_tf" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/tfsdk" +) + +const resourceName = "clean_room" + +var _ resource.ResourceWithConfigure = &CleanRoomResource{} + +func ResourceCleanRoom() resource.Resource { + return &CleanRoomResource{} +} + +type CleanRoomResource struct { + Client *autogen.DatabricksClient +} + +func (r *CleanRoomResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = autogen.GetDatabricksProductionName(resourceName) +} + +func (r *CleanRoomResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + attrs, blocks := tfschema.ResourceStructToSchemaMap(ctx, cleanrooms_tf.CleanRoom{}, func(c tfschema.CustomizableSchema) tfschema.CustomizableSchema { + c.AddPlanModifier(stringplanmodifier.UseStateForUnknown(), "name") + return c + }) + resp.Schema = schema.Schema{ + Description: "Terraform schema for Databricks clean_room", + Attributes: attrs, + Blocks: blocks, + } +} + +func (r *CleanRoomResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + r.Client = autogen.ConfigureResource(req, resp) +} + +func (r *CleanRoomResource) update(ctx context.Context, plan cleanrooms_tf.CleanRoom, diags *diag.Diagnostics, state *tfsdk.State) { + client, clientDiags := r.Client.GetWorkspaceClient() + diags.Append(clientDiags...) + if diags.HasError() { + return + } + + var clean_room cleanrooms.CleanRoom + diags.Append(converters.TfSdkToGoSdkStruct(ctx, plan, &clean_room)...) + if diags.HasError() { + return + } + + updateRequest := cleanrooms.UpdateCleanRoomRequest{ + CleanRoom: &clean_room, + Name: plan.Name.ValueString(), + } + + response, err := client.CleanRooms.Update(ctx, updateRequest) + if err != nil { + diags.AddError("failed to update clean_room", err.Error()) + return + } + + var newState cleanrooms_tf.CleanRoom + diags.Append(converters.GoSdkToTfSdkStruct(ctx, response, &newState)...) + if diags.HasError() { + return + } + + newState.SyncEffectiveFieldsDuringCreateOrUpdate(plan) + diags.Append(state.Set(ctx, newState)...) +} + +func (r *CleanRoomResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) + + client, diags := r.Client.GetWorkspaceClient() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + var plan cleanrooms_tf.CleanRoom + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + var clean_room cleanrooms.CleanRoom + resp.Diagnostics.Append(converters.TfSdkToGoSdkStruct(ctx, plan, &clean_room)...) + if resp.Diagnostics.HasError() { + return + } + + createRequest := cleanrooms.CreateCleanRoomRequest{ + CleanRoom: clean_room, + } + + response, err := client.CleanRooms.Create(ctx, createRequest) + if err != nil { + resp.Diagnostics.AddError("failed to create clean_room", err.Error()) + return + } + + var newState cleanrooms_tf.CleanRoom + + resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, response, &newState)...) + + if resp.Diagnostics.HasError() { + return + } + + newState.SyncEffectiveFieldsDuringCreateOrUpdate(plan) + + resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) + if resp.Diagnostics.HasError() { + return + } +} + +func (r *CleanRoomResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) + + client, diags := r.Client.GetWorkspaceClient() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + var existingState cleanrooms_tf.CleanRoom + resp.Diagnostics.Append(req.State.Get(ctx, &existingState)...) + if resp.Diagnostics.HasError() { + return + } + + var readRequest cleanrooms.GetCleanRoomRequest + resp.Diagnostics.Append(converters.TfSdkToGoSdkStruct(ctx, existingState, &readRequest)...) + if resp.Diagnostics.HasError() { + return + } + + response, err := client.CleanRooms.Get(ctx, readRequest) + if err != nil { + if apierr.IsMissing(err) { + resp.State.RemoveResource(ctx) + return + } + + resp.Diagnostics.AddError("failed to get clean_room", err.Error()) + return + } + + var newState cleanrooms_tf.CleanRoom + resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, response, &newState)...) + if resp.Diagnostics.HasError() { + return + } + + newState.SyncEffectiveFieldsDuringRead(existingState) + + resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) +} + +func (r *CleanRoomResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) + + var plan cleanrooms_tf.CleanRoom + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + r.update(ctx, plan, &resp.Diagnostics, &resp.State) +} + +func (r *CleanRoomResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) + + client, diags := r.Client.GetWorkspaceClient() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + var state cleanrooms_tf.CleanRoom + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + var deleteRequest cleanrooms.DeleteCleanRoomRequest + resp.Diagnostics.Append(converters.TfSdkToGoSdkStruct(ctx, state, &deleteRequest)...) + if resp.Diagnostics.HasError() { + return + } + + err := client.CleanRooms.Delete(ctx, deleteRequest) + if err != nil && !apierr.IsMissing(err) { + resp.Diagnostics.AddError("failed to delete clean_room", err.Error()) + return + } +} + +var _ resource.ResourceWithImportState = &CleanRoomResource{} + +func (r *CleanRoomResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + parts := strings.Split(req.ID, ",") + + if len(parts) != 1 || parts[0] == "" { + resp.Diagnostics.AddError( + "Unexpected Import Identifier", + fmt.Sprintf( + "Expected import identifier with format: name. Got: %q", + req.ID, + ), + ) + return + } + + name := parts[0] + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("name"), name)...) +} diff --git a/internal/providers/pluginfw/products/database_instance/data_database_instances.go b/internal/providers/pluginfw/products/database_instance/data_database_instances.go index d4b49a931b..d649638b36 100755 --- a/internal/providers/pluginfw/products/database_instance/data_database_instances.go +++ b/internal/providers/pluginfw/products/database_instance/data_database_instances.go @@ -90,17 +90,17 @@ func (r *DatabaseInstancesDataSource) Read(ctx context.Context, req datasource.R return } - var database_instances = []attr.Value{} + var results = []attr.Value{} for _, item := range response { var database_instance database_tf.DatabaseInstance resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, item, &database_instance)...) if resp.Diagnostics.HasError() { return } - database_instances = append(database_instances, database_instance.ToObjectValue(ctx)) + results = append(results, database_instance.ToObjectValue(ctx)) } var newState DatabaseInstancesList - newState.Database = types.ListValueMust(database_tf.DatabaseInstance{}.Type(ctx), database_instances) + newState.Database = types.ListValueMust(database_tf.DatabaseInstance{}.Type(ctx), results) resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) } diff --git a/internal/providers/pluginfw/products/database_instance/resource_database_instance.go b/internal/providers/pluginfw/products/database_instance/resource_database_instance.go index 7367c3195a..f3dfa30487 100755 --- a/internal/providers/pluginfw/products/database_instance/resource_database_instance.go +++ b/internal/providers/pluginfw/products/database_instance/resource_database_instance.go @@ -70,7 +70,7 @@ func (r *DatabaseInstanceResource) update(ctx context.Context, plan database_tf. updateRequest := database.UpdateDatabaseInstanceRequest{ DatabaseInstance: database_instance, Name: plan.Name.ValueString(), - UpdateMask: "capacity,stopped", + UpdateMask: "capacity,enable_readable_secondaries,node_count,parent_instance_ref,retention_window_in_days,stopped", } response, err := client.Database.UpdateDatabaseInstance(ctx, updateRequest) diff --git a/internal/providers/pluginfw/products/online_store/data_online_stores.go b/internal/providers/pluginfw/products/online_store/data_online_stores.go index ec7bc4a549..78eafb1486 100755 --- a/internal/providers/pluginfw/products/online_store/data_online_stores.go +++ b/internal/providers/pluginfw/products/online_store/data_online_stores.go @@ -90,17 +90,17 @@ func (r *OnlineStoresDataSource) Read(ctx context.Context, req datasource.ReadRe return } - var online_stores = []attr.Value{} + var results = []attr.Value{} for _, item := range response { var online_store ml_tf.OnlineStore resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, item, &online_store)...) if resp.Diagnostics.HasError() { return } - online_stores = append(online_stores, online_store.ToObjectValue(ctx)) + results = append(results, online_store.ToObjectValue(ctx)) } var newState OnlineStoresList - newState.FeatureStore = types.ListValueMust(ml_tf.OnlineStore{}.Type(ctx), online_stores) + newState.FeatureStore = types.ListValueMust(ml_tf.OnlineStore{}.Type(ctx), results) resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) } diff --git a/internal/providers/pluginfw/products/quality_monitor_v2/data_quality_monitor_v2.go b/internal/providers/pluginfw/products/quality_monitor_v2/data_quality_monitor_v2.go index b11810e526..70f3e87254 100755 --- a/internal/providers/pluginfw/products/quality_monitor_v2/data_quality_monitor_v2.go +++ b/internal/providers/pluginfw/products/quality_monitor_v2/data_quality_monitor_v2.go @@ -18,21 +18,21 @@ import ( const dataSourceName = "quality_monitor_v2" -var _ datasource.DataSourceWithConfigure = &QualityMonitorV2DataSource{} +var _ datasource.DataSourceWithConfigure = &QualityMonitorDataSource{} func DataSourceQualityMonitor() datasource.DataSource { - return &QualityMonitorV2DataSource{} + return &QualityMonitorDataSource{} } -type QualityMonitorV2DataSource struct { +type QualityMonitorDataSource struct { Client *autogen.DatabricksClient } -func (r *QualityMonitorV2DataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { +func (r *QualityMonitorDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = autogen.GetDatabricksProductionName(dataSourceName) } -func (r *QualityMonitorV2DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { +func (r *QualityMonitorDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { attrs, blocks := tfschema.DataSourceStructToSchemaMap(ctx, qualitymonitorv2_tf.QualityMonitor{}, nil) resp.Schema = schema.Schema{ Description: "Terraform schema for Databricks QualityMonitor", @@ -41,11 +41,11 @@ func (r *QualityMonitorV2DataSource) Schema(ctx context.Context, req datasource. } } -func (r *QualityMonitorV2DataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { +func (r *QualityMonitorDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { r.Client = autogen.ConfigureDataSource(req, resp) } -func (r *QualityMonitorV2DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { +func (r *QualityMonitorDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { ctx = pluginfwcontext.SetUserAgentInDataSourceContext(ctx, dataSourceName) client, diags := r.Client.GetWorkspaceClient() diff --git a/internal/providers/pluginfw/products/quality_monitor_v2/data_quality_monitors_v2.go b/internal/providers/pluginfw/products/quality_monitor_v2/data_quality_monitors_v2.go index 20cab9f7fa..f9a7083a51 100755 --- a/internal/providers/pluginfw/products/quality_monitor_v2/data_quality_monitors_v2.go +++ b/internal/providers/pluginfw/products/quality_monitor_v2/data_quality_monitors_v2.go @@ -20,10 +20,10 @@ import ( const dataSourcesName = "quality_monitors_v2" -var _ datasource.DataSourceWithConfigure = &QualityMonitorsV2DataSource{} +var _ datasource.DataSourceWithConfigure = &QualityMonitorsDataSource{} -func DataSourceQualityMonitorsV2() datasource.DataSource { - return &QualityMonitorsV2DataSource{} +func DataSourceQualityMonitors() datasource.DataSource { + return &QualityMonitorsDataSource{} } type QualityMonitorsList struct { @@ -42,15 +42,15 @@ func (QualityMonitorsList) GetComplexFieldTypes(context.Context) map[string]refl } } -type QualityMonitorsV2DataSource struct { +type QualityMonitorsDataSource struct { Client *autogen.DatabricksClient } -func (r *QualityMonitorsV2DataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { +func (r *QualityMonitorsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = autogen.GetDatabricksProductionName(dataSourcesName) } -func (r *QualityMonitorsV2DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { +func (r *QualityMonitorsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { attrs, blocks := tfschema.DataSourceStructToSchemaMap(ctx, QualityMonitorsList{}, nil) resp.Schema = schema.Schema{ Description: "Terraform schema for Databricks QualityMonitor", @@ -59,11 +59,11 @@ func (r *QualityMonitorsV2DataSource) Schema(ctx context.Context, req datasource } } -func (r *QualityMonitorsV2DataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { +func (r *QualityMonitorsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { r.Client = autogen.ConfigureDataSource(req, resp) } -func (r *QualityMonitorsV2DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { +func (r *QualityMonitorsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { ctx = pluginfwcontext.SetUserAgentInDataSourceContext(ctx, dataSourcesName) client, diags := r.Client.GetWorkspaceClient() @@ -90,17 +90,17 @@ func (r *QualityMonitorsV2DataSource) Read(ctx context.Context, req datasource.R return } - var quality_monitors = []attr.Value{} + var results = []attr.Value{} for _, item := range response { var quality_monitor qualitymonitorv2_tf.QualityMonitor resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, item, &quality_monitor)...) if resp.Diagnostics.HasError() { return } - quality_monitors = append(quality_monitors, quality_monitor.ToObjectValue(ctx)) + results = append(results, quality_monitor.ToObjectValue(ctx)) } var newState QualityMonitorsList - newState.QualityMonitorV2 = types.ListValueMust(qualitymonitorv2_tf.QualityMonitor{}.Type(ctx), quality_monitors) + newState.QualityMonitorV2 = types.ListValueMust(qualitymonitorv2_tf.QualityMonitor{}.Type(ctx), results) resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) } diff --git a/internal/providers/pluginfw/products/quality_monitor_v2/resource_quality_monitor_v2.go b/internal/providers/pluginfw/products/quality_monitor_v2/resource_quality_monitor_v2.go index 732b2c6292..627c200152 100755 --- a/internal/providers/pluginfw/products/quality_monitor_v2/resource_quality_monitor_v2.go +++ b/internal/providers/pluginfw/products/quality_monitor_v2/resource_quality_monitor_v2.go @@ -24,21 +24,21 @@ import ( const resourceName = "quality_monitor_v2" -var _ resource.ResourceWithConfigure = &QualityMonitorV2Resource{} +var _ resource.ResourceWithConfigure = &QualityMonitorResource{} -func ResourceQualityMonitorV2() resource.Resource { - return &QualityMonitorV2Resource{} +func ResourceQualityMonitor() resource.Resource { + return &QualityMonitorResource{} } -type QualityMonitorV2Resource struct { +type QualityMonitorResource struct { Client *autogen.DatabricksClient } -func (r *QualityMonitorV2Resource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { +func (r *QualityMonitorResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { resp.TypeName = autogen.GetDatabricksProductionName(resourceName) } -func (r *QualityMonitorV2Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { +func (r *QualityMonitorResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { attrs, blocks := tfschema.ResourceStructToSchemaMap(ctx, qualitymonitorv2_tf.QualityMonitor{}, func(c tfschema.CustomizableSchema) tfschema.CustomizableSchema { c.AddPlanModifier(stringplanmodifier.UseStateForUnknown(), "object_type") c.AddPlanModifier(stringplanmodifier.UseStateForUnknown(), "object_id") @@ -51,11 +51,11 @@ func (r *QualityMonitorV2Resource) Schema(ctx context.Context, req resource.Sche } } -func (r *QualityMonitorV2Resource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { +func (r *QualityMonitorResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { r.Client = autogen.ConfigureResource(req, resp) } -func (r *QualityMonitorV2Resource) update(ctx context.Context, plan qualitymonitorv2_tf.QualityMonitor, diags *diag.Diagnostics, state *tfsdk.State) { +func (r *QualityMonitorResource) update(ctx context.Context, plan qualitymonitorv2_tf.QualityMonitor, diags *diag.Diagnostics, state *tfsdk.State) { client, clientDiags := r.Client.GetWorkspaceClient() diags.Append(clientDiags...) if diags.HasError() { @@ -90,7 +90,7 @@ func (r *QualityMonitorV2Resource) update(ctx context.Context, plan qualitymonit diags.Append(state.Set(ctx, newState)...) } -func (r *QualityMonitorV2Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { +func (r *QualityMonitorResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) client, diags := r.Client.GetWorkspaceClient() @@ -137,7 +137,7 @@ func (r *QualityMonitorV2Resource) Create(ctx context.Context, req resource.Crea } } -func (r *QualityMonitorV2Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { +func (r *QualityMonitorResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) client, diags := r.Client.GetWorkspaceClient() @@ -180,7 +180,7 @@ func (r *QualityMonitorV2Resource) Read(ctx context.Context, req resource.ReadRe resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) } -func (r *QualityMonitorV2Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { +func (r *QualityMonitorResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) var plan qualitymonitorv2_tf.QualityMonitor @@ -192,7 +192,7 @@ func (r *QualityMonitorV2Resource) Update(ctx context.Context, req resource.Upda r.update(ctx, plan, &resp.Diagnostics, &resp.State) } -func (r *QualityMonitorV2Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { +func (r *QualityMonitorResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) client, diags := r.Client.GetWorkspaceClient() @@ -220,9 +220,9 @@ func (r *QualityMonitorV2Resource) Delete(ctx context.Context, req resource.Dele } } -var _ resource.ResourceWithImportState = &QualityMonitorV2Resource{} +var _ resource.ResourceWithImportState = &QualityMonitorResource{} -func (r *QualityMonitorV2Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { +func (r *QualityMonitorResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { parts := strings.Split(req.ID, ",") if len(parts) != 2 || parts[0] == "" || parts[1] == "" { diff --git a/internal/providers/pluginfw/products/recipient_federation_policy/data_recipient_federation_policies.go b/internal/providers/pluginfw/products/recipient_federation_policy/data_recipient_federation_policies.go index ae636d2f27..549d2f9691 100755 --- a/internal/providers/pluginfw/products/recipient_federation_policy/data_recipient_federation_policies.go +++ b/internal/providers/pluginfw/products/recipient_federation_policy/data_recipient_federation_policies.go @@ -20,10 +20,10 @@ import ( const dataSourcesName = "recipient_federation_policies" -var _ datasource.DataSourceWithConfigure = &RecipientFederationPoliciesDataSource{} +var _ datasource.DataSourceWithConfigure = &FederationPoliciesDataSource{} -func DataSourceRecipientFederationPolicies() datasource.DataSource { - return &RecipientFederationPoliciesDataSource{} +func DataSourceFederationPolicies() datasource.DataSource { + return &FederationPoliciesDataSource{} } type FederationPoliciesList struct { @@ -42,15 +42,15 @@ func (FederationPoliciesList) GetComplexFieldTypes(context.Context) map[string]r } } -type RecipientFederationPoliciesDataSource struct { +type FederationPoliciesDataSource struct { Client *autogen.DatabricksClient } -func (r *RecipientFederationPoliciesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { +func (r *FederationPoliciesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = autogen.GetDatabricksProductionName(dataSourcesName) } -func (r *RecipientFederationPoliciesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { +func (r *FederationPoliciesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { attrs, blocks := tfschema.DataSourceStructToSchemaMap(ctx, FederationPoliciesList{}, nil) resp.Schema = schema.Schema{ Description: "Terraform schema for Databricks FederationPolicy", @@ -59,11 +59,11 @@ func (r *RecipientFederationPoliciesDataSource) Schema(ctx context.Context, req } } -func (r *RecipientFederationPoliciesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { +func (r *FederationPoliciesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { r.Client = autogen.ConfigureDataSource(req, resp) } -func (r *RecipientFederationPoliciesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { +func (r *FederationPoliciesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { ctx = pluginfwcontext.SetUserAgentInDataSourceContext(ctx, dataSourcesName) client, diags := r.Client.GetWorkspaceClient() @@ -90,17 +90,17 @@ func (r *RecipientFederationPoliciesDataSource) Read(ctx context.Context, req da return } - var policies = []attr.Value{} + var results = []attr.Value{} for _, item := range response { var federation_policy sharing_tf.FederationPolicy resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, item, &federation_policy)...) if resp.Diagnostics.HasError() { return } - policies = append(policies, federation_policy.ToObjectValue(ctx)) + results = append(results, federation_policy.ToObjectValue(ctx)) } var newState FederationPoliciesList - newState.RecipientFederationPolicies = types.ListValueMust(sharing_tf.FederationPolicy{}.Type(ctx), policies) + newState.RecipientFederationPolicies = types.ListValueMust(sharing_tf.FederationPolicy{}.Type(ctx), results) resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) } diff --git a/internal/providers/pluginfw/products/recipient_federation_policy/data_recipient_federation_policy.go b/internal/providers/pluginfw/products/recipient_federation_policy/data_recipient_federation_policy.go index cf5987d149..71929236a3 100755 --- a/internal/providers/pluginfw/products/recipient_federation_policy/data_recipient_federation_policy.go +++ b/internal/providers/pluginfw/products/recipient_federation_policy/data_recipient_federation_policy.go @@ -18,21 +18,21 @@ import ( const dataSourceName = "recipient_federation_policy" -var _ datasource.DataSourceWithConfigure = &RecipientFederationPolicyDataSource{} +var _ datasource.DataSourceWithConfigure = &FederationPolicyDataSource{} func DataSourceFederationPolicy() datasource.DataSource { - return &RecipientFederationPolicyDataSource{} + return &FederationPolicyDataSource{} } -type RecipientFederationPolicyDataSource struct { +type FederationPolicyDataSource struct { Client *autogen.DatabricksClient } -func (r *RecipientFederationPolicyDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { +func (r *FederationPolicyDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = autogen.GetDatabricksProductionName(dataSourceName) } -func (r *RecipientFederationPolicyDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { +func (r *FederationPolicyDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { attrs, blocks := tfschema.DataSourceStructToSchemaMap(ctx, sharing_tf.FederationPolicy{}, nil) resp.Schema = schema.Schema{ Description: "Terraform schema for Databricks FederationPolicy", @@ -41,11 +41,11 @@ func (r *RecipientFederationPolicyDataSource) Schema(ctx context.Context, req da } } -func (r *RecipientFederationPolicyDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { +func (r *FederationPolicyDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { r.Client = autogen.ConfigureDataSource(req, resp) } -func (r *RecipientFederationPolicyDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { +func (r *FederationPolicyDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { ctx = pluginfwcontext.SetUserAgentInDataSourceContext(ctx, dataSourceName) client, diags := r.Client.GetWorkspaceClient() diff --git a/internal/providers/pluginfw/products/recipient_federation_policy/resource_recipient_federation_policy.go b/internal/providers/pluginfw/products/recipient_federation_policy/resource_recipient_federation_policy.go index 57e8cc3bca..ccf7c2758b 100755 --- a/internal/providers/pluginfw/products/recipient_federation_policy/resource_recipient_federation_policy.go +++ b/internal/providers/pluginfw/products/recipient_federation_policy/resource_recipient_federation_policy.go @@ -24,21 +24,21 @@ import ( const resourceName = "recipient_federation_policy" -var _ resource.ResourceWithConfigure = &RecipientFederationPolicyResource{} +var _ resource.ResourceWithConfigure = &FederationPolicyResource{} -func ResourceRecipientFederationPolicy() resource.Resource { - return &RecipientFederationPolicyResource{} +func ResourceFederationPolicy() resource.Resource { + return &FederationPolicyResource{} } -type RecipientFederationPolicyResource struct { +type FederationPolicyResource struct { Client *autogen.DatabricksClient } -func (r *RecipientFederationPolicyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { +func (r *FederationPolicyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { resp.TypeName = autogen.GetDatabricksProductionName(resourceName) } -func (r *RecipientFederationPolicyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { +func (r *FederationPolicyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { attrs, blocks := tfschema.ResourceStructToSchemaMap(ctx, sharing_tf.FederationPolicy{}, func(c tfschema.CustomizableSchema) tfschema.CustomizableSchema { c.AddPlanModifier(stringplanmodifier.UseStateForUnknown(), "name") return c @@ -50,11 +50,11 @@ func (r *RecipientFederationPolicyResource) Schema(ctx context.Context, req reso } } -func (r *RecipientFederationPolicyResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { +func (r *FederationPolicyResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { r.Client = autogen.ConfigureResource(req, resp) } -func (r *RecipientFederationPolicyResource) update(ctx context.Context, plan sharing_tf.FederationPolicy, diags *diag.Diagnostics, state *tfsdk.State) { +func (r *FederationPolicyResource) update(ctx context.Context, plan sharing_tf.FederationPolicy, diags *diag.Diagnostics, state *tfsdk.State) { client, clientDiags := r.Client.GetWorkspaceClient() diags.Append(clientDiags...) if diags.HasError() { @@ -89,7 +89,7 @@ func (r *RecipientFederationPolicyResource) update(ctx context.Context, plan sha diags.Append(state.Set(ctx, newState)...) } -func (r *RecipientFederationPolicyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { +func (r *FederationPolicyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) client, diags := r.Client.GetWorkspaceClient() @@ -136,7 +136,7 @@ func (r *RecipientFederationPolicyResource) Create(ctx context.Context, req reso } } -func (r *RecipientFederationPolicyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { +func (r *FederationPolicyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) client, diags := r.Client.GetWorkspaceClient() @@ -179,7 +179,7 @@ func (r *RecipientFederationPolicyResource) Read(ctx context.Context, req resour resp.Diagnostics.Append(resp.State.Set(ctx, newState)...) } -func (r *RecipientFederationPolicyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { +func (r *FederationPolicyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) var plan sharing_tf.FederationPolicy @@ -191,7 +191,7 @@ func (r *RecipientFederationPolicyResource) Update(ctx context.Context, req reso r.update(ctx, plan, &resp.Diagnostics, &resp.State) } -func (r *RecipientFederationPolicyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { +func (r *FederationPolicyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { ctx = pluginfwcontext.SetUserAgentInResourceContext(ctx, resourceName) client, diags := r.Client.GetWorkspaceClient() @@ -219,9 +219,9 @@ func (r *RecipientFederationPolicyResource) Delete(ctx context.Context, req reso } } -var _ resource.ResourceWithImportState = &RecipientFederationPolicyResource{} +var _ resource.ResourceWithImportState = &FederationPolicyResource{} -func (r *RecipientFederationPolicyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { +func (r *FederationPolicyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { parts := strings.Split(req.ID, ",") if len(parts) != 1 || parts[0] == "" { diff --git a/internal/service/aibuilder_tf/legacy_model.go b/internal/service/aibuilder_tf/legacy_model.go index 9841f6d839..4a91989f45 100755 --- a/internal/service/aibuilder_tf/legacy_model.go +++ b/internal/service/aibuilder_tf/legacy_model.go @@ -28,18 +28,6 @@ type CancelCustomLlmOptimizationRunRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *CancelCustomLlmOptimizationRunRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelCustomLlmOptimizationRunRequest_SdkV2) { -} - -func (newState *CancelCustomLlmOptimizationRunRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelCustomLlmOptimizationRunRequest_SdkV2) { -} - -func (c CancelCustomLlmOptimizationRunRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelCustomLlmOptimizationRunRequest. // Container types (types.Map, types.List, types.Set) and 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,36 +59,6 @@ func (o CancelCustomLlmOptimizationRunRequest_SdkV2) Type(ctx context.Context) a } } -type CancelOptimizeResponse_SdkV2 struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelOptimizeResponse. -// Container types (types.Map, types.List, types.Set) and 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 CancelOptimizeResponse_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, CancelOptimizeResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o CancelOptimizeResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o CancelOptimizeResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type CreateCustomLlmRequest_SdkV2 struct { // Optional: UC path for agent artifacts. If you are using a dataset that // you only have read permissions, please provide a destination path where @@ -117,22 +75,6 @@ type CreateCustomLlmRequest_SdkV2 struct { Name types.String `tfsdk:"name"` } -func (newState *CreateCustomLlmRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomLlmRequest_SdkV2) { -} - -func (newState *CreateCustomLlmRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCustomLlmRequest_SdkV2) { -} - -func (c CreateCustomLlmRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["agent_artifact_path"] = attrs["agent_artifact_path"].SetOptional() - attrs["datasets"] = attrs["datasets"].SetOptional() - attrs["guidelines"] = attrs["guidelines"].SetOptional() - attrs["instructions"] = attrs["instructions"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCustomLlmRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -498,36 +440,6 @@ func (o DeleteCustomLlmRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type DeleteCustomLlmResponse_SdkV2 struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCustomLlmResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteCustomLlmResponse_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, DeleteCustomLlmResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteCustomLlmResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteCustomLlmResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type GetCustomLlmRequest_SdkV2 struct { // The id of the custom llm Id types.String `tfsdk:"-"` @@ -569,18 +481,6 @@ type StartCustomLlmOptimizationRunRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *StartCustomLlmOptimizationRunRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartCustomLlmOptimizationRunRequest_SdkV2) { -} - -func (newState *StartCustomLlmOptimizationRunRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartCustomLlmOptimizationRunRequest_SdkV2) { -} - -func (c StartCustomLlmOptimizationRunRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartCustomLlmOptimizationRunRequest. // Container types (types.Map, types.List, types.Set) and 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,21 +592,6 @@ type UpdateCustomLlmRequest_SdkV2 struct { UpdateMask types.String `tfsdk:"update_mask"` } -func (newState *UpdateCustomLlmRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCustomLlmRequest_SdkV2) { -} - -func (newState *UpdateCustomLlmRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCustomLlmRequest_SdkV2) { -} - -func (c UpdateCustomLlmRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["custom_llm"] = attrs["custom_llm"].SetRequired() - attrs["custom_llm"] = attrs["custom_llm"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["id"] = attrs["id"].SetRequired() - attrs["update_mask"] = attrs["update_mask"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCustomLlmRequest. // Container types (types.Map, types.List, types.Set) and 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/aibuilder_tf/model.go b/internal/service/aibuilder_tf/model.go index 8528ee4c4e..46f98587f0 100755 --- a/internal/service/aibuilder_tf/model.go +++ b/internal/service/aibuilder_tf/model.go @@ -27,18 +27,6 @@ type CancelCustomLlmOptimizationRunRequest struct { Id types.String `tfsdk:"-"` } -func (newState *CancelCustomLlmOptimizationRunRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelCustomLlmOptimizationRunRequest) { -} - -func (newState *CancelCustomLlmOptimizationRunRequest) SyncEffectiveFieldsDuringRead(existingState CancelCustomLlmOptimizationRunRequest) { -} - -func (c CancelCustomLlmOptimizationRunRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelCustomLlmOptimizationRunRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -70,36 +58,6 @@ func (o CancelCustomLlmOptimizationRunRequest) Type(ctx context.Context) attr.Ty } } -type CancelOptimizeResponse struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelOptimizeResponse. -// Container types (types.Map, types.List, types.Set) and 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 CancelOptimizeResponse) 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, CancelOptimizeResponse -// only implements ToObjectValue() and Type(). -func (o CancelOptimizeResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o CancelOptimizeResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type CreateCustomLlmRequest struct { // Optional: UC path for agent artifacts. If you are using a dataset that // you only have read permissions, please provide a destination path where @@ -116,22 +74,6 @@ type CreateCustomLlmRequest struct { Name types.String `tfsdk:"name"` } -func (newState *CreateCustomLlmRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomLlmRequest) { -} - -func (newState *CreateCustomLlmRequest) SyncEffectiveFieldsDuringRead(existingState CreateCustomLlmRequest) { -} - -func (c CreateCustomLlmRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["agent_artifact_path"] = attrs["agent_artifact_path"].SetOptional() - attrs["datasets"] = attrs["datasets"].SetOptional() - attrs["guidelines"] = attrs["guidelines"].SetOptional() - attrs["instructions"] = attrs["instructions"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCustomLlmRequest. // Container types (types.Map, types.List, types.Set) and 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,36 +438,6 @@ func (o DeleteCustomLlmRequest) Type(ctx context.Context) attr.Type { } } -type DeleteCustomLlmResponse struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCustomLlmResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteCustomLlmResponse) 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, DeleteCustomLlmResponse -// only implements ToObjectValue() and Type(). -func (o DeleteCustomLlmResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteCustomLlmResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type GetCustomLlmRequest struct { // The id of the custom llm Id types.String `tfsdk:"-"` @@ -567,18 +479,6 @@ type StartCustomLlmOptimizationRunRequest struct { Id types.String `tfsdk:"-"` } -func (newState *StartCustomLlmOptimizationRunRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartCustomLlmOptimizationRunRequest) { -} - -func (newState *StartCustomLlmOptimizationRunRequest) SyncEffectiveFieldsDuringRead(existingState StartCustomLlmOptimizationRunRequest) { -} - -func (c StartCustomLlmOptimizationRunRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartCustomLlmOptimizationRunRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -690,20 +590,6 @@ type UpdateCustomLlmRequest struct { UpdateMask types.String `tfsdk:"update_mask"` } -func (newState *UpdateCustomLlmRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCustomLlmRequest) { -} - -func (newState *UpdateCustomLlmRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCustomLlmRequest) { -} - -func (c UpdateCustomLlmRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["custom_llm"] = attrs["custom_llm"].SetRequired() - attrs["id"] = attrs["id"].SetRequired() - attrs["update_mask"] = attrs["update_mask"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCustomLlmRequest. // Container types (types.Map, types.List, types.Set) and 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/legacy_model.go b/internal/service/apps_tf/legacy_model.go index de4c55c5bd..d36f39b547 100755 --- a/internal/service/apps_tf/legacy_model.go +++ b/internal/service/apps_tf/legacy_model.go @@ -397,7 +397,7 @@ func (o *App_SdkV2) SetUserApiScopes(ctx context.Context, v []types.String) { type AppAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -811,7 +811,7 @@ type AppPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -983,7 +983,7 @@ func (o *AppPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []App type AppPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -1039,19 +1039,6 @@ type AppPermissionsRequest_SdkV2 struct { AppName types.String `tfsdk:"-"` } -func (newState *AppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermissionsRequest_SdkV2) { -} - -func (newState *AppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppPermissionsRequest_SdkV2) { -} - -func (c AppPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["app_name"] = attrs["app_name"].SetRequired() - - return attrs -} - // 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 @@ -1729,6 +1716,7 @@ func (o ComputeStatus_SdkV2) Type(ctx context.Context) attr.Type { } type CreateAppDeploymentRequest_SdkV2 struct { + // The app deployment configuration. AppDeployment types.List `tfsdk:"app_deployment"` // The name of the app. AppName types.String `tfsdk:"-"` @@ -2384,18 +2372,6 @@ type StartAppRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *StartAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartAppRequest_SdkV2) { -} - -func (newState *StartAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartAppRequest_SdkV2) { -} - -func (c StartAppRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 @@ -2432,18 +2408,6 @@ type StopAppRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *StopAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopAppRequest_SdkV2) { -} - -func (newState *StopAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopAppRequest_SdkV2) { -} - -func (c StopAppRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/apps_tf/model.go b/internal/service/apps_tf/model.go index 9ede05a58d..628f4349a2 100755 --- a/internal/service/apps_tf/model.go +++ b/internal/service/apps_tf/model.go @@ -392,7 +392,7 @@ func (o *App) SetUserApiScopes(ctx context.Context, v []types.String) { type AppAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -804,7 +804,7 @@ type AppPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -976,7 +976,7 @@ func (o *AppPermissions) SetAccessControlList(ctx context.Context, v []AppAccess type AppPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -1032,19 +1032,6 @@ type AppPermissionsRequest struct { AppName types.String `tfsdk:"-"` } -func (newState *AppPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermissionsRequest) { -} - -func (newState *AppPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState AppPermissionsRequest) { -} - -func (c AppPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["app_name"] = attrs["app_name"].SetRequired() - - return attrs -} - // 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 @@ -1717,6 +1704,7 @@ func (o ComputeStatus) Type(ctx context.Context) attr.Type { } type CreateAppDeploymentRequest struct { + // The app deployment configuration. AppDeployment types.Object `tfsdk:"app_deployment"` // The name of the app. AppName types.String `tfsdk:"-"` @@ -2372,18 +2360,6 @@ type StartAppRequest struct { Name types.String `tfsdk:"-"` } -func (newState *StartAppRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartAppRequest) { -} - -func (newState *StartAppRequest) SyncEffectiveFieldsDuringRead(existingState StartAppRequest) { -} - -func (c StartAppRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 @@ -2420,18 +2396,6 @@ type StopAppRequest struct { Name types.String `tfsdk:"-"` } -func (newState *StopAppRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopAppRequest) { -} - -func (newState *StopAppRequest) SyncEffectiveFieldsDuringRead(existingState StopAppRequest) { -} - -func (c StopAppRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/billing_tf/legacy_model.go b/internal/service/billing_tf/legacy_model.go index 54018c54ec..1830d03bd6 100755 --- a/internal/service/billing_tf/legacy_model.go +++ b/internal/service/billing_tf/legacy_model.go @@ -832,19 +832,6 @@ type CreateBillingUsageDashboardRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"workspace_id"` } -func (newState *CreateBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBillingUsageDashboardRequest_SdkV2) { -} - -func (newState *CreateBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBillingUsageDashboardRequest_SdkV2) { -} - -func (c CreateBillingUsageDashboardRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_type"] = attrs["dashboard_type"].SetOptional() - attrs["workspace_id"] = attrs["workspace_id"].SetOptional() - - return attrs -} - // 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 @@ -1213,19 +1200,6 @@ type CreateBudgetConfigurationRequest_SdkV2 struct { Budget types.List `tfsdk:"budget"` } -func (newState *CreateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationRequest_SdkV2) { -} - -func (newState *CreateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationRequest_SdkV2) { -} - -func (c CreateBudgetConfigurationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["budget"] = attrs["budget"].SetRequired() - attrs["budget"] = attrs["budget"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -1378,20 +1352,6 @@ type CreateBudgetPolicyRequest_SdkV2 struct { RequestId types.String `tfsdk:"request_id"` } -func (newState *CreateBudgetPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetPolicyRequest_SdkV2) { -} - -func (newState *CreateBudgetPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetPolicyRequest_SdkV2) { -} - -func (c CreateBudgetPolicyRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["policy"] = attrs["policy"].SetOptional() - attrs["policy"] = attrs["policy"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["request_id"] = attrs["request_id"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1734,36 +1694,6 @@ func (o DeleteBudgetPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type DeleteResponse_SdkV2 struct { -} - -// 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 -// 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 DeleteResponse_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, DeleteResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DownloadRequest_SdkV2 struct { // Format: `YYYY-MM`. Last month to return billable usage logs for. This // field is required. @@ -3222,20 +3152,6 @@ type UpdateBudgetConfigurationRequest_SdkV2 struct { BudgetId types.String `tfsdk:"-"` } -func (newState *UpdateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationRequest_SdkV2) { -} - -func (newState *UpdateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationRequest_SdkV2) { -} - -func (c UpdateBudgetConfigurationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["budget"] = attrs["budget"].SetRequired() - attrs["budget"] = attrs["budget"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["budget_id"] = attrs["budget_id"].SetRequired() - - return attrs -} - // 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 @@ -3382,7 +3298,9 @@ type UpdateBudgetPolicyRequest_SdkV2 struct { // DEPRECATED. This is redundant field as LimitConfig is part of the // BudgetPolicy LimitConfig types.List `tfsdk:"-"` - // Contains the BudgetPolicy details. + // The policy to update. `creator_user_id` cannot be specified in the + // request. All other fields must be specified even if not changed. The + // `policy_id` is used to identify the policy to update. Policy types.List `tfsdk:"policy"` // The Id of the policy. This field is generated by Databricks and globally // unique. @@ -3495,19 +3413,6 @@ type UpdateLogDeliveryConfigurationStatusRequest_SdkV2 struct { Status types.String `tfsdk:"status"` } -func (newState *UpdateLogDeliveryConfigurationStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateLogDeliveryConfigurationStatusRequest_SdkV2) { -} - -func (newState *UpdateLogDeliveryConfigurationStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateLogDeliveryConfigurationStatusRequest_SdkV2) { -} - -func (c UpdateLogDeliveryConfigurationStatusRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["log_delivery_configuration_id"] = attrs["log_delivery_configuration_id"].SetRequired() - attrs["status"] = attrs["status"].SetRequired() - - return attrs -} - // 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 @@ -3543,23 +3448,9 @@ func (o UpdateLogDeliveryConfigurationStatusRequest_SdkV2) Type(ctx context.Cont // * Properties of the new log delivery configuration. type WrappedCreateLogDeliveryConfiguration_SdkV2 struct { - // * Log Delivery Configuration LogDeliveryConfiguration types.List `tfsdk:"log_delivery_configuration"` } -func (newState *WrappedCreateLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedCreateLogDeliveryConfiguration_SdkV2) { -} - -func (newState *WrappedCreateLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState WrappedCreateLogDeliveryConfiguration_SdkV2) { -} - -func (c WrappedCreateLogDeliveryConfiguration_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["log_delivery_configuration"] = attrs["log_delivery_configuration"].SetRequired() - attrs["log_delivery_configuration"] = attrs["log_delivery_configuration"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 diff --git a/internal/service/billing_tf/model.go b/internal/service/billing_tf/model.go index 07cb11a07a..bb694531e7 100755 --- a/internal/service/billing_tf/model.go +++ b/internal/service/billing_tf/model.go @@ -828,19 +828,6 @@ type CreateBillingUsageDashboardRequest struct { WorkspaceId types.Int64 `tfsdk:"workspace_id"` } -func (newState *CreateBillingUsageDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBillingUsageDashboardRequest) { -} - -func (newState *CreateBillingUsageDashboardRequest) SyncEffectiveFieldsDuringRead(existingState CreateBillingUsageDashboardRequest) { -} - -func (c CreateBillingUsageDashboardRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_type"] = attrs["dashboard_type"].SetOptional() - attrs["workspace_id"] = attrs["workspace_id"].SetOptional() - - return attrs -} - // 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 @@ -1208,18 +1195,6 @@ type CreateBudgetConfigurationRequest struct { Budget types.Object `tfsdk:"budget"` } -func (newState *CreateBudgetConfigurationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationRequest) { -} - -func (newState *CreateBudgetConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationRequest) { -} - -func (c CreateBudgetConfigurationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["budget"] = attrs["budget"].SetRequired() - - return attrs -} - // 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 @@ -1371,19 +1346,6 @@ type CreateBudgetPolicyRequest struct { RequestId types.String `tfsdk:"request_id"` } -func (newState *CreateBudgetPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetPolicyRequest) { -} - -func (newState *CreateBudgetPolicyRequest) SyncEffectiveFieldsDuringRead(existingState CreateBudgetPolicyRequest) { -} - -func (c CreateBudgetPolicyRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["policy"] = attrs["policy"].SetOptional() - attrs["request_id"] = attrs["request_id"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1726,36 +1688,6 @@ func (o DeleteBudgetPolicyRequest) Type(ctx context.Context) attr.Type { } } -type DeleteResponse struct { -} - -// 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 -// 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 DeleteResponse) 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, DeleteResponse -// only implements ToObjectValue() and Type(). -func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DownloadRequest struct { // Format: `YYYY-MM`. Last month to return billable usage logs for. This // field is required. @@ -3210,19 +3142,6 @@ type UpdateBudgetConfigurationRequest struct { BudgetId types.String `tfsdk:"-"` } -func (newState *UpdateBudgetConfigurationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationRequest) { -} - -func (newState *UpdateBudgetConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationRequest) { -} - -func (c UpdateBudgetConfigurationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["budget"] = attrs["budget"].SetRequired() - attrs["budget_id"] = attrs["budget_id"].SetRequired() - - return attrs -} - // 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 @@ -3368,7 +3287,9 @@ type UpdateBudgetPolicyRequest struct { // DEPRECATED. This is redundant field as LimitConfig is part of the // BudgetPolicy LimitConfig types.Object `tfsdk:"-"` - // Contains the BudgetPolicy details. + // The policy to update. `creator_user_id` cannot be specified in the + // request. All other fields must be specified even if not changed. The + // `policy_id` is used to identify the policy to update. Policy types.Object `tfsdk:"policy"` // The Id of the policy. This field is generated by Databricks and globally // unique. @@ -3481,19 +3402,6 @@ type UpdateLogDeliveryConfigurationStatusRequest struct { Status types.String `tfsdk:"status"` } -func (newState *UpdateLogDeliveryConfigurationStatusRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateLogDeliveryConfigurationStatusRequest) { -} - -func (newState *UpdateLogDeliveryConfigurationStatusRequest) SyncEffectiveFieldsDuringRead(existingState UpdateLogDeliveryConfigurationStatusRequest) { -} - -func (c UpdateLogDeliveryConfigurationStatusRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["log_delivery_configuration_id"] = attrs["log_delivery_configuration_id"].SetRequired() - attrs["status"] = attrs["status"].SetRequired() - - return attrs -} - // 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 @@ -3529,22 +3437,9 @@ func (o UpdateLogDeliveryConfigurationStatusRequest) Type(ctx context.Context) a // * Properties of the new log delivery configuration. type WrappedCreateLogDeliveryConfiguration struct { - // * Log Delivery Configuration LogDeliveryConfiguration types.Object `tfsdk:"log_delivery_configuration"` } -func (newState *WrappedCreateLogDeliveryConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedCreateLogDeliveryConfiguration) { -} - -func (newState *WrappedCreateLogDeliveryConfiguration) SyncEffectiveFieldsDuringRead(existingState WrappedCreateLogDeliveryConfiguration) { -} - -func (c WrappedCreateLogDeliveryConfiguration) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["log_delivery_configuration"] = attrs["log_delivery_configuration"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/catalog_tf/legacy_model.go b/internal/service/catalog_tf/legacy_model.go index ef669a3584..3be01c6c7a 100755 --- a/internal/service/catalog_tf/legacy_model.go +++ b/internal/service/catalog_tf/legacy_model.go @@ -27,19 +27,6 @@ type AccountsCreateMetastore_SdkV2 struct { MetastoreInfo types.List `tfsdk:"metastore_info"` } -func (newState *AccountsCreateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateMetastore_SdkV2) { -} - -func (newState *AccountsCreateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastore_SdkV2) { -} - -func (c AccountsCreateMetastore_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metastore_info"] = attrs["metastore_info"].SetOptional() - attrs["metastore_info"] = attrs["metastore_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -109,21 +96,6 @@ type AccountsCreateMetastoreAssignment_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *AccountsCreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateMetastoreAssignment_SdkV2) { -} - -func (newState *AccountsCreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastoreAssignment_SdkV2) { -} - -func (c AccountsCreateMetastoreAssignment_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metastore_assignment"] = attrs["metastore_assignment"].SetOptional() - attrs["metastore_assignment"] = attrs["metastore_assignment"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 @@ -195,20 +167,6 @@ type AccountsCreateStorageCredential_SdkV2 struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *AccountsCreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateStorageCredential_SdkV2) { -} - -func (newState *AccountsCreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsCreateStorageCredential_SdkV2) { -} - -func (c AccountsCreateStorageCredential_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["credential_info"] = attrs["credential_info"].SetOptional() - attrs["credential_info"] = attrs["credential_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - - return attrs -} - // 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 @@ -513,20 +471,6 @@ type AccountsUpdateMetastore_SdkV2 struct { MetastoreInfo types.List `tfsdk:"metastore_info"` } -func (newState *AccountsUpdateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateMetastore_SdkV2) { -} - -func (newState *AccountsUpdateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastore_SdkV2) { -} - -func (c AccountsUpdateMetastore_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["metastore_info"] = attrs["metastore_info"].SetOptional() - attrs["metastore_info"] = attrs["metastore_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -598,21 +542,6 @@ type AccountsUpdateMetastoreAssignment_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *AccountsUpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateMetastoreAssignment_SdkV2) { -} - -func (newState *AccountsUpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastoreAssignment_SdkV2) { -} - -func (c AccountsUpdateMetastoreAssignment_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metastore_assignment"] = attrs["metastore_assignment"].SetOptional() - attrs["metastore_assignment"] = attrs["metastore_assignment"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 @@ -686,21 +615,6 @@ type AccountsUpdateStorageCredential_SdkV2 struct { StorageCredentialName types.String `tfsdk:"-"` } -func (newState *AccountsUpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateStorageCredential_SdkV2) { -} - -func (newState *AccountsUpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateStorageCredential_SdkV2) { -} - -func (c AccountsUpdateStorageCredential_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["credential_info"] = attrs["credential_info"].SetOptional() - attrs["credential_info"] = attrs["credential_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["storage_credential_name"] = attrs["storage_credential_name"].SetRequired() - - return attrs -} - // 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 @@ -1199,7 +1113,7 @@ type AwsSqsQueue_SdkV2 struct { // resources. ManagedResourceId types.String `tfsdk:"managed_resource_id"` // The AQS queue url in the format - // https://sqs.{region}.amazonaws.com/{account id}/{queue name} REQUIRED for + // https://sqs.{region}.amazonaws.com/{account id}/{queue name} Required for // provided_sqs. QueueUrl types.String `tfsdk:"queue_url"` } @@ -1500,14 +1414,14 @@ type AzureQueueStorage_SdkV2 struct { // resources. ManagedResourceId types.String `tfsdk:"managed_resource_id"` // The AQS queue url in the format https://{storage - // account}.queue.core.windows.net/{queue name} REQUIRED for provided_aqs. + // account}.queue.core.windows.net/{queue name} Required for provided_aqs. QueueUrl types.String `tfsdk:"queue_url"` // The resource group for the queue, event grid subscription, and external - // location storage account. ONLY REQUIRED for locations with a service + // location storage account. Only required for locations with a service // principal storage credential ResourceGroup types.String `tfsdk:"resource_group"` - // OPTIONAL: The subscription id for the queue, event grid subscription, and - // external location storage account. REQUIRED for locations with a service + // Optional subscription id for the queue, event grid subscription, and + // external location storage account. Required for locations with a service // principal storage credential SubscriptionId types.String `tfsdk:"subscription_id"` } @@ -1751,7 +1665,7 @@ type CatalogInfo_SdkV2 struct { // associated object through the BROWSE privilege when include_browse is // enabled in the request. BrowseOnly types.Bool `tfsdk:"browse_only"` - // The type of the catalog. + CatalogType types.String `tfsdk:"catalog_type"` // User-provided free-form text description. Comment types.String `tfsdk:"comment"` @@ -1786,9 +1700,9 @@ type CatalogInfo_SdkV2 struct { // 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"` - // Status of an asynchronously provisioned resource. + ProvisioningInfo types.List `tfsdk:"provisioning_info"` - // The type of Unity Catalog securable. + SecurableType types.String `tfsdk:"securable_type"` // The name of the share under the share provider. ShareName types.String `tfsdk:"share_name"` @@ -2310,6 +2224,108 @@ func (o *ColumnMask_SdkV2) SetUsingColumnNames(ctx context.Context, v []types.St o.UsingColumnNames = types.ListValueMust(t, vs) } +type ColumnRelationship_SdkV2 struct { + Source types.String `tfsdk:"source"` + + Target types.String `tfsdk:"target"` +} + +func (newState *ColumnRelationship_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnRelationship_SdkV2) { +} + +func (newState *ColumnRelationship_SdkV2) SyncEffectiveFieldsDuringRead(existingState ColumnRelationship_SdkV2) { +} + +func (c ColumnRelationship_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["source"] = attrs["source"].SetOptional() + attrs["target"] = attrs["target"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnRelationship. +// Container types (types.Map, types.List, types.Set) and 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 ColumnRelationship_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, ColumnRelationship_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ColumnRelationship_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ColumnRelationship_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "source": types.StringType, + "target": types.StringType, + }, + } +} + +// A connection that is dependent on a SQL object. +type ConnectionDependency_SdkV2 struct { + // Full name of the dependent connection, in the form of + // __connection_name__. + ConnectionName types.String `tfsdk:"connection_name"` +} + +func (newState *ConnectionDependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ConnectionDependency_SdkV2) { +} + +func (newState *ConnectionDependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState ConnectionDependency_SdkV2) { +} + +func (c ConnectionDependency_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["connection_name"] = attrs["connection_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ConnectionDependency. +// Container types (types.Map, types.List, types.Set) and 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 ConnectionDependency_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, ConnectionDependency_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ConnectionDependency_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "connection_name": o.ConnectionName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ConnectionDependency_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "connection_name": types.StringType, + }, + } +} + type ConnectionInfo_SdkV2 struct { // User-provided free-form text description. Comment types.String `tfsdk:"comment"` @@ -2335,11 +2351,11 @@ type ConnectionInfo_SdkV2 struct { Owner types.String `tfsdk:"owner"` // A map of key-value properties attached to the securable. Properties types.Map `tfsdk:"properties"` - // Status of an asynchronously provisioned resource. + ProvisioningInfo types.List `tfsdk:"provisioning_info"` // If the connection is read only. ReadOnly types.Bool `tfsdk:"read_only"` - // The type of Unity Catalog securable. + SecurableType types.String `tfsdk:"securable_type"` // Time at which this connection was updated, in epoch milliseconds. UpdatedAt types.Int64 `tfsdk:"updated_at"` @@ -2648,25 +2664,6 @@ type CreateCatalog_SdkV2 struct { StorageRoot types.String `tfsdk:"storage_root"` } -func (newState *CreateCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCatalog_SdkV2) { -} - -func (newState *CreateCatalog_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCatalog_SdkV2) { -} - -func (c CreateCatalog_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["connection_name"] = attrs["connection_name"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["options"] = attrs["options"].SetOptional() - attrs["properties"] = attrs["properties"].SetOptional() - attrs["provider_name"] = attrs["provider_name"].SetOptional() - attrs["share_name"] = attrs["share_name"].SetOptional() - attrs["storage_root"] = attrs["storage_root"].SetOptional() - - return attrs -} - // 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 @@ -2786,23 +2783,6 @@ type CreateConnection_SdkV2 struct { ReadOnly types.Bool `tfsdk:"read_only"` } -func (newState *CreateConnection_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateConnection_SdkV2) { -} - -func (newState *CreateConnection_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateConnection_SdkV2) { -} - -func (c CreateConnection_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["connection_type"] = attrs["connection_type"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["options"] = attrs["options"].SetRequired() - attrs["properties"] = attrs["properties"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - - return attrs -} - // 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 @@ -2927,30 +2907,6 @@ type CreateCredentialRequest_SdkV2 struct { SkipValidation types.Bool `tfsdk:"skip_validation"` } -func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialRequest_SdkV2) { -} - -func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest_SdkV2) { -} - -func (c CreateCredentialRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_iam_role"] = attrs["aws_iam_role"].SetOptional() - attrs["aws_iam_role"] = attrs["aws_iam_role"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].SetOptional() - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_service_principal"] = attrs["azure_service_principal"].SetOptional() - attrs["azure_service_principal"] = attrs["azure_service_principal"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["comment"] = attrs["comment"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["name"] = attrs["name"].SetRequired() - attrs["purpose"] = attrs["purpose"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - - return attrs -} - // 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 @@ -3115,21 +3071,85 @@ func (o *CreateCredentialRequest_SdkV2) SetDatabricksGcpServiceAccount(ctx conte o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) } +type CreateExternalLineageRelationshipRequest_SdkV2 struct { + ExternalLineageRelationship types.List `tfsdk:"external_lineage_relationship"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExternalLineageRelationshipRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateExternalLineageRelationshipRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_relationship": reflect.TypeOf(CreateRequestExternalLineage_SdkV2{}), + } +} + +// 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, CreateExternalLineageRelationshipRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateExternalLineageRelationshipRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_relationship": o.ExternalLineageRelationship, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExternalLineageRelationshipRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_relationship": basetypes.ListType{ + ElemType: CreateRequestExternalLineage_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetExternalLineageRelationship returns the value of the ExternalLineageRelationship field in CreateExternalLineageRelationshipRequest_SdkV2 as +// a CreateRequestExternalLineage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateExternalLineageRelationshipRequest_SdkV2) GetExternalLineageRelationship(ctx context.Context) (CreateRequestExternalLineage_SdkV2, bool) { + var e CreateRequestExternalLineage_SdkV2 + if o.ExternalLineageRelationship.IsNull() || o.ExternalLineageRelationship.IsUnknown() { + return e, false + } + var v []CreateRequestExternalLineage_SdkV2 + d := o.ExternalLineageRelationship.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalLineageRelationship sets the value of the ExternalLineageRelationship field in CreateExternalLineageRelationshipRequest_SdkV2. +func (o *CreateExternalLineageRelationshipRequest_SdkV2) SetExternalLineageRelationship(ctx context.Context, v CreateRequestExternalLineage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_lineage_relationship"] + o.ExternalLineageRelationship = types.ListValueMust(t, vs) +} + type CreateExternalLocation_SdkV2 struct { // User-provided free-form text description. Comment types.String `tfsdk:"comment"` // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name"` - // [Create:OPT Update:OPT] Whether to enable file events on this external - // location. + // Whether to enable file events on this external location. EnableFileEvents types.Bool `tfsdk:"enable_file_events"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details"` // 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"` - // [Create:OPT Update:OPT] File event queue settings. + // File event queue settings. FileEventQueue types.List `tfsdk:"file_event_queue"` // Name of the external location. Name types.String `tfsdk:"name"` @@ -3142,41 +3162,18 @@ type CreateExternalLocation_SdkV2 struct { Url types.String `tfsdk:"url"` } -func (newState *CreateExternalLocation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExternalLocation_SdkV2) { -} - -func (newState *CreateExternalLocation_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExternalLocation_SdkV2) { -} - -func (c CreateExternalLocation_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["credential_name"] = attrs["credential_name"].SetRequired() - attrs["enable_file_events"] = attrs["enable_file_events"].SetOptional() - attrs["encryption_details"] = attrs["encryption_details"].SetOptional() - attrs["encryption_details"] = attrs["encryption_details"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["fallback"] = attrs["fallback"].SetOptional() - attrs["file_event_queue"] = attrs["file_event_queue"].SetOptional() - attrs["file_event_queue"] = attrs["file_event_queue"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["name"] = attrs["name"].SetRequired() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - attrs["url"] = attrs["url"].SetRequired() - - return attrs -} - -// 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 -// 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 CreateExternalLocation_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "encryption_details": reflect.TypeOf(EncryptionDetails_SdkV2{}), - "file_event_queue": reflect.TypeOf(FileEventQueue_SdkV2{}), - } +// 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 +// 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 CreateExternalLocation_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "encryption_details": reflect.TypeOf(EncryptionDetails_SdkV2{}), + "file_event_queue": reflect.TypeOf(FileEventQueue_SdkV2{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -3273,6 +3270,71 @@ func (o *CreateExternalLocation_SdkV2) SetFileEventQueue(ctx context.Context, v o.FileEventQueue = types.ListValueMust(t, vs) } +type CreateExternalMetadataRequest_SdkV2 struct { + ExternalMetadata types.List `tfsdk:"external_metadata"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExternalMetadataRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateExternalMetadataRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_metadata": reflect.TypeOf(ExternalMetadata_SdkV2{}), + } +} + +// 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, CreateExternalMetadataRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateExternalMetadataRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_metadata": o.ExternalMetadata, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExternalMetadataRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_metadata": basetypes.ListType{ + ElemType: ExternalMetadata_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetExternalMetadata returns the value of the ExternalMetadata field in CreateExternalMetadataRequest_SdkV2 as +// a ExternalMetadata_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateExternalMetadataRequest_SdkV2) GetExternalMetadata(ctx context.Context) (ExternalMetadata_SdkV2, bool) { + var e ExternalMetadata_SdkV2 + if o.ExternalMetadata.IsNull() || o.ExternalMetadata.IsUnknown() { + return e, false + } + var v []ExternalMetadata_SdkV2 + d := o.ExternalMetadata.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalMetadata sets the value of the ExternalMetadata field in CreateExternalMetadataRequest_SdkV2. +func (o *CreateExternalMetadataRequest_SdkV2) SetExternalMetadata(ctx context.Context, v ExternalMetadata_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_metadata"] + o.ExternalMetadata = types.ListValueMust(t, vs) +} + type CreateFunction_SdkV2 struct { // Name of parent catalog. CatalogName types.String `tfsdk:"catalog_name"` @@ -3521,19 +3583,6 @@ type CreateFunctionRequest_SdkV2 struct { FunctionInfo types.List `tfsdk:"function_info"` } -func (newState *CreateFunctionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFunctionRequest_SdkV2) { -} - -func (newState *CreateFunctionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFunctionRequest_SdkV2) { -} - -func (c CreateFunctionRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["function_info"] = attrs["function_info"].SetRequired() - attrs["function_info"] = attrs["function_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -3754,37 +3803,6 @@ type CreateMonitor_SdkV2 struct { WarehouseId types.String `tfsdk:"warehouse_id"` } -func (newState *CreateMonitor_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateMonitor_SdkV2) { -} - -func (newState *CreateMonitor_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateMonitor_SdkV2) { -} - -func (c CreateMonitor_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["assets_dir"] = attrs["assets_dir"].SetRequired() - attrs["baseline_table_name"] = attrs["baseline_table_name"].SetOptional() - attrs["custom_metrics"] = attrs["custom_metrics"].SetOptional() - attrs["data_classification_config"] = attrs["data_classification_config"].SetOptional() - attrs["data_classification_config"] = attrs["data_classification_config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["inference_log"] = attrs["inference_log"].SetOptional() - attrs["inference_log"] = attrs["inference_log"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["notifications"] = attrs["notifications"].SetOptional() - attrs["notifications"] = attrs["notifications"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["output_schema_name"] = attrs["output_schema_name"].SetRequired() - attrs["schedule"] = attrs["schedule"].SetOptional() - attrs["schedule"] = attrs["schedule"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["skip_builtin_dashboard"] = attrs["skip_builtin_dashboard"].SetOptional() - attrs["slicing_exprs"] = attrs["slicing_exprs"].SetOptional() - attrs["snapshot"] = attrs["snapshot"].SetOptional() - attrs["snapshot"] = attrs["snapshot"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["table_name"] = attrs["table_name"].SetRequired() - attrs["time_series"] = attrs["time_series"].SetOptional() - attrs["time_series"] = attrs["time_series"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["warehouse_id"] = attrs["warehouse_id"].SetOptional() - - return attrs -} - // 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 @@ -4076,7 +4094,7 @@ func (o *CreateMonitor_SdkV2) SetTimeSeries(ctx context.Context, v MonitorTimeSe } type CreateOnlineTableRequest_SdkV2 struct { - // Online Table information. + // Specification of the online table to be created. Table types.List `tfsdk:"table"` } @@ -4155,22 +4173,6 @@ type CreateRegisteredModelRequest_SdkV2 struct { StorageLocation types.String `tfsdk:"storage_location"` } -func (newState *CreateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegisteredModelRequest_SdkV2) { -} - -func (newState *CreateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRegisteredModelRequest_SdkV2) { -} - -func (c CreateRegisteredModelRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["catalog_name"] = attrs["catalog_name"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["schema_name"] = attrs["schema_name"].SetRequired() - attrs["storage_location"] = attrs["storage_location"].SetOptional() - - return attrs -} - // 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 @@ -4210,6 +4212,193 @@ func (o CreateRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type } } +type CreateRequestExternalLineage_SdkV2 struct { + // List of column relationships between source and target objects. + Columns types.List `tfsdk:"columns"` + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Key-value properties associated with the external lineage relationship. + Properties types.Map `tfsdk:"properties"` + // Source object of the external lineage relationship. + Source types.List `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.List `tfsdk:"target"` +} + +func (newState *CreateRequestExternalLineage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRequestExternalLineage_SdkV2) { +} + +func (newState *CreateRequestExternalLineage_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRequestExternalLineage_SdkV2) { +} + +func (c CreateRequestExternalLineage_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["id"] = attrs["id"].SetComputed() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["source"] = attrs["source"].SetRequired() + attrs["source"] = attrs["source"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["target"] = attrs["target"].SetRequired() + attrs["target"] = attrs["target"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRequestExternalLineage. +// Container types (types.Map, types.List, types.Set) and 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 CreateRequestExternalLineage_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnRelationship_SdkV2{}), + "properties": reflect.TypeOf(types.String{}), + "source": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + "target": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + } +} + +// 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, CreateRequestExternalLineage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateRequestExternalLineage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "id": o.Id, + "properties": o.Properties, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateRequestExternalLineage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: ColumnRelationship_SdkV2{}.Type(ctx), + }, + "id": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "source": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + "target": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in CreateRequestExternalLineage_SdkV2 as +// a slice of ColumnRelationship_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRequestExternalLineage_SdkV2) GetColumns(ctx context.Context) ([]ColumnRelationship_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnRelationship_SdkV2 + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in CreateRequestExternalLineage_SdkV2. +func (o *CreateRequestExternalLineage_SdkV2) SetColumns(ctx context.Context, v []ColumnRelationship_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in CreateRequestExternalLineage_SdkV2 as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRequestExternalLineage_SdkV2) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in CreateRequestExternalLineage_SdkV2. +func (o *CreateRequestExternalLineage_SdkV2) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + +// GetSource returns the value of the Source field in CreateRequestExternalLineage_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRequestExternalLineage_SdkV2) GetSource(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Source.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSource sets the value of the Source field in CreateRequestExternalLineage_SdkV2. +func (o *CreateRequestExternalLineage_SdkV2) SetSource(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["source"] + o.Source = types.ListValueMust(t, vs) +} + +// GetTarget returns the value of the Target field in CreateRequestExternalLineage_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRequestExternalLineage_SdkV2) GetTarget(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Target.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTarget sets the value of the Target field in CreateRequestExternalLineage_SdkV2. +func (o *CreateRequestExternalLineage_SdkV2) SetTarget(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["target"] + o.Target = types.ListValueMust(t, vs) +} + type CreateResponse_SdkV2 struct { } @@ -4253,22 +4442,6 @@ type CreateSchema_SdkV2 struct { StorageRoot types.String `tfsdk:"storage_root"` } -func (newState *CreateSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateSchema_SdkV2) { -} - -func (newState *CreateSchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateSchema_SdkV2) { -} - -func (c CreateSchema_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["catalog_name"] = attrs["catalog_name"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["properties"] = attrs["properties"].SetOptional() - attrs["storage_root"] = attrs["storage_root"].SetOptional() - - return attrs -} - // 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 @@ -4581,28 +4754,11 @@ func (o *CreateStorageCredential_SdkV2) SetDatabricksGcpServiceAccount(ctx conte } type CreateTableConstraint_SdkV2 struct { - // A table constraint, as defined by *one* of the following fields being - // set: __primary_key_constraint__, __foreign_key_constraint__, - // __named_table_constraint__. Constraint types.List `tfsdk:"constraint"` // The full name of the table referenced by the constraint. FullNameArg types.String `tfsdk:"full_name_arg"` } -func (newState *CreateTableConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTableConstraint_SdkV2) { -} - -func (newState *CreateTableConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTableConstraint_SdkV2) { -} - -func (c CreateTableConstraint_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["constraint"] = attrs["constraint"].SetRequired() - attrs["constraint"] = attrs["constraint"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["full_name_arg"] = attrs["full_name_arg"].SetRequired() - - return attrs -} - // 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 @@ -4677,30 +4833,8 @@ type CreateVolumeRequestContent_SdkV2 struct { SchemaName types.String `tfsdk:"schema_name"` // The storage location on the cloud StorageLocation types.String `tfsdk:"storage_location"` - // The type of the volume. An external volume is located in the specified - // external location. A managed volume is located in the default location - // which is specified by the parent schema, or the parent catalog, or the - // Metastore. [Learn more] - // - // [Learn more]: https://docs.databricks.com/aws/en/volumes/managed-vs-external - VolumeType types.String `tfsdk:"volume_type"` -} - -func (newState *CreateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVolumeRequestContent_SdkV2) { -} - -func (newState *CreateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVolumeRequestContent_SdkV2) { -} -func (c CreateVolumeRequestContent_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["catalog_name"] = attrs["catalog_name"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["schema_name"] = attrs["schema_name"].SetRequired() - attrs["storage_location"] = attrs["storage_location"].SetOptional() - attrs["volume_type"] = attrs["volume_type"].SetRequired() - - return attrs + VolumeType types.String `tfsdk:"volume_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVolumeRequestContent. @@ -4744,6 +4878,56 @@ func (o CreateVolumeRequestContent_SdkV2) Type(ctx context.Context) attr.Type { } } +// A credential that is dependent on a SQL object. +type CredentialDependency_SdkV2 struct { + // Full name of the dependent credential, in the form of + // __credential_name__. + CredentialName types.String `tfsdk:"credential_name"` +} + +func (newState *CredentialDependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialDependency_SdkV2) { +} + +func (newState *CredentialDependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState CredentialDependency_SdkV2) { +} + +func (c CredentialDependency_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["credential_name"] = attrs["credential_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialDependency. +// Container types (types.Map, types.List, types.Set) and 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 CredentialDependency_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, CredentialDependency_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CredentialDependency_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_name": o.CredentialName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CredentialDependency_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_name": types.StringType, + }, + } +} + type CredentialInfo_SdkV2 struct { // The AWS IAM role configuration. AwsIamRole types.List `tfsdk:"aws_iam_role"` @@ -5055,6 +5239,36 @@ func (o CredentialValidationResult_SdkV2) Type(ctx context.Context) attr.Type { } } +type CurrentRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CurrentRequest. +// Container types (types.Map, types.List, types.Set) and 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 CurrentRequest_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, CurrentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CurrentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o CurrentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + // GCP long-lived credential. Databricks-created Google Cloud Storage service // account. type DatabricksGcpServiceAccount_SdkV2 struct { @@ -5567,6 +5781,71 @@ func (o DeleteCredentialResponse_SdkV2) Type(ctx context.Context) attr.Type { } } +type DeleteExternalLineageRelationshipRequest_SdkV2 struct { + ExternalLineageRelationship types.List `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExternalLineageRelationshipRequest. +// Container types (types.Map, types.List, types.Set) and 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 DeleteExternalLineageRelationshipRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_relationship": reflect.TypeOf(DeleteRequestExternalLineage_SdkV2{}), + } +} + +// 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, DeleteExternalLineageRelationshipRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteExternalLineageRelationshipRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_relationship": o.ExternalLineageRelationship, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteExternalLineageRelationshipRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_relationship": basetypes.ListType{ + ElemType: DeleteRequestExternalLineage_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetExternalLineageRelationship returns the value of the ExternalLineageRelationship field in DeleteExternalLineageRelationshipRequest_SdkV2 as +// a DeleteRequestExternalLineage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteExternalLineageRelationshipRequest_SdkV2) GetExternalLineageRelationship(ctx context.Context) (DeleteRequestExternalLineage_SdkV2, bool) { + var e DeleteRequestExternalLineage_SdkV2 + if o.ExternalLineageRelationship.IsNull() || o.ExternalLineageRelationship.IsUnknown() { + return e, false + } + var v []DeleteRequestExternalLineage_SdkV2 + d := o.ExternalLineageRelationship.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalLineageRelationship sets the value of the ExternalLineageRelationship field in DeleteExternalLineageRelationshipRequest_SdkV2. +func (o *DeleteExternalLineageRelationshipRequest_SdkV2) SetExternalLineageRelationship(ctx context.Context, v DeleteRequestExternalLineage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_lineage_relationship"] + o.ExternalLineageRelationship = types.ListValueMust(t, vs) +} + type DeleteExternalLocationRequest_SdkV2 struct { // Force deletion even if there are dependent external tables or mounts. Force types.Bool `tfsdk:"-"` @@ -5607,6 +5886,41 @@ func (o DeleteExternalLocationRequest_SdkV2) Type(ctx context.Context) attr.Type } } +type DeleteExternalMetadataRequest_SdkV2 struct { + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExternalMetadataRequest. +// Container types (types.Map, types.List, types.Set) and 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 DeleteExternalMetadataRequest_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, DeleteExternalMetadataRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteExternalMetadataRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteExternalMetadataRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + type DeleteFunctionRequest_SdkV2 struct { // Force deletion even if the function is notempty. Force types.Bool `tfsdk:"-"` @@ -5836,6 +6150,125 @@ func (o DeleteRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type } } +type DeleteRequestExternalLineage_SdkV2 struct { + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Source object of the external lineage relationship. + Source types.List `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.List `tfsdk:"target"` +} + +func (newState *DeleteRequestExternalLineage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRequestExternalLineage_SdkV2) { +} + +func (newState *DeleteRequestExternalLineage_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRequestExternalLineage_SdkV2) { +} + +func (c DeleteRequestExternalLineage_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["id"] = attrs["id"].SetComputed() + attrs["source"] = attrs["source"].SetRequired() + attrs["source"] = attrs["source"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["target"] = attrs["target"].SetRequired() + attrs["target"] = attrs["target"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRequestExternalLineage. +// Container types (types.Map, types.List, types.Set) and 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 DeleteRequestExternalLineage_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "source": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + "target": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + } +} + +// 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, DeleteRequestExternalLineage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRequestExternalLineage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteRequestExternalLineage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "source": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + "target": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetSource returns the value of the Source field in DeleteRequestExternalLineage_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteRequestExternalLineage_SdkV2) GetSource(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Source.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSource sets the value of the Source field in DeleteRequestExternalLineage_SdkV2. +func (o *DeleteRequestExternalLineage_SdkV2) SetSource(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["source"] + o.Source = types.ListValueMust(t, vs) +} + +// GetTarget returns the value of the Target field in DeleteRequestExternalLineage_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteRequestExternalLineage_SdkV2) GetTarget(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Target.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTarget sets the value of the Target field in DeleteRequestExternalLineage_SdkV2. +func (o *DeleteRequestExternalLineage_SdkV2) SetTarget(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["target"] + o.Target = types.ListValueMust(t, vs) +} + type DeleteResponse_SdkV2 struct { } @@ -6158,12 +6591,15 @@ func (o *DeltaRuntimePropertiesKvPairs_SdkV2) SetDeltaRuntimeProperties(ctx cont o.DeltaRuntimeProperties = types.MapValueMust(t, vs) } -// A dependency of a SQL object. Either the __table__ field or the __function__ -// field must be defined. +// A dependency of a SQL object. One of the following fields must be defined: +// __table__, __function__, __connection__, or __credential__. type Dependency_SdkV2 struct { - // A function that is dependent on a SQL object. + Connection types.List `tfsdk:"connection"` + + Credential types.List `tfsdk:"credential"` + Function types.List `tfsdk:"function"` - // A table that is dependent on a SQL object. + Table types.List `tfsdk:"table"` } @@ -6174,6 +6610,10 @@ func (newState *Dependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState De } func (c Dependency_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["connection"] = attrs["connection"].SetOptional() + attrs["connection"] = attrs["connection"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["credential"] = attrs["credential"].SetOptional() + attrs["credential"] = attrs["credential"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["function"] = attrs["function"].SetOptional() attrs["function"] = attrs["function"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["table"] = attrs["table"].SetOptional() @@ -6191,8 +6631,10 @@ func (c Dependency_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.At // SDK values. func (a Dependency_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "function": reflect.TypeOf(FunctionDependency_SdkV2{}), - "table": reflect.TypeOf(TableDependency_SdkV2{}), + "connection": reflect.TypeOf(ConnectionDependency_SdkV2{}), + "credential": reflect.TypeOf(CredentialDependency_SdkV2{}), + "function": reflect.TypeOf(FunctionDependency_SdkV2{}), + "table": reflect.TypeOf(TableDependency_SdkV2{}), } } @@ -6203,8 +6645,10 @@ func (o Dependency_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVal return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "function": o.Function, - "table": o.Table, + "connection": o.Connection, + "credential": o.Credential, + "function": o.Function, + "table": o.Table, }) } @@ -6212,6 +6656,12 @@ func (o Dependency_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o Dependency_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ + "connection": basetypes.ListType{ + ElemType: ConnectionDependency_SdkV2{}.Type(ctx), + }, + "credential": basetypes.ListType{ + ElemType: CredentialDependency_SdkV2{}.Type(ctx), + }, "function": basetypes.ListType{ ElemType: FunctionDependency_SdkV2{}.Type(ctx), }, @@ -6222,6 +6672,58 @@ func (o Dependency_SdkV2) Type(ctx context.Context) attr.Type { } } +// GetConnection returns the value of the Connection field in Dependency_SdkV2 as +// a ConnectionDependency_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Dependency_SdkV2) GetConnection(ctx context.Context) (ConnectionDependency_SdkV2, bool) { + var e ConnectionDependency_SdkV2 + if o.Connection.IsNull() || o.Connection.IsUnknown() { + return e, false + } + var v []ConnectionDependency_SdkV2 + d := o.Connection.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConnection sets the value of the Connection field in Dependency_SdkV2. +func (o *Dependency_SdkV2) SetConnection(ctx context.Context, v ConnectionDependency_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["connection"] + o.Connection = types.ListValueMust(t, vs) +} + +// GetCredential returns the value of the Credential field in Dependency_SdkV2 as +// a CredentialDependency_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Dependency_SdkV2) GetCredential(ctx context.Context) (CredentialDependency_SdkV2, bool) { + var e CredentialDependency_SdkV2 + if o.Credential.IsNull() || o.Credential.IsUnknown() { + return e, false + } + var v []CredentialDependency_SdkV2 + d := o.Credential.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCredential sets the value of the Credential field in Dependency_SdkV2. +func (o *Dependency_SdkV2) SetCredential(ctx context.Context, v CredentialDependency_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["credential"] + o.Credential = types.ListValueMust(t, vs) +} + // GetFunction returns the value of the Function field in Dependency_SdkV2 as // a FunctionDependency_SdkV2 value. // If the field is unknown or null, the boolean return value is false. @@ -6736,20 +7238,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) { -} - -func (c EnableRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["catalog_name"] = attrs["catalog_name"].SetOptional() - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["schema_name"] = attrs["schema_name"].SetRequired() - - return attrs -} - // 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 @@ -6819,125 +7307,1351 @@ func (o EnableResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.Objec map[string]attr.Value{}) } -// Type implements basetypes.ObjectValuable. -func (o EnableResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } +// Type implements basetypes.ObjectValuable. +func (o EnableResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]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"` +} + +func (newState *EncryptionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EncryptionDetails_SdkV2) { +} + +func (newState *EncryptionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState EncryptionDetails_SdkV2) { +} + +func (c EncryptionDetails_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["sse_encryption_details"] = attrs["sse_encryption_details"].SetOptional() + attrs["sse_encryption_details"] = attrs["sse_encryption_details"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs +} + +// 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 +// 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 EncryptionDetails_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sse_encryption_details": reflect.TypeOf(SseEncryptionDetails_SdkV2{}), + } +} + +// 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, EncryptionDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EncryptionDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "sse_encryption_details": o.SseEncryptionDetails, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EncryptionDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "sse_encryption_details": basetypes.ListType{ + ElemType: SseEncryptionDetails_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetSseEncryptionDetails returns the value of the SseEncryptionDetails field in EncryptionDetails_SdkV2 as +// a SseEncryptionDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EncryptionDetails_SdkV2) GetSseEncryptionDetails(ctx context.Context) (SseEncryptionDetails_SdkV2, bool) { + var e SseEncryptionDetails_SdkV2 + if o.SseEncryptionDetails.IsNull() || o.SseEncryptionDetails.IsUnknown() { + return e, false + } + var v []SseEncryptionDetails_SdkV2 + d := o.SseEncryptionDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSseEncryptionDetails sets the value of the SseEncryptionDetails field in EncryptionDetails_SdkV2. +func (o *EncryptionDetails_SdkV2) SetSseEncryptionDetails(ctx context.Context, v SseEncryptionDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sse_encryption_details"] + o.SseEncryptionDetails = types.ListValueMust(t, vs) +} + +type ExistsRequest_SdkV2 struct { + // Full name of the table. + FullName types.String `tfsdk:"-"` +} + +// 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 +// 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 ExistsRequest_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, ExistsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExistsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExistsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + }, + } +} + +type ExternalLineageExternalMetadata_SdkV2 struct { + Name types.String `tfsdk:"name"` +} + +func (newState *ExternalLineageExternalMetadata_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageExternalMetadata_SdkV2) { +} + +func (newState *ExternalLineageExternalMetadata_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageExternalMetadata_SdkV2) { +} + +func (c ExternalLineageExternalMetadata_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageExternalMetadata. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageExternalMetadata_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, ExternalLineageExternalMetadata_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineageExternalMetadata_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageExternalMetadata_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Represents the external metadata object in the lineage event. +type ExternalLineageExternalMetadataInfo_SdkV2 struct { + // Type of entity represented by the external metadata object. + EntityType types.String `tfsdk:"entity_type"` + // Timestamp of the lineage event. + EventTime types.String `tfsdk:"event_time"` + // Name of the external metadata object. + Name types.String `tfsdk:"name"` + // Type of external system. + SystemType types.String `tfsdk:"system_type"` +} + +func (newState *ExternalLineageExternalMetadataInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageExternalMetadataInfo_SdkV2) { +} + +func (newState *ExternalLineageExternalMetadataInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageExternalMetadataInfo_SdkV2) { +} + +func (c ExternalLineageExternalMetadataInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["entity_type"] = attrs["entity_type"].SetOptional() + attrs["event_time"] = attrs["event_time"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + attrs["system_type"] = attrs["system_type"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageExternalMetadataInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageExternalMetadataInfo_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, ExternalLineageExternalMetadataInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineageExternalMetadataInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "entity_type": o.EntityType, + "event_time": o.EventTime, + "name": o.Name, + "system_type": o.SystemType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageExternalMetadataInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "entity_type": types.StringType, + "event_time": types.StringType, + "name": types.StringType, + "system_type": types.StringType, + }, + } +} + +// Represents the path information in the lineage event. +type ExternalLineageFileInfo_SdkV2 struct { + // Timestamp of the lineage event. + EventTime types.String `tfsdk:"event_time"` + // URL of the path. + Path types.String `tfsdk:"path"` + // The full name of the securable on the path. + SecurableName types.String `tfsdk:"securable_name"` + // The securable type of the securable on the path. + SecurableType types.String `tfsdk:"securable_type"` + // The storage location associated with securable on the path. + StorageLocation types.String `tfsdk:"storage_location"` +} + +func (newState *ExternalLineageFileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageFileInfo_SdkV2) { +} + +func (newState *ExternalLineageFileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageFileInfo_SdkV2) { +} + +func (c ExternalLineageFileInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["event_time"] = attrs["event_time"].SetOptional() + attrs["path"] = attrs["path"].SetOptional() + attrs["securable_name"] = attrs["securable_name"].SetOptional() + attrs["securable_type"] = attrs["securable_type"].SetOptional() + attrs["storage_location"] = attrs["storage_location"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageFileInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageFileInfo_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, ExternalLineageFileInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineageFileInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "event_time": o.EventTime, + "path": o.Path, + "securable_name": o.SecurableName, + "securable_type": o.SecurableType, + "storage_location": o.StorageLocation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageFileInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "event_time": types.StringType, + "path": types.StringType, + "securable_name": types.StringType, + "securable_type": types.StringType, + "storage_location": types.StringType, + }, + } +} + +// Lineage response containing lineage information of a data asset. +type ExternalLineageInfo_SdkV2 struct { + // Information about the edge metadata of the external lineage relationship. + ExternalLineageInfo types.List `tfsdk:"external_lineage_info"` + // Information about external metadata involved in the lineage relationship. + ExternalMetadataInfo types.List `tfsdk:"external_metadata_info"` + // Information about the file involved in the lineage relationship. + FileInfo types.List `tfsdk:"file_info"` + // Information about the model version involved in the lineage relationship. + ModelInfo types.List `tfsdk:"model_info"` + // Information about the table involved in the lineage relationship. + TableInfo types.List `tfsdk:"table_info"` +} + +func (newState *ExternalLineageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageInfo_SdkV2) { +} + +func (newState *ExternalLineageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageInfo_SdkV2) { +} + +func (c ExternalLineageInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_lineage_info"] = attrs["external_lineage_info"].SetOptional() + attrs["external_lineage_info"] = attrs["external_lineage_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["external_metadata_info"] = attrs["external_metadata_info"].SetOptional() + attrs["external_metadata_info"] = attrs["external_metadata_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["file_info"] = attrs["file_info"].SetOptional() + attrs["file_info"] = attrs["file_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["model_info"] = attrs["model_info"].SetOptional() + attrs["model_info"] = attrs["model_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["table_info"] = attrs["table_info"].SetOptional() + attrs["table_info"] = attrs["table_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_info": reflect.TypeOf(ExternalLineageRelationshipInfo_SdkV2{}), + "external_metadata_info": reflect.TypeOf(ExternalLineageExternalMetadataInfo_SdkV2{}), + "file_info": reflect.TypeOf(ExternalLineageFileInfo_SdkV2{}), + "model_info": reflect.TypeOf(ExternalLineageModelVersionInfo_SdkV2{}), + "table_info": reflect.TypeOf(ExternalLineageTableInfo_SdkV2{}), + } +} + +// 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, ExternalLineageInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineageInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_info": o.ExternalLineageInfo, + "external_metadata_info": o.ExternalMetadataInfo, + "file_info": o.FileInfo, + "model_info": o.ModelInfo, + "table_info": o.TableInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_info": basetypes.ListType{ + ElemType: ExternalLineageRelationshipInfo_SdkV2{}.Type(ctx), + }, + "external_metadata_info": basetypes.ListType{ + ElemType: ExternalLineageExternalMetadataInfo_SdkV2{}.Type(ctx), + }, + "file_info": basetypes.ListType{ + ElemType: ExternalLineageFileInfo_SdkV2{}.Type(ctx), + }, + "model_info": basetypes.ListType{ + ElemType: ExternalLineageModelVersionInfo_SdkV2{}.Type(ctx), + }, + "table_info": basetypes.ListType{ + ElemType: ExternalLineageTableInfo_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetExternalLineageInfo returns the value of the ExternalLineageInfo field in ExternalLineageInfo_SdkV2 as +// a ExternalLineageRelationshipInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo_SdkV2) GetExternalLineageInfo(ctx context.Context) (ExternalLineageRelationshipInfo_SdkV2, bool) { + var e ExternalLineageRelationshipInfo_SdkV2 + if o.ExternalLineageInfo.IsNull() || o.ExternalLineageInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageRelationshipInfo_SdkV2 + d := o.ExternalLineageInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalLineageInfo sets the value of the ExternalLineageInfo field in ExternalLineageInfo_SdkV2. +func (o *ExternalLineageInfo_SdkV2) SetExternalLineageInfo(ctx context.Context, v ExternalLineageRelationshipInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_lineage_info"] + o.ExternalLineageInfo = types.ListValueMust(t, vs) +} + +// GetExternalMetadataInfo returns the value of the ExternalMetadataInfo field in ExternalLineageInfo_SdkV2 as +// a ExternalLineageExternalMetadataInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo_SdkV2) GetExternalMetadataInfo(ctx context.Context) (ExternalLineageExternalMetadataInfo_SdkV2, bool) { + var e ExternalLineageExternalMetadataInfo_SdkV2 + if o.ExternalMetadataInfo.IsNull() || o.ExternalMetadataInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageExternalMetadataInfo_SdkV2 + d := o.ExternalMetadataInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalMetadataInfo sets the value of the ExternalMetadataInfo field in ExternalLineageInfo_SdkV2. +func (o *ExternalLineageInfo_SdkV2) SetExternalMetadataInfo(ctx context.Context, v ExternalLineageExternalMetadataInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_metadata_info"] + o.ExternalMetadataInfo = types.ListValueMust(t, vs) +} + +// GetFileInfo returns the value of the FileInfo field in ExternalLineageInfo_SdkV2 as +// a ExternalLineageFileInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo_SdkV2) GetFileInfo(ctx context.Context) (ExternalLineageFileInfo_SdkV2, bool) { + var e ExternalLineageFileInfo_SdkV2 + if o.FileInfo.IsNull() || o.FileInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageFileInfo_SdkV2 + d := o.FileInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFileInfo sets the value of the FileInfo field in ExternalLineageInfo_SdkV2. +func (o *ExternalLineageInfo_SdkV2) SetFileInfo(ctx context.Context, v ExternalLineageFileInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_info"] + o.FileInfo = types.ListValueMust(t, vs) +} + +// GetModelInfo returns the value of the ModelInfo field in ExternalLineageInfo_SdkV2 as +// a ExternalLineageModelVersionInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo_SdkV2) GetModelInfo(ctx context.Context) (ExternalLineageModelVersionInfo_SdkV2, bool) { + var e ExternalLineageModelVersionInfo_SdkV2 + if o.ModelInfo.IsNull() || o.ModelInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageModelVersionInfo_SdkV2 + d := o.ModelInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetModelInfo sets the value of the ModelInfo field in ExternalLineageInfo_SdkV2. +func (o *ExternalLineageInfo_SdkV2) SetModelInfo(ctx context.Context, v ExternalLineageModelVersionInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_info"] + o.ModelInfo = types.ListValueMust(t, vs) +} + +// GetTableInfo returns the value of the TableInfo field in ExternalLineageInfo_SdkV2 as +// a ExternalLineageTableInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo_SdkV2) GetTableInfo(ctx context.Context) (ExternalLineageTableInfo_SdkV2, bool) { + var e ExternalLineageTableInfo_SdkV2 + if o.TableInfo.IsNull() || o.TableInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageTableInfo_SdkV2 + d := o.TableInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTableInfo sets the value of the TableInfo field in ExternalLineageInfo_SdkV2. +func (o *ExternalLineageInfo_SdkV2) SetTableInfo(ctx context.Context, v ExternalLineageTableInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_info"] + o.TableInfo = types.ListValueMust(t, vs) +} + +type ExternalLineageModelVersion_SdkV2 struct { + Name types.String `tfsdk:"name"` + + Version types.String `tfsdk:"version"` +} + +func (newState *ExternalLineageModelVersion_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageModelVersion_SdkV2) { +} + +func (newState *ExternalLineageModelVersion_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageModelVersion_SdkV2) { +} + +func (c ExternalLineageModelVersion_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() + attrs["version"] = attrs["version"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageModelVersion. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageModelVersion_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, ExternalLineageModelVersion_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineageModelVersion_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageModelVersion_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "version": types.StringType, + }, + } +} + +// Represents the model version information in the lineage event. +type ExternalLineageModelVersionInfo_SdkV2 struct { + // Timestamp of the lineage event. + EventTime types.String `tfsdk:"event_time"` + // Name of the model. + ModelName types.String `tfsdk:"model_name"` + // Version number of the model. + Version types.Int64 `tfsdk:"version"` +} + +func (newState *ExternalLineageModelVersionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageModelVersionInfo_SdkV2) { +} + +func (newState *ExternalLineageModelVersionInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageModelVersionInfo_SdkV2) { +} + +func (c ExternalLineageModelVersionInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["event_time"] = attrs["event_time"].SetOptional() + attrs["model_name"] = attrs["model_name"].SetOptional() + attrs["version"] = attrs["version"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageModelVersionInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageModelVersionInfo_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, ExternalLineageModelVersionInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineageModelVersionInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "event_time": o.EventTime, + "model_name": o.ModelName, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageModelVersionInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "event_time": types.StringType, + "model_name": types.StringType, + "version": types.Int64Type, + }, + } +} + +type ExternalLineageObject_SdkV2 struct { + ExternalMetadata types.List `tfsdk:"external_metadata"` + + ModelVersion types.List `tfsdk:"model_version"` + + Path types.List `tfsdk:"path"` + + Table types.List `tfsdk:"table"` +} + +func (newState *ExternalLineageObject_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageObject_SdkV2) { +} + +func (newState *ExternalLineageObject_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageObject_SdkV2) { +} + +func (c ExternalLineageObject_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_metadata"] = attrs["external_metadata"].SetOptional() + attrs["external_metadata"] = attrs["external_metadata"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["model_version"] = attrs["model_version"].SetOptional() + attrs["model_version"] = attrs["model_version"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["path"] = attrs["path"].SetOptional() + attrs["path"] = attrs["path"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["table"] = attrs["table"].SetOptional() + attrs["table"] = attrs["table"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageObject. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageObject_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_metadata": reflect.TypeOf(ExternalLineageExternalMetadata_SdkV2{}), + "model_version": reflect.TypeOf(ExternalLineageModelVersion_SdkV2{}), + "path": reflect.TypeOf(ExternalLineagePath_SdkV2{}), + "table": reflect.TypeOf(ExternalLineageTable_SdkV2{}), + } +} + +// 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, ExternalLineageObject_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineageObject_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_metadata": o.ExternalMetadata, + "model_version": o.ModelVersion, + "path": o.Path, + "table": o.Table, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageObject_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_metadata": basetypes.ListType{ + ElemType: ExternalLineageExternalMetadata_SdkV2{}.Type(ctx), + }, + "model_version": basetypes.ListType{ + ElemType: ExternalLineageModelVersion_SdkV2{}.Type(ctx), + }, + "path": basetypes.ListType{ + ElemType: ExternalLineagePath_SdkV2{}.Type(ctx), + }, + "table": basetypes.ListType{ + ElemType: ExternalLineageTable_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetExternalMetadata returns the value of the ExternalMetadata field in ExternalLineageObject_SdkV2 as +// a ExternalLineageExternalMetadata_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageObject_SdkV2) GetExternalMetadata(ctx context.Context) (ExternalLineageExternalMetadata_SdkV2, bool) { + var e ExternalLineageExternalMetadata_SdkV2 + if o.ExternalMetadata.IsNull() || o.ExternalMetadata.IsUnknown() { + return e, false + } + var v []ExternalLineageExternalMetadata_SdkV2 + d := o.ExternalMetadata.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalMetadata sets the value of the ExternalMetadata field in ExternalLineageObject_SdkV2. +func (o *ExternalLineageObject_SdkV2) SetExternalMetadata(ctx context.Context, v ExternalLineageExternalMetadata_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_metadata"] + o.ExternalMetadata = types.ListValueMust(t, vs) +} + +// GetModelVersion returns the value of the ModelVersion field in ExternalLineageObject_SdkV2 as +// a ExternalLineageModelVersion_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageObject_SdkV2) GetModelVersion(ctx context.Context) (ExternalLineageModelVersion_SdkV2, bool) { + var e ExternalLineageModelVersion_SdkV2 + if o.ModelVersion.IsNull() || o.ModelVersion.IsUnknown() { + return e, false + } + var v []ExternalLineageModelVersion_SdkV2 + d := o.ModelVersion.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetModelVersion sets the value of the ModelVersion field in ExternalLineageObject_SdkV2. +func (o *ExternalLineageObject_SdkV2) SetModelVersion(ctx context.Context, v ExternalLineageModelVersion_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_version"] + o.ModelVersion = types.ListValueMust(t, vs) +} + +// GetPath returns the value of the Path field in ExternalLineageObject_SdkV2 as +// a ExternalLineagePath_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageObject_SdkV2) GetPath(ctx context.Context) (ExternalLineagePath_SdkV2, bool) { + var e ExternalLineagePath_SdkV2 + if o.Path.IsNull() || o.Path.IsUnknown() { + return e, false + } + var v []ExternalLineagePath_SdkV2 + d := o.Path.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPath sets the value of the Path field in ExternalLineageObject_SdkV2. +func (o *ExternalLineageObject_SdkV2) SetPath(ctx context.Context, v ExternalLineagePath_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["path"] + o.Path = types.ListValueMust(t, vs) +} + +// GetTable returns the value of the Table field in ExternalLineageObject_SdkV2 as +// a ExternalLineageTable_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageObject_SdkV2) GetTable(ctx context.Context) (ExternalLineageTable_SdkV2, bool) { + var e ExternalLineageTable_SdkV2 + if o.Table.IsNull() || o.Table.IsUnknown() { + return e, false + } + var v []ExternalLineageTable_SdkV2 + d := o.Table.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTable sets the value of the Table field in ExternalLineageObject_SdkV2. +func (o *ExternalLineageObject_SdkV2) SetTable(ctx context.Context, v ExternalLineageTable_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] + o.Table = types.ListValueMust(t, vs) +} + +type ExternalLineagePath_SdkV2 struct { + Url types.String `tfsdk:"url"` +} + +func (newState *ExternalLineagePath_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineagePath_SdkV2) { +} + +func (newState *ExternalLineagePath_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineagePath_SdkV2) { +} + +func (c ExternalLineagePath_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["url"] = attrs["url"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineagePath. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineagePath_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, ExternalLineagePath_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineagePath_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineagePath_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "url": types.StringType, + }, + } +} + +type ExternalLineageRelationship_SdkV2 struct { + // List of column relationships between source and target objects. + Columns types.List `tfsdk:"columns"` + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Key-value properties associated with the external lineage relationship. + Properties types.Map `tfsdk:"properties"` + // Source object of the external lineage relationship. + Source types.List `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.List `tfsdk:"target"` +} + +func (newState *ExternalLineageRelationship_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageRelationship_SdkV2) { +} + +func (newState *ExternalLineageRelationship_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageRelationship_SdkV2) { +} + +func (c ExternalLineageRelationship_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["id"] = attrs["id"].SetComputed() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["source"] = attrs["source"].SetRequired() + attrs["source"] = attrs["source"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["target"] = attrs["target"].SetRequired() + attrs["target"] = attrs["target"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageRelationship. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageRelationship_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnRelationship_SdkV2{}), + "properties": reflect.TypeOf(types.String{}), + "source": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + "target": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + } +} + +// 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, ExternalLineageRelationship_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineageRelationship_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "id": o.Id, + "properties": o.Properties, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageRelationship_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: ColumnRelationship_SdkV2{}.Type(ctx), + }, + "id": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "source": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + "target": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in ExternalLineageRelationship_SdkV2 as +// a slice of ColumnRelationship_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationship_SdkV2) GetColumns(ctx context.Context) ([]ColumnRelationship_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnRelationship_SdkV2 + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in ExternalLineageRelationship_SdkV2. +func (o *ExternalLineageRelationship_SdkV2) SetColumns(ctx context.Context, v []ColumnRelationship_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in ExternalLineageRelationship_SdkV2 as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationship_SdkV2) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in ExternalLineageRelationship_SdkV2. +func (o *ExternalLineageRelationship_SdkV2) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + +// GetSource returns the value of the Source field in ExternalLineageRelationship_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationship_SdkV2) GetSource(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Source.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSource sets the value of the Source field in ExternalLineageRelationship_SdkV2. +func (o *ExternalLineageRelationship_SdkV2) SetSource(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["source"] + o.Source = types.ListValueMust(t, vs) +} + +// GetTarget returns the value of the Target field in ExternalLineageRelationship_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationship_SdkV2) GetTarget(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Target.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTarget sets the value of the Target field in ExternalLineageRelationship_SdkV2. +func (o *ExternalLineageRelationship_SdkV2) SetTarget(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["target"] + o.Target = types.ListValueMust(t, vs) +} + +type ExternalLineageRelationshipInfo_SdkV2 struct { + // List of column relationships between source and target objects. + Columns types.List `tfsdk:"columns"` + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Key-value properties associated with the external lineage relationship. + Properties types.Map `tfsdk:"properties"` + // Source object of the external lineage relationship. + Source types.List `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.List `tfsdk:"target"` +} + +func (newState *ExternalLineageRelationshipInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageRelationshipInfo_SdkV2) { +} + +func (newState *ExternalLineageRelationshipInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageRelationshipInfo_SdkV2) { +} + +func (c ExternalLineageRelationshipInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["id"] = attrs["id"].SetComputed() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["source"] = attrs["source"].SetRequired() + attrs["source"] = attrs["source"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["target"] = attrs["target"].SetRequired() + attrs["target"] = attrs["target"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageRelationshipInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageRelationshipInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnRelationship_SdkV2{}), + "properties": reflect.TypeOf(types.String{}), + "source": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + "target": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + } +} + +// 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, ExternalLineageRelationshipInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLineageRelationshipInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "id": o.Id, + "properties": o.Properties, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageRelationshipInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: ColumnRelationship_SdkV2{}.Type(ctx), + }, + "id": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "source": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + "target": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in ExternalLineageRelationshipInfo_SdkV2 as +// a slice of ColumnRelationship_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationshipInfo_SdkV2) GetColumns(ctx context.Context) ([]ColumnRelationship_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnRelationship_SdkV2 + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in ExternalLineageRelationshipInfo_SdkV2. +func (o *ExternalLineageRelationshipInfo_SdkV2) SetColumns(ctx context.Context, v []ColumnRelationship_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in ExternalLineageRelationshipInfo_SdkV2 as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationshipInfo_SdkV2) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in ExternalLineageRelationshipInfo_SdkV2. +func (o *ExternalLineageRelationshipInfo_SdkV2) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + +// GetSource returns the value of the Source field in ExternalLineageRelationshipInfo_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationshipInfo_SdkV2) GetSource(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Source.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSource sets the value of the Source field in ExternalLineageRelationshipInfo_SdkV2. +func (o *ExternalLineageRelationshipInfo_SdkV2) SetSource(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["source"] + o.Source = types.ListValueMust(t, vs) +} + +// GetTarget returns the value of the Target field in ExternalLineageRelationshipInfo_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationshipInfo_SdkV2) GetTarget(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Target.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTarget sets the value of the Target field in ExternalLineageRelationshipInfo_SdkV2. +func (o *ExternalLineageRelationshipInfo_SdkV2) SetTarget(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["target"] + o.Target = types.ListValueMust(t, vs) } -// 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"` +type ExternalLineageTable_SdkV2 struct { + Name types.String `tfsdk:"name"` } -func (newState *EncryptionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EncryptionDetails_SdkV2) { +func (newState *ExternalLineageTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageTable_SdkV2) { } -func (newState *EncryptionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState EncryptionDetails_SdkV2) { +func (newState *ExternalLineageTable_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageTable_SdkV2) { } -func (c EncryptionDetails_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["sse_encryption_details"] = attrs["sse_encryption_details"].SetOptional() - attrs["sse_encryption_details"] = attrs["sse_encryption_details"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) +func (c ExternalLineageTable_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in EncryptionDetails. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageTable. // Container types (types.Map, types.List, types.Set) and 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 EncryptionDetails_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "sse_encryption_details": reflect.TypeOf(SseEncryptionDetails_SdkV2{}), - } +func (a ExternalLineageTable_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, EncryptionDetails_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, ExternalLineageTable_SdkV2 // only implements ToObjectValue() and Type(). -func (o EncryptionDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ExternalLineageTable_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "sse_encryption_details": o.SseEncryptionDetails, + "name": o.Name, }) } // Type implements basetypes.ObjectValuable. -func (o EncryptionDetails_SdkV2) Type(ctx context.Context) attr.Type { +func (o ExternalLineageTable_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "sse_encryption_details": basetypes.ListType{ - ElemType: SseEncryptionDetails_SdkV2{}.Type(ctx), - }, + "name": types.StringType, }, } } -// GetSseEncryptionDetails returns the value of the SseEncryptionDetails field in EncryptionDetails_SdkV2 as -// a SseEncryptionDetails_SdkV2 value. -// If the field is unknown or null, the boolean return value is false. -func (o *EncryptionDetails_SdkV2) GetSseEncryptionDetails(ctx context.Context) (SseEncryptionDetails_SdkV2, bool) { - var e SseEncryptionDetails_SdkV2 - if o.SseEncryptionDetails.IsNull() || o.SseEncryptionDetails.IsUnknown() { - return e, false - } - var v []SseEncryptionDetails_SdkV2 - d := o.SseEncryptionDetails.ElementsAs(ctx, &v, true) - if d.HasError() { - panic(pluginfwcommon.DiagToString(d)) - } - if len(v) == 0 { - return e, false - } - return v[0], true +// Represents the table information in the lineage event. +type ExternalLineageTableInfo_SdkV2 struct { + // Name of Catalog. + CatalogName types.String `tfsdk:"catalog_name"` + // Timestamp of the lineage event. + EventTime types.String `tfsdk:"event_time"` + // Name of Table. + Name types.String `tfsdk:"name"` + // Name of Schema. + SchemaName types.String `tfsdk:"schema_name"` } -// SetSseEncryptionDetails sets the value of the SseEncryptionDetails field in EncryptionDetails_SdkV2. -func (o *EncryptionDetails_SdkV2) SetSseEncryptionDetails(ctx context.Context, v SseEncryptionDetails_SdkV2) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sse_encryption_details"] - o.SseEncryptionDetails = types.ListValueMust(t, vs) +func (newState *ExternalLineageTableInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageTableInfo_SdkV2) { } -type ExistsRequest_SdkV2 struct { - // Full name of the table. - FullName types.String `tfsdk:"-"` +func (newState *ExternalLineageTableInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLineageTableInfo_SdkV2) { } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExistsRequest. +func (c ExternalLineageTableInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["catalog_name"] = attrs["catalog_name"].SetOptional() + attrs["event_time"] = attrs["event_time"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + attrs["schema_name"] = attrs["schema_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageTableInfo. // Container types (types.Map, types.List, types.Set) and 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 ExistsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a ExternalLineageTableInfo_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, ExistsRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, ExternalLineageTableInfo_SdkV2 // only implements ToObjectValue() and Type(). -func (o ExistsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ExternalLineageTableInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "full_name": o.FullName, + "catalog_name": o.CatalogName, + "event_time": o.EventTime, + "name": o.Name, + "schema_name": o.SchemaName, }) } // Type implements basetypes.ObjectValuable. -func (o ExistsRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o ExternalLineageTableInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "full_name": types.StringType, + "catalog_name": types.StringType, + "event_time": types.StringType, + "name": types.StringType, + "schema_name": types.StringType, }, } } @@ -6957,16 +8671,15 @@ type ExternalLocationInfo_SdkV2 struct { CredentialId types.String `tfsdk:"credential_id"` // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name"` - // [Create:OPT Update:OPT] Whether to enable file events on this external - // location. + // Whether to enable file events on this external location. EnableFileEvents types.Bool `tfsdk:"enable_file_events"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details"` // 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"` - // [Create:OPT Update:OPT] File event queue settings. + // File event queue settings. FileEventQueue types.List `tfsdk:"file_event_queue"` IsolationMode types.String `tfsdk:"isolation_mode"` @@ -7142,6 +8855,178 @@ func (o *ExternalLocationInfo_SdkV2) SetFileEventQueue(ctx context.Context, v Fi o.FileEventQueue = types.ListValueMust(t, vs) } +type ExternalMetadata_SdkV2 struct { + // List of columns associated with the external metadata object. + Columns types.List `tfsdk:"columns"` + // Time at which this external metadata object was created. + CreateTime types.String `tfsdk:"create_time"` + // Username of external metadata object creator. + CreatedBy types.String `tfsdk:"created_by"` + // User-provided free-form text description. + Description types.String `tfsdk:"description"` + // Type of entity within the external system. + EntityType types.String `tfsdk:"entity_type"` + // Unique identifier of the external metadata object. + Id types.String `tfsdk:"id"` + // Unique identifier of parent metastore. + MetastoreId types.String `tfsdk:"metastore_id"` + // Name of the external metadata object. + Name types.String `tfsdk:"name"` + // Owner of the external metadata object. + Owner types.String `tfsdk:"owner"` + // A map of key-value properties attached to the external metadata object. + Properties types.Map `tfsdk:"properties"` + // Type of external system. + SystemType types.String `tfsdk:"system_type"` + // Time at which this external metadata object was last modified. + UpdateTime types.String `tfsdk:"update_time"` + // Username of user who last modified external metadata object. + UpdatedBy types.String `tfsdk:"updated_by"` + // URL associated with the external metadata object. + Url types.String `tfsdk:"url"` +} + +func (newState *ExternalMetadata_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalMetadata_SdkV2) { +} + +func (newState *ExternalMetadata_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalMetadata_SdkV2) { +} + +func (c ExternalMetadata_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["create_time"] = attrs["create_time"].SetComputed() + attrs["created_by"] = attrs["created_by"].SetComputed() + attrs["description"] = attrs["description"].SetOptional() + attrs["entity_type"] = attrs["entity_type"].SetRequired() + attrs["id"] = attrs["id"].SetComputed() + attrs["metastore_id"] = attrs["metastore_id"].SetComputed() + attrs["name"] = attrs["name"].SetRequired() + attrs["owner"] = attrs["owner"].SetOptional() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["system_type"] = attrs["system_type"].SetRequired() + attrs["update_time"] = attrs["update_time"].SetComputed() + attrs["updated_by"] = attrs["updated_by"].SetComputed() + attrs["url"] = attrs["url"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalMetadata. +// Container types (types.Map, types.List, types.Set) and 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 ExternalMetadata_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(types.String{}), + "properties": reflect.TypeOf(types.String{}), + } +} + +// 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, ExternalMetadata_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalMetadata_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "create_time": o.CreateTime, + "created_by": o.CreatedBy, + "description": o.Description, + "entity_type": o.EntityType, + "id": o.Id, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "properties": o.Properties, + "system_type": o.SystemType, + "update_time": o.UpdateTime, + "updated_by": o.UpdatedBy, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalMetadata_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: types.StringType, + }, + "create_time": types.StringType, + "created_by": types.StringType, + "description": types.StringType, + "entity_type": types.StringType, + "id": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "system_type": types.StringType, + "update_time": types.StringType, + "updated_by": types.StringType, + "url": types.StringType, + }, + } +} + +// GetColumns returns the value of the Columns field in ExternalMetadata_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalMetadata_SdkV2) GetColumns(ctx context.Context) ([]types.String, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in ExternalMetadata_SdkV2. +func (o *ExternalMetadata_SdkV2) SetColumns(ctx context.Context, v []types.String) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in ExternalMetadata_SdkV2 as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalMetadata_SdkV2) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in ExternalMetadata_SdkV2. +func (o *ExternalMetadata_SdkV2) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + // Detailed status of an online table. Shown if the online table is in the // OFFLINE_FAILED or the ONLINE_PIPELINE_FAILED state. type FailedStatus_SdkV2 struct { @@ -7464,6 +9349,8 @@ type ForeignKeyConstraint_SdkV2 struct { ParentColumns types.List `tfsdk:"parent_columns"` // The full name of the parent constraint. ParentTable types.String `tfsdk:"parent_table"` + // True if the constraint is RELY, false or unset if NORELY. + Rely types.Bool `tfsdk:"rely"` } func (newState *ForeignKeyConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForeignKeyConstraint_SdkV2) { @@ -7477,6 +9364,7 @@ func (c ForeignKeyConstraint_SdkV2) ApplySchemaCustomizations(attrs map[string]t attrs["name"] = attrs["name"].SetRequired() attrs["parent_columns"] = attrs["parent_columns"].SetRequired() attrs["parent_table"] = attrs["parent_table"].SetRequired() + attrs["rely"] = attrs["rely"].SetOptional() return attrs } @@ -7506,6 +9394,7 @@ func (o ForeignKeyConstraint_SdkV2) ToObjectValue(ctx context.Context) basetypes "name": o.Name, "parent_columns": o.ParentColumns, "parent_table": o.ParentTable, + "rely": o.Rely, }) } @@ -7521,6 +9410,7 @@ func (o ForeignKeyConstraint_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "parent_table": types.StringType, + "rely": types.BoolType, }, } } @@ -7925,9 +9815,9 @@ type FunctionParameterInfo_SdkV2 struct { Name types.String `tfsdk:"name"` // Default value of the parameter. ParameterDefault types.String `tfsdk:"parameter_default"` - // The mode of the function parameter. + ParameterMode types.String `tfsdk:"parameter_mode"` - // The type of function parameter. + ParameterType types.String `tfsdk:"parameter_type"` // Ordinal position of column (starting at position 0). Position types.Int64 `tfsdk:"position"` @@ -8154,7 +10044,7 @@ type GcpPubsub_SdkV2 struct { // resources. ManagedResourceId types.String `tfsdk:"managed_resource_id"` // The Pub/Sub subscription name in the format - // projects/{project}/subscriptions/{subscription name} REQUIRED for + // projects/{project}/subscriptions/{subscription name} Required for // provided_pubsub. SubscriptionName types.String `tfsdk:"subscription_name"` } @@ -8368,29 +10258,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"` // The name of the service credential used to generate a temporary // credential CredentialName types.String `tfsdk:"credential_name"` - // The GCP cloud options to customize the requested temporary credential - GcpOptions types.List `tfsdk:"gcp_options"` -} - -func (newState *GenerateTemporaryServiceCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialRequest_SdkV2) { -} -func (newState *GenerateTemporaryServiceCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialRequest_SdkV2) { -} - -func (c GenerateTemporaryServiceCredentialRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["azure_options"] = attrs["azure_options"].SetOptional() - attrs["azure_options"] = attrs["azure_options"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["credential_name"] = attrs["credential_name"].SetRequired() - attrs["gcp_options"] = attrs["gcp_options"].SetOptional() - attrs["gcp_options"] = attrs["gcp_options"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs + GcpOptions types.List `tfsdk:"gcp_options"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialRequest. @@ -8496,19 +10369,6 @@ type GenerateTemporaryTableCredentialRequest_SdkV2 struct { TableId types.String `tfsdk:"table_id"` } -func (newState *GenerateTemporaryTableCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryTableCredentialRequest_SdkV2) { -} - -func (newState *GenerateTemporaryTableCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryTableCredentialRequest_SdkV2) { -} - -func (c GenerateTemporaryTableCredentialRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["operation"] = attrs["operation"].SetOptional() - attrs["table_id"] = attrs["table_id"].SetOptional() - - return attrs -} - // 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 @@ -8543,24 +10403,17 @@ 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"` - // 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"` - // 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"` // 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"` - // 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"` - // R2 temporary credentials for API authentication. Read more at - // https://developers.cloudflare.com/r2/api/s3/tokens/. + R2TempCredentials types.List `tfsdk:"r2_temp_credentials"` // The URL of the storage path accessible by the temporary credential. Url types.String `tfsdk:"url"` @@ -9288,35 +11141,70 @@ type GetExternalLocationRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in 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 +// 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 GetExternalLocationRequest_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, GetExternalLocationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetExternalLocationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "include_browse": o.IncludeBrowse, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetExternalLocationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_browse": types.BoolType, + "name": types.StringType, + }, + } +} + +type GetExternalMetadataRequest_SdkV2 struct { + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExternalMetadataRequest. // Container types (types.Map, types.List, types.Set) and 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 GetExternalLocationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GetExternalMetadataRequest_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, GetExternalLocationRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GetExternalMetadataRequest_SdkV2 // only implements ToObjectValue() and Type(). -func (o GetExternalLocationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GetExternalMetadataRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "include_browse": o.IncludeBrowse, - "name": o.Name, + "name": o.Name, }) } // Type implements basetypes.ObjectValuable. -func (o GetExternalLocationRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o GetExternalMetadataRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "include_browse": types.BoolType, - "name": types.StringType, + "name": types.StringType, }, } } @@ -10103,11 +11991,12 @@ type GetTableRequest_SdkV2 struct { // Full name of the table. FullName types.String `tfsdk:"-"` // Whether to include tables in the response for which the principal can - // only access selective metadata for + // only access selective metadata for. IncludeBrowse types.Bool `tfsdk:"-"` // Whether delta metadata should be included in the response. IncludeDeltaMetadata types.Bool `tfsdk:"-"` - // Whether to include a manifest containing capabilities the table has. + // Whether to include a manifest containing table capabilities in the + // response. IncludeManifestCapabilities types.Bool `tfsdk:"-"` } @@ -10383,6 +12272,36 @@ func (o *ListAccountMetastoreAssignmentsResponse_SdkV2) SetWorkspaceIds(ctx cont o.WorkspaceIds = types.ListValueMust(t, vs) } +type ListAccountMetastoresRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountMetastoresRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListAccountMetastoresRequest_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, ListAccountMetastoresRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAccountMetastoresRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAccountMetastoresRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListAccountStorageCredentialsRequest_SdkV2 struct { // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` @@ -10897,6 +12816,166 @@ func (o *ListCredentialsResponse_SdkV2) SetCredentials(ctx context.Context, v [] o.Credentials = types.ListValueMust(t, vs) } +type ListExternalLineageRelationshipsRequest_SdkV2 struct { + // The lineage direction to filter on. + LineageDirection types.String `tfsdk:"-"` + // The object to query external lineage relationship on. + ObjectInfo types.List `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLineageRelationshipsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListExternalLineageRelationshipsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "object_info": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + } +} + +// 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, ListExternalLineageRelationshipsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExternalLineageRelationshipsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "lineage_direction": o.LineageDirection, + "object_info": o.ObjectInfo, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExternalLineageRelationshipsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "lineage_direction": types.StringType, + "object_info": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +// GetObjectInfo returns the value of the ObjectInfo field in ListExternalLineageRelationshipsRequest_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExternalLineageRelationshipsRequest_SdkV2) GetObjectInfo(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.ObjectInfo.IsNull() || o.ObjectInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.ObjectInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetObjectInfo sets the value of the ObjectInfo field in ListExternalLineageRelationshipsRequest_SdkV2. +func (o *ListExternalLineageRelationshipsRequest_SdkV2) SetObjectInfo(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["object_info"] + o.ObjectInfo = types.ListValueMust(t, vs) +} + +type ListExternalLineageRelationshipsResponse_SdkV2 struct { + ExternalLineageRelationships types.List `tfsdk:"external_lineage_relationships"` + + NextPageToken types.String `tfsdk:"next_page_token"` +} + +func (newState *ListExternalLineageRelationshipsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLineageRelationshipsResponse_SdkV2) { +} + +func (newState *ListExternalLineageRelationshipsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExternalLineageRelationshipsResponse_SdkV2) { +} + +func (c ListExternalLineageRelationshipsResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_lineage_relationships"] = attrs["external_lineage_relationships"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLineageRelationshipsResponse. +// Container types (types.Map, types.List, types.Set) and 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 ListExternalLineageRelationshipsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_relationships": reflect.TypeOf(ExternalLineageInfo_SdkV2{}), + } +} + +// 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, ListExternalLineageRelationshipsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExternalLineageRelationshipsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_relationships": o.ExternalLineageRelationships, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExternalLineageRelationshipsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_relationships": basetypes.ListType{ + ElemType: ExternalLineageInfo_SdkV2{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetExternalLineageRelationships returns the value of the ExternalLineageRelationships field in ListExternalLineageRelationshipsResponse_SdkV2 as +// a slice of ExternalLineageInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExternalLineageRelationshipsResponse_SdkV2) GetExternalLineageRelationships(ctx context.Context) ([]ExternalLineageInfo_SdkV2, bool) { + if o.ExternalLineageRelationships.IsNull() || o.ExternalLineageRelationships.IsUnknown() { + return nil, false + } + var v []ExternalLineageInfo_SdkV2 + d := o.ExternalLineageRelationships.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExternalLineageRelationships sets the value of the ExternalLineageRelationships field in ListExternalLineageRelationshipsResponse_SdkV2. +func (o *ListExternalLineageRelationshipsResponse_SdkV2) SetExternalLineageRelationships(ctx context.Context, v []ExternalLineageInfo_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_lineage_relationships"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExternalLineageRelationships = types.ListValueMust(t, vs) +} + type ListExternalLocationsRequest_SdkV2 struct { // Whether to include external locations in the response for which the // principal can only access selective metadata for @@ -10937,99 +13016,220 @@ func (o ListExternalLocationsRequest_SdkV2) ToObjectValue(ctx context.Context) b } // Type implements basetypes.ObjectValuable. -func (o ListExternalLocationsRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o ListExternalLocationsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_browse": types.BoolType, + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListExternalLocationsResponse_SdkV2 struct { + // An array of external locations. + ExternalLocations types.List `tfsdk:"external_locations"` + // 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"` +} + +func (newState *ListExternalLocationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsResponse_SdkV2) { +} + +func (newState *ListExternalLocationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsResponse_SdkV2) { +} + +func (c ListExternalLocationsResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_locations"] = attrs["external_locations"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// 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 +// 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 ListExternalLocationsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_locations": reflect.TypeOf(ExternalLocationInfo_SdkV2{}), + } +} + +// 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, ListExternalLocationsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExternalLocationsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_locations": o.ExternalLocations, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExternalLocationsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_locations": basetypes.ListType{ + ElemType: ExternalLocationInfo_SdkV2{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetExternalLocations returns the value of the ExternalLocations field in ListExternalLocationsResponse_SdkV2 as +// a slice of ExternalLocationInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExternalLocationsResponse_SdkV2) GetExternalLocations(ctx context.Context) ([]ExternalLocationInfo_SdkV2, bool) { + if o.ExternalLocations.IsNull() || o.ExternalLocations.IsUnknown() { + return nil, false + } + var v []ExternalLocationInfo_SdkV2 + d := o.ExternalLocations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExternalLocations sets the value of the ExternalLocations field in ListExternalLocationsResponse_SdkV2. +func (o *ListExternalLocationsResponse_SdkV2) SetExternalLocations(ctx context.Context, v []ExternalLocationInfo_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_locations"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExternalLocations = types.ListValueMust(t, vs) +} + +type ListExternalMetadataRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalMetadataRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListExternalMetadataRequest_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, ListExternalMetadataRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExternalMetadataRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExternalMetadataRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "include_browse": types.BoolType, - "max_results": types.Int64Type, - "page_token": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, }, } } -type ListExternalLocationsResponse_SdkV2 struct { - // An array of external locations. - ExternalLocations types.List `tfsdk:"external_locations"` - // 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). +type ListExternalMetadataResponse_SdkV2 struct { + ExternalMetadata types.List `tfsdk:"external_metadata"` + NextPageToken types.String `tfsdk:"next_page_token"` } -func (newState *ListExternalLocationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsResponse_SdkV2) { +func (newState *ListExternalMetadataResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalMetadataResponse_SdkV2) { } -func (newState *ListExternalLocationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsResponse_SdkV2) { +func (newState *ListExternalMetadataResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExternalMetadataResponse_SdkV2) { } -func (c ListExternalLocationsResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["external_locations"] = attrs["external_locations"].SetOptional() +func (c ListExternalMetadataResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_metadata"] = attrs["external_metadata"].SetOptional() attrs["next_page_token"] = attrs["next_page_token"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLocationsResponse. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalMetadataResponse. // Container types (types.Map, types.List, types.Set) and 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 ListExternalLocationsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a ListExternalMetadataResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "external_locations": reflect.TypeOf(ExternalLocationInfo_SdkV2{}), + "external_metadata": reflect.TypeOf(ExternalMetadata_SdkV2{}), } } // 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, ListExternalLocationsResponse_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListExternalMetadataResponse_SdkV2 // only implements ToObjectValue() and Type(). -func (o ListExternalLocationsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ListExternalMetadataResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "external_locations": o.ExternalLocations, - "next_page_token": o.NextPageToken, + "external_metadata": o.ExternalMetadata, + "next_page_token": o.NextPageToken, }) } // Type implements basetypes.ObjectValuable. -func (o ListExternalLocationsResponse_SdkV2) Type(ctx context.Context) attr.Type { +func (o ListExternalMetadataResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "external_locations": basetypes.ListType{ - ElemType: ExternalLocationInfo_SdkV2{}.Type(ctx), + "external_metadata": basetypes.ListType{ + ElemType: ExternalMetadata_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, } } -// GetExternalLocations returns the value of the ExternalLocations field in ListExternalLocationsResponse_SdkV2 as -// a slice of ExternalLocationInfo_SdkV2 values. +// GetExternalMetadata returns the value of the ExternalMetadata field in ListExternalMetadataResponse_SdkV2 as +// a slice of ExternalMetadata_SdkV2 values. // If the field is unknown or null, the boolean return value is false. -func (o *ListExternalLocationsResponse_SdkV2) GetExternalLocations(ctx context.Context) ([]ExternalLocationInfo_SdkV2, bool) { - if o.ExternalLocations.IsNull() || o.ExternalLocations.IsUnknown() { +func (o *ListExternalMetadataResponse_SdkV2) GetExternalMetadata(ctx context.Context) ([]ExternalMetadata_SdkV2, bool) { + if o.ExternalMetadata.IsNull() || o.ExternalMetadata.IsUnknown() { return nil, false } - var v []ExternalLocationInfo_SdkV2 - d := o.ExternalLocations.ElementsAs(ctx, &v, true) + var v []ExternalMetadata_SdkV2 + d := o.ExternalMetadata.ElementsAs(ctx, &v, true) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } return v, true } -// SetExternalLocations sets the value of the ExternalLocations field in ListExternalLocationsResponse_SdkV2. -func (o *ListExternalLocationsResponse_SdkV2) SetExternalLocations(ctx context.Context, v []ExternalLocationInfo_SdkV2) { +// SetExternalMetadata sets the value of the ExternalMetadata field in ListExternalMetadataResponse_SdkV2. +func (o *ListExternalMetadataResponse_SdkV2) SetExternalMetadata(ctx context.Context, v []ExternalMetadata_SdkV2) { vs := make([]attr.Value, 0, len(v)) for _, e := range v { vs = append(vs, e.ToObjectValue(ctx)) } - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_locations"] + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_metadata"] t = t.(attr.TypeWithElementType).ElementType() - o.ExternalLocations = types.ListValueMust(t, vs) + o.ExternalMetadata = types.ListValueMust(t, vs) } type ListFunctionsRequest_SdkV2 struct { @@ -12036,7 +14236,8 @@ func (o *ListStorageCredentialsResponse_SdkV2) SetStorageCredentials(ctx context type ListSummariesRequest_SdkV2 struct { // Name of parent catalog for tables of interest. CatalogName types.String `tfsdk:"-"` - // Whether to include a manifest containing capabilities the table has. + // Whether to include a manifest containing table capabilities in the + // response. IncludeManifestCapabilities types.Bool `tfsdk:"-"` // Maximum number of summaries for tables to return. If not set, the page // length is set to a server configured value (10000, as of 1/5/2024). - @@ -12320,11 +14521,10 @@ type ListTablesRequest_SdkV2 struct { // Name of parent catalog for tables of interest. CatalogName types.String `tfsdk:"-"` // Whether to include tables in the response for which the principal can - // only access selective metadata for + // only access selective metadata for. IncludeBrowse types.Bool `tfsdk:"-"` - // Whether delta metadata should be included in the response. - IncludeDeltaMetadata types.Bool `tfsdk:"-"` - // Whether to include a manifest containing capabilities the table has. + // Whether to include a manifest containing table capabilities in the + // response. IncludeManifestCapabilities types.Bool `tfsdk:"-"` // Maximum number of tables to return. If not set, all the tables are // returned (not recommended). - when set to a value greater than 0, the @@ -12366,7 +14566,6 @@ func (o ListTablesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.Ob map[string]attr.Value{ "catalog_name": o.CatalogName, "include_browse": o.IncludeBrowse, - "include_delta_metadata": o.IncludeDeltaMetadata, "include_manifest_capabilities": o.IncludeManifestCapabilities, "max_results": o.MaxResults, "omit_columns": o.OmitColumns, @@ -12383,7 +14582,6 @@ func (o ListTablesRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "catalog_name": types.StringType, "include_browse": types.BoolType, - "include_delta_metadata": types.BoolType, "include_manifest_capabilities": types.BoolType, "max_results": types.Int64Type, "omit_columns": types.BoolType, @@ -13393,7 +15591,7 @@ type MonitorInfo_SdkV2 struct { SlicingExprs types.List `tfsdk:"slicing_exprs"` // Configuration for monitoring snapshot tables. Snapshot types.List `tfsdk:"snapshot"` - // The status of the monitor. + Status types.String `tfsdk:"status"` // The full name of the table to monitor. Format: // __catalog_name__.__schema_name__.__table_name__. @@ -14691,22 +16889,16 @@ func (o OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) Type(ctx context.Context // Status of an online table. 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"` // The state of the online table. DetailedState types.String `tfsdk:"detailed_state"` - // 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"` // A text description of the current state of the online table. Message types.String `tfsdk:"message"` - // 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"` - // 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"` } @@ -14889,6 +17081,162 @@ func (o *OnlineTableStatus_SdkV2) SetTriggeredUpdateStatus(ctx context.Context, o.TriggeredUpdateStatus = types.ListValueMust(t, vs) } +// Spec of an allowed option on a securable kind and its attributes. This is +// mostly used by UI to provide user friendly hints and descriptions in order to +// facilitate the securable creation process. +type OptionSpec_SdkV2 struct { + // For drop down / radio button selections, UI will want to know the + // possible input values, it can also be used by other option types to limit + // input selections. + AllowedValues types.List `tfsdk:"allowed_values"` + // The default value of the option, for example, value '443' for 'port' + // option. + DefaultValue types.String `tfsdk:"default_value"` + // A concise user facing description of what the input value of this option + // should look like. + Description types.String `tfsdk:"description"` + // The hint is used on the UI to suggest what the input value can possibly + // be like, for example: example.com for 'host' option. Unlike default + // value, it will not be applied automatically without user input. + Hint types.String `tfsdk:"hint"` + // Indicates whether an option should be displayed with copy button on the + // UI. + IsCopiable types.Bool `tfsdk:"is_copiable"` + // Indicates whether an option can be provided by users in the create/update + // path of an entity. + IsCreatable types.Bool `tfsdk:"is_creatable"` + // Is the option value not user settable and is thus not shown on the UI. + IsHidden types.Bool `tfsdk:"is_hidden"` + // Specifies whether this option is safe to log, i.e. no sensitive + // information. + IsLoggable types.Bool `tfsdk:"is_loggable"` + // Is the option required. + IsRequired types.Bool `tfsdk:"is_required"` + // Is the option value considered secret and thus redacted on the UI. + IsSecret types.Bool `tfsdk:"is_secret"` + // Is the option updatable by users. + IsUpdatable types.Bool `tfsdk:"is_updatable"` + // The unique name of the option. + Name types.String `tfsdk:"name"` + // Specifies when the option value is displayed on the UI within the OAuth + // flow. + OauthStage types.String `tfsdk:"oauth_stage"` + // The type of the option. + Type_ types.String `tfsdk:"type"` +} + +func (newState *OptionSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OptionSpec_SdkV2) { +} + +func (newState *OptionSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState OptionSpec_SdkV2) { +} + +func (c OptionSpec_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["allowed_values"] = attrs["allowed_values"].SetOptional() + attrs["default_value"] = attrs["default_value"].SetOptional() + attrs["description"] = attrs["description"].SetOptional() + attrs["hint"] = attrs["hint"].SetOptional() + attrs["is_copiable"] = attrs["is_copiable"].SetOptional() + attrs["is_creatable"] = attrs["is_creatable"].SetOptional() + attrs["is_hidden"] = attrs["is_hidden"].SetOptional() + attrs["is_loggable"] = attrs["is_loggable"].SetOptional() + attrs["is_required"] = attrs["is_required"].SetOptional() + attrs["is_secret"] = attrs["is_secret"].SetOptional() + attrs["is_updatable"] = attrs["is_updatable"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + attrs["oauth_stage"] = attrs["oauth_stage"].SetOptional() + attrs["type"] = attrs["type"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OptionSpec. +// Container types (types.Map, types.List, types.Set) and 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 OptionSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "allowed_values": reflect.TypeOf(types.String{}), + } +} + +// 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, OptionSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o OptionSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allowed_values": o.AllowedValues, + "default_value": o.DefaultValue, + "description": o.Description, + "hint": o.Hint, + "is_copiable": o.IsCopiable, + "is_creatable": o.IsCreatable, + "is_hidden": o.IsHidden, + "is_loggable": o.IsLoggable, + "is_required": o.IsRequired, + "is_secret": o.IsSecret, + "is_updatable": o.IsUpdatable, + "name": o.Name, + "oauth_stage": o.OauthStage, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o OptionSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allowed_values": basetypes.ListType{ + ElemType: types.StringType, + }, + "default_value": types.StringType, + "description": types.StringType, + "hint": types.StringType, + "is_copiable": types.BoolType, + "is_creatable": types.BoolType, + "is_hidden": types.BoolType, + "is_loggable": types.BoolType, + "is_required": types.BoolType, + "is_secret": types.BoolType, + "is_updatable": types.BoolType, + "name": types.StringType, + "oauth_stage": types.StringType, + "type": types.StringType, + }, + } +} + +// GetAllowedValues returns the value of the AllowedValues field in OptionSpec_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *OptionSpec_SdkV2) GetAllowedValues(ctx context.Context) ([]types.String, bool) { + if o.AllowedValues.IsNull() || o.AllowedValues.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AllowedValues.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllowedValues sets the value of the AllowedValues field in OptionSpec_SdkV2. +func (o *OptionSpec_SdkV2) SetAllowedValues(ctx context.Context, v []types.String) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["allowed_values"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllowedValues = types.ListValueMust(t, vs) +} + type PermissionsChange_SdkV2 struct { // The set of privileges to add. Add types.List `tfsdk:"add"` @@ -15082,6 +17430,8 @@ type PrimaryKeyConstraint_SdkV2 struct { ChildColumns types.List `tfsdk:"child_columns"` // The name of the constraint. Name types.String `tfsdk:"name"` + // True if the constraint is RELY, false or unset if NORELY. + Rely types.Bool `tfsdk:"rely"` // Column names that represent a timeseries. TimeseriesColumns types.List `tfsdk:"timeseries_columns"` } @@ -15095,6 +17445,7 @@ func (newState *PrimaryKeyConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existi func (c PrimaryKeyConstraint_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["child_columns"] = attrs["child_columns"].SetRequired() attrs["name"] = attrs["name"].SetRequired() + attrs["rely"] = attrs["rely"].SetOptional() attrs["timeseries_columns"] = attrs["timeseries_columns"].SetOptional() return attrs @@ -15123,6 +17474,7 @@ func (o PrimaryKeyConstraint_SdkV2) ToObjectValue(ctx context.Context) basetypes map[string]attr.Value{ "child_columns": o.ChildColumns, "name": o.Name, + "rely": o.Rely, "timeseries_columns": o.TimeseriesColumns, }) } @@ -15135,6 +17487,7 @@ func (o PrimaryKeyConstraint_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "name": types.StringType, + "rely": types.BoolType, "timeseries_columns": basetypes.ListType{ ElemType: types.StringType, }, @@ -15195,7 +17548,8 @@ func (o *PrimaryKeyConstraint_SdkV2) SetTimeseriesColumns(ctx context.Context, v } type PrivilegeAssignment_SdkV2 struct { - // The principal (user email address or group name). + // The principal (user email address or group name). For deleted principals, + // `principal` is empty while `principal_id` is populated. Principal types.String `tfsdk:"principal"` // The privileges assigned to the principal. Privileges types.List `tfsdk:"privileges"` @@ -15591,19 +17945,6 @@ type RegenerateDashboardRequest_SdkV2 struct { WarehouseId types.String `tfsdk:"warehouse_id"` } -func (newState *RegenerateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegenerateDashboardRequest_SdkV2) { -} - -func (newState *RegenerateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegenerateDashboardRequest_SdkV2) { -} - -func (c RegenerateDashboardRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["table_name"] = attrs["table_name"].SetRequired() - attrs["warehouse_id"] = attrs["warehouse_id"].SetOptional() - - return attrs -} - // 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 @@ -16125,6 +18466,163 @@ func (o *SchemaInfo_SdkV2) SetProperties(ctx context.Context, v map[string]types o.Properties = types.MapValueMust(t, vs) } +// Manifest of a specific securable kind. +type SecurableKindManifest_SdkV2 struct { + // Privileges that can be assigned to the securable. + AssignablePrivileges types.List `tfsdk:"assignable_privileges"` + // A list of capabilities in the securable kind. + Capabilities types.List `tfsdk:"capabilities"` + // Detailed specs of allowed options. + Options types.List `tfsdk:"options"` + // Securable kind to get manifest of. + SecurableKind types.String `tfsdk:"securable_kind"` + // Securable Type of the kind. + SecurableType types.String `tfsdk:"securable_type"` +} + +func (newState *SecurableKindManifest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecurableKindManifest_SdkV2) { +} + +func (newState *SecurableKindManifest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SecurableKindManifest_SdkV2) { +} + +func (c SecurableKindManifest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["assignable_privileges"] = attrs["assignable_privileges"].SetOptional() + attrs["capabilities"] = attrs["capabilities"].SetOptional() + attrs["options"] = attrs["options"].SetOptional() + attrs["securable_kind"] = attrs["securable_kind"].SetOptional() + attrs["securable_type"] = attrs["securable_type"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SecurableKindManifest. +// Container types (types.Map, types.List, types.Set) and 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 SecurableKindManifest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "assignable_privileges": reflect.TypeOf(types.String{}), + "capabilities": reflect.TypeOf(types.String{}), + "options": reflect.TypeOf(OptionSpec_SdkV2{}), + } +} + +// 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, SecurableKindManifest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SecurableKindManifest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "assignable_privileges": o.AssignablePrivileges, + "capabilities": o.Capabilities, + "options": o.Options, + "securable_kind": o.SecurableKind, + "securable_type": o.SecurableType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SecurableKindManifest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "assignable_privileges": basetypes.ListType{ + ElemType: types.StringType, + }, + "capabilities": basetypes.ListType{ + ElemType: types.StringType, + }, + "options": basetypes.ListType{ + ElemType: OptionSpec_SdkV2{}.Type(ctx), + }, + "securable_kind": types.StringType, + "securable_type": types.StringType, + }, + } +} + +// GetAssignablePrivileges returns the value of the AssignablePrivileges field in SecurableKindManifest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SecurableKindManifest_SdkV2) GetAssignablePrivileges(ctx context.Context) ([]types.String, bool) { + if o.AssignablePrivileges.IsNull() || o.AssignablePrivileges.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AssignablePrivileges.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAssignablePrivileges sets the value of the AssignablePrivileges field in SecurableKindManifest_SdkV2. +func (o *SecurableKindManifest_SdkV2) SetAssignablePrivileges(ctx context.Context, v []types.String) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["assignable_privileges"] + t = t.(attr.TypeWithElementType).ElementType() + o.AssignablePrivileges = types.ListValueMust(t, vs) +} + +// GetCapabilities returns the value of the Capabilities field in SecurableKindManifest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SecurableKindManifest_SdkV2) GetCapabilities(ctx context.Context) ([]types.String, bool) { + if o.Capabilities.IsNull() || o.Capabilities.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Capabilities.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCapabilities sets the value of the Capabilities field in SecurableKindManifest_SdkV2. +func (o *SecurableKindManifest_SdkV2) SetCapabilities(ctx context.Context, v []types.String) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["capabilities"] + t = t.(attr.TypeWithElementType).ElementType() + o.Capabilities = types.ListValueMust(t, vs) +} + +// GetOptions returns the value of the Options field in SecurableKindManifest_SdkV2 as +// a slice of OptionSpec_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SecurableKindManifest_SdkV2) GetOptions(ctx context.Context) ([]OptionSpec_SdkV2, bool) { + if o.Options.IsNull() || o.Options.IsUnknown() { + return nil, false + } + var v []OptionSpec_SdkV2 + d := o.Options.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOptions sets the value of the Options field in SecurableKindManifest_SdkV2. +func (o *SecurableKindManifest_SdkV2) SetOptions(ctx context.Context, v []OptionSpec_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] + t = t.(attr.TypeWithElementType).ElementType() + o.Options = types.ListValueMust(t, vs) +} + type SetArtifactAllowlist_SdkV2 struct { // A list of allowed artifact match patterns. ArtifactMatchers types.List `tfsdk:"artifact_matchers"` @@ -16138,22 +18636,6 @@ type SetArtifactAllowlist_SdkV2 struct { MetastoreId types.String `tfsdk:"metastore_id"` } -func (newState *SetArtifactAllowlist_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetArtifactAllowlist_SdkV2) { -} - -func (newState *SetArtifactAllowlist_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetArtifactAllowlist_SdkV2) { -} - -func (c SetArtifactAllowlist_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["artifact_matchers"] = attrs["artifact_matchers"].SetRequired() - attrs["artifact_type"] = attrs["artifact_type"].SetRequired() - attrs["created_at"] = attrs["created_at"].SetComputed() - attrs["created_by"] = attrs["created_by"].SetComputed() - attrs["metastore_id"] = attrs["metastore_id"].SetComputed() - - return attrs -} - // 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 @@ -16232,20 +18714,6 @@ type SetRegisteredModelAliasRequest_SdkV2 struct { VersionNum types.Int64 `tfsdk:"version_num"` } -func (newState *SetRegisteredModelAliasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetRegisteredModelAliasRequest_SdkV2) { -} - -func (newState *SetRegisteredModelAliasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetRegisteredModelAliasRequest_SdkV2) { -} - -func (c SetRegisteredModelAliasRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["alias"] = attrs["alias"].SetRequired() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["version_num"] = attrs["version_num"].SetRequired() - - return attrs -} - // 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 @@ -16626,6 +19094,36 @@ func (o *StorageCredentialInfo_SdkV2) SetDatabricksGcpServiceAccount(ctx context o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) } +type SummaryRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SummaryRequest. +// Container types (types.Map, types.List, types.Set) and 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 SummaryRequest_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, SummaryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SummaryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o SummaryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type SystemSchemaInfo_SdkV2 struct { // Name of the system schema. Schema types.String `tfsdk:"schema"` @@ -16950,7 +19448,7 @@ type TableInfo_SdkV2 struct { CreatedBy types.String `tfsdk:"created_by"` // Unique ID of the Data Access Configuration to use with the table data. DataAccessConfigurationId types.String `tfsdk:"data_access_configuration_id"` - // Data source format + DataSourceFormat types.String `tfsdk:"data_source_format"` // Time at which this table was deleted, in epoch milliseconds. Field is // omitted if table is not deleted. @@ -16961,7 +19459,7 @@ type TableInfo_SdkV2 struct { EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag"` EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details"` // Full name of table, in form of // __catalog_name__.__schema_name__.__table_name__ @@ -16981,12 +19479,14 @@ type TableInfo_SdkV2 struct { RowFilter types.List `tfsdk:"row_filter"` // Name of parent schema relative to its parent catalog. SchemaName types.String `tfsdk:"schema_name"` + // SecurableKindManifest of table, including capabilities the table has. + SecurableKindManifest types.List `tfsdk:"securable_kind_manifest"` // List of schemes whose objects can be referenced without qualification. SqlPath types.String `tfsdk:"sql_path"` // Name of the storage credential, when a storage credential is configured // for use with this table. StorageCredentialName types.String `tfsdk:"storage_credential_name"` - // Storage root URL for table (for **MANAGED**, **EXTERNAL** tables) + // Storage root URL for table (for **MANAGED**, **EXTERNAL** tables). StorageLocation types.String `tfsdk:"storage_location"` // List of table constraints. Note: this field is not set in the output of // the __listTables__ API. @@ -17043,6 +19543,8 @@ func (c TableInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.Att attrs["row_filter"] = attrs["row_filter"].SetOptional() attrs["row_filter"] = attrs["row_filter"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["schema_name"] = attrs["schema_name"].SetOptional() + attrs["securable_kind_manifest"] = attrs["securable_kind_manifest"].SetOptional() + attrs["securable_kind_manifest"] = attrs["securable_kind_manifest"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["sql_path"] = attrs["sql_path"].SetOptional() attrs["storage_credential_name"] = attrs["storage_credential_name"].SetOptional() attrs["storage_location"] = attrs["storage_location"].SetOptional() @@ -17073,6 +19575,7 @@ func (a TableInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]re "encryption_details": reflect.TypeOf(EncryptionDetails_SdkV2{}), "properties": reflect.TypeOf(types.String{}), "row_filter": reflect.TypeOf(TableRowFilter_SdkV2{}), + "securable_kind_manifest": reflect.TypeOf(SecurableKindManifest_SdkV2{}), "table_constraints": reflect.TypeOf(TableConstraint_SdkV2{}), "view_dependencies": reflect.TypeOf(DependencyList_SdkV2{}), } @@ -17107,6 +19610,7 @@ func (o TableInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValu "properties": o.Properties, "row_filter": o.RowFilter, "schema_name": o.SchemaName, + "securable_kind_manifest": o.SecurableKindManifest, "sql_path": o.SqlPath, "storage_credential_name": o.StorageCredentialName, "storage_location": o.StorageLocation, @@ -17157,7 +19661,10 @@ func (o TableInfo_SdkV2) Type(ctx context.Context) attr.Type { "row_filter": basetypes.ListType{ ElemType: TableRowFilter_SdkV2{}.Type(ctx), }, - "schema_name": types.StringType, + "schema_name": types.StringType, + "securable_kind_manifest": basetypes.ListType{ + ElemType: SecurableKindManifest_SdkV2{}.Type(ctx), + }, "sql_path": types.StringType, "storage_credential_name": types.StringType, "storage_location": types.StringType, @@ -17332,6 +19839,32 @@ func (o *TableInfo_SdkV2) SetRowFilter(ctx context.Context, v TableRowFilter_Sdk o.RowFilter = types.ListValueMust(t, vs) } +// GetSecurableKindManifest returns the value of the SecurableKindManifest field in TableInfo_SdkV2 as +// a SecurableKindManifest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableInfo_SdkV2) GetSecurableKindManifest(ctx context.Context) (SecurableKindManifest_SdkV2, bool) { + var e SecurableKindManifest_SdkV2 + if o.SecurableKindManifest.IsNull() || o.SecurableKindManifest.IsUnknown() { + return e, false + } + var v []SecurableKindManifest_SdkV2 + d := o.SecurableKindManifest.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSecurableKindManifest sets the value of the SecurableKindManifest field in TableInfo_SdkV2. +func (o *TableInfo_SdkV2) SetSecurableKindManifest(ctx context.Context, v SecurableKindManifest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["securable_kind_manifest"] + o.SecurableKindManifest = types.ListValueMust(t, vs) +} + // GetTableConstraints returns the value of the TableConstraints field in TableInfo_SdkV2 as // a slice of TableConstraint_SdkV2 values. // If the field is unknown or null, the boolean return value is false. @@ -17472,6 +20005,8 @@ 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"` + // SecurableKindManifest of table, including capabilities the table has. + SecurableKindManifest types.List `tfsdk:"securable_kind_manifest"` TableType types.String `tfsdk:"table_type"` } @@ -17484,6 +20019,8 @@ func (newState *TableSummary_SdkV2) SyncEffectiveFieldsDuringRead(existingState func (c TableSummary_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["full_name"] = attrs["full_name"].SetOptional() + attrs["securable_kind_manifest"] = attrs["securable_kind_manifest"].SetOptional() + attrs["securable_kind_manifest"] = attrs["securable_kind_manifest"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["table_type"] = attrs["table_type"].SetOptional() return attrs @@ -17497,7 +20034,9 @@ func (c TableSummary_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema. // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a TableSummary_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "securable_kind_manifest": reflect.TypeOf(SecurableKindManifest_SdkV2{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -17507,8 +20046,9 @@ func (o TableSummary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectV return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "full_name": o.FullName, - "table_type": o.TableType, + "full_name": o.FullName, + "securable_kind_manifest": o.SecurableKindManifest, + "table_type": o.TableType, }) } @@ -17516,12 +20056,41 @@ func (o TableSummary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o TableSummary_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "full_name": types.StringType, + "full_name": types.StringType, + "securable_kind_manifest": basetypes.ListType{ + ElemType: SecurableKindManifest_SdkV2{}.Type(ctx), + }, "table_type": types.StringType, }, } } +// GetSecurableKindManifest returns the value of the SecurableKindManifest field in TableSummary_SdkV2 as +// a SecurableKindManifest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableSummary_SdkV2) GetSecurableKindManifest(ctx context.Context) (SecurableKindManifest_SdkV2, bool) { + var e SecurableKindManifest_SdkV2 + if o.SecurableKindManifest.IsNull() || o.SecurableKindManifest.IsUnknown() { + return e, false + } + var v []SecurableKindManifest_SdkV2 + d := o.SecurableKindManifest.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSecurableKindManifest sets the value of the SecurableKindManifest field in TableSummary_SdkV2. +func (o *TableSummary_SdkV2) SetSecurableKindManifest(ctx context.Context, v SecurableKindManifest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["securable_kind_manifest"] + o.SecurableKindManifest = types.ListValueMust(t, vs) +} + type TagKeyValue_SdkV2 struct { // name of the tag Key types.String `tfsdk:"key"` @@ -17576,18 +20145,13 @@ func (o TagKeyValue_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"` - // 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"` // 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"` - // 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"` } @@ -17971,25 +20535,6 @@ type UpdateCatalog_SdkV2 struct { Properties types.Map `tfsdk:"properties"` } -func (newState *UpdateCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCatalog_SdkV2) { -} - -func (newState *UpdateCatalog_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCatalog_SdkV2) { -} - -func (c UpdateCatalog_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["enable_predictive_optimization"] = attrs["enable_predictive_optimization"].SetOptional() - attrs["isolation_mode"] = attrs["isolation_mode"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["options"] = attrs["options"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["properties"] = attrs["properties"].SetOptional() - - return attrs -} - // 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 @@ -18183,21 +20728,6 @@ type UpdateConnection_SdkV2 struct { Owner types.String `tfsdk:"owner"` } -func (newState *UpdateConnection_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateConnection_SdkV2) { -} - -func (newState *UpdateConnection_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateConnection_SdkV2) { -} - -func (c UpdateConnection_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["options"] = attrs["options"].SetRequired() - attrs["owner"] = attrs["owner"].SetOptional() - - return attrs -} - // 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 @@ -18297,33 +20827,6 @@ type UpdateCredentialRequest_SdkV2 struct { SkipValidation types.Bool `tfsdk:"skip_validation"` } -func (newState *UpdateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialRequest_SdkV2) { -} - -func (newState *UpdateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialRequest_SdkV2) { -} - -func (c UpdateCredentialRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_iam_role"] = attrs["aws_iam_role"].SetOptional() - attrs["aws_iam_role"] = attrs["aws_iam_role"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].SetOptional() - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_service_principal"] = attrs["azure_service_principal"].SetOptional() - attrs["azure_service_principal"] = attrs["azure_service_principal"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["comment"] = attrs["comment"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["force"] = attrs["force"].SetOptional() - attrs["isolation_mode"] = attrs["isolation_mode"].SetOptional() - attrs["name_arg"] = attrs["name_arg"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - - return attrs -} - // 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 @@ -18494,21 +20997,99 @@ func (o *UpdateCredentialRequest_SdkV2) SetDatabricksGcpServiceAccount(ctx conte o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) } +type UpdateExternalLineageRelationshipRequest_SdkV2 struct { + ExternalLineageRelationship types.List `tfsdk:"external_lineage_relationship"` + // The field mask must be a single string, with multiple fields separated by + // commas (no spaces). The field path is relative to the resource object, + // using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`). + // Specification of elements in sequence or map fields is not allowed, as + // only the entire collection field can be specified. Field names must + // exactly match the resource field names. + // + // A field mask of `*` indicates full replacement. It’s recommended to + // always explicitly list the fields being updated and avoid using `*` + // wildcards, as it can lead to unintended results if the API changes in the + // future. + UpdateMask types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExternalLineageRelationshipRequest. +// Container types (types.Map, types.List, types.Set) and 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 UpdateExternalLineageRelationshipRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_relationship": reflect.TypeOf(UpdateRequestExternalLineage_SdkV2{}), + } +} + +// 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, UpdateExternalLineageRelationshipRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateExternalLineageRelationshipRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_relationship": o.ExternalLineageRelationship, + "update_mask": o.UpdateMask, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateExternalLineageRelationshipRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_relationship": basetypes.ListType{ + ElemType: UpdateRequestExternalLineage_SdkV2{}.Type(ctx), + }, + "update_mask": types.StringType, + }, + } +} + +// GetExternalLineageRelationship returns the value of the ExternalLineageRelationship field in UpdateExternalLineageRelationshipRequest_SdkV2 as +// a UpdateRequestExternalLineage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateExternalLineageRelationshipRequest_SdkV2) GetExternalLineageRelationship(ctx context.Context) (UpdateRequestExternalLineage_SdkV2, bool) { + var e UpdateRequestExternalLineage_SdkV2 + if o.ExternalLineageRelationship.IsNull() || o.ExternalLineageRelationship.IsUnknown() { + return e, false + } + var v []UpdateRequestExternalLineage_SdkV2 + d := o.ExternalLineageRelationship.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalLineageRelationship sets the value of the ExternalLineageRelationship field in UpdateExternalLineageRelationshipRequest_SdkV2. +func (o *UpdateExternalLineageRelationshipRequest_SdkV2) SetExternalLineageRelationship(ctx context.Context, v UpdateRequestExternalLineage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_lineage_relationship"] + o.ExternalLineageRelationship = types.ListValueMust(t, vs) +} + type UpdateExternalLocation_SdkV2 struct { // User-provided free-form text description. Comment types.String `tfsdk:"comment"` // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name"` - // [Create:OPT Update:OPT] Whether to enable file events on this external - // location. + // Whether to enable file events on this external location. EnableFileEvents types.Bool `tfsdk:"enable_file_events"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details"` // 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"` - // [Create:OPT Update:OPT] File event queue settings. + // File event queue settings. FileEventQueue types.List `tfsdk:"file_event_queue"` // Force update even if changing url invalidates dependent external tables // or mounts. @@ -18530,33 +21111,6 @@ type UpdateExternalLocation_SdkV2 struct { Url types.String `tfsdk:"url"` } -func (newState *UpdateExternalLocation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExternalLocation_SdkV2) { -} - -func (newState *UpdateExternalLocation_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExternalLocation_SdkV2) { -} - -func (c UpdateExternalLocation_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["credential_name"] = attrs["credential_name"].SetOptional() - attrs["enable_file_events"] = attrs["enable_file_events"].SetOptional() - attrs["encryption_details"] = attrs["encryption_details"].SetOptional() - attrs["encryption_details"] = attrs["encryption_details"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["fallback"] = attrs["fallback"].SetOptional() - attrs["file_event_queue"] = attrs["file_event_queue"].SetOptional() - attrs["file_event_queue"] = attrs["file_event_queue"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["force"] = attrs["force"].SetOptional() - attrs["isolation_mode"] = attrs["isolation_mode"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - attrs["url"] = attrs["url"].SetOptional() - - return attrs -} - // 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 @@ -18673,25 +21227,95 @@ func (o *UpdateExternalLocation_SdkV2) SetFileEventQueue(ctx context.Context, v o.FileEventQueue = types.ListValueMust(t, vs) } -type UpdateFunction_SdkV2 struct { - // The fully-qualified name of the function (of the form - // __catalog_name__.__schema_name__.__function__name__). +type UpdateExternalMetadataRequest_SdkV2 struct { + ExternalMetadata types.List `tfsdk:"external_metadata"` + // Name of the external metadata object. Name types.String `tfsdk:"-"` - // Username of current owner of function. - Owner types.String `tfsdk:"owner"` + // The field mask must be a single string, with multiple fields separated by + // commas (no spaces). The field path is relative to the resource object, + // using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`). + // Specification of elements in sequence or map fields is not allowed, as + // only the entire collection field can be specified. Field names must + // exactly match the resource field names. + // + // A field mask of `*` indicates full replacement. It’s recommended to + // always explicitly list the fields being updated and avoid using `*` + // wildcards, as it can lead to unintended results if the API changes in the + // future. + UpdateMask types.String `tfsdk:"-"` } -func (newState *UpdateFunction_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateFunction_SdkV2) { +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExternalMetadataRequest. +// Container types (types.Map, types.List, types.Set) and 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 UpdateExternalMetadataRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_metadata": reflect.TypeOf(ExternalMetadata_SdkV2{}), + } } -func (newState *UpdateFunction_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateFunction_SdkV2) { +// 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, UpdateExternalMetadataRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateExternalMetadataRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_metadata": o.ExternalMetadata, + "name": o.Name, + "update_mask": o.UpdateMask, + }) } -func (c UpdateFunction_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["owner"] = attrs["owner"].SetOptional() +// Type implements basetypes.ObjectValuable. +func (o UpdateExternalMetadataRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_metadata": basetypes.ListType{ + ElemType: ExternalMetadata_SdkV2{}.Type(ctx), + }, + "name": types.StringType, + "update_mask": types.StringType, + }, + } +} - return attrs +// GetExternalMetadata returns the value of the ExternalMetadata field in UpdateExternalMetadataRequest_SdkV2 as +// a ExternalMetadata_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateExternalMetadataRequest_SdkV2) GetExternalMetadata(ctx context.Context) (ExternalMetadata_SdkV2, bool) { + var e ExternalMetadata_SdkV2 + if o.ExternalMetadata.IsNull() || o.ExternalMetadata.IsUnknown() { + return e, false + } + var v []ExternalMetadata_SdkV2 + d := o.ExternalMetadata.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalMetadata sets the value of the ExternalMetadata field in UpdateExternalMetadataRequest_SdkV2. +func (o *UpdateExternalMetadataRequest_SdkV2) SetExternalMetadata(ctx context.Context, v ExternalMetadata_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_metadata"] + o.ExternalMetadata = types.ListValueMust(t, vs) +} + +type UpdateFunction_SdkV2 struct { + // The fully-qualified name of the function (of the form + // __catalog_name__.__schema_name__.__function__name__). + Name types.String `tfsdk:"-"` + // Username of current owner of function. + Owner types.String `tfsdk:"owner"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateFunction. @@ -18881,20 +21505,6 @@ type UpdateModelVersionRequest_SdkV2 struct { Version types.Int64 `tfsdk:"-"` } -func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionRequest_SdkV2) { -} - -func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest_SdkV2) { -} - -func (c UpdateModelVersionRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -18956,43 +21566,14 @@ type UpdateMonitor_SdkV2 struct { // 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"` - // Configuration for monitoring snapshot tables. - Snapshot types.List `tfsdk:"snapshot"` - // Full name of the table. - TableName types.String `tfsdk:"-"` - // Configuration for monitoring time series tables. - TimeSeries types.List `tfsdk:"time_series"` -} - -func (newState *UpdateMonitor_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMonitor_SdkV2) { -} - -func (newState *UpdateMonitor_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateMonitor_SdkV2) { -} - -func (c UpdateMonitor_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["baseline_table_name"] = attrs["baseline_table_name"].SetOptional() - attrs["custom_metrics"] = attrs["custom_metrics"].SetOptional() - attrs["dashboard_id"] = attrs["dashboard_id"].SetOptional() - attrs["data_classification_config"] = attrs["data_classification_config"].SetOptional() - attrs["data_classification_config"] = attrs["data_classification_config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["inference_log"] = attrs["inference_log"].SetOptional() - attrs["inference_log"] = attrs["inference_log"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["notifications"] = attrs["notifications"].SetOptional() - attrs["notifications"] = attrs["notifications"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["output_schema_name"] = attrs["output_schema_name"].SetRequired() - attrs["schedule"] = attrs["schedule"].SetOptional() - attrs["schedule"] = attrs["schedule"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["slicing_exprs"] = attrs["slicing_exprs"].SetOptional() - attrs["snapshot"] = attrs["snapshot"].SetOptional() - attrs["snapshot"] = attrs["snapshot"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["table_name"] = attrs["table_name"].SetRequired() - attrs["time_series"] = attrs["time_series"].SetOptional() - attrs["time_series"] = attrs["time_series"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs + // slices. + SlicingExprs types.List `tfsdk:"slicing_exprs"` + // Configuration for monitoring snapshot tables. + Snapshot types.List `tfsdk:"snapshot"` + // Full name of the table. + TableName types.String `tfsdk:"-"` + // Configuration for monitoring time series tables. + TimeSeries types.List `tfsdk:"time_series"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMonitor. @@ -19290,20 +21871,6 @@ type UpdatePermissions_SdkV2 struct { SecurableType types.String `tfsdk:"-"` } -func (newState *UpdatePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePermissions_SdkV2) { -} - -func (newState *UpdatePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePermissions_SdkV2) { -} - -func (c UpdatePermissions_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["changes"] = attrs["changes"].SetOptional() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["securable_type"] = attrs["securable_type"].SetRequired() - - return attrs -} - // 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 @@ -19458,21 +22025,6 @@ type UpdateRegisteredModelRequest_SdkV2 struct { Owner types.String `tfsdk:"owner"` } -func (newState *UpdateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegisteredModelRequest_SdkV2) { -} - -func (newState *UpdateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRegisteredModelRequest_SdkV2) { -} - -func (c UpdateRegisteredModelRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - - return attrs -} - // 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 @@ -19510,9 +22062,207 @@ func (o UpdateRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type } } +type UpdateRequestExternalLineage_SdkV2 struct { + // List of column relationships between source and target objects. + Columns types.List `tfsdk:"columns"` + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Key-value properties associated with the external lineage relationship. + Properties types.Map `tfsdk:"properties"` + // Source object of the external lineage relationship. + Source types.List `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.List `tfsdk:"target"` +} + +func (newState *UpdateRequestExternalLineage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRequestExternalLineage_SdkV2) { +} + +func (newState *UpdateRequestExternalLineage_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRequestExternalLineage_SdkV2) { +} + +func (c UpdateRequestExternalLineage_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["id"] = attrs["id"].SetComputed() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["source"] = attrs["source"].SetRequired() + attrs["source"] = attrs["source"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["target"] = attrs["target"].SetRequired() + attrs["target"] = attrs["target"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRequestExternalLineage. +// Container types (types.Map, types.List, types.Set) and 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 UpdateRequestExternalLineage_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnRelationship_SdkV2{}), + "properties": reflect.TypeOf(types.String{}), + "source": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + "target": reflect.TypeOf(ExternalLineageObject_SdkV2{}), + } +} + +// 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, UpdateRequestExternalLineage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRequestExternalLineage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "id": o.Id, + "properties": o.Properties, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRequestExternalLineage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: ColumnRelationship_SdkV2{}.Type(ctx), + }, + "id": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "source": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + "target": basetypes.ListType{ + ElemType: ExternalLineageObject_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in UpdateRequestExternalLineage_SdkV2 as +// a slice of ColumnRelationship_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRequestExternalLineage_SdkV2) GetColumns(ctx context.Context) ([]ColumnRelationship_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnRelationship_SdkV2 + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in UpdateRequestExternalLineage_SdkV2. +func (o *UpdateRequestExternalLineage_SdkV2) SetColumns(ctx context.Context, v []ColumnRelationship_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in UpdateRequestExternalLineage_SdkV2 as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRequestExternalLineage_SdkV2) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in UpdateRequestExternalLineage_SdkV2. +func (o *UpdateRequestExternalLineage_SdkV2) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + +// GetSource returns the value of the Source field in UpdateRequestExternalLineage_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRequestExternalLineage_SdkV2) GetSource(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Source.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSource sets the value of the Source field in UpdateRequestExternalLineage_SdkV2. +func (o *UpdateRequestExternalLineage_SdkV2) SetSource(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["source"] + o.Source = types.ListValueMust(t, vs) +} + +// GetTarget returns the value of the Target field in UpdateRequestExternalLineage_SdkV2 as +// a ExternalLineageObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRequestExternalLineage_SdkV2) GetTarget(ctx context.Context) (ExternalLineageObject_SdkV2, bool) { + var e ExternalLineageObject_SdkV2 + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject_SdkV2 + d := o.Target.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTarget sets the value of the Target field in UpdateRequestExternalLineage_SdkV2. +func (o *UpdateRequestExternalLineage_SdkV2) SetTarget(ctx context.Context, v ExternalLineageObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["target"] + o.Target = types.ListValueMust(t, vs) +} + type UpdateResponse_SdkV2 struct { } +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { +} + +func (c UpdateResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -19556,23 +22306,6 @@ type UpdateSchema_SdkV2 struct { Properties types.Map `tfsdk:"properties"` } -func (newState *UpdateSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSchema_SdkV2) { -} - -func (newState *UpdateSchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateSchema_SdkV2) { -} - -func (c UpdateSchema_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["enable_predictive_optimization"] = attrs["enable_predictive_optimization"].SetOptional() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["properties"] = attrs["properties"].SetOptional() - - return attrs -} - // 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 @@ -19907,27 +22640,13 @@ func (o *UpdateStorageCredential_SdkV2) SetDatabricksGcpServiceAccount(ctx conte o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) } -// Update a table owner. type UpdateTableRequest_SdkV2 struct { // Full name of the table. FullName types.String `tfsdk:"-"` - + // Username of current owner of table. Owner types.String `tfsdk:"owner"` } -func (newState *UpdateTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateTableRequest_SdkV2) { -} - -func (newState *UpdateTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateTableRequest_SdkV2) { -} - -func (c UpdateTableRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["owner"] = attrs["owner"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -19972,21 +22691,6 @@ type UpdateVolumeRequestContent_SdkV2 struct { Owner types.String `tfsdk:"owner"` } -func (newState *UpdateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVolumeRequestContent_SdkV2) { -} - -func (newState *UpdateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateVolumeRequestContent_SdkV2) { -} - -func (c UpdateVolumeRequestContent_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - - return attrs -} - // 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 @@ -20033,20 +22737,6 @@ type UpdateWorkspaceBindings_SdkV2 struct { UnassignWorkspaces types.List `tfsdk:"unassign_workspaces"` } -func (newState *UpdateWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceBindings_SdkV2) { -} - -func (newState *UpdateWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindings_SdkV2) { -} - -func (c UpdateWorkspaceBindings_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["assign_workspaces"] = attrs["assign_workspaces"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["unassign_workspaces"] = attrs["unassign_workspaces"].SetOptional() - - return attrs -} - // 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 @@ -20153,21 +22843,6 @@ type UpdateWorkspaceBindingsParameters_SdkV2 struct { SecurableType types.String `tfsdk:"-"` } -func (newState *UpdateWorkspaceBindingsParameters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceBindingsParameters_SdkV2) { -} - -func (newState *UpdateWorkspaceBindingsParameters_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindingsParameters_SdkV2) { -} - -func (c UpdateWorkspaceBindingsParameters_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["add"] = attrs["add"].SetOptional() - attrs["remove"] = attrs["remove"].SetOptional() - attrs["securable_name"] = attrs["securable_name"].SetRequired() - attrs["securable_type"] = attrs["securable_type"].SetRequired() - - return attrs -} - // 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 @@ -20345,15 +23020,13 @@ func (o *UpdateWorkspaceBindingsResponse_SdkV2) SetBindings(ctx context.Context, // Next ID: 17 type ValidateCredentialRequest_SdkV2 struct { - // The AWS IAM role configuration AwsIamRole types.List `tfsdk:"aws_iam_role"` - // The Azure managed identity configuration. + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity"` // Required. The name of an existing credential or long-lived cloud // credential to validate. CredentialName types.String `tfsdk:"credential_name"` - // GCP long-lived credential. Databricks-created Google Cloud Storage - // service account. + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account"` // The name of an existing external location to validate. Only applicable // for storage credentials (purpose is **STORAGE**.) @@ -20369,28 +23042,6 @@ type ValidateCredentialRequest_SdkV2 struct { Url types.String `tfsdk:"url"` } -func (newState *ValidateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateCredentialRequest_SdkV2) { -} - -func (newState *ValidateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateCredentialRequest_SdkV2) { -} - -func (c ValidateCredentialRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_iam_role"] = attrs["aws_iam_role"].SetOptional() - attrs["aws_iam_role"] = attrs["aws_iam_role"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].SetOptional() - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["credential_name"] = attrs["credential_name"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["external_location_name"] = attrs["external_location_name"].SetOptional() - attrs["purpose"] = attrs["purpose"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["url"] = attrs["url"].SetOptional() - - return attrs -} - // 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 @@ -20630,31 +23281,6 @@ type ValidateStorageCredential_SdkV2 struct { Url types.String `tfsdk:"url"` } -func (newState *ValidateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateStorageCredential_SdkV2) { -} - -func (newState *ValidateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateStorageCredential_SdkV2) { -} - -func (c ValidateStorageCredential_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_iam_role"] = attrs["aws_iam_role"].SetOptional() - attrs["aws_iam_role"] = attrs["aws_iam_role"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].SetOptional() - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_service_principal"] = attrs["azure_service_principal"].SetOptional() - attrs["azure_service_principal"] = attrs["azure_service_principal"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["cloudflare_api_token"] = attrs["cloudflare_api_token"].SetOptional() - attrs["cloudflare_api_token"] = attrs["cloudflare_api_token"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["external_location_name"] = attrs["external_location_name"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["storage_credential_name"] = attrs["storage_credential_name"].SetOptional() - attrs["url"] = attrs["url"].SetOptional() - - return attrs -} - // 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 @@ -21004,7 +23630,7 @@ type VolumeInfo_SdkV2 struct { CreatedAt types.Int64 `tfsdk:"created_at"` // The identifier of the user who created the volume CreatedBy types.String `tfsdk:"created_by"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details"` // The three-level (fully qualified) name of the volume FullName types.String `tfsdk:"full_name"` @@ -21024,12 +23650,7 @@ type VolumeInfo_SdkV2 struct { UpdatedBy types.String `tfsdk:"updated_by"` // The unique identifier of the volume VolumeId types.String `tfsdk:"volume_id"` - // The type of the volume. An external volume is located in the specified - // external location. A managed volume is located in the default location - // which is specified by the parent schema, or the parent catalog, or the - // Metastore. [Learn more] - // - // [Learn more]: https://docs.databricks.com/aws/en/volumes/managed-vs-external + VolumeType types.String `tfsdk:"volume_type"` } diff --git a/internal/service/catalog_tf/model.go b/internal/service/catalog_tf/model.go index 901cb6fa60..3049bfbb06 100755 --- a/internal/service/catalog_tf/model.go +++ b/internal/service/catalog_tf/model.go @@ -26,18 +26,6 @@ type AccountsCreateMetastore struct { MetastoreInfo types.Object `tfsdk:"metastore_info"` } -func (newState *AccountsCreateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateMetastore) { -} - -func (newState *AccountsCreateMetastore) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastore) { -} - -func (c AccountsCreateMetastore) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metastore_info"] = attrs["metastore_info"].SetOptional() - - return attrs -} - // 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 @@ -107,20 +95,6 @@ type AccountsCreateMetastoreAssignment struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *AccountsCreateMetastoreAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateMetastoreAssignment) { -} - -func (newState *AccountsCreateMetastoreAssignment) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastoreAssignment) { -} - -func (c AccountsCreateMetastoreAssignment) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metastore_assignment"] = attrs["metastore_assignment"].SetOptional() - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 @@ -192,19 +166,6 @@ type AccountsCreateStorageCredential struct { MetastoreId types.String `tfsdk:"-"` } -func (newState *AccountsCreateStorageCredential) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateStorageCredential) { -} - -func (newState *AccountsCreateStorageCredential) SyncEffectiveFieldsDuringRead(existingState AccountsCreateStorageCredential) { -} - -func (c AccountsCreateStorageCredential) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["credential_info"] = attrs["credential_info"].SetOptional() - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - - return attrs -} - // 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 @@ -506,19 +467,6 @@ type AccountsUpdateMetastore struct { MetastoreInfo types.Object `tfsdk:"metastore_info"` } -func (newState *AccountsUpdateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateMetastore) { -} - -func (newState *AccountsUpdateMetastore) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastore) { -} - -func (c AccountsUpdateMetastore) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["metastore_info"] = attrs["metastore_info"].SetOptional() - - return attrs -} - // 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 @@ -590,20 +538,6 @@ type AccountsUpdateMetastoreAssignment struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *AccountsUpdateMetastoreAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateMetastoreAssignment) { -} - -func (newState *AccountsUpdateMetastoreAssignment) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastoreAssignment) { -} - -func (c AccountsUpdateMetastoreAssignment) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metastore_assignment"] = attrs["metastore_assignment"].SetOptional() - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 @@ -677,20 +611,6 @@ type AccountsUpdateStorageCredential struct { StorageCredentialName types.String `tfsdk:"-"` } -func (newState *AccountsUpdateStorageCredential) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateStorageCredential) { -} - -func (newState *AccountsUpdateStorageCredential) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateStorageCredential) { -} - -func (c AccountsUpdateStorageCredential) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["credential_info"] = attrs["credential_info"].SetOptional() - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["storage_credential_name"] = attrs["storage_credential_name"].SetRequired() - - return attrs -} - // 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 @@ -1189,7 +1109,7 @@ type AwsSqsQueue struct { // resources. ManagedResourceId types.String `tfsdk:"managed_resource_id"` // The AQS queue url in the format - // https://sqs.{region}.amazonaws.com/{account id}/{queue name} REQUIRED for + // https://sqs.{region}.amazonaws.com/{account id}/{queue name} Required for // provided_sqs. QueueUrl types.String `tfsdk:"queue_url"` } @@ -1490,14 +1410,14 @@ type AzureQueueStorage struct { // resources. ManagedResourceId types.String `tfsdk:"managed_resource_id"` // The AQS queue url in the format https://{storage - // account}.queue.core.windows.net/{queue name} REQUIRED for provided_aqs. + // account}.queue.core.windows.net/{queue name} Required for provided_aqs. QueueUrl types.String `tfsdk:"queue_url"` // The resource group for the queue, event grid subscription, and external - // location storage account. ONLY REQUIRED for locations with a service + // location storage account. Only required for locations with a service // principal storage credential ResourceGroup types.String `tfsdk:"resource_group"` - // OPTIONAL: The subscription id for the queue, event grid subscription, and - // external location storage account. REQUIRED for locations with a service + // Optional subscription id for the queue, event grid subscription, and + // external location storage account. Required for locations with a service // principal storage credential SubscriptionId types.String `tfsdk:"subscription_id"` } @@ -1741,7 +1661,7 @@ type CatalogInfo struct { // associated object through the BROWSE privilege when include_browse is // enabled in the request. BrowseOnly types.Bool `tfsdk:"browse_only"` - // The type of the catalog. + CatalogType types.String `tfsdk:"catalog_type"` // User-provided free-form text description. Comment types.String `tfsdk:"comment"` @@ -1776,9 +1696,9 @@ type CatalogInfo struct { // 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"` - // Status of an asynchronously provisioned resource. + ProvisioningInfo types.Object `tfsdk:"provisioning_info"` - // The type of Unity Catalog securable. + SecurableType types.String `tfsdk:"securable_type"` // The name of the share under the share provider. ShareName types.String `tfsdk:"share_name"` @@ -2297,6 +2217,108 @@ func (o *ColumnMask) SetUsingColumnNames(ctx context.Context, v []types.String) o.UsingColumnNames = types.ListValueMust(t, vs) } +type ColumnRelationship struct { + Source types.String `tfsdk:"source"` + + Target types.String `tfsdk:"target"` +} + +func (newState *ColumnRelationship) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnRelationship) { +} + +func (newState *ColumnRelationship) SyncEffectiveFieldsDuringRead(existingState ColumnRelationship) { +} + +func (c ColumnRelationship) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["source"] = attrs["source"].SetOptional() + attrs["target"] = attrs["target"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnRelationship. +// Container types (types.Map, types.List, types.Set) and 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 ColumnRelationship) 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, ColumnRelationship +// only implements ToObjectValue() and Type(). +func (o ColumnRelationship) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ColumnRelationship) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "source": types.StringType, + "target": types.StringType, + }, + } +} + +// A connection that is dependent on a SQL object. +type ConnectionDependency struct { + // Full name of the dependent connection, in the form of + // __connection_name__. + ConnectionName types.String `tfsdk:"connection_name"` +} + +func (newState *ConnectionDependency) SyncEffectiveFieldsDuringCreateOrUpdate(plan ConnectionDependency) { +} + +func (newState *ConnectionDependency) SyncEffectiveFieldsDuringRead(existingState ConnectionDependency) { +} + +func (c ConnectionDependency) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["connection_name"] = attrs["connection_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ConnectionDependency. +// Container types (types.Map, types.List, types.Set) and 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 ConnectionDependency) 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, ConnectionDependency +// only implements ToObjectValue() and Type(). +func (o ConnectionDependency) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "connection_name": o.ConnectionName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ConnectionDependency) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "connection_name": types.StringType, + }, + } +} + type ConnectionInfo struct { // User-provided free-form text description. Comment types.String `tfsdk:"comment"` @@ -2322,11 +2344,11 @@ type ConnectionInfo struct { Owner types.String `tfsdk:"owner"` // A map of key-value properties attached to the securable. Properties types.Map `tfsdk:"properties"` - // Status of an asynchronously provisioned resource. + ProvisioningInfo types.Object `tfsdk:"provisioning_info"` // If the connection is read only. ReadOnly types.Bool `tfsdk:"read_only"` - // The type of Unity Catalog securable. + SecurableType types.String `tfsdk:"securable_type"` // Time at which this connection was updated, in epoch milliseconds. UpdatedAt types.Int64 `tfsdk:"updated_at"` @@ -2633,25 +2655,6 @@ type CreateCatalog struct { StorageRoot types.String `tfsdk:"storage_root"` } -func (newState *CreateCatalog) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCatalog) { -} - -func (newState *CreateCatalog) SyncEffectiveFieldsDuringRead(existingState CreateCatalog) { -} - -func (c CreateCatalog) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["connection_name"] = attrs["connection_name"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["options"] = attrs["options"].SetOptional() - attrs["properties"] = attrs["properties"].SetOptional() - attrs["provider_name"] = attrs["provider_name"].SetOptional() - attrs["share_name"] = attrs["share_name"].SetOptional() - attrs["storage_root"] = attrs["storage_root"].SetOptional() - - return attrs -} - // 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 @@ -2771,23 +2774,6 @@ type CreateConnection struct { ReadOnly types.Bool `tfsdk:"read_only"` } -func (newState *CreateConnection) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateConnection) { -} - -func (newState *CreateConnection) SyncEffectiveFieldsDuringRead(existingState CreateConnection) { -} - -func (c CreateConnection) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["connection_type"] = attrs["connection_type"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["options"] = attrs["options"].SetRequired() - attrs["properties"] = attrs["properties"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - - return attrs -} - // 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 @@ -2912,26 +2898,6 @@ type CreateCredentialRequest struct { SkipValidation types.Bool `tfsdk:"skip_validation"` } -func (newState *CreateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialRequest) { -} - -func (newState *CreateCredentialRequest) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest) { -} - -func (c CreateCredentialRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_iam_role"] = attrs["aws_iam_role"].SetOptional() - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].SetOptional() - attrs["azure_service_principal"] = attrs["azure_service_principal"].SetOptional() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["purpose"] = attrs["purpose"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - - return attrs -} - // 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 @@ -3096,21 +3062,85 @@ func (o *CreateCredentialRequest) SetDatabricksGcpServiceAccount(ctx context.Con o.DatabricksGcpServiceAccount = vs } +type CreateExternalLineageRelationshipRequest struct { + ExternalLineageRelationship types.Object `tfsdk:"external_lineage_relationship"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExternalLineageRelationshipRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateExternalLineageRelationshipRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_relationship": reflect.TypeOf(CreateRequestExternalLineage{}), + } +} + +// 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, CreateExternalLineageRelationshipRequest +// only implements ToObjectValue() and Type(). +func (o CreateExternalLineageRelationshipRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_relationship": o.ExternalLineageRelationship, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExternalLineageRelationshipRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_relationship": CreateRequestExternalLineage{}.Type(ctx), + }, + } +} + +// GetExternalLineageRelationship returns the value of the ExternalLineageRelationship field in CreateExternalLineageRelationshipRequest as +// a CreateRequestExternalLineage value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateExternalLineageRelationshipRequest) GetExternalLineageRelationship(ctx context.Context) (CreateRequestExternalLineage, bool) { + var e CreateRequestExternalLineage + if o.ExternalLineageRelationship.IsNull() || o.ExternalLineageRelationship.IsUnknown() { + return e, false + } + var v []CreateRequestExternalLineage + d := o.ExternalLineageRelationship.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 +} + +// SetExternalLineageRelationship sets the value of the ExternalLineageRelationship field in CreateExternalLineageRelationshipRequest. +func (o *CreateExternalLineageRelationshipRequest) SetExternalLineageRelationship(ctx context.Context, v CreateRequestExternalLineage) { + vs := v.ToObjectValue(ctx) + o.ExternalLineageRelationship = vs +} + type CreateExternalLocation struct { // User-provided free-form text description. Comment types.String `tfsdk:"comment"` // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name"` - // [Create:OPT Update:OPT] Whether to enable file events on this external - // location. + // Whether to enable file events on this external location. EnableFileEvents types.Bool `tfsdk:"enable_file_events"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.Object `tfsdk:"encryption_details"` // 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"` - // [Create:OPT Update:OPT] File event queue settings. + // File event queue settings. FileEventQueue types.Object `tfsdk:"file_event_queue"` // Name of the external location. Name types.String `tfsdk:"name"` @@ -3123,27 +3153,6 @@ type CreateExternalLocation struct { Url types.String `tfsdk:"url"` } -func (newState *CreateExternalLocation) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExternalLocation) { -} - -func (newState *CreateExternalLocation) SyncEffectiveFieldsDuringRead(existingState CreateExternalLocation) { -} - -func (c CreateExternalLocation) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["credential_name"] = attrs["credential_name"].SetRequired() - attrs["enable_file_events"] = attrs["enable_file_events"].SetOptional() - attrs["encryption_details"] = attrs["encryption_details"].SetOptional() - attrs["fallback"] = attrs["fallback"].SetOptional() - attrs["file_event_queue"] = attrs["file_event_queue"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - attrs["url"] = attrs["url"].SetRequired() - - return attrs -} - // 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 @@ -3252,13 +3261,78 @@ func (o *CreateExternalLocation) SetFileEventQueue(ctx context.Context, v FileEv o.FileEventQueue = vs } -type CreateFunction struct { - // Name of parent catalog. - CatalogName types.String `tfsdk:"catalog_name"` - // User-provided free-form text description. - Comment types.String `tfsdk:"comment"` - // Scalar function return data type. - DataType types.String `tfsdk:"data_type"` +type CreateExternalMetadataRequest struct { + ExternalMetadata types.Object `tfsdk:"external_metadata"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExternalMetadataRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateExternalMetadataRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_metadata": reflect.TypeOf(ExternalMetadata{}), + } +} + +// 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, CreateExternalMetadataRequest +// only implements ToObjectValue() and Type(). +func (o CreateExternalMetadataRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_metadata": o.ExternalMetadata, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExternalMetadataRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_metadata": ExternalMetadata{}.Type(ctx), + }, + } +} + +// GetExternalMetadata returns the value of the ExternalMetadata field in CreateExternalMetadataRequest as +// a ExternalMetadata value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateExternalMetadataRequest) GetExternalMetadata(ctx context.Context) (ExternalMetadata, bool) { + var e ExternalMetadata + if o.ExternalMetadata.IsNull() || o.ExternalMetadata.IsUnknown() { + return e, false + } + var v []ExternalMetadata + d := o.ExternalMetadata.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 +} + +// SetExternalMetadata sets the value of the ExternalMetadata field in CreateExternalMetadataRequest. +func (o *CreateExternalMetadataRequest) SetExternalMetadata(ctx context.Context, v ExternalMetadata) { + vs := v.ToObjectValue(ctx) + o.ExternalMetadata = vs +} + +type CreateFunction struct { + // Name of parent catalog. + CatalogName types.String `tfsdk:"catalog_name"` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment"` + // Scalar function return data type. + DataType types.String `tfsdk:"data_type"` // External function language. ExternalLanguage types.String `tfsdk:"external_language"` // External function name. @@ -3497,18 +3571,6 @@ type CreateFunctionRequest struct { FunctionInfo types.Object `tfsdk:"function_info"` } -func (newState *CreateFunctionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFunctionRequest) { -} - -func (newState *CreateFunctionRequest) SyncEffectiveFieldsDuringRead(existingState CreateFunctionRequest) { -} - -func (c CreateFunctionRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["function_info"] = attrs["function_info"].SetRequired() - - return attrs -} - // 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 @@ -3729,31 +3791,6 @@ type CreateMonitor struct { WarehouseId types.String `tfsdk:"warehouse_id"` } -func (newState *CreateMonitor) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateMonitor) { -} - -func (newState *CreateMonitor) SyncEffectiveFieldsDuringRead(existingState CreateMonitor) { -} - -func (c CreateMonitor) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["assets_dir"] = attrs["assets_dir"].SetRequired() - attrs["baseline_table_name"] = attrs["baseline_table_name"].SetOptional() - attrs["custom_metrics"] = attrs["custom_metrics"].SetOptional() - attrs["data_classification_config"] = attrs["data_classification_config"].SetOptional() - attrs["inference_log"] = attrs["inference_log"].SetOptional() - attrs["notifications"] = attrs["notifications"].SetOptional() - attrs["output_schema_name"] = attrs["output_schema_name"].SetRequired() - attrs["schedule"] = attrs["schedule"].SetOptional() - attrs["skip_builtin_dashboard"] = attrs["skip_builtin_dashboard"].SetOptional() - attrs["slicing_exprs"] = attrs["slicing_exprs"].SetOptional() - attrs["snapshot"] = attrs["snapshot"].SetOptional() - attrs["table_name"] = attrs["table_name"].SetRequired() - attrs["time_series"] = attrs["time_series"].SetOptional() - attrs["warehouse_id"] = attrs["warehouse_id"].SetOptional() - - return attrs -} - // 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 @@ -4045,7 +4082,7 @@ func (o *CreateMonitor) SetTimeSeries(ctx context.Context, v MonitorTimeSeries) } type CreateOnlineTableRequest struct { - // Online Table information. + // Specification of the online table to be created. Table types.Object `tfsdk:"table"` } @@ -4124,22 +4161,6 @@ type CreateRegisteredModelRequest struct { StorageLocation types.String `tfsdk:"storage_location"` } -func (newState *CreateRegisteredModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegisteredModelRequest) { -} - -func (newState *CreateRegisteredModelRequest) SyncEffectiveFieldsDuringRead(existingState CreateRegisteredModelRequest) { -} - -func (c CreateRegisteredModelRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["catalog_name"] = attrs["catalog_name"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["schema_name"] = attrs["schema_name"].SetRequired() - attrs["storage_location"] = attrs["storage_location"].SetOptional() - - return attrs -} - // 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 @@ -4179,6 +4200,191 @@ func (o CreateRegisteredModelRequest) Type(ctx context.Context) attr.Type { } } +type CreateRequestExternalLineage struct { + // List of column relationships between source and target objects. + Columns types.List `tfsdk:"columns"` + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Key-value properties associated with the external lineage relationship. + Properties types.Map `tfsdk:"properties"` + // Source object of the external lineage relationship. + Source types.Object `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.Object `tfsdk:"target"` +} + +func (newState *CreateRequestExternalLineage) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRequestExternalLineage) { +} + +func (newState *CreateRequestExternalLineage) SyncEffectiveFieldsDuringRead(existingState CreateRequestExternalLineage) { +} + +func (c CreateRequestExternalLineage) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["id"] = attrs["id"].SetComputed() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["source"] = attrs["source"].SetRequired() + attrs["target"] = attrs["target"].SetRequired() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRequestExternalLineage. +// Container types (types.Map, types.List, types.Set) and 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 CreateRequestExternalLineage) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnRelationship{}), + "properties": reflect.TypeOf(types.String{}), + "source": reflect.TypeOf(ExternalLineageObject{}), + "target": reflect.TypeOf(ExternalLineageObject{}), + } +} + +// 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, CreateRequestExternalLineage +// only implements ToObjectValue() and Type(). +func (o CreateRequestExternalLineage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "id": o.Id, + "properties": o.Properties, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateRequestExternalLineage) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: ColumnRelationship{}.Type(ctx), + }, + "id": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "source": ExternalLineageObject{}.Type(ctx), + "target": ExternalLineageObject{}.Type(ctx), + }, + } +} + +// GetColumns returns the value of the Columns field in CreateRequestExternalLineage as +// a slice of ColumnRelationship values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRequestExternalLineage) GetColumns(ctx context.Context) ([]ColumnRelationship, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnRelationship + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in CreateRequestExternalLineage. +func (o *CreateRequestExternalLineage) SetColumns(ctx context.Context, v []ColumnRelationship) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in CreateRequestExternalLineage as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRequestExternalLineage) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in CreateRequestExternalLineage. +func (o *CreateRequestExternalLineage) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + +// GetSource returns the value of the Source field in CreateRequestExternalLineage as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRequestExternalLineage) GetSource(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Source.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 +} + +// SetSource sets the value of the Source field in CreateRequestExternalLineage. +func (o *CreateRequestExternalLineage) SetSource(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Source = vs +} + +// GetTarget returns the value of the Target field in CreateRequestExternalLineage as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRequestExternalLineage) GetTarget(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Target.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 +} + +// SetTarget sets the value of the Target field in CreateRequestExternalLineage. +func (o *CreateRequestExternalLineage) SetTarget(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Target = vs +} + type CreateResponse struct { } @@ -4222,22 +4428,6 @@ type CreateSchema struct { StorageRoot types.String `tfsdk:"storage_root"` } -func (newState *CreateSchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateSchema) { -} - -func (newState *CreateSchema) SyncEffectiveFieldsDuringRead(existingState CreateSchema) { -} - -func (c CreateSchema) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["catalog_name"] = attrs["catalog_name"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["properties"] = attrs["properties"].SetOptional() - attrs["storage_root"] = attrs["storage_root"].SetOptional() - - return attrs -} - // 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 @@ -4545,27 +4735,11 @@ func (o *CreateStorageCredential) SetDatabricksGcpServiceAccount(ctx context.Con } type CreateTableConstraint struct { - // A table constraint, as defined by *one* of the following fields being - // set: __primary_key_constraint__, __foreign_key_constraint__, - // __named_table_constraint__. Constraint types.Object `tfsdk:"constraint"` // The full name of the table referenced by the constraint. FullNameArg types.String `tfsdk:"full_name_arg"` } -func (newState *CreateTableConstraint) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTableConstraint) { -} - -func (newState *CreateTableConstraint) SyncEffectiveFieldsDuringRead(existingState CreateTableConstraint) { -} - -func (c CreateTableConstraint) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["constraint"] = attrs["constraint"].SetRequired() - attrs["full_name_arg"] = attrs["full_name_arg"].SetRequired() - - return attrs -} - // 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 @@ -4640,30 +4814,8 @@ type CreateVolumeRequestContent struct { SchemaName types.String `tfsdk:"schema_name"` // The storage location on the cloud StorageLocation types.String `tfsdk:"storage_location"` - // The type of the volume. An external volume is located in the specified - // external location. A managed volume is located in the default location - // which is specified by the parent schema, or the parent catalog, or the - // Metastore. [Learn more] - // - // [Learn more]: https://docs.databricks.com/aws/en/volumes/managed-vs-external - VolumeType types.String `tfsdk:"volume_type"` -} -func (newState *CreateVolumeRequestContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVolumeRequestContent) { -} - -func (newState *CreateVolumeRequestContent) SyncEffectiveFieldsDuringRead(existingState CreateVolumeRequestContent) { -} - -func (c CreateVolumeRequestContent) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["catalog_name"] = attrs["catalog_name"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["schema_name"] = attrs["schema_name"].SetRequired() - attrs["storage_location"] = attrs["storage_location"].SetOptional() - attrs["volume_type"] = attrs["volume_type"].SetRequired() - - return attrs + VolumeType types.String `tfsdk:"volume_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVolumeRequestContent. @@ -4707,10 +4859,60 @@ func (o CreateVolumeRequestContent) Type(ctx context.Context) attr.Type { } } -type CredentialInfo struct { - // The AWS IAM role configuration. - AwsIamRole types.Object `tfsdk:"aws_iam_role"` - // The Azure managed identity configuration. +// A credential that is dependent on a SQL object. +type CredentialDependency struct { + // Full name of the dependent credential, in the form of + // __credential_name__. + CredentialName types.String `tfsdk:"credential_name"` +} + +func (newState *CredentialDependency) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialDependency) { +} + +func (newState *CredentialDependency) SyncEffectiveFieldsDuringRead(existingState CredentialDependency) { +} + +func (c CredentialDependency) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["credential_name"] = attrs["credential_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialDependency. +// Container types (types.Map, types.List, types.Set) and 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 CredentialDependency) 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, CredentialDependency +// only implements ToObjectValue() and Type(). +func (o CredentialDependency) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_name": o.CredentialName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CredentialDependency) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_name": types.StringType, + }, + } +} + +type CredentialInfo struct { + // The AWS IAM role configuration. + AwsIamRole types.Object `tfsdk:"aws_iam_role"` + // The Azure managed identity configuration. AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity"` // The Azure service principal configuration. AzureServicePrincipal types.Object `tfsdk:"azure_service_principal"` @@ -5014,6 +5216,36 @@ func (o CredentialValidationResult) Type(ctx context.Context) attr.Type { } } +type CurrentRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CurrentRequest. +// Container types (types.Map, types.List, types.Set) and 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 CurrentRequest) 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, CurrentRequest +// only implements ToObjectValue() and Type(). +func (o CurrentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o CurrentRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + // GCP long-lived credential. Databricks-created Google Cloud Storage service // account. type DatabricksGcpServiceAccount struct { @@ -5526,6 +5758,71 @@ func (o DeleteCredentialResponse) Type(ctx context.Context) attr.Type { } } +type DeleteExternalLineageRelationshipRequest struct { + ExternalLineageRelationship types.Object `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExternalLineageRelationshipRequest. +// Container types (types.Map, types.List, types.Set) and 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 DeleteExternalLineageRelationshipRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_relationship": reflect.TypeOf(DeleteRequestExternalLineage{}), + } +} + +// 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, DeleteExternalLineageRelationshipRequest +// only implements ToObjectValue() and Type(). +func (o DeleteExternalLineageRelationshipRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_relationship": o.ExternalLineageRelationship, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteExternalLineageRelationshipRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_relationship": DeleteRequestExternalLineage{}.Type(ctx), + }, + } +} + +// GetExternalLineageRelationship returns the value of the ExternalLineageRelationship field in DeleteExternalLineageRelationshipRequest as +// a DeleteRequestExternalLineage value. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteExternalLineageRelationshipRequest) GetExternalLineageRelationship(ctx context.Context) (DeleteRequestExternalLineage, bool) { + var e DeleteRequestExternalLineage + if o.ExternalLineageRelationship.IsNull() || o.ExternalLineageRelationship.IsUnknown() { + return e, false + } + var v []DeleteRequestExternalLineage + d := o.ExternalLineageRelationship.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 +} + +// SetExternalLineageRelationship sets the value of the ExternalLineageRelationship field in DeleteExternalLineageRelationshipRequest. +func (o *DeleteExternalLineageRelationshipRequest) SetExternalLineageRelationship(ctx context.Context, v DeleteRequestExternalLineage) { + vs := v.ToObjectValue(ctx) + o.ExternalLineageRelationship = vs +} + type DeleteExternalLocationRequest struct { // Force deletion even if there are dependent external tables or mounts. Force types.Bool `tfsdk:"-"` @@ -5566,6 +5863,41 @@ func (o DeleteExternalLocationRequest) Type(ctx context.Context) attr.Type { } } +type DeleteExternalMetadataRequest struct { + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExternalMetadataRequest. +// Container types (types.Map, types.List, types.Set) and 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 DeleteExternalMetadataRequest) 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, DeleteExternalMetadataRequest +// only implements ToObjectValue() and Type(). +func (o DeleteExternalMetadataRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteExternalMetadataRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + type DeleteFunctionRequest struct { // Force deletion even if the function is notempty. Force types.Bool `tfsdk:"-"` @@ -5795,6 +6127,123 @@ func (o DeleteRegisteredModelRequest) Type(ctx context.Context) attr.Type { } } +type DeleteRequestExternalLineage struct { + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Source object of the external lineage relationship. + Source types.Object `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.Object `tfsdk:"target"` +} + +func (newState *DeleteRequestExternalLineage) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRequestExternalLineage) { +} + +func (newState *DeleteRequestExternalLineage) SyncEffectiveFieldsDuringRead(existingState DeleteRequestExternalLineage) { +} + +func (c DeleteRequestExternalLineage) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["id"] = attrs["id"].SetComputed() + attrs["source"] = attrs["source"].SetRequired() + attrs["target"] = attrs["target"].SetRequired() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRequestExternalLineage. +// Container types (types.Map, types.List, types.Set) and 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 DeleteRequestExternalLineage) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "source": reflect.TypeOf(ExternalLineageObject{}), + "target": reflect.TypeOf(ExternalLineageObject{}), + } +} + +// 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, DeleteRequestExternalLineage +// only implements ToObjectValue() and Type(). +func (o DeleteRequestExternalLineage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteRequestExternalLineage) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "source": ExternalLineageObject{}.Type(ctx), + "target": ExternalLineageObject{}.Type(ctx), + }, + } +} + +// GetSource returns the value of the Source field in DeleteRequestExternalLineage as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteRequestExternalLineage) GetSource(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Source.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 +} + +// SetSource sets the value of the Source field in DeleteRequestExternalLineage. +func (o *DeleteRequestExternalLineage) SetSource(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Source = vs +} + +// GetTarget returns the value of the Target field in DeleteRequestExternalLineage as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteRequestExternalLineage) GetTarget(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Target.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 +} + +// SetTarget sets the value of the Target field in DeleteRequestExternalLineage. +func (o *DeleteRequestExternalLineage) SetTarget(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Target = vs +} + type DeleteResponse struct { } @@ -6117,12 +6566,15 @@ func (o *DeltaRuntimePropertiesKvPairs) SetDeltaRuntimeProperties(ctx context.Co o.DeltaRuntimeProperties = types.MapValueMust(t, vs) } -// A dependency of a SQL object. Either the __table__ field or the __function__ -// field must be defined. +// A dependency of a SQL object. One of the following fields must be defined: +// __table__, __function__, __connection__, or __credential__. type Dependency struct { - // A function that is dependent on a SQL object. + Connection types.Object `tfsdk:"connection"` + + Credential types.Object `tfsdk:"credential"` + Function types.Object `tfsdk:"function"` - // A table that is dependent on a SQL object. + Table types.Object `tfsdk:"table"` } @@ -6133,6 +6585,8 @@ func (newState *Dependency) SyncEffectiveFieldsDuringRead(existingState Dependen } func (c Dependency) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["connection"] = attrs["connection"].SetOptional() + attrs["credential"] = attrs["credential"].SetOptional() attrs["function"] = attrs["function"].SetOptional() attrs["table"] = attrs["table"].SetOptional() @@ -6148,8 +6602,10 @@ func (c Dependency) ApplySchemaCustomizations(attrs map[string]tfschema.Attribut // SDK values. func (a Dependency) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "function": reflect.TypeOf(FunctionDependency{}), - "table": reflect.TypeOf(TableDependency{}), + "connection": reflect.TypeOf(ConnectionDependency{}), + "credential": reflect.TypeOf(CredentialDependency{}), + "function": reflect.TypeOf(FunctionDependency{}), + "table": reflect.TypeOf(TableDependency{}), } } @@ -6160,8 +6616,10 @@ func (o Dependency) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "function": o.Function, - "table": o.Table, + "connection": o.Connection, + "credential": o.Credential, + "function": o.Function, + "table": o.Table, }) } @@ -6169,12 +6627,70 @@ func (o Dependency) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Dependency) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "function": FunctionDependency{}.Type(ctx), - "table": TableDependency{}.Type(ctx), + "connection": ConnectionDependency{}.Type(ctx), + "credential": CredentialDependency{}.Type(ctx), + "function": FunctionDependency{}.Type(ctx), + "table": TableDependency{}.Type(ctx), }, } } +// GetConnection returns the value of the Connection field in Dependency as +// a ConnectionDependency value. +// If the field is unknown or null, the boolean return value is false. +func (o *Dependency) GetConnection(ctx context.Context) (ConnectionDependency, bool) { + var e ConnectionDependency + if o.Connection.IsNull() || o.Connection.IsUnknown() { + return e, false + } + var v []ConnectionDependency + d := o.Connection.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 +} + +// SetConnection sets the value of the Connection field in Dependency. +func (o *Dependency) SetConnection(ctx context.Context, v ConnectionDependency) { + vs := v.ToObjectValue(ctx) + o.Connection = vs +} + +// GetCredential returns the value of the Credential field in Dependency as +// a CredentialDependency value. +// If the field is unknown or null, the boolean return value is false. +func (o *Dependency) GetCredential(ctx context.Context) (CredentialDependency, bool) { + var e CredentialDependency + if o.Credential.IsNull() || o.Credential.IsUnknown() { + return e, false + } + var v []CredentialDependency + d := o.Credential.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 +} + +// SetCredential sets the value of the Credential field in Dependency. +func (o *Dependency) SetCredential(ctx context.Context, v CredentialDependency) { + vs := v.ToObjectValue(ctx) + o.Credential = vs +} + // GetFunction returns the value of the Function field in Dependency as // a FunctionDependency value. // If the field is unknown or null, the boolean return value is false. @@ -6693,20 +7209,6 @@ type EnableRequest struct { SchemaName types.String `tfsdk:"-"` } -func (newState *EnableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnableRequest) { -} - -func (newState *EnableRequest) SyncEffectiveFieldsDuringRead(existingState EnableRequest) { -} - -func (c EnableRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["catalog_name"] = attrs["catalog_name"].SetOptional() - attrs["metastore_id"] = attrs["metastore_id"].SetRequired() - attrs["schema_name"] = attrs["schema_name"].SetRequired() - - return attrs -} - // 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 @@ -6776,124 +7278,1337 @@ func (o EnableResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue map[string]attr.Value{}) } -// Type implements basetypes.ObjectValuable. -func (o EnableResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } +// Type implements basetypes.ObjectValuable. +func (o EnableResponse) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]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"` +} + +func (newState *EncryptionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan EncryptionDetails) { +} + +func (newState *EncryptionDetails) SyncEffectiveFieldsDuringRead(existingState EncryptionDetails) { +} + +func (c EncryptionDetails) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["sse_encryption_details"] = attrs["sse_encryption_details"].SetOptional() + + return attrs +} + +// 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 +// 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 EncryptionDetails) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sse_encryption_details": reflect.TypeOf(SseEncryptionDetails{}), + } +} + +// 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, EncryptionDetails +// only implements ToObjectValue() and Type(). +func (o EncryptionDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "sse_encryption_details": o.SseEncryptionDetails, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EncryptionDetails) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "sse_encryption_details": SseEncryptionDetails{}.Type(ctx), + }, + } +} + +// GetSseEncryptionDetails returns the value of the SseEncryptionDetails field in EncryptionDetails as +// a SseEncryptionDetails value. +// If the field is unknown or null, the boolean return value is false. +func (o *EncryptionDetails) GetSseEncryptionDetails(ctx context.Context) (SseEncryptionDetails, bool) { + var e SseEncryptionDetails + if o.SseEncryptionDetails.IsNull() || o.SseEncryptionDetails.IsUnknown() { + return e, false + } + var v []SseEncryptionDetails + d := o.SseEncryptionDetails.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 +} + +// SetSseEncryptionDetails sets the value of the SseEncryptionDetails field in EncryptionDetails. +func (o *EncryptionDetails) SetSseEncryptionDetails(ctx context.Context, v SseEncryptionDetails) { + vs := v.ToObjectValue(ctx) + o.SseEncryptionDetails = vs +} + +type ExistsRequest struct { + // Full name of the table. + FullName types.String `tfsdk:"-"` +} + +// 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 +// 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 ExistsRequest) 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, ExistsRequest +// only implements ToObjectValue() and Type(). +func (o ExistsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExistsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + }, + } +} + +type ExternalLineageExternalMetadata struct { + Name types.String `tfsdk:"name"` +} + +func (newState *ExternalLineageExternalMetadata) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageExternalMetadata) { +} + +func (newState *ExternalLineageExternalMetadata) SyncEffectiveFieldsDuringRead(existingState ExternalLineageExternalMetadata) { +} + +func (c ExternalLineageExternalMetadata) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageExternalMetadata. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageExternalMetadata) 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, ExternalLineageExternalMetadata +// only implements ToObjectValue() and Type(). +func (o ExternalLineageExternalMetadata) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageExternalMetadata) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Represents the external metadata object in the lineage event. +type ExternalLineageExternalMetadataInfo struct { + // Type of entity represented by the external metadata object. + EntityType types.String `tfsdk:"entity_type"` + // Timestamp of the lineage event. + EventTime types.String `tfsdk:"event_time"` + // Name of the external metadata object. + Name types.String `tfsdk:"name"` + // Type of external system. + SystemType types.String `tfsdk:"system_type"` +} + +func (newState *ExternalLineageExternalMetadataInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageExternalMetadataInfo) { +} + +func (newState *ExternalLineageExternalMetadataInfo) SyncEffectiveFieldsDuringRead(existingState ExternalLineageExternalMetadataInfo) { +} + +func (c ExternalLineageExternalMetadataInfo) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["entity_type"] = attrs["entity_type"].SetOptional() + attrs["event_time"] = attrs["event_time"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + attrs["system_type"] = attrs["system_type"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageExternalMetadataInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageExternalMetadataInfo) 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, ExternalLineageExternalMetadataInfo +// only implements ToObjectValue() and Type(). +func (o ExternalLineageExternalMetadataInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "entity_type": o.EntityType, + "event_time": o.EventTime, + "name": o.Name, + "system_type": o.SystemType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageExternalMetadataInfo) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "entity_type": types.StringType, + "event_time": types.StringType, + "name": types.StringType, + "system_type": types.StringType, + }, + } +} + +// Represents the path information in the lineage event. +type ExternalLineageFileInfo struct { + // Timestamp of the lineage event. + EventTime types.String `tfsdk:"event_time"` + // URL of the path. + Path types.String `tfsdk:"path"` + // The full name of the securable on the path. + SecurableName types.String `tfsdk:"securable_name"` + // The securable type of the securable on the path. + SecurableType types.String `tfsdk:"securable_type"` + // The storage location associated with securable on the path. + StorageLocation types.String `tfsdk:"storage_location"` +} + +func (newState *ExternalLineageFileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageFileInfo) { +} + +func (newState *ExternalLineageFileInfo) SyncEffectiveFieldsDuringRead(existingState ExternalLineageFileInfo) { +} + +func (c ExternalLineageFileInfo) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["event_time"] = attrs["event_time"].SetOptional() + attrs["path"] = attrs["path"].SetOptional() + attrs["securable_name"] = attrs["securable_name"].SetOptional() + attrs["securable_type"] = attrs["securable_type"].SetOptional() + attrs["storage_location"] = attrs["storage_location"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageFileInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageFileInfo) 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, ExternalLineageFileInfo +// only implements ToObjectValue() and Type(). +func (o ExternalLineageFileInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "event_time": o.EventTime, + "path": o.Path, + "securable_name": o.SecurableName, + "securable_type": o.SecurableType, + "storage_location": o.StorageLocation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageFileInfo) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "event_time": types.StringType, + "path": types.StringType, + "securable_name": types.StringType, + "securable_type": types.StringType, + "storage_location": types.StringType, + }, + } +} + +// Lineage response containing lineage information of a data asset. +type ExternalLineageInfo struct { + // Information about the edge metadata of the external lineage relationship. + ExternalLineageInfo types.Object `tfsdk:"external_lineage_info"` + // Information about external metadata involved in the lineage relationship. + ExternalMetadataInfo types.Object `tfsdk:"external_metadata_info"` + // Information about the file involved in the lineage relationship. + FileInfo types.Object `tfsdk:"file_info"` + // Information about the model version involved in the lineage relationship. + ModelInfo types.Object `tfsdk:"model_info"` + // Information about the table involved in the lineage relationship. + TableInfo types.Object `tfsdk:"table_info"` +} + +func (newState *ExternalLineageInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageInfo) { +} + +func (newState *ExternalLineageInfo) SyncEffectiveFieldsDuringRead(existingState ExternalLineageInfo) { +} + +func (c ExternalLineageInfo) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_lineage_info"] = attrs["external_lineage_info"].SetOptional() + attrs["external_metadata_info"] = attrs["external_metadata_info"].SetOptional() + attrs["file_info"] = attrs["file_info"].SetOptional() + attrs["model_info"] = attrs["model_info"].SetOptional() + attrs["table_info"] = attrs["table_info"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_info": reflect.TypeOf(ExternalLineageRelationshipInfo{}), + "external_metadata_info": reflect.TypeOf(ExternalLineageExternalMetadataInfo{}), + "file_info": reflect.TypeOf(ExternalLineageFileInfo{}), + "model_info": reflect.TypeOf(ExternalLineageModelVersionInfo{}), + "table_info": reflect.TypeOf(ExternalLineageTableInfo{}), + } +} + +// 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, ExternalLineageInfo +// only implements ToObjectValue() and Type(). +func (o ExternalLineageInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_info": o.ExternalLineageInfo, + "external_metadata_info": o.ExternalMetadataInfo, + "file_info": o.FileInfo, + "model_info": o.ModelInfo, + "table_info": o.TableInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageInfo) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_info": ExternalLineageRelationshipInfo{}.Type(ctx), + "external_metadata_info": ExternalLineageExternalMetadataInfo{}.Type(ctx), + "file_info": ExternalLineageFileInfo{}.Type(ctx), + "model_info": ExternalLineageModelVersionInfo{}.Type(ctx), + "table_info": ExternalLineageTableInfo{}.Type(ctx), + }, + } +} + +// GetExternalLineageInfo returns the value of the ExternalLineageInfo field in ExternalLineageInfo as +// a ExternalLineageRelationshipInfo value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo) GetExternalLineageInfo(ctx context.Context) (ExternalLineageRelationshipInfo, bool) { + var e ExternalLineageRelationshipInfo + if o.ExternalLineageInfo.IsNull() || o.ExternalLineageInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageRelationshipInfo + d := o.ExternalLineageInfo.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 +} + +// SetExternalLineageInfo sets the value of the ExternalLineageInfo field in ExternalLineageInfo. +func (o *ExternalLineageInfo) SetExternalLineageInfo(ctx context.Context, v ExternalLineageRelationshipInfo) { + vs := v.ToObjectValue(ctx) + o.ExternalLineageInfo = vs +} + +// GetExternalMetadataInfo returns the value of the ExternalMetadataInfo field in ExternalLineageInfo as +// a ExternalLineageExternalMetadataInfo value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo) GetExternalMetadataInfo(ctx context.Context) (ExternalLineageExternalMetadataInfo, bool) { + var e ExternalLineageExternalMetadataInfo + if o.ExternalMetadataInfo.IsNull() || o.ExternalMetadataInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageExternalMetadataInfo + d := o.ExternalMetadataInfo.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 +} + +// SetExternalMetadataInfo sets the value of the ExternalMetadataInfo field in ExternalLineageInfo. +func (o *ExternalLineageInfo) SetExternalMetadataInfo(ctx context.Context, v ExternalLineageExternalMetadataInfo) { + vs := v.ToObjectValue(ctx) + o.ExternalMetadataInfo = vs +} + +// GetFileInfo returns the value of the FileInfo field in ExternalLineageInfo as +// a ExternalLineageFileInfo value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo) GetFileInfo(ctx context.Context) (ExternalLineageFileInfo, bool) { + var e ExternalLineageFileInfo + if o.FileInfo.IsNull() || o.FileInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageFileInfo + d := o.FileInfo.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 +} + +// SetFileInfo sets the value of the FileInfo field in ExternalLineageInfo. +func (o *ExternalLineageInfo) SetFileInfo(ctx context.Context, v ExternalLineageFileInfo) { + vs := v.ToObjectValue(ctx) + o.FileInfo = vs +} + +// GetModelInfo returns the value of the ModelInfo field in ExternalLineageInfo as +// a ExternalLineageModelVersionInfo value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo) GetModelInfo(ctx context.Context) (ExternalLineageModelVersionInfo, bool) { + var e ExternalLineageModelVersionInfo + if o.ModelInfo.IsNull() || o.ModelInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageModelVersionInfo + d := o.ModelInfo.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 +} + +// SetModelInfo sets the value of the ModelInfo field in ExternalLineageInfo. +func (o *ExternalLineageInfo) SetModelInfo(ctx context.Context, v ExternalLineageModelVersionInfo) { + vs := v.ToObjectValue(ctx) + o.ModelInfo = vs +} + +// GetTableInfo returns the value of the TableInfo field in ExternalLineageInfo as +// a ExternalLineageTableInfo value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageInfo) GetTableInfo(ctx context.Context) (ExternalLineageTableInfo, bool) { + var e ExternalLineageTableInfo + if o.TableInfo.IsNull() || o.TableInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageTableInfo + d := o.TableInfo.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 +} + +// SetTableInfo sets the value of the TableInfo field in ExternalLineageInfo. +func (o *ExternalLineageInfo) SetTableInfo(ctx context.Context, v ExternalLineageTableInfo) { + vs := v.ToObjectValue(ctx) + o.TableInfo = vs +} + +type ExternalLineageModelVersion struct { + Name types.String `tfsdk:"name"` + + Version types.String `tfsdk:"version"` +} + +func (newState *ExternalLineageModelVersion) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageModelVersion) { +} + +func (newState *ExternalLineageModelVersion) SyncEffectiveFieldsDuringRead(existingState ExternalLineageModelVersion) { +} + +func (c ExternalLineageModelVersion) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() + attrs["version"] = attrs["version"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageModelVersion. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageModelVersion) 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, ExternalLineageModelVersion +// only implements ToObjectValue() and Type(). +func (o ExternalLineageModelVersion) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageModelVersion) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "version": types.StringType, + }, + } +} + +// Represents the model version information in the lineage event. +type ExternalLineageModelVersionInfo struct { + // Timestamp of the lineage event. + EventTime types.String `tfsdk:"event_time"` + // Name of the model. + ModelName types.String `tfsdk:"model_name"` + // Version number of the model. + Version types.Int64 `tfsdk:"version"` +} + +func (newState *ExternalLineageModelVersionInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageModelVersionInfo) { +} + +func (newState *ExternalLineageModelVersionInfo) SyncEffectiveFieldsDuringRead(existingState ExternalLineageModelVersionInfo) { +} + +func (c ExternalLineageModelVersionInfo) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["event_time"] = attrs["event_time"].SetOptional() + attrs["model_name"] = attrs["model_name"].SetOptional() + attrs["version"] = attrs["version"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageModelVersionInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageModelVersionInfo) 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, ExternalLineageModelVersionInfo +// only implements ToObjectValue() and Type(). +func (o ExternalLineageModelVersionInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "event_time": o.EventTime, + "model_name": o.ModelName, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageModelVersionInfo) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "event_time": types.StringType, + "model_name": types.StringType, + "version": types.Int64Type, + }, + } +} + +type ExternalLineageObject struct { + ExternalMetadata types.Object `tfsdk:"external_metadata"` + + ModelVersion types.Object `tfsdk:"model_version"` + + Path types.Object `tfsdk:"path"` + + Table types.Object `tfsdk:"table"` +} + +func (newState *ExternalLineageObject) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageObject) { +} + +func (newState *ExternalLineageObject) SyncEffectiveFieldsDuringRead(existingState ExternalLineageObject) { +} + +func (c ExternalLineageObject) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_metadata"] = attrs["external_metadata"].SetOptional() + attrs["model_version"] = attrs["model_version"].SetOptional() + attrs["path"] = attrs["path"].SetOptional() + attrs["table"] = attrs["table"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageObject. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageObject) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_metadata": reflect.TypeOf(ExternalLineageExternalMetadata{}), + "model_version": reflect.TypeOf(ExternalLineageModelVersion{}), + "path": reflect.TypeOf(ExternalLineagePath{}), + "table": reflect.TypeOf(ExternalLineageTable{}), + } +} + +// 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, ExternalLineageObject +// only implements ToObjectValue() and Type(). +func (o ExternalLineageObject) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_metadata": o.ExternalMetadata, + "model_version": o.ModelVersion, + "path": o.Path, + "table": o.Table, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageObject) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_metadata": ExternalLineageExternalMetadata{}.Type(ctx), + "model_version": ExternalLineageModelVersion{}.Type(ctx), + "path": ExternalLineagePath{}.Type(ctx), + "table": ExternalLineageTable{}.Type(ctx), + }, + } +} + +// GetExternalMetadata returns the value of the ExternalMetadata field in ExternalLineageObject as +// a ExternalLineageExternalMetadata value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageObject) GetExternalMetadata(ctx context.Context) (ExternalLineageExternalMetadata, bool) { + var e ExternalLineageExternalMetadata + if o.ExternalMetadata.IsNull() || o.ExternalMetadata.IsUnknown() { + return e, false + } + var v []ExternalLineageExternalMetadata + d := o.ExternalMetadata.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 +} + +// SetExternalMetadata sets the value of the ExternalMetadata field in ExternalLineageObject. +func (o *ExternalLineageObject) SetExternalMetadata(ctx context.Context, v ExternalLineageExternalMetadata) { + vs := v.ToObjectValue(ctx) + o.ExternalMetadata = vs +} + +// GetModelVersion returns the value of the ModelVersion field in ExternalLineageObject as +// a ExternalLineageModelVersion value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageObject) GetModelVersion(ctx context.Context) (ExternalLineageModelVersion, bool) { + var e ExternalLineageModelVersion + if o.ModelVersion.IsNull() || o.ModelVersion.IsUnknown() { + return e, false + } + var v []ExternalLineageModelVersion + d := o.ModelVersion.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 +} + +// SetModelVersion sets the value of the ModelVersion field in ExternalLineageObject. +func (o *ExternalLineageObject) SetModelVersion(ctx context.Context, v ExternalLineageModelVersion) { + vs := v.ToObjectValue(ctx) + o.ModelVersion = vs +} + +// GetPath returns the value of the Path field in ExternalLineageObject as +// a ExternalLineagePath value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageObject) GetPath(ctx context.Context) (ExternalLineagePath, bool) { + var e ExternalLineagePath + if o.Path.IsNull() || o.Path.IsUnknown() { + return e, false + } + var v []ExternalLineagePath + d := o.Path.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 +} + +// SetPath sets the value of the Path field in ExternalLineageObject. +func (o *ExternalLineageObject) SetPath(ctx context.Context, v ExternalLineagePath) { + vs := v.ToObjectValue(ctx) + o.Path = vs +} + +// GetTable returns the value of the Table field in ExternalLineageObject as +// a ExternalLineageTable value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageObject) GetTable(ctx context.Context) (ExternalLineageTable, bool) { + var e ExternalLineageTable + if o.Table.IsNull() || o.Table.IsUnknown() { + return e, false + } + var v []ExternalLineageTable + d := o.Table.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 +} + +// SetTable sets the value of the Table field in ExternalLineageObject. +func (o *ExternalLineageObject) SetTable(ctx context.Context, v ExternalLineageTable) { + vs := v.ToObjectValue(ctx) + o.Table = vs +} + +type ExternalLineagePath struct { + Url types.String `tfsdk:"url"` +} + +func (newState *ExternalLineagePath) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineagePath) { +} + +func (newState *ExternalLineagePath) SyncEffectiveFieldsDuringRead(existingState ExternalLineagePath) { +} + +func (c ExternalLineagePath) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["url"] = attrs["url"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineagePath. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineagePath) 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, ExternalLineagePath +// only implements ToObjectValue() and Type(). +func (o ExternalLineagePath) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineagePath) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "url": types.StringType, + }, + } +} + +type ExternalLineageRelationship struct { + // List of column relationships between source and target objects. + Columns types.List `tfsdk:"columns"` + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Key-value properties associated with the external lineage relationship. + Properties types.Map `tfsdk:"properties"` + // Source object of the external lineage relationship. + Source types.Object `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.Object `tfsdk:"target"` +} + +func (newState *ExternalLineageRelationship) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageRelationship) { +} + +func (newState *ExternalLineageRelationship) SyncEffectiveFieldsDuringRead(existingState ExternalLineageRelationship) { +} + +func (c ExternalLineageRelationship) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["id"] = attrs["id"].SetComputed() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["source"] = attrs["source"].SetRequired() + attrs["target"] = attrs["target"].SetRequired() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageRelationship. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageRelationship) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnRelationship{}), + "properties": reflect.TypeOf(types.String{}), + "source": reflect.TypeOf(ExternalLineageObject{}), + "target": reflect.TypeOf(ExternalLineageObject{}), + } +} + +// 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, ExternalLineageRelationship +// only implements ToObjectValue() and Type(). +func (o ExternalLineageRelationship) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "id": o.Id, + "properties": o.Properties, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageRelationship) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: ColumnRelationship{}.Type(ctx), + }, + "id": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "source": ExternalLineageObject{}.Type(ctx), + "target": ExternalLineageObject{}.Type(ctx), + }, + } +} + +// GetColumns returns the value of the Columns field in ExternalLineageRelationship as +// a slice of ColumnRelationship values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationship) GetColumns(ctx context.Context) ([]ColumnRelationship, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnRelationship + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in ExternalLineageRelationship. +func (o *ExternalLineageRelationship) SetColumns(ctx context.Context, v []ColumnRelationship) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in ExternalLineageRelationship as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationship) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in ExternalLineageRelationship. +func (o *ExternalLineageRelationship) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + +// GetSource returns the value of the Source field in ExternalLineageRelationship as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationship) GetSource(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Source.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 +} + +// SetSource sets the value of the Source field in ExternalLineageRelationship. +func (o *ExternalLineageRelationship) SetSource(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Source = vs +} + +// GetTarget returns the value of the Target field in ExternalLineageRelationship as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationship) GetTarget(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Target.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 +} + +// SetTarget sets the value of the Target field in ExternalLineageRelationship. +func (o *ExternalLineageRelationship) SetTarget(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Target = vs +} + +type ExternalLineageRelationshipInfo struct { + // List of column relationships between source and target objects. + Columns types.List `tfsdk:"columns"` + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Key-value properties associated with the external lineage relationship. + Properties types.Map `tfsdk:"properties"` + // Source object of the external lineage relationship. + Source types.Object `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.Object `tfsdk:"target"` +} + +func (newState *ExternalLineageRelationshipInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageRelationshipInfo) { +} + +func (newState *ExternalLineageRelationshipInfo) SyncEffectiveFieldsDuringRead(existingState ExternalLineageRelationshipInfo) { +} + +func (c ExternalLineageRelationshipInfo) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["id"] = attrs["id"].SetComputed() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["source"] = attrs["source"].SetRequired() + attrs["target"] = attrs["target"].SetRequired() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageRelationshipInfo. +// Container types (types.Map, types.List, types.Set) and 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 ExternalLineageRelationshipInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnRelationship{}), + "properties": reflect.TypeOf(types.String{}), + "source": reflect.TypeOf(ExternalLineageObject{}), + "target": reflect.TypeOf(ExternalLineageObject{}), + } +} + +// 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, ExternalLineageRelationshipInfo +// only implements ToObjectValue() and Type(). +func (o ExternalLineageRelationshipInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "id": o.Id, + "properties": o.Properties, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLineageRelationshipInfo) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: ColumnRelationship{}.Type(ctx), + }, + "id": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "source": ExternalLineageObject{}.Type(ctx), + "target": ExternalLineageObject{}.Type(ctx), + }, + } +} + +// GetColumns returns the value of the Columns field in ExternalLineageRelationshipInfo as +// a slice of ColumnRelationship values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationshipInfo) GetColumns(ctx context.Context) ([]ColumnRelationship, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnRelationship + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in ExternalLineageRelationshipInfo. +func (o *ExternalLineageRelationshipInfo) SetColumns(ctx context.Context, v []ColumnRelationship) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in ExternalLineageRelationshipInfo as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationshipInfo) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in ExternalLineageRelationshipInfo. +func (o *ExternalLineageRelationshipInfo) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + +// GetSource returns the value of the Source field in ExternalLineageRelationshipInfo as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationshipInfo) GetSource(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Source.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 +} + +// SetSource sets the value of the Source field in ExternalLineageRelationshipInfo. +func (o *ExternalLineageRelationshipInfo) SetSource(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Source = vs +} + +// GetTarget returns the value of the Target field in ExternalLineageRelationshipInfo as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLineageRelationshipInfo) GetTarget(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Target.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 +} + +// SetTarget sets the value of the Target field in ExternalLineageRelationshipInfo. +func (o *ExternalLineageRelationshipInfo) SetTarget(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Target = vs } -// 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"` +type ExternalLineageTable struct { + Name types.String `tfsdk:"name"` } -func (newState *EncryptionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan EncryptionDetails) { +func (newState *ExternalLineageTable) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageTable) { } -func (newState *EncryptionDetails) SyncEffectiveFieldsDuringRead(existingState EncryptionDetails) { +func (newState *ExternalLineageTable) SyncEffectiveFieldsDuringRead(existingState ExternalLineageTable) { } -func (c EncryptionDetails) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["sse_encryption_details"] = attrs["sse_encryption_details"].SetOptional() +func (c ExternalLineageTable) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in EncryptionDetails. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageTable. // Container types (types.Map, types.List, types.Set) and 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 EncryptionDetails) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "sse_encryption_details": reflect.TypeOf(SseEncryptionDetails{}), - } +func (a ExternalLineageTable) 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, EncryptionDetails +// interfere with how the plugin framework retrieves and sets values in state. Thus, ExternalLineageTable // only implements ToObjectValue() and Type(). -func (o EncryptionDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ExternalLineageTable) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "sse_encryption_details": o.SseEncryptionDetails, + "name": o.Name, }) } // Type implements basetypes.ObjectValuable. -func (o EncryptionDetails) Type(ctx context.Context) attr.Type { +func (o ExternalLineageTable) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "sse_encryption_details": SseEncryptionDetails{}.Type(ctx), + "name": types.StringType, }, } } -// GetSseEncryptionDetails returns the value of the SseEncryptionDetails field in EncryptionDetails as -// a SseEncryptionDetails value. -// If the field is unknown or null, the boolean return value is false. -func (o *EncryptionDetails) GetSseEncryptionDetails(ctx context.Context) (SseEncryptionDetails, bool) { - var e SseEncryptionDetails - if o.SseEncryptionDetails.IsNull() || o.SseEncryptionDetails.IsUnknown() { - return e, false - } - var v []SseEncryptionDetails - d := o.SseEncryptionDetails.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 +// Represents the table information in the lineage event. +type ExternalLineageTableInfo struct { + // Name of Catalog. + CatalogName types.String `tfsdk:"catalog_name"` + // Timestamp of the lineage event. + EventTime types.String `tfsdk:"event_time"` + // Name of Table. + Name types.String `tfsdk:"name"` + // Name of Schema. + SchemaName types.String `tfsdk:"schema_name"` } -// SetSseEncryptionDetails sets the value of the SseEncryptionDetails field in EncryptionDetails. -func (o *EncryptionDetails) SetSseEncryptionDetails(ctx context.Context, v SseEncryptionDetails) { - vs := v.ToObjectValue(ctx) - o.SseEncryptionDetails = vs +func (newState *ExternalLineageTableInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLineageTableInfo) { } -type ExistsRequest struct { - // Full name of the table. - FullName types.String `tfsdk:"-"` +func (newState *ExternalLineageTableInfo) SyncEffectiveFieldsDuringRead(existingState ExternalLineageTableInfo) { } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExistsRequest. +func (c ExternalLineageTableInfo) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["catalog_name"] = attrs["catalog_name"].SetOptional() + attrs["event_time"] = attrs["event_time"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + attrs["schema_name"] = attrs["schema_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLineageTableInfo. // Container types (types.Map, types.List, types.Set) and 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 ExistsRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a ExternalLineageTableInfo) 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, ExistsRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, ExternalLineageTableInfo // only implements ToObjectValue() and Type(). -func (o ExistsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ExternalLineageTableInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "full_name": o.FullName, + "catalog_name": o.CatalogName, + "event_time": o.EventTime, + "name": o.Name, + "schema_name": o.SchemaName, }) } // Type implements basetypes.ObjectValuable. -func (o ExistsRequest) Type(ctx context.Context) attr.Type { +func (o ExternalLineageTableInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "full_name": types.StringType, + "catalog_name": types.StringType, + "event_time": types.StringType, + "name": types.StringType, + "schema_name": types.StringType, }, } } @@ -6913,16 +8628,15 @@ type ExternalLocationInfo struct { CredentialId types.String `tfsdk:"credential_id"` // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name"` - // [Create:OPT Update:OPT] Whether to enable file events on this external - // location. + // Whether to enable file events on this external location. EnableFileEvents types.Bool `tfsdk:"enable_file_events"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.Object `tfsdk:"encryption_details"` // 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"` - // [Create:OPT Update:OPT] File event queue settings. + // File event queue settings. FileEventQueue types.Object `tfsdk:"file_event_queue"` IsolationMode types.String `tfsdk:"isolation_mode"` @@ -7096,6 +8810,178 @@ func (o *ExternalLocationInfo) SetFileEventQueue(ctx context.Context, v FileEven o.FileEventQueue = vs } +type ExternalMetadata struct { + // List of columns associated with the external metadata object. + Columns types.List `tfsdk:"columns"` + // Time at which this external metadata object was created. + CreateTime types.String `tfsdk:"create_time"` + // Username of external metadata object creator. + CreatedBy types.String `tfsdk:"created_by"` + // User-provided free-form text description. + Description types.String `tfsdk:"description"` + // Type of entity within the external system. + EntityType types.String `tfsdk:"entity_type"` + // Unique identifier of the external metadata object. + Id types.String `tfsdk:"id"` + // Unique identifier of parent metastore. + MetastoreId types.String `tfsdk:"metastore_id"` + // Name of the external metadata object. + Name types.String `tfsdk:"name"` + // Owner of the external metadata object. + Owner types.String `tfsdk:"owner"` + // A map of key-value properties attached to the external metadata object. + Properties types.Map `tfsdk:"properties"` + // Type of external system. + SystemType types.String `tfsdk:"system_type"` + // Time at which this external metadata object was last modified. + UpdateTime types.String `tfsdk:"update_time"` + // Username of user who last modified external metadata object. + UpdatedBy types.String `tfsdk:"updated_by"` + // URL associated with the external metadata object. + Url types.String `tfsdk:"url"` +} + +func (newState *ExternalMetadata) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalMetadata) { +} + +func (newState *ExternalMetadata) SyncEffectiveFieldsDuringRead(existingState ExternalMetadata) { +} + +func (c ExternalMetadata) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["create_time"] = attrs["create_time"].SetComputed() + attrs["created_by"] = attrs["created_by"].SetComputed() + attrs["description"] = attrs["description"].SetOptional() + attrs["entity_type"] = attrs["entity_type"].SetRequired() + attrs["id"] = attrs["id"].SetComputed() + attrs["metastore_id"] = attrs["metastore_id"].SetComputed() + attrs["name"] = attrs["name"].SetRequired() + attrs["owner"] = attrs["owner"].SetOptional() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["system_type"] = attrs["system_type"].SetRequired() + attrs["update_time"] = attrs["update_time"].SetComputed() + attrs["updated_by"] = attrs["updated_by"].SetComputed() + attrs["url"] = attrs["url"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalMetadata. +// Container types (types.Map, types.List, types.Set) and 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 ExternalMetadata) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(types.String{}), + "properties": reflect.TypeOf(types.String{}), + } +} + +// 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, ExternalMetadata +// only implements ToObjectValue() and Type(). +func (o ExternalMetadata) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "create_time": o.CreateTime, + "created_by": o.CreatedBy, + "description": o.Description, + "entity_type": o.EntityType, + "id": o.Id, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "properties": o.Properties, + "system_type": o.SystemType, + "update_time": o.UpdateTime, + "updated_by": o.UpdatedBy, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalMetadata) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: types.StringType, + }, + "create_time": types.StringType, + "created_by": types.StringType, + "description": types.StringType, + "entity_type": types.StringType, + "id": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "system_type": types.StringType, + "update_time": types.StringType, + "updated_by": types.StringType, + "url": types.StringType, + }, + } +} + +// GetColumns returns the value of the Columns field in ExternalMetadata as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalMetadata) GetColumns(ctx context.Context) ([]types.String, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in ExternalMetadata. +func (o *ExternalMetadata) SetColumns(ctx context.Context, v []types.String) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in ExternalMetadata as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalMetadata) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in ExternalMetadata. +func (o *ExternalMetadata) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + // Detailed status of an online table. Shown if the online table is in the // OFFLINE_FAILED or the ONLINE_PIPELINE_FAILED state. type FailedStatus struct { @@ -7412,6 +9298,8 @@ type ForeignKeyConstraint struct { ParentColumns types.List `tfsdk:"parent_columns"` // The full name of the parent constraint. ParentTable types.String `tfsdk:"parent_table"` + // True if the constraint is RELY, false or unset if NORELY. + Rely types.Bool `tfsdk:"rely"` } func (newState *ForeignKeyConstraint) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForeignKeyConstraint) { @@ -7425,6 +9313,7 @@ func (c ForeignKeyConstraint) ApplySchemaCustomizations(attrs map[string]tfschem attrs["name"] = attrs["name"].SetRequired() attrs["parent_columns"] = attrs["parent_columns"].SetRequired() attrs["parent_table"] = attrs["parent_table"].SetRequired() + attrs["rely"] = attrs["rely"].SetOptional() return attrs } @@ -7454,6 +9343,7 @@ func (o ForeignKeyConstraint) ToObjectValue(ctx context.Context) basetypes.Objec "name": o.Name, "parent_columns": o.ParentColumns, "parent_table": o.ParentTable, + "rely": o.Rely, }) } @@ -7469,6 +9359,7 @@ func (o ForeignKeyConstraint) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "parent_table": types.StringType, + "rely": types.BoolType, }, } } @@ -7870,9 +9761,9 @@ type FunctionParameterInfo struct { Name types.String `tfsdk:"name"` // Default value of the parameter. ParameterDefault types.String `tfsdk:"parameter_default"` - // The mode of the function parameter. + ParameterMode types.String `tfsdk:"parameter_mode"` - // The type of function parameter. + ParameterType types.String `tfsdk:"parameter_type"` // Ordinal position of column (starting at position 0). Position types.Int64 `tfsdk:"position"` @@ -8099,7 +9990,7 @@ type GcpPubsub struct { // resources. ManagedResourceId types.String `tfsdk:"managed_resource_id"` // The Pub/Sub subscription name in the format - // projects/{project}/subscriptions/{subscription name} REQUIRED for + // projects/{project}/subscriptions/{subscription name} Required for // provided_pubsub. SubscriptionName types.String `tfsdk:"subscription_name"` } @@ -8313,27 +10204,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"` // The name of the service credential used to generate a temporary // credential CredentialName types.String `tfsdk:"credential_name"` - // The GCP cloud options to customize the requested temporary credential - GcpOptions types.Object `tfsdk:"gcp_options"` -} - -func (newState *GenerateTemporaryServiceCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialRequest) { -} - -func (newState *GenerateTemporaryServiceCredentialRequest) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialRequest) { -} - -func (c GenerateTemporaryServiceCredentialRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["azure_options"] = attrs["azure_options"].SetOptional() - attrs["credential_name"] = attrs["credential_name"].SetRequired() - attrs["gcp_options"] = attrs["gcp_options"].SetOptional() - return attrs + GcpOptions types.Object `tfsdk:"gcp_options"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialRequest. @@ -8439,19 +10315,6 @@ type GenerateTemporaryTableCredentialRequest struct { TableId types.String `tfsdk:"table_id"` } -func (newState *GenerateTemporaryTableCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryTableCredentialRequest) { -} - -func (newState *GenerateTemporaryTableCredentialRequest) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryTableCredentialRequest) { -} - -func (c GenerateTemporaryTableCredentialRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["operation"] = attrs["operation"].SetOptional() - attrs["table_id"] = attrs["table_id"].SetOptional() - - return attrs -} - // 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 @@ -8486,24 +10349,17 @@ 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"` - // 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"` - // 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"` // 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"` - // 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"` - // R2 temporary credentials for API authentication. Read more at - // https://developers.cloudflare.com/r2/api/s3/tokens/. + R2TempCredentials types.Object `tfsdk:"r2_temp_credentials"` // The URL of the storage path accessible by the temporary credential. Url types.String `tfsdk:"url"` @@ -9244,17 +11100,52 @@ func (o GetExternalLocationRequest) ToObjectValue(ctx context.Context) basetypes return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "include_browse": o.IncludeBrowse, - "name": o.Name, + "include_browse": o.IncludeBrowse, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetExternalLocationRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_browse": types.BoolType, + "name": types.StringType, + }, + } +} + +type GetExternalMetadataRequest struct { + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExternalMetadataRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetExternalMetadataRequest) 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, GetExternalMetadataRequest +// only implements ToObjectValue() and Type(). +func (o GetExternalMetadataRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, }) } // Type implements basetypes.ObjectValuable. -func (o GetExternalLocationRequest) Type(ctx context.Context) attr.Type { +func (o GetExternalMetadataRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "include_browse": types.BoolType, - "name": types.StringType, + "name": types.StringType, }, } } @@ -10040,11 +11931,12 @@ type GetTableRequest struct { // Full name of the table. FullName types.String `tfsdk:"-"` // Whether to include tables in the response for which the principal can - // only access selective metadata for + // only access selective metadata for. IncludeBrowse types.Bool `tfsdk:"-"` // Whether delta metadata should be included in the response. IncludeDeltaMetadata types.Bool `tfsdk:"-"` - // Whether to include a manifest containing capabilities the table has. + // Whether to include a manifest containing table capabilities in the + // response. IncludeManifestCapabilities types.Bool `tfsdk:"-"` } @@ -10320,6 +12212,36 @@ func (o *ListAccountMetastoreAssignmentsResponse) SetWorkspaceIds(ctx context.Co o.WorkspaceIds = types.ListValueMust(t, vs) } +type ListAccountMetastoresRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountMetastoresRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListAccountMetastoresRequest) 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, ListAccountMetastoresRequest +// only implements ToObjectValue() and Type(). +func (o ListAccountMetastoresRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAccountMetastoresRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListAccountStorageCredentialsRequest struct { // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` @@ -10834,6 +12756,166 @@ func (o *ListCredentialsResponse) SetCredentials(ctx context.Context, v []Creden o.Credentials = types.ListValueMust(t, vs) } +type ListExternalLineageRelationshipsRequest struct { + // The lineage direction to filter on. + LineageDirection types.String `tfsdk:"-"` + // The object to query external lineage relationship on. + ObjectInfo types.Object `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLineageRelationshipsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListExternalLineageRelationshipsRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "object_info": reflect.TypeOf(ExternalLineageObject{}), + } +} + +// 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, ListExternalLineageRelationshipsRequest +// only implements ToObjectValue() and Type(). +func (o ListExternalLineageRelationshipsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "lineage_direction": o.LineageDirection, + "object_info": o.ObjectInfo, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExternalLineageRelationshipsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "lineage_direction": types.StringType, + "object_info": ExternalLineageObject{}.Type(ctx), + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +// GetObjectInfo returns the value of the ObjectInfo field in ListExternalLineageRelationshipsRequest as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExternalLineageRelationshipsRequest) GetObjectInfo(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.ObjectInfo.IsNull() || o.ObjectInfo.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.ObjectInfo.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 +} + +// SetObjectInfo sets the value of the ObjectInfo field in ListExternalLineageRelationshipsRequest. +func (o *ListExternalLineageRelationshipsRequest) SetObjectInfo(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.ObjectInfo = vs +} + +type ListExternalLineageRelationshipsResponse struct { + ExternalLineageRelationships types.List `tfsdk:"external_lineage_relationships"` + + NextPageToken types.String `tfsdk:"next_page_token"` +} + +func (newState *ListExternalLineageRelationshipsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLineageRelationshipsResponse) { +} + +func (newState *ListExternalLineageRelationshipsResponse) SyncEffectiveFieldsDuringRead(existingState ListExternalLineageRelationshipsResponse) { +} + +func (c ListExternalLineageRelationshipsResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_lineage_relationships"] = attrs["external_lineage_relationships"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLineageRelationshipsResponse. +// Container types (types.Map, types.List, types.Set) and 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 ListExternalLineageRelationshipsResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_relationships": reflect.TypeOf(ExternalLineageInfo{}), + } +} + +// 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, ListExternalLineageRelationshipsResponse +// only implements ToObjectValue() and Type(). +func (o ListExternalLineageRelationshipsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_relationships": o.ExternalLineageRelationships, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExternalLineageRelationshipsResponse) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_relationships": basetypes.ListType{ + ElemType: ExternalLineageInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetExternalLineageRelationships returns the value of the ExternalLineageRelationships field in ListExternalLineageRelationshipsResponse as +// a slice of ExternalLineageInfo values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExternalLineageRelationshipsResponse) GetExternalLineageRelationships(ctx context.Context) ([]ExternalLineageInfo, bool) { + if o.ExternalLineageRelationships.IsNull() || o.ExternalLineageRelationships.IsUnknown() { + return nil, false + } + var v []ExternalLineageInfo + d := o.ExternalLineageRelationships.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExternalLineageRelationships sets the value of the ExternalLineageRelationships field in ListExternalLineageRelationshipsResponse. +func (o *ListExternalLineageRelationshipsResponse) SetExternalLineageRelationships(ctx context.Context, v []ExternalLineageInfo) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_lineage_relationships"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExternalLineageRelationships = types.ListValueMust(t, vs) +} + type ListExternalLocationsRequest struct { // Whether to include external locations in the response for which the // principal can only access selective metadata for @@ -10867,106 +12949,227 @@ func (o ListExternalLocationsRequest) ToObjectValue(ctx context.Context) basetyp return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "include_browse": o.IncludeBrowse, - "max_results": o.MaxResults, - "page_token": o.PageToken, + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExternalLocationsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_browse": types.BoolType, + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListExternalLocationsResponse struct { + // An array of external locations. + ExternalLocations types.List `tfsdk:"external_locations"` + // 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"` +} + +func (newState *ListExternalLocationsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsResponse) { +} + +func (newState *ListExternalLocationsResponse) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsResponse) { +} + +func (c ListExternalLocationsResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_locations"] = attrs["external_locations"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// 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 +// 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 ListExternalLocationsResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_locations": reflect.TypeOf(ExternalLocationInfo{}), + } +} + +// 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, ListExternalLocationsResponse +// only implements ToObjectValue() and Type(). +func (o ListExternalLocationsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_locations": o.ExternalLocations, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExternalLocationsResponse) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_locations": basetypes.ListType{ + ElemType: ExternalLocationInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetExternalLocations returns the value of the ExternalLocations field in ListExternalLocationsResponse as +// a slice of ExternalLocationInfo values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExternalLocationsResponse) GetExternalLocations(ctx context.Context) ([]ExternalLocationInfo, bool) { + if o.ExternalLocations.IsNull() || o.ExternalLocations.IsUnknown() { + return nil, false + } + var v []ExternalLocationInfo + d := o.ExternalLocations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExternalLocations sets the value of the ExternalLocations field in ListExternalLocationsResponse. +func (o *ListExternalLocationsResponse) SetExternalLocations(ctx context.Context, v []ExternalLocationInfo) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_locations"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExternalLocations = types.ListValueMust(t, vs) +} + +type ListExternalMetadataRequest struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalMetadataRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListExternalMetadataRequest) 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, ListExternalMetadataRequest +// only implements ToObjectValue() and Type(). +func (o ListExternalMetadataRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, }) } // Type implements basetypes.ObjectValuable. -func (o ListExternalLocationsRequest) Type(ctx context.Context) attr.Type { +func (o ListExternalMetadataRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "include_browse": types.BoolType, - "max_results": types.Int64Type, - "page_token": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, }, } } -type ListExternalLocationsResponse struct { - // An array of external locations. - ExternalLocations types.List `tfsdk:"external_locations"` - // 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). +type ListExternalMetadataResponse struct { + ExternalMetadata types.List `tfsdk:"external_metadata"` + NextPageToken types.String `tfsdk:"next_page_token"` } -func (newState *ListExternalLocationsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsResponse) { +func (newState *ListExternalMetadataResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalMetadataResponse) { } -func (newState *ListExternalLocationsResponse) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsResponse) { +func (newState *ListExternalMetadataResponse) SyncEffectiveFieldsDuringRead(existingState ListExternalMetadataResponse) { } -func (c ListExternalLocationsResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["external_locations"] = attrs["external_locations"].SetOptional() +func (c ListExternalMetadataResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["external_metadata"] = attrs["external_metadata"].SetOptional() attrs["next_page_token"] = attrs["next_page_token"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLocationsResponse. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalMetadataResponse. // Container types (types.Map, types.List, types.Set) and 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 ListExternalLocationsResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a ListExternalMetadataResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "external_locations": reflect.TypeOf(ExternalLocationInfo{}), + "external_metadata": reflect.TypeOf(ExternalMetadata{}), } } // 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, ListExternalLocationsResponse +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListExternalMetadataResponse // only implements ToObjectValue() and Type(). -func (o ListExternalLocationsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ListExternalMetadataResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "external_locations": o.ExternalLocations, - "next_page_token": o.NextPageToken, + "external_metadata": o.ExternalMetadata, + "next_page_token": o.NextPageToken, }) } // Type implements basetypes.ObjectValuable. -func (o ListExternalLocationsResponse) Type(ctx context.Context) attr.Type { +func (o ListExternalMetadataResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "external_locations": basetypes.ListType{ - ElemType: ExternalLocationInfo{}.Type(ctx), + "external_metadata": basetypes.ListType{ + ElemType: ExternalMetadata{}.Type(ctx), }, "next_page_token": types.StringType, }, } } -// GetExternalLocations returns the value of the ExternalLocations field in ListExternalLocationsResponse as -// a slice of ExternalLocationInfo values. +// GetExternalMetadata returns the value of the ExternalMetadata field in ListExternalMetadataResponse as +// a slice of ExternalMetadata values. // If the field is unknown or null, the boolean return value is false. -func (o *ListExternalLocationsResponse) GetExternalLocations(ctx context.Context) ([]ExternalLocationInfo, bool) { - if o.ExternalLocations.IsNull() || o.ExternalLocations.IsUnknown() { +func (o *ListExternalMetadataResponse) GetExternalMetadata(ctx context.Context) ([]ExternalMetadata, bool) { + if o.ExternalMetadata.IsNull() || o.ExternalMetadata.IsUnknown() { return nil, false } - var v []ExternalLocationInfo - d := o.ExternalLocations.ElementsAs(ctx, &v, true) + var v []ExternalMetadata + d := o.ExternalMetadata.ElementsAs(ctx, &v, true) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } return v, true } -// SetExternalLocations sets the value of the ExternalLocations field in ListExternalLocationsResponse. -func (o *ListExternalLocationsResponse) SetExternalLocations(ctx context.Context, v []ExternalLocationInfo) { +// SetExternalMetadata sets the value of the ExternalMetadata field in ListExternalMetadataResponse. +func (o *ListExternalMetadataResponse) SetExternalMetadata(ctx context.Context, v []ExternalMetadata) { vs := make([]attr.Value, 0, len(v)) for _, e := range v { vs = append(vs, e.ToObjectValue(ctx)) } - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_locations"] + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_metadata"] t = t.(attr.TypeWithElementType).ElementType() - o.ExternalLocations = types.ListValueMust(t, vs) + o.ExternalMetadata = types.ListValueMust(t, vs) } type ListFunctionsRequest struct { @@ -11973,7 +14176,8 @@ func (o *ListStorageCredentialsResponse) SetStorageCredentials(ctx context.Conte type ListSummariesRequest struct { // Name of parent catalog for tables of interest. CatalogName types.String `tfsdk:"-"` - // Whether to include a manifest containing capabilities the table has. + // Whether to include a manifest containing table capabilities in the + // response. IncludeManifestCapabilities types.Bool `tfsdk:"-"` // Maximum number of summaries for tables to return. If not set, the page // length is set to a server configured value (10000, as of 1/5/2024). - @@ -12257,11 +14461,10 @@ type ListTablesRequest struct { // Name of parent catalog for tables of interest. CatalogName types.String `tfsdk:"-"` // Whether to include tables in the response for which the principal can - // only access selective metadata for + // only access selective metadata for. IncludeBrowse types.Bool `tfsdk:"-"` - // Whether delta metadata should be included in the response. - IncludeDeltaMetadata types.Bool `tfsdk:"-"` - // Whether to include a manifest containing capabilities the table has. + // Whether to include a manifest containing table capabilities in the + // response. IncludeManifestCapabilities types.Bool `tfsdk:"-"` // Maximum number of tables to return. If not set, all the tables are // returned (not recommended). - when set to a value greater than 0, the @@ -12303,7 +14506,6 @@ func (o ListTablesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectVa map[string]attr.Value{ "catalog_name": o.CatalogName, "include_browse": o.IncludeBrowse, - "include_delta_metadata": o.IncludeDeltaMetadata, "include_manifest_capabilities": o.IncludeManifestCapabilities, "max_results": o.MaxResults, "omit_columns": o.OmitColumns, @@ -12320,7 +14522,6 @@ func (o ListTablesRequest) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "catalog_name": types.StringType, "include_browse": types.BoolType, - "include_delta_metadata": types.BoolType, "include_manifest_capabilities": types.BoolType, "max_results": types.Int64Type, "omit_columns": types.BoolType, @@ -13329,7 +15530,7 @@ type MonitorInfo struct { SlicingExprs types.List `tfsdk:"slicing_exprs"` // Configuration for monitoring snapshot tables. Snapshot types.Object `tfsdk:"snapshot"` - // The status of the monitor. + Status types.String `tfsdk:"status"` // The full name of the table to monitor. Format: // __catalog_name__.__schema_name__.__table_name__. @@ -14615,22 +16816,16 @@ func (o OnlineTableSpecTriggeredSchedulingPolicy) Type(ctx context.Context) attr // Status of an online table. 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"` // The state of the online table. DetailedState types.String `tfsdk:"detailed_state"` - // 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"` // A text description of the current state of the online table. Message types.String `tfsdk:"message"` - // 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"` - // 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"` } @@ -14809,6 +17004,162 @@ func (o *OnlineTableStatus) SetTriggeredUpdateStatus(ctx context.Context, v Trig o.TriggeredUpdateStatus = vs } +// Spec of an allowed option on a securable kind and its attributes. This is +// mostly used by UI to provide user friendly hints and descriptions in order to +// facilitate the securable creation process. +type OptionSpec struct { + // For drop down / radio button selections, UI will want to know the + // possible input values, it can also be used by other option types to limit + // input selections. + AllowedValues types.List `tfsdk:"allowed_values"` + // The default value of the option, for example, value '443' for 'port' + // option. + DefaultValue types.String `tfsdk:"default_value"` + // A concise user facing description of what the input value of this option + // should look like. + Description types.String `tfsdk:"description"` + // The hint is used on the UI to suggest what the input value can possibly + // be like, for example: example.com for 'host' option. Unlike default + // value, it will not be applied automatically without user input. + Hint types.String `tfsdk:"hint"` + // Indicates whether an option should be displayed with copy button on the + // UI. + IsCopiable types.Bool `tfsdk:"is_copiable"` + // Indicates whether an option can be provided by users in the create/update + // path of an entity. + IsCreatable types.Bool `tfsdk:"is_creatable"` + // Is the option value not user settable and is thus not shown on the UI. + IsHidden types.Bool `tfsdk:"is_hidden"` + // Specifies whether this option is safe to log, i.e. no sensitive + // information. + IsLoggable types.Bool `tfsdk:"is_loggable"` + // Is the option required. + IsRequired types.Bool `tfsdk:"is_required"` + // Is the option value considered secret and thus redacted on the UI. + IsSecret types.Bool `tfsdk:"is_secret"` + // Is the option updatable by users. + IsUpdatable types.Bool `tfsdk:"is_updatable"` + // The unique name of the option. + Name types.String `tfsdk:"name"` + // Specifies when the option value is displayed on the UI within the OAuth + // flow. + OauthStage types.String `tfsdk:"oauth_stage"` + // The type of the option. + Type_ types.String `tfsdk:"type"` +} + +func (newState *OptionSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan OptionSpec) { +} + +func (newState *OptionSpec) SyncEffectiveFieldsDuringRead(existingState OptionSpec) { +} + +func (c OptionSpec) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["allowed_values"] = attrs["allowed_values"].SetOptional() + attrs["default_value"] = attrs["default_value"].SetOptional() + attrs["description"] = attrs["description"].SetOptional() + attrs["hint"] = attrs["hint"].SetOptional() + attrs["is_copiable"] = attrs["is_copiable"].SetOptional() + attrs["is_creatable"] = attrs["is_creatable"].SetOptional() + attrs["is_hidden"] = attrs["is_hidden"].SetOptional() + attrs["is_loggable"] = attrs["is_loggable"].SetOptional() + attrs["is_required"] = attrs["is_required"].SetOptional() + attrs["is_secret"] = attrs["is_secret"].SetOptional() + attrs["is_updatable"] = attrs["is_updatable"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + attrs["oauth_stage"] = attrs["oauth_stage"].SetOptional() + attrs["type"] = attrs["type"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OptionSpec. +// Container types (types.Map, types.List, types.Set) and 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 OptionSpec) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "allowed_values": reflect.TypeOf(types.String{}), + } +} + +// 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, OptionSpec +// only implements ToObjectValue() and Type(). +func (o OptionSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allowed_values": o.AllowedValues, + "default_value": o.DefaultValue, + "description": o.Description, + "hint": o.Hint, + "is_copiable": o.IsCopiable, + "is_creatable": o.IsCreatable, + "is_hidden": o.IsHidden, + "is_loggable": o.IsLoggable, + "is_required": o.IsRequired, + "is_secret": o.IsSecret, + "is_updatable": o.IsUpdatable, + "name": o.Name, + "oauth_stage": o.OauthStage, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o OptionSpec) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allowed_values": basetypes.ListType{ + ElemType: types.StringType, + }, + "default_value": types.StringType, + "description": types.StringType, + "hint": types.StringType, + "is_copiable": types.BoolType, + "is_creatable": types.BoolType, + "is_hidden": types.BoolType, + "is_loggable": types.BoolType, + "is_required": types.BoolType, + "is_secret": types.BoolType, + "is_updatable": types.BoolType, + "name": types.StringType, + "oauth_stage": types.StringType, + "type": types.StringType, + }, + } +} + +// GetAllowedValues returns the value of the AllowedValues field in OptionSpec as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *OptionSpec) GetAllowedValues(ctx context.Context) ([]types.String, bool) { + if o.AllowedValues.IsNull() || o.AllowedValues.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AllowedValues.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllowedValues sets the value of the AllowedValues field in OptionSpec. +func (o *OptionSpec) SetAllowedValues(ctx context.Context, v []types.String) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["allowed_values"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllowedValues = types.ListValueMust(t, vs) +} + type PermissionsChange struct { // The set of privileges to add. Add types.List `tfsdk:"add"` @@ -15002,6 +17353,8 @@ type PrimaryKeyConstraint struct { ChildColumns types.List `tfsdk:"child_columns"` // The name of the constraint. Name types.String `tfsdk:"name"` + // True if the constraint is RELY, false or unset if NORELY. + Rely types.Bool `tfsdk:"rely"` // Column names that represent a timeseries. TimeseriesColumns types.List `tfsdk:"timeseries_columns"` } @@ -15015,6 +17368,7 @@ func (newState *PrimaryKeyConstraint) SyncEffectiveFieldsDuringRead(existingStat func (c PrimaryKeyConstraint) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["child_columns"] = attrs["child_columns"].SetRequired() attrs["name"] = attrs["name"].SetRequired() + attrs["rely"] = attrs["rely"].SetOptional() attrs["timeseries_columns"] = attrs["timeseries_columns"].SetOptional() return attrs @@ -15043,6 +17397,7 @@ func (o PrimaryKeyConstraint) ToObjectValue(ctx context.Context) basetypes.Objec map[string]attr.Value{ "child_columns": o.ChildColumns, "name": o.Name, + "rely": o.Rely, "timeseries_columns": o.TimeseriesColumns, }) } @@ -15055,6 +17410,7 @@ func (o PrimaryKeyConstraint) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "name": types.StringType, + "rely": types.BoolType, "timeseries_columns": basetypes.ListType{ ElemType: types.StringType, }, @@ -15115,7 +17471,8 @@ func (o *PrimaryKeyConstraint) SetTimeseriesColumns(ctx context.Context, v []typ } type PrivilegeAssignment struct { - // The principal (user email address or group name). + // The principal (user email address or group name). For deleted principals, + // `principal` is empty while `principal_id` is populated. Principal types.String `tfsdk:"principal"` // The privileges assigned to the principal. Privileges types.List `tfsdk:"privileges"` @@ -15510,19 +17867,6 @@ type RegenerateDashboardRequest struct { WarehouseId types.String `tfsdk:"warehouse_id"` } -func (newState *RegenerateDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegenerateDashboardRequest) { -} - -func (newState *RegenerateDashboardRequest) SyncEffectiveFieldsDuringRead(existingState RegenerateDashboardRequest) { -} - -func (c RegenerateDashboardRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["table_name"] = attrs["table_name"].SetRequired() - attrs["warehouse_id"] = attrs["warehouse_id"].SetOptional() - - return attrs -} - // 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 @@ -16043,6 +18387,163 @@ func (o *SchemaInfo) SetProperties(ctx context.Context, v map[string]types.Strin o.Properties = types.MapValueMust(t, vs) } +// Manifest of a specific securable kind. +type SecurableKindManifest struct { + // Privileges that can be assigned to the securable. + AssignablePrivileges types.List `tfsdk:"assignable_privileges"` + // A list of capabilities in the securable kind. + Capabilities types.List `tfsdk:"capabilities"` + // Detailed specs of allowed options. + Options types.List `tfsdk:"options"` + // Securable kind to get manifest of. + SecurableKind types.String `tfsdk:"securable_kind"` + // Securable Type of the kind. + SecurableType types.String `tfsdk:"securable_type"` +} + +func (newState *SecurableKindManifest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecurableKindManifest) { +} + +func (newState *SecurableKindManifest) SyncEffectiveFieldsDuringRead(existingState SecurableKindManifest) { +} + +func (c SecurableKindManifest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["assignable_privileges"] = attrs["assignable_privileges"].SetOptional() + attrs["capabilities"] = attrs["capabilities"].SetOptional() + attrs["options"] = attrs["options"].SetOptional() + attrs["securable_kind"] = attrs["securable_kind"].SetOptional() + attrs["securable_type"] = attrs["securable_type"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SecurableKindManifest. +// Container types (types.Map, types.List, types.Set) and 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 SecurableKindManifest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "assignable_privileges": reflect.TypeOf(types.String{}), + "capabilities": reflect.TypeOf(types.String{}), + "options": reflect.TypeOf(OptionSpec{}), + } +} + +// 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, SecurableKindManifest +// only implements ToObjectValue() and Type(). +func (o SecurableKindManifest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "assignable_privileges": o.AssignablePrivileges, + "capabilities": o.Capabilities, + "options": o.Options, + "securable_kind": o.SecurableKind, + "securable_type": o.SecurableType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SecurableKindManifest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "assignable_privileges": basetypes.ListType{ + ElemType: types.StringType, + }, + "capabilities": basetypes.ListType{ + ElemType: types.StringType, + }, + "options": basetypes.ListType{ + ElemType: OptionSpec{}.Type(ctx), + }, + "securable_kind": types.StringType, + "securable_type": types.StringType, + }, + } +} + +// GetAssignablePrivileges returns the value of the AssignablePrivileges field in SecurableKindManifest as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SecurableKindManifest) GetAssignablePrivileges(ctx context.Context) ([]types.String, bool) { + if o.AssignablePrivileges.IsNull() || o.AssignablePrivileges.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AssignablePrivileges.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAssignablePrivileges sets the value of the AssignablePrivileges field in SecurableKindManifest. +func (o *SecurableKindManifest) SetAssignablePrivileges(ctx context.Context, v []types.String) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["assignable_privileges"] + t = t.(attr.TypeWithElementType).ElementType() + o.AssignablePrivileges = types.ListValueMust(t, vs) +} + +// GetCapabilities returns the value of the Capabilities field in SecurableKindManifest as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SecurableKindManifest) GetCapabilities(ctx context.Context) ([]types.String, bool) { + if o.Capabilities.IsNull() || o.Capabilities.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Capabilities.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCapabilities sets the value of the Capabilities field in SecurableKindManifest. +func (o *SecurableKindManifest) SetCapabilities(ctx context.Context, v []types.String) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["capabilities"] + t = t.(attr.TypeWithElementType).ElementType() + o.Capabilities = types.ListValueMust(t, vs) +} + +// GetOptions returns the value of the Options field in SecurableKindManifest as +// a slice of OptionSpec values. +// If the field is unknown or null, the boolean return value is false. +func (o *SecurableKindManifest) GetOptions(ctx context.Context) ([]OptionSpec, bool) { + if o.Options.IsNull() || o.Options.IsUnknown() { + return nil, false + } + var v []OptionSpec + d := o.Options.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOptions sets the value of the Options field in SecurableKindManifest. +func (o *SecurableKindManifest) SetOptions(ctx context.Context, v []OptionSpec) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] + t = t.(attr.TypeWithElementType).ElementType() + o.Options = types.ListValueMust(t, vs) +} + type SetArtifactAllowlist struct { // A list of allowed artifact match patterns. ArtifactMatchers types.List `tfsdk:"artifact_matchers"` @@ -16056,22 +18557,6 @@ type SetArtifactAllowlist struct { MetastoreId types.String `tfsdk:"metastore_id"` } -func (newState *SetArtifactAllowlist) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetArtifactAllowlist) { -} - -func (newState *SetArtifactAllowlist) SyncEffectiveFieldsDuringRead(existingState SetArtifactAllowlist) { -} - -func (c SetArtifactAllowlist) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["artifact_matchers"] = attrs["artifact_matchers"].SetRequired() - attrs["artifact_type"] = attrs["artifact_type"].SetRequired() - attrs["created_at"] = attrs["created_at"].SetComputed() - attrs["created_by"] = attrs["created_by"].SetComputed() - attrs["metastore_id"] = attrs["metastore_id"].SetComputed() - - return attrs -} - // 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 @@ -16150,20 +18635,6 @@ type SetRegisteredModelAliasRequest struct { VersionNum types.Int64 `tfsdk:"version_num"` } -func (newState *SetRegisteredModelAliasRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetRegisteredModelAliasRequest) { -} - -func (newState *SetRegisteredModelAliasRequest) SyncEffectiveFieldsDuringRead(existingState SetRegisteredModelAliasRequest) { -} - -func (c SetRegisteredModelAliasRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["alias"] = attrs["alias"].SetRequired() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["version_num"] = attrs["version_num"].SetRequired() - - return attrs -} - // 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 @@ -16539,6 +19010,36 @@ func (o *StorageCredentialInfo) SetDatabricksGcpServiceAccount(ctx context.Conte o.DatabricksGcpServiceAccount = vs } +type SummaryRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SummaryRequest. +// Container types (types.Map, types.List, types.Set) and 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 SummaryRequest) 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, SummaryRequest +// only implements ToObjectValue() and Type(). +func (o SummaryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o SummaryRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type SystemSchemaInfo struct { // Name of the system schema. Schema types.String `tfsdk:"schema"` @@ -16860,7 +19361,7 @@ type TableInfo struct { CreatedBy types.String `tfsdk:"created_by"` // Unique ID of the Data Access Configuration to use with the table data. DataAccessConfigurationId types.String `tfsdk:"data_access_configuration_id"` - // Data source format + DataSourceFormat types.String `tfsdk:"data_source_format"` // Time at which this table was deleted, in epoch milliseconds. Field is // omitted if table is not deleted. @@ -16871,7 +19372,7 @@ type TableInfo struct { EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag"` EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.Object `tfsdk:"encryption_details"` // Full name of table, in form of // __catalog_name__.__schema_name__.__table_name__ @@ -16891,12 +19392,14 @@ type TableInfo struct { RowFilter types.Object `tfsdk:"row_filter"` // Name of parent schema relative to its parent catalog. SchemaName types.String `tfsdk:"schema_name"` + // SecurableKindManifest of table, including capabilities the table has. + SecurableKindManifest types.Object `tfsdk:"securable_kind_manifest"` // List of schemes whose objects can be referenced without qualification. SqlPath types.String `tfsdk:"sql_path"` // Name of the storage credential, when a storage credential is configured // for use with this table. StorageCredentialName types.String `tfsdk:"storage_credential_name"` - // Storage root URL for table (for **MANAGED**, **EXTERNAL** tables) + // Storage root URL for table (for **MANAGED**, **EXTERNAL** tables). StorageLocation types.String `tfsdk:"storage_location"` // List of table constraints. Note: this field is not set in the output of // the __listTables__ API. @@ -16949,6 +19452,7 @@ func (c TableInfo) ApplySchemaCustomizations(attrs map[string]tfschema.Attribute attrs["properties"] = attrs["properties"].SetOptional() attrs["row_filter"] = attrs["row_filter"].SetOptional() attrs["schema_name"] = attrs["schema_name"].SetOptional() + attrs["securable_kind_manifest"] = attrs["securable_kind_manifest"].SetOptional() attrs["sql_path"] = attrs["sql_path"].SetOptional() attrs["storage_credential_name"] = attrs["storage_credential_name"].SetOptional() attrs["storage_location"] = attrs["storage_location"].SetOptional() @@ -16978,6 +19482,7 @@ func (a TableInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect. "encryption_details": reflect.TypeOf(EncryptionDetails{}), "properties": reflect.TypeOf(types.String{}), "row_filter": reflect.TypeOf(TableRowFilter{}), + "securable_kind_manifest": reflect.TypeOf(SecurableKindManifest{}), "table_constraints": reflect.TypeOf(TableConstraint{}), "view_dependencies": reflect.TypeOf(DependencyList{}), } @@ -17012,6 +19517,7 @@ func (o TableInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { "properties": o.Properties, "row_filter": o.RowFilter, "schema_name": o.SchemaName, + "securable_kind_manifest": o.SecurableKindManifest, "sql_path": o.SqlPath, "storage_credential_name": o.StorageCredentialName, "storage_location": o.StorageLocation, @@ -17055,6 +19561,7 @@ func (o TableInfo) Type(ctx context.Context) attr.Type { }, "row_filter": TableRowFilter{}.Type(ctx), "schema_name": types.StringType, + "securable_kind_manifest": SecurableKindManifest{}.Type(ctx), "sql_path": types.StringType, "storage_credential_name": types.StringType, "storage_location": types.StringType, @@ -17235,6 +19742,34 @@ func (o *TableInfo) SetRowFilter(ctx context.Context, v TableRowFilter) { o.RowFilter = vs } +// GetSecurableKindManifest returns the value of the SecurableKindManifest field in TableInfo as +// a SecurableKindManifest value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableInfo) GetSecurableKindManifest(ctx context.Context) (SecurableKindManifest, bool) { + var e SecurableKindManifest + if o.SecurableKindManifest.IsNull() || o.SecurableKindManifest.IsUnknown() { + return e, false + } + var v []SecurableKindManifest + d := o.SecurableKindManifest.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 +} + +// SetSecurableKindManifest sets the value of the SecurableKindManifest field in TableInfo. +func (o *TableInfo) SetSecurableKindManifest(ctx context.Context, v SecurableKindManifest) { + vs := v.ToObjectValue(ctx) + o.SecurableKindManifest = vs +} + // GetTableConstraints returns the value of the TableConstraints field in TableInfo as // a slice of TableConstraint values. // If the field is unknown or null, the boolean return value is false. @@ -17377,6 +19912,8 @@ 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"` + // SecurableKindManifest of table, including capabilities the table has. + SecurableKindManifest types.Object `tfsdk:"securable_kind_manifest"` TableType types.String `tfsdk:"table_type"` } @@ -17389,6 +19926,7 @@ func (newState *TableSummary) SyncEffectiveFieldsDuringRead(existingState TableS func (c TableSummary) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["full_name"] = attrs["full_name"].SetOptional() + attrs["securable_kind_manifest"] = attrs["securable_kind_manifest"].SetOptional() attrs["table_type"] = attrs["table_type"].SetOptional() return attrs @@ -17402,7 +19940,9 @@ func (c TableSummary) ApplySchemaCustomizations(attrs map[string]tfschema.Attrib // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a TableSummary) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "securable_kind_manifest": reflect.TypeOf(SecurableKindManifest{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -17412,8 +19952,9 @@ func (o TableSummary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "full_name": o.FullName, - "table_type": o.TableType, + "full_name": o.FullName, + "securable_kind_manifest": o.SecurableKindManifest, + "table_type": o.TableType, }) } @@ -17421,12 +19962,41 @@ func (o TableSummary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o TableSummary) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "full_name": types.StringType, - "table_type": types.StringType, + "full_name": types.StringType, + "securable_kind_manifest": SecurableKindManifest{}.Type(ctx), + "table_type": types.StringType, }, } } +// GetSecurableKindManifest returns the value of the SecurableKindManifest field in TableSummary as +// a SecurableKindManifest value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableSummary) GetSecurableKindManifest(ctx context.Context) (SecurableKindManifest, bool) { + var e SecurableKindManifest + if o.SecurableKindManifest.IsNull() || o.SecurableKindManifest.IsUnknown() { + return e, false + } + var v []SecurableKindManifest + d := o.SecurableKindManifest.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 +} + +// SetSecurableKindManifest sets the value of the SecurableKindManifest field in TableSummary. +func (o *TableSummary) SetSecurableKindManifest(ctx context.Context, v SecurableKindManifest) { + vs := v.ToObjectValue(ctx) + o.SecurableKindManifest = vs +} + type TagKeyValue struct { // name of the tag Key types.String `tfsdk:"key"` @@ -17481,18 +20051,13 @@ func (o TagKeyValue) 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"` - // 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"` // 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"` - // 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"` } @@ -17872,25 +20437,6 @@ type UpdateCatalog struct { Properties types.Map `tfsdk:"properties"` } -func (newState *UpdateCatalog) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCatalog) { -} - -func (newState *UpdateCatalog) SyncEffectiveFieldsDuringRead(existingState UpdateCatalog) { -} - -func (c UpdateCatalog) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["enable_predictive_optimization"] = attrs["enable_predictive_optimization"].SetOptional() - attrs["isolation_mode"] = attrs["isolation_mode"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["options"] = attrs["options"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["properties"] = attrs["properties"].SetOptional() - - return attrs -} - // 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 @@ -18084,21 +20630,6 @@ type UpdateConnection struct { Owner types.String `tfsdk:"owner"` } -func (newState *UpdateConnection) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateConnection) { -} - -func (newState *UpdateConnection) SyncEffectiveFieldsDuringRead(existingState UpdateConnection) { -} - -func (c UpdateConnection) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["options"] = attrs["options"].SetRequired() - attrs["owner"] = attrs["owner"].SetOptional() - - return attrs -} - // 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 @@ -18198,29 +20729,6 @@ type UpdateCredentialRequest struct { SkipValidation types.Bool `tfsdk:"skip_validation"` } -func (newState *UpdateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialRequest) { -} - -func (newState *UpdateCredentialRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialRequest) { -} - -func (c UpdateCredentialRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_iam_role"] = attrs["aws_iam_role"].SetOptional() - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].SetOptional() - attrs["azure_service_principal"] = attrs["azure_service_principal"].SetOptional() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].SetOptional() - attrs["force"] = attrs["force"].SetOptional() - attrs["isolation_mode"] = attrs["isolation_mode"].SetOptional() - attrs["name_arg"] = attrs["name_arg"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - - return attrs -} - // 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 @@ -18391,21 +20899,99 @@ func (o *UpdateCredentialRequest) SetDatabricksGcpServiceAccount(ctx context.Con o.DatabricksGcpServiceAccount = vs } +type UpdateExternalLineageRelationshipRequest struct { + ExternalLineageRelationship types.Object `tfsdk:"external_lineage_relationship"` + // The field mask must be a single string, with multiple fields separated by + // commas (no spaces). The field path is relative to the resource object, + // using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`). + // Specification of elements in sequence or map fields is not allowed, as + // only the entire collection field can be specified. Field names must + // exactly match the resource field names. + // + // A field mask of `*` indicates full replacement. It’s recommended to + // always explicitly list the fields being updated and avoid using `*` + // wildcards, as it can lead to unintended results if the API changes in the + // future. + UpdateMask types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExternalLineageRelationshipRequest. +// Container types (types.Map, types.List, types.Set) and 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 UpdateExternalLineageRelationshipRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_lineage_relationship": reflect.TypeOf(UpdateRequestExternalLineage{}), + } +} + +// 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, UpdateExternalLineageRelationshipRequest +// only implements ToObjectValue() and Type(). +func (o UpdateExternalLineageRelationshipRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_lineage_relationship": o.ExternalLineageRelationship, + "update_mask": o.UpdateMask, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateExternalLineageRelationshipRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_lineage_relationship": UpdateRequestExternalLineage{}.Type(ctx), + "update_mask": types.StringType, + }, + } +} + +// GetExternalLineageRelationship returns the value of the ExternalLineageRelationship field in UpdateExternalLineageRelationshipRequest as +// a UpdateRequestExternalLineage value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateExternalLineageRelationshipRequest) GetExternalLineageRelationship(ctx context.Context) (UpdateRequestExternalLineage, bool) { + var e UpdateRequestExternalLineage + if o.ExternalLineageRelationship.IsNull() || o.ExternalLineageRelationship.IsUnknown() { + return e, false + } + var v []UpdateRequestExternalLineage + d := o.ExternalLineageRelationship.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 +} + +// SetExternalLineageRelationship sets the value of the ExternalLineageRelationship field in UpdateExternalLineageRelationshipRequest. +func (o *UpdateExternalLineageRelationshipRequest) SetExternalLineageRelationship(ctx context.Context, v UpdateRequestExternalLineage) { + vs := v.ToObjectValue(ctx) + o.ExternalLineageRelationship = vs +} + type UpdateExternalLocation struct { // User-provided free-form text description. Comment types.String `tfsdk:"comment"` // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name"` - // [Create:OPT Update:OPT] Whether to enable file events on this external - // location. + // Whether to enable file events on this external location. EnableFileEvents types.Bool `tfsdk:"enable_file_events"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.Object `tfsdk:"encryption_details"` // 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"` - // [Create:OPT Update:OPT] File event queue settings. + // File event queue settings. FileEventQueue types.Object `tfsdk:"file_event_queue"` // Force update even if changing url invalidates dependent external tables // or mounts. @@ -18427,31 +21013,6 @@ type UpdateExternalLocation struct { Url types.String `tfsdk:"url"` } -func (newState *UpdateExternalLocation) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExternalLocation) { -} - -func (newState *UpdateExternalLocation) SyncEffectiveFieldsDuringRead(existingState UpdateExternalLocation) { -} - -func (c UpdateExternalLocation) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["credential_name"] = attrs["credential_name"].SetOptional() - attrs["enable_file_events"] = attrs["enable_file_events"].SetOptional() - attrs["encryption_details"] = attrs["encryption_details"].SetOptional() - attrs["fallback"] = attrs["fallback"].SetOptional() - attrs["file_event_queue"] = attrs["file_event_queue"].SetOptional() - attrs["force"] = attrs["force"].SetOptional() - attrs["isolation_mode"] = attrs["isolation_mode"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - attrs["url"] = attrs["url"].SetOptional() - - return attrs -} - // 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 @@ -18568,25 +21129,95 @@ func (o *UpdateExternalLocation) SetFileEventQueue(ctx context.Context, v FileEv o.FileEventQueue = vs } -type UpdateFunction struct { - // The fully-qualified name of the function (of the form - // __catalog_name__.__schema_name__.__function__name__). +type UpdateExternalMetadataRequest struct { + ExternalMetadata types.Object `tfsdk:"external_metadata"` + // Name of the external metadata object. Name types.String `tfsdk:"-"` - // Username of current owner of function. - Owner types.String `tfsdk:"owner"` + // The field mask must be a single string, with multiple fields separated by + // commas (no spaces). The field path is relative to the resource object, + // using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`). + // Specification of elements in sequence or map fields is not allowed, as + // only the entire collection field can be specified. Field names must + // exactly match the resource field names. + // + // A field mask of `*` indicates full replacement. It’s recommended to + // always explicitly list the fields being updated and avoid using `*` + // wildcards, as it can lead to unintended results if the API changes in the + // future. + UpdateMask types.String `tfsdk:"-"` } -func (newState *UpdateFunction) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateFunction) { +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExternalMetadataRequest. +// Container types (types.Map, types.List, types.Set) and 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 UpdateExternalMetadataRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_metadata": reflect.TypeOf(ExternalMetadata{}), + } } -func (newState *UpdateFunction) SyncEffectiveFieldsDuringRead(existingState UpdateFunction) { +// 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, UpdateExternalMetadataRequest +// only implements ToObjectValue() and Type(). +func (o UpdateExternalMetadataRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_metadata": o.ExternalMetadata, + "name": o.Name, + "update_mask": o.UpdateMask, + }) } -func (c UpdateFunction) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["owner"] = attrs["owner"].SetOptional() +// Type implements basetypes.ObjectValuable. +func (o UpdateExternalMetadataRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_metadata": ExternalMetadata{}.Type(ctx), + "name": types.StringType, + "update_mask": types.StringType, + }, + } +} - return attrs +// GetExternalMetadata returns the value of the ExternalMetadata field in UpdateExternalMetadataRequest as +// a ExternalMetadata value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateExternalMetadataRequest) GetExternalMetadata(ctx context.Context) (ExternalMetadata, bool) { + var e ExternalMetadata + if o.ExternalMetadata.IsNull() || o.ExternalMetadata.IsUnknown() { + return e, false + } + var v []ExternalMetadata + d := o.ExternalMetadata.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 +} + +// SetExternalMetadata sets the value of the ExternalMetadata field in UpdateExternalMetadataRequest. +func (o *UpdateExternalMetadataRequest) SetExternalMetadata(ctx context.Context, v ExternalMetadata) { + vs := v.ToObjectValue(ctx) + o.ExternalMetadata = vs +} + +type UpdateFunction struct { + // The fully-qualified name of the function (of the form + // __catalog_name__.__schema_name__.__function__name__). + Name types.String `tfsdk:"-"` + // Username of current owner of function. + Owner types.String `tfsdk:"owner"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateFunction. @@ -18776,20 +21407,6 @@ type UpdateModelVersionRequest struct { Version types.Int64 `tfsdk:"-"` } -func (newState *UpdateModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionRequest) { -} - -func (newState *UpdateModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest) { -} - -func (c UpdateModelVersionRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -18847,41 +21464,18 @@ type UpdateMonitor struct { OutputSchemaName types.String `tfsdk:"output_schema_name"` // The schedule for automatically updating and refreshing metric tables. Schedule types.Object `tfsdk:"schedule"` - // 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"` - // Configuration for monitoring snapshot tables. - Snapshot types.Object `tfsdk:"snapshot"` - // Full name of the table. - TableName types.String `tfsdk:"-"` - // Configuration for monitoring time series tables. - TimeSeries types.Object `tfsdk:"time_series"` -} - -func (newState *UpdateMonitor) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMonitor) { -} - -func (newState *UpdateMonitor) SyncEffectiveFieldsDuringRead(existingState UpdateMonitor) { -} - -func (c UpdateMonitor) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["baseline_table_name"] = attrs["baseline_table_name"].SetOptional() - attrs["custom_metrics"] = attrs["custom_metrics"].SetOptional() - attrs["dashboard_id"] = attrs["dashboard_id"].SetOptional() - attrs["data_classification_config"] = attrs["data_classification_config"].SetOptional() - attrs["inference_log"] = attrs["inference_log"].SetOptional() - attrs["notifications"] = attrs["notifications"].SetOptional() - attrs["output_schema_name"] = attrs["output_schema_name"].SetRequired() - attrs["schedule"] = attrs["schedule"].SetOptional() - attrs["slicing_exprs"] = attrs["slicing_exprs"].SetOptional() - attrs["snapshot"] = attrs["snapshot"].SetOptional() - attrs["table_name"] = attrs["table_name"].SetRequired() - attrs["time_series"] = attrs["time_series"].SetOptional() - - return attrs + // 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"` + // Configuration for monitoring snapshot tables. + Snapshot types.Object `tfsdk:"snapshot"` + // Full name of the table. + TableName types.String `tfsdk:"-"` + // Configuration for monitoring time series tables. + TimeSeries types.Object `tfsdk:"time_series"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMonitor. @@ -19179,20 +21773,6 @@ type UpdatePermissions struct { SecurableType types.String `tfsdk:"-"` } -func (newState *UpdatePermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePermissions) { -} - -func (newState *UpdatePermissions) SyncEffectiveFieldsDuringRead(existingState UpdatePermissions) { -} - -func (c UpdatePermissions) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["changes"] = attrs["changes"].SetOptional() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["securable_type"] = attrs["securable_type"].SetRequired() - - return attrs -} - // 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 @@ -19347,21 +21927,6 @@ type UpdateRegisteredModelRequest struct { Owner types.String `tfsdk:"owner"` } -func (newState *UpdateRegisteredModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegisteredModelRequest) { -} - -func (newState *UpdateRegisteredModelRequest) SyncEffectiveFieldsDuringRead(existingState UpdateRegisteredModelRequest) { -} - -func (c UpdateRegisteredModelRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - - return attrs -} - // 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 @@ -19399,9 +21964,205 @@ func (o UpdateRegisteredModelRequest) Type(ctx context.Context) attr.Type { } } +type UpdateRequestExternalLineage struct { + // List of column relationships between source and target objects. + Columns types.List `tfsdk:"columns"` + // Unique identifier of the external lineage relationship. + Id types.String `tfsdk:"id"` + // Key-value properties associated with the external lineage relationship. + Properties types.Map `tfsdk:"properties"` + // Source object of the external lineage relationship. + Source types.Object `tfsdk:"source"` + // Target object of the external lineage relationship. + Target types.Object `tfsdk:"target"` +} + +func (newState *UpdateRequestExternalLineage) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRequestExternalLineage) { +} + +func (newState *UpdateRequestExternalLineage) SyncEffectiveFieldsDuringRead(existingState UpdateRequestExternalLineage) { +} + +func (c UpdateRequestExternalLineage) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["columns"] = attrs["columns"].SetOptional() + attrs["id"] = attrs["id"].SetComputed() + attrs["properties"] = attrs["properties"].SetOptional() + attrs["source"] = attrs["source"].SetRequired() + attrs["target"] = attrs["target"].SetRequired() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRequestExternalLineage. +// Container types (types.Map, types.List, types.Set) and 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 UpdateRequestExternalLineage) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnRelationship{}), + "properties": reflect.TypeOf(types.String{}), + "source": reflect.TypeOf(ExternalLineageObject{}), + "target": reflect.TypeOf(ExternalLineageObject{}), + } +} + +// 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, UpdateRequestExternalLineage +// only implements ToObjectValue() and Type(). +func (o UpdateRequestExternalLineage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "id": o.Id, + "properties": o.Properties, + "source": o.Source, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRequestExternalLineage) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: ColumnRelationship{}.Type(ctx), + }, + "id": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "source": ExternalLineageObject{}.Type(ctx), + "target": ExternalLineageObject{}.Type(ctx), + }, + } +} + +// GetColumns returns the value of the Columns field in UpdateRequestExternalLineage as +// a slice of ColumnRelationship values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRequestExternalLineage) GetColumns(ctx context.Context) ([]ColumnRelationship, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnRelationship + d := o.Columns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumns sets the value of the Columns field in UpdateRequestExternalLineage. +func (o *UpdateRequestExternalLineage) SetColumns(ctx context.Context, v []ColumnRelationship) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Columns = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in UpdateRequestExternalLineage as +// a map of string to types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRequestExternalLineage) GetProperties(ctx context.Context) (map[string]types.String, bool) { + if o.Properties.IsNull() || o.Properties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Properties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProperties sets the value of the Properties field in UpdateRequestExternalLineage. +func (o *UpdateRequestExternalLineage) SetProperties(ctx context.Context, v map[string]types.String) { + vs := make(map[string]attr.Value, len(v)) + for k, e := range v { + vs[k] = e + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.Properties = types.MapValueMust(t, vs) +} + +// GetSource returns the value of the Source field in UpdateRequestExternalLineage as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRequestExternalLineage) GetSource(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Source.IsNull() || o.Source.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Source.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 +} + +// SetSource sets the value of the Source field in UpdateRequestExternalLineage. +func (o *UpdateRequestExternalLineage) SetSource(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Source = vs +} + +// GetTarget returns the value of the Target field in UpdateRequestExternalLineage as +// a ExternalLineageObject value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRequestExternalLineage) GetTarget(ctx context.Context) (ExternalLineageObject, bool) { + var e ExternalLineageObject + if o.Target.IsNull() || o.Target.IsUnknown() { + return e, false + } + var v []ExternalLineageObject + d := o.Target.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 +} + +// SetTarget sets the value of the Target field in UpdateRequestExternalLineage. +func (o *UpdateRequestExternalLineage) SetTarget(ctx context.Context, v ExternalLineageObject) { + vs := v.ToObjectValue(ctx) + o.Target = vs +} + type UpdateResponse struct { } +func (newState *UpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse) { +} + +func (newState *UpdateResponse) SyncEffectiveFieldsDuringRead(existingState UpdateResponse) { +} + +func (c UpdateResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -19445,23 +22206,6 @@ type UpdateSchema struct { Properties types.Map `tfsdk:"properties"` } -func (newState *UpdateSchema) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSchema) { -} - -func (newState *UpdateSchema) SyncEffectiveFieldsDuringRead(existingState UpdateSchema) { -} - -func (c UpdateSchema) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["enable_predictive_optimization"] = attrs["enable_predictive_optimization"].SetOptional() - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["properties"] = attrs["properties"].SetOptional() - - return attrs -} - // 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 @@ -19791,27 +22535,13 @@ func (o *UpdateStorageCredential) SetDatabricksGcpServiceAccount(ctx context.Con o.DatabricksGcpServiceAccount = vs } -// Update a table owner. type UpdateTableRequest struct { // Full name of the table. FullName types.String `tfsdk:"-"` - + // Username of current owner of table. Owner types.String `tfsdk:"owner"` } -func (newState *UpdateTableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateTableRequest) { -} - -func (newState *UpdateTableRequest) SyncEffectiveFieldsDuringRead(existingState UpdateTableRequest) { -} - -func (c UpdateTableRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["full_name"] = attrs["full_name"].SetRequired() - attrs["owner"] = attrs["owner"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -19856,21 +22586,6 @@ type UpdateVolumeRequestContent struct { Owner types.String `tfsdk:"owner"` } -func (newState *UpdateVolumeRequestContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVolumeRequestContent) { -} - -func (newState *UpdateVolumeRequestContent) SyncEffectiveFieldsDuringRead(existingState UpdateVolumeRequestContent) { -} - -func (c UpdateVolumeRequestContent) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - - return attrs -} - // 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 @@ -19917,20 +22632,6 @@ type UpdateWorkspaceBindings struct { UnassignWorkspaces types.List `tfsdk:"unassign_workspaces"` } -func (newState *UpdateWorkspaceBindings) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceBindings) { -} - -func (newState *UpdateWorkspaceBindings) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindings) { -} - -func (c UpdateWorkspaceBindings) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["assign_workspaces"] = attrs["assign_workspaces"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["unassign_workspaces"] = attrs["unassign_workspaces"].SetOptional() - - return attrs -} - // 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 @@ -20037,21 +22738,6 @@ type UpdateWorkspaceBindingsParameters struct { SecurableType types.String `tfsdk:"-"` } -func (newState *UpdateWorkspaceBindingsParameters) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceBindingsParameters) { -} - -func (newState *UpdateWorkspaceBindingsParameters) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindingsParameters) { -} - -func (c UpdateWorkspaceBindingsParameters) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["add"] = attrs["add"].SetOptional() - attrs["remove"] = attrs["remove"].SetOptional() - attrs["securable_name"] = attrs["securable_name"].SetRequired() - attrs["securable_type"] = attrs["securable_type"].SetRequired() - - return attrs -} - // 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 @@ -20229,15 +22915,13 @@ func (o *UpdateWorkspaceBindingsResponse) SetBindings(ctx context.Context, v []W // Next ID: 17 type ValidateCredentialRequest struct { - // The AWS IAM role configuration AwsIamRole types.Object `tfsdk:"aws_iam_role"` - // The Azure managed identity configuration. + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity"` // Required. The name of an existing credential or long-lived cloud // credential to validate. CredentialName types.String `tfsdk:"credential_name"` - // GCP long-lived credential. Databricks-created Google Cloud Storage - // service account. + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account"` // The name of an existing external location to validate. Only applicable // for storage credentials (purpose is **STORAGE**.) @@ -20253,25 +22937,6 @@ type ValidateCredentialRequest struct { Url types.String `tfsdk:"url"` } -func (newState *ValidateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateCredentialRequest) { -} - -func (newState *ValidateCredentialRequest) SyncEffectiveFieldsDuringRead(existingState ValidateCredentialRequest) { -} - -func (c ValidateCredentialRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_iam_role"] = attrs["aws_iam_role"].SetOptional() - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].SetOptional() - attrs["credential_name"] = attrs["credential_name"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].SetOptional() - attrs["external_location_name"] = attrs["external_location_name"].SetOptional() - attrs["purpose"] = attrs["purpose"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["url"] = attrs["url"].SetOptional() - - return attrs -} - // 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 @@ -20511,26 +23176,6 @@ type ValidateStorageCredential struct { Url types.String `tfsdk:"url"` } -func (newState *ValidateStorageCredential) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateStorageCredential) { -} - -func (newState *ValidateStorageCredential) SyncEffectiveFieldsDuringRead(existingState ValidateStorageCredential) { -} - -func (c ValidateStorageCredential) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_iam_role"] = attrs["aws_iam_role"].SetOptional() - attrs["azure_managed_identity"] = attrs["azure_managed_identity"].SetOptional() - attrs["azure_service_principal"] = attrs["azure_service_principal"].SetOptional() - attrs["cloudflare_api_token"] = attrs["cloudflare_api_token"].SetOptional() - attrs["databricks_gcp_service_account"] = attrs["databricks_gcp_service_account"].SetOptional() - attrs["external_location_name"] = attrs["external_location_name"].SetOptional() - attrs["read_only"] = attrs["read_only"].SetOptional() - attrs["storage_credential_name"] = attrs["storage_credential_name"].SetOptional() - attrs["url"] = attrs["url"].SetOptional() - - return attrs -} - // 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 @@ -20880,7 +23525,7 @@ type VolumeInfo struct { CreatedAt types.Int64 `tfsdk:"created_at"` // The identifier of the user who created the volume CreatedBy types.String `tfsdk:"created_by"` - // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.Object `tfsdk:"encryption_details"` // The three-level (fully qualified) name of the volume FullName types.String `tfsdk:"full_name"` @@ -20900,12 +23545,7 @@ type VolumeInfo struct { UpdatedBy types.String `tfsdk:"updated_by"` // The unique identifier of the volume VolumeId types.String `tfsdk:"volume_id"` - // The type of the volume. An external volume is located in the specified - // external location. A managed volume is located in the default location - // which is specified by the parent schema, or the parent catalog, or the - // Metastore. [Learn more] - // - // [Learn more]: https://docs.databricks.com/aws/en/volumes/managed-vs-external + VolumeType types.String `tfsdk:"volume_type"` } diff --git a/internal/service/cleanrooms_tf/legacy_model.go b/internal/service/cleanrooms_tf/legacy_model.go index 5e7a326594..3b02d864f3 100755 --- a/internal/service/cleanrooms_tf/legacy_model.go +++ b/internal/service/cleanrooms_tf/legacy_model.go @@ -1544,8 +1544,7 @@ type CleanRoomRemoteDetail_SdkV2 struct { // // 2. Its invite_recipient_email is empty. Collaborators types.List `tfsdk:"collaborators"` - // The compliance security profile used to process regulated data following - // compliance standards. + ComplianceSecurityProfile types.List `tfsdk:"compliance_security_profile"` // Collaborator who creates the clean room. Creator types.List `tfsdk:"creator"` @@ -1895,7 +1894,6 @@ func (o *ComplianceSecurityProfile_SdkV2) SetComplianceStandards(ctx context.Con } type CreateCleanRoomAssetRequest_SdkV2 struct { - // Metadata of the clean room asset Asset types.List `tfsdk:"asset"` // Name of the clean room. CleanRoomName types.String `tfsdk:"-"` @@ -2301,36 +2299,6 @@ func (o DeleteCleanRoomRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type DeleteResponse_SdkV2 struct { -} - -// 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 -// 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 DeleteResponse_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, DeleteResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type GetCleanRoomAssetRequest_SdkV2 struct { // The type of the asset. AssetType types.String `tfsdk:"-"` @@ -2796,7 +2764,8 @@ func (o *ListCleanRoomsResponse_SdkV2) SetCleanRooms(ctx context.Context, v []Cl } type UpdateCleanRoomAssetRequest_SdkV2 struct { - // Metadata of the clean room asset + // The asset to update. The asset's `name` and `asset_type` fields are used + // to identify the asset to update. Asset types.List `tfsdk:"asset"` // The type of the asset. AssetType types.String `tfsdk:"-"` @@ -2885,20 +2854,6 @@ type UpdateCleanRoomRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *UpdateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCleanRoomRequest_SdkV2) { -} - -func (newState *UpdateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCleanRoomRequest_SdkV2) { -} - -func (c UpdateCleanRoomRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clean_room"] = attrs["clean_room"].SetOptional() - attrs["clean_room"] = attrs["clean_room"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 4dcd53116c..98c0025bc5 100755 --- a/internal/service/cleanrooms_tf/model.go +++ b/internal/service/cleanrooms_tf/model.go @@ -1532,8 +1532,7 @@ type CleanRoomRemoteDetail struct { // // 2. Its invite_recipient_email is empty. Collaborators types.List `tfsdk:"collaborators"` - // The compliance security profile used to process regulated data following - // compliance standards. + ComplianceSecurityProfile types.Object `tfsdk:"compliance_security_profile"` // Collaborator who creates the clean room. Creator types.Object `tfsdk:"creator"` @@ -1880,7 +1879,6 @@ func (o *ComplianceSecurityProfile) SetComplianceStandards(ctx context.Context, } type CreateCleanRoomAssetRequest struct { - // Metadata of the clean room asset Asset types.Object `tfsdk:"asset"` // Name of the clean room. CleanRoomName types.String `tfsdk:"-"` @@ -2285,36 +2283,6 @@ func (o DeleteCleanRoomRequest) Type(ctx context.Context) attr.Type { } } -type DeleteResponse struct { -} - -// 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 -// 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 DeleteResponse) 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, DeleteResponse -// only implements ToObjectValue() and Type(). -func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type GetCleanRoomAssetRequest struct { // The type of the asset. AssetType types.String `tfsdk:"-"` @@ -2780,7 +2748,8 @@ func (o *ListCleanRoomsResponse) SetCleanRooms(ctx context.Context, v []CleanRoo } type UpdateCleanRoomAssetRequest struct { - // Metadata of the clean room asset + // The asset to update. The asset's `name` and `asset_type` fields are used + // to identify the asset to update. Asset types.Object `tfsdk:"asset"` // The type of the asset. AssetType types.String `tfsdk:"-"` @@ -2869,19 +2838,6 @@ type UpdateCleanRoomRequest struct { Name types.String `tfsdk:"-"` } -func (newState *UpdateCleanRoomRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCleanRoomRequest) { -} - -func (newState *UpdateCleanRoomRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCleanRoomRequest) { -} - -func (c UpdateCleanRoomRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clean_room"] = attrs["clean_room"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 952a41ed0f..6d6cb273c2 100755 --- a/internal/service/compute_tf/legacy_model.go +++ b/internal/service/compute_tf/legacy_model.go @@ -52,21 +52,6 @@ type AddInstanceProfile_SdkV2 struct { SkipValidation types.Bool `tfsdk:"skip_validation"` } -func (newState *AddInstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddInstanceProfile_SdkV2) { -} - -func (newState *AddInstanceProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddInstanceProfile_SdkV2) { -} - -func (c AddInstanceProfile_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["iam_role_arn"] = attrs["iam_role_arn"].SetOptional() - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetRequired() - attrs["is_meta_instance_profile"] = attrs["is_meta_instance_profile"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - - return attrs -} - // 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 @@ -255,11 +240,6 @@ func (o AutoScale_SdkV2) Type(ctx context.Context) attr.Type { // Attributes set during cluster creation which are related to Amazon Web // Services. type AwsAttributes_SdkV2 struct { - // Availability type used for all subsequent nodes past the - // `first_on_demand` ones. - // - // Note: If `first_on_demand` is zero, this availability type will be used - // for the entire cluster. Availability types.String `tfsdk:"availability"` // 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 @@ -522,20 +502,6 @@ type CancelCommand_SdkV2 struct { ContextId types.String `tfsdk:"contextId"` } -func (newState *CancelCommand_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelCommand_SdkV2) { -} - -func (newState *CancelCommand_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelCommand_SdkV2) { -} - -func (c CancelCommand_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clusterId"] = attrs["clusterId"].SetOptional() - attrs["commandId"] = attrs["commandId"].SetOptional() - attrs["contextId"] = attrs["contextId"].SetOptional() - - return attrs -} - // 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 @@ -618,19 +584,6 @@ type ChangeClusterOwner_SdkV2 struct { OwnerUsername types.String `tfsdk:"owner_username"` } -func (newState *ChangeClusterOwner_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChangeClusterOwner_SdkV2) { -} - -func (newState *ChangeClusterOwner_SdkV2) SyncEffectiveFieldsDuringRead(existingState ChangeClusterOwner_SdkV2) { -} - -func (c ChangeClusterOwner_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["owner_username"] = attrs["owner_username"].SetRequired() - - return attrs -} - // 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 @@ -887,7 +840,7 @@ 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"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -1082,35 +1035,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.List `tfsdk:"docker_image"` @@ -1149,23 +1074,7 @@ type ClusterAttributes_SdkV2 struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -1226,7 +1135,7 @@ type ClusterAttributes_SdkV2 struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. + WorkloadType types.List `tfsdk:"workload_type"` } @@ -1832,35 +1741,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Tags that are added by Databricks regardless of any `custom_tags`, // including: @@ -1921,23 +1802,7 @@ type ClusterDetails_SdkV2 struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // the timestamp that the cluster was started/restarted LastRestartedTime types.Int64 `tfsdk:"last_restarted_time"` @@ -2036,7 +1901,7 @@ type ClusterDetails_SdkV2 struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. + WorkloadType types.List `tfsdk:"workload_type"` } @@ -3137,7 +3002,7 @@ type ClusterPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3309,7 +3174,7 @@ func (o *ClusterPermissions_SdkV2) SetAccessControlList(ctx context.Context, v [ type ClusterPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3365,19 +3230,6 @@ type ClusterPermissionsRequest_SdkV2 struct { ClusterId types.String `tfsdk:"-"` } -func (newState *ClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermissionsRequest_SdkV2) { -} - -func (newState *ClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPermissionsRequest_SdkV2) { -} - -func (c ClusterPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -3444,7 +3296,7 @@ func (o *ClusterPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Conte type ClusterPolicyAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -3606,7 +3458,7 @@ type ClusterPolicyPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3778,7 +3630,7 @@ func (o *ClusterPolicyPermissions_SdkV2) SetAccessControlList(ctx context.Contex type ClusterPolicyPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3834,19 +3686,6 @@ type ClusterPolicyPermissionsRequest_SdkV2 struct { ClusterPolicyId types.String `tfsdk:"-"` } -func (newState *ClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermissionsRequest_SdkV2) { -} - -func (newState *ClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissionsRequest_SdkV2) { -} - -func (c ClusterPolicyPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["cluster_policy_id"] = attrs["cluster_policy_id"].SetRequired() - - return attrs -} - // 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 @@ -4116,35 +3955,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.List `tfsdk:"docker_image"` @@ -4183,23 +3994,7 @@ type ClusterSpec_SdkV2 struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -4271,7 +4066,7 @@ type ClusterSpec_SdkV2 struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. + WorkloadType types.List `tfsdk:"workload_type"` } @@ -4814,21 +4609,6 @@ type Command_SdkV2 struct { Language types.String `tfsdk:"language"` } -func (newState *Command_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Command_SdkV2) { -} - -func (newState *Command_SdkV2) SyncEffectiveFieldsDuringRead(existingState Command_SdkV2) { -} - -func (c Command_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clusterId"] = attrs["clusterId"].SetOptional() - attrs["command"] = attrs["command"].SetOptional() - attrs["contextId"] = attrs["contextId"].SetOptional() - attrs["language"] = attrs["language"].SetOptional() - - return attrs -} - // 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 @@ -5134,35 +4914,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.List `tfsdk:"docker_image"` @@ -5201,23 +4953,7 @@ type CreateCluster_SdkV2 struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -5289,60 +5025,8 @@ type CreateCluster_SdkV2 struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. - WorkloadType types.List `tfsdk:"workload_type"` -} - -func (newState *CreateCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCluster_SdkV2) { -} - -func (newState *CreateCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCluster_SdkV2) { -} - -func (c CreateCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["apply_policy_default_values"] = attrs["apply_policy_default_values"].SetOptional() - attrs["autoscale"] = attrs["autoscale"].SetOptional() - attrs["autoscale"] = attrs["autoscale"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["autotermination_minutes"] = attrs["autotermination_minutes"].SetOptional() - attrs["aws_attributes"] = attrs["aws_attributes"].SetOptional() - attrs["aws_attributes"] = attrs["aws_attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_attributes"] = attrs["azure_attributes"].SetOptional() - attrs["azure_attributes"] = attrs["azure_attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["clone_from"] = attrs["clone_from"].SetOptional() - attrs["clone_from"] = attrs["clone_from"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["cluster_log_conf"] = attrs["cluster_log_conf"].SetOptional() - attrs["cluster_log_conf"] = attrs["cluster_log_conf"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["cluster_name"] = attrs["cluster_name"].SetOptional() - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["data_security_mode"] = attrs["data_security_mode"].SetOptional() - attrs["docker_image"] = attrs["docker_image"].SetOptional() - attrs["docker_image"] = attrs["docker_image"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["driver_instance_pool_id"] = attrs["driver_instance_pool_id"].SetOptional() - attrs["driver_node_type_id"] = attrs["driver_node_type_id"].SetOptional() - attrs["enable_elastic_disk"] = attrs["enable_elastic_disk"].SetOptional() - attrs["enable_local_disk_encryption"] = attrs["enable_local_disk_encryption"].SetOptional() - attrs["gcp_attributes"] = attrs["gcp_attributes"].SetOptional() - attrs["gcp_attributes"] = attrs["gcp_attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["init_scripts"] = attrs["init_scripts"].SetOptional() - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetOptional() - attrs["is_single_node"] = attrs["is_single_node"].SetOptional() - attrs["kind"] = attrs["kind"].SetOptional() - attrs["node_type_id"] = attrs["node_type_id"].SetOptional() - attrs["num_workers"] = attrs["num_workers"].SetOptional() - attrs["policy_id"] = attrs["policy_id"].SetOptional() - attrs["remote_disk_throughput"] = attrs["remote_disk_throughput"].SetOptional() - attrs["runtime_engine"] = attrs["runtime_engine"].SetOptional() - attrs["single_user_name"] = attrs["single_user_name"].SetOptional() - attrs["spark_conf"] = attrs["spark_conf"].SetOptional() - attrs["spark_env_vars"] = attrs["spark_env_vars"].SetOptional() - attrs["spark_version"] = attrs["spark_version"].SetRequired() - attrs["ssh_public_keys"] = attrs["ssh_public_keys"].SetOptional() - attrs["total_initial_remote_disk_size"] = attrs["total_initial_remote_disk_size"].SetOptional() - attrs["use_ml_runtime"] = attrs["use_ml_runtime"].SetOptional() - attrs["workload_type"] = attrs["workload_type"].SetOptional() - attrs["workload_type"] = attrs["workload_type"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - return attrs + WorkloadType types.List `tfsdk:"workload_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCluster. @@ -5872,19 +5556,6 @@ type CreateContext_SdkV2 struct { Language types.String `tfsdk:"language"` } -func (newState *CreateContext_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateContext_SdkV2) { -} - -func (newState *CreateContext_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateContext_SdkV2) { -} - -func (c CreateContext_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clusterId"] = attrs["clusterId"].SetOptional() - attrs["language"] = attrs["language"].SetOptional() - - return attrs -} - // 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 @@ -5981,36 +5652,6 @@ type CreateInstancePool_SdkV2 struct { TotalInitialRemoteDiskSize types.Int64 `tfsdk:"total_initial_remote_disk_size"` } -func (newState *CreateInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstancePool_SdkV2) { -} - -func (newState *CreateInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateInstancePool_SdkV2) { -} - -func (c CreateInstancePool_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_attributes"] = attrs["aws_attributes"].SetOptional() - attrs["aws_attributes"] = attrs["aws_attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_attributes"] = attrs["azure_attributes"].SetOptional() - attrs["azure_attributes"] = attrs["azure_attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["disk_spec"] = attrs["disk_spec"].SetOptional() - attrs["disk_spec"] = attrs["disk_spec"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["enable_elastic_disk"] = attrs["enable_elastic_disk"].SetOptional() - attrs["gcp_attributes"] = attrs["gcp_attributes"].SetOptional() - attrs["gcp_attributes"] = attrs["gcp_attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["idle_instance_autotermination_minutes"] = attrs["idle_instance_autotermination_minutes"].SetOptional() - attrs["instance_pool_name"] = attrs["instance_pool_name"].SetRequired() - attrs["max_capacity"] = attrs["max_capacity"].SetOptional() - attrs["min_idle_instances"] = attrs["min_idle_instances"].SetOptional() - attrs["node_type_id"] = attrs["node_type_id"].SetRequired() - attrs["preloaded_docker_images"] = attrs["preloaded_docker_images"].SetOptional() - attrs["preloaded_spark_versions"] = attrs["preloaded_spark_versions"].SetOptional() - attrs["remote_disk_throughput"] = attrs["remote_disk_throughput"].SetOptional() - attrs["total_initial_remote_disk_size"] = attrs["total_initial_remote_disk_size"].SetOptional() - - return attrs -} - // 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 @@ -6358,24 +5999,6 @@ type CreatePolicy_SdkV2 struct { PolicyFamilyId types.String `tfsdk:"policy_family_id"` } -func (newState *CreatePolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePolicy_SdkV2) { -} - -func (newState *CreatePolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePolicy_SdkV2) { -} - -func (c CreatePolicy_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["definition"] = attrs["definition"].SetOptional() - attrs["description"] = attrs["description"].SetOptional() - attrs["libraries"] = attrs["libraries"].SetOptional() - attrs["max_clusters_per_user"] = attrs["max_clusters_per_user"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["policy_family_definition_overrides"] = attrs["policy_family_definition_overrides"].SetOptional() - attrs["policy_family_id"] = attrs["policy_family_id"].SetOptional() - - return attrs -} - // 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 @@ -6763,18 +6386,6 @@ type DeleteCluster_SdkV2 struct { ClusterId types.String `tfsdk:"cluster_id"` } -func (newState *DeleteCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCluster_SdkV2) { -} - -func (newState *DeleteCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCluster_SdkV2) { -} - -func (c DeleteCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -6888,18 +6499,6 @@ type DeleteInstancePool_SdkV2 struct { InstancePoolId types.String `tfsdk:"instance_pool_id"` } -func (newState *DeleteInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteInstancePool_SdkV2) { -} - -func (newState *DeleteInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteInstancePool_SdkV2) { -} - -func (c DeleteInstancePool_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetRequired() - - return attrs -} - // 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 @@ -6977,18 +6576,6 @@ type DeletePolicy_SdkV2 struct { PolicyId types.String `tfsdk:"policy_id"` } -func (newState *DeletePolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePolicy_SdkV2) { -} - -func (newState *DeletePolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePolicy_SdkV2) { -} - -func (c DeletePolicy_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["policy_id"] = attrs["policy_id"].SetRequired() - - return attrs -} - // 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 @@ -7108,19 +6695,6 @@ type DestroyContext_SdkV2 struct { ContextId types.String `tfsdk:"contextId"` } -func (newState *DestroyContext_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DestroyContext_SdkV2) { -} - -func (newState *DestroyContext_SdkV2) SyncEffectiveFieldsDuringRead(existingState DestroyContext_SdkV2) { -} - -func (c DestroyContext_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clusterId"] = attrs["clusterId"].SetRequired() - attrs["contextId"] = attrs["contextId"].SetRequired() - - return attrs -} - // 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 @@ -7322,11 +6896,8 @@ func (o *DiskSpec_SdkV2) SetDiskType(ctx context.Context, v DiskType_SdkV2) { // Describes the disk type. type DiskType_SdkV2 struct { - // All Azure Disk types that Databricks supports. See - // https://docs.microsoft.com/en-us/azure/storage/storage-about-disks-and-vhds-linux#types-of-disks AzureDiskVolumeType types.String `tfsdk:"azure_disk_volume_type"` - // All EBS volume types that Databricks supports. See - // https://aws.amazon.com/ebs/details/ for details. + EbsVolumeType types.String `tfsdk:"ebs_volume_type"` } @@ -7558,35 +7129,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.List `tfsdk:"docker_image"` @@ -7625,23 +7168,7 @@ type EditCluster_SdkV2 struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -7713,59 +7240,8 @@ type EditCluster_SdkV2 struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. - WorkloadType types.List `tfsdk:"workload_type"` -} - -func (newState *EditCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditCluster_SdkV2) { -} -func (newState *EditCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditCluster_SdkV2) { -} - -func (c EditCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["apply_policy_default_values"] = attrs["apply_policy_default_values"].SetOptional() - attrs["autoscale"] = attrs["autoscale"].SetOptional() - attrs["autoscale"] = attrs["autoscale"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["autotermination_minutes"] = attrs["autotermination_minutes"].SetOptional() - attrs["aws_attributes"] = attrs["aws_attributes"].SetOptional() - attrs["aws_attributes"] = attrs["aws_attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["azure_attributes"] = attrs["azure_attributes"].SetOptional() - attrs["azure_attributes"] = attrs["azure_attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["cluster_log_conf"] = attrs["cluster_log_conf"].SetOptional() - attrs["cluster_log_conf"] = attrs["cluster_log_conf"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["cluster_name"] = attrs["cluster_name"].SetOptional() - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["data_security_mode"] = attrs["data_security_mode"].SetOptional() - attrs["docker_image"] = attrs["docker_image"].SetOptional() - attrs["docker_image"] = attrs["docker_image"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["driver_instance_pool_id"] = attrs["driver_instance_pool_id"].SetOptional() - attrs["driver_node_type_id"] = attrs["driver_node_type_id"].SetOptional() - attrs["enable_elastic_disk"] = attrs["enable_elastic_disk"].SetOptional() - attrs["enable_local_disk_encryption"] = attrs["enable_local_disk_encryption"].SetOptional() - attrs["gcp_attributes"] = attrs["gcp_attributes"].SetOptional() - attrs["gcp_attributes"] = attrs["gcp_attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["init_scripts"] = attrs["init_scripts"].SetOptional() - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetOptional() - attrs["is_single_node"] = attrs["is_single_node"].SetOptional() - attrs["kind"] = attrs["kind"].SetOptional() - attrs["node_type_id"] = attrs["node_type_id"].SetOptional() - attrs["num_workers"] = attrs["num_workers"].SetOptional() - attrs["policy_id"] = attrs["policy_id"].SetOptional() - attrs["remote_disk_throughput"] = attrs["remote_disk_throughput"].SetOptional() - attrs["runtime_engine"] = attrs["runtime_engine"].SetOptional() - attrs["single_user_name"] = attrs["single_user_name"].SetOptional() - attrs["spark_conf"] = attrs["spark_conf"].SetOptional() - attrs["spark_env_vars"] = attrs["spark_env_vars"].SetOptional() - attrs["spark_version"] = attrs["spark_version"].SetRequired() - attrs["ssh_public_keys"] = attrs["ssh_public_keys"].SetOptional() - attrs["total_initial_remote_disk_size"] = attrs["total_initial_remote_disk_size"].SetOptional() - attrs["use_ml_runtime"] = attrs["use_ml_runtime"].SetOptional() - attrs["workload_type"] = attrs["workload_type"].SetOptional() - attrs["workload_type"] = attrs["workload_type"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs + WorkloadType types.List `tfsdk:"workload_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditCluster. @@ -8293,26 +7769,6 @@ type EditInstancePool_SdkV2 struct { TotalInitialRemoteDiskSize types.Int64 `tfsdk:"total_initial_remote_disk_size"` } -func (newState *EditInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditInstancePool_SdkV2) { -} - -func (newState *EditInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditInstancePool_SdkV2) { -} - -func (c EditInstancePool_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["idle_instance_autotermination_minutes"] = attrs["idle_instance_autotermination_minutes"].SetOptional() - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetRequired() - attrs["instance_pool_name"] = attrs["instance_pool_name"].SetRequired() - attrs["max_capacity"] = attrs["max_capacity"].SetOptional() - attrs["min_idle_instances"] = attrs["min_idle_instances"].SetOptional() - attrs["node_type_id"] = attrs["node_type_id"].SetRequired() - attrs["remote_disk_throughput"] = attrs["remote_disk_throughput"].SetOptional() - attrs["total_initial_remote_disk_size"] = attrs["total_initial_remote_disk_size"].SetOptional() - - return attrs -} - // 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 @@ -8469,25 +7925,6 @@ type EditPolicy_SdkV2 struct { PolicyId types.String `tfsdk:"policy_id"` } -func (newState *EditPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPolicy_SdkV2) { -} - -func (newState *EditPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPolicy_SdkV2) { -} - -func (c EditPolicy_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["definition"] = attrs["definition"].SetOptional() - attrs["description"] = attrs["description"].SetOptional() - attrs["libraries"] = attrs["libraries"].SetOptional() - attrs["max_clusters_per_user"] = attrs["max_clusters_per_user"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["policy_family_definition_overrides"] = attrs["policy_family_definition_overrides"].SetOptional() - attrs["policy_family_id"] = attrs["policy_family_id"].SetOptional() - attrs["policy_id"] = attrs["policy_id"].SetRequired() - - return attrs -} - // 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 @@ -8653,19 +8090,6 @@ type EnforceClusterComplianceRequest_SdkV2 struct { ValidateOnly types.Bool `tfsdk:"validate_only"` } -func (newState *EnforceClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforceClusterComplianceRequest_SdkV2) { -} - -func (newState *EnforceClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforceClusterComplianceRequest_SdkV2) { -} - -func (c EnforceClusterComplianceRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["validate_only"] = attrs["validate_only"].SetOptional() - - return attrs -} - // 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 @@ -11000,21 +10424,6 @@ type GlobalInitScriptCreateRequest_SdkV2 struct { Script types.String `tfsdk:"script"` } -func (newState *GlobalInitScriptCreateRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptCreateRequest_SdkV2) { -} - -func (newState *GlobalInitScriptCreateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptCreateRequest_SdkV2) { -} - -func (c GlobalInitScriptCreateRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["enabled"] = attrs["enabled"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["position"] = attrs["position"].SetOptional() - attrs["script"] = attrs["script"].SetRequired() - - return attrs -} - // 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 @@ -11253,22 +10662,6 @@ type GlobalInitScriptUpdateRequest_SdkV2 struct { ScriptId types.String `tfsdk:"-"` } -func (newState *GlobalInitScriptUpdateRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptUpdateRequest_SdkV2) { -} - -func (newState *GlobalInitScriptUpdateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptUpdateRequest_SdkV2) { -} - -func (c GlobalInitScriptUpdateRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["enabled"] = attrs["enabled"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["position"] = attrs["position"].SetOptional() - attrs["script"] = attrs["script"].SetRequired() - attrs["script_id"] = attrs["script_id"].SetRequired() - - return attrs -} - // 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 @@ -12053,19 +11446,6 @@ type InstallLibraries_SdkV2 struct { Libraries types.List `tfsdk:"libraries"` } -func (newState *InstallLibraries_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstallLibraries_SdkV2) { -} - -func (newState *InstallLibraries_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstallLibraries_SdkV2) { -} - -func (c InstallLibraries_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["libraries"] = attrs["libraries"].SetRequired() - - return attrs -} - // 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 @@ -12173,7 +11553,7 @@ func (o InstallLibrariesResponse_SdkV2) Type(ctx context.Context) attr.Type { type InstancePoolAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -12947,9 +12327,6 @@ func (o InstancePoolAzureAttributes_SdkV2) Type(ctx context.Context) attr.Type { // Attributes set during instance pool creation which are related to GCP. 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"` // 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 @@ -13030,7 +12407,7 @@ type InstancePoolPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -13202,7 +12579,7 @@ func (o *InstancePoolPermissions_SdkV2) SetAccessControlList(ctx context.Context type InstancePoolPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -13258,19 +12635,6 @@ type InstancePoolPermissionsRequest_SdkV2 struct { InstancePoolId types.String `tfsdk:"-"` } -func (newState *InstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermissionsRequest_SdkV2) { -} - -func (newState *InstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissionsRequest_SdkV2) { -} - -func (c InstancePoolPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetRequired() - - return attrs -} - // 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 @@ -13862,6 +13226,36 @@ func (o *LibraryFullStatus_SdkV2) SetMessages(ctx context.Context, v []types.Str o.Messages = types.ListValueMust(t, vs) } +type ListAllClusterLibraryStatuses_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllClusterLibraryStatuses. +// Container types (types.Map, types.List, types.Set) and 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 ListAllClusterLibraryStatuses_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, ListAllClusterLibraryStatuses_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAllClusterLibraryStatuses_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAllClusterLibraryStatuses_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListAllClusterLibraryStatusesResponse_SdkV2 struct { // A list of cluster statuses. Statuses types.List `tfsdk:"statuses"` @@ -14582,6 +13976,36 @@ func (o ListClustersSortBy_SdkV2) Type(ctx context.Context) attr.Type { } } +type ListGlobalInitScriptsRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGlobalInitScriptsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListGlobalInitScriptsRequest_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, ListGlobalInitScriptsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListGlobalInitScriptsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListGlobalInitScriptsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListGlobalInitScriptsResponse_SdkV2 struct { Scripts types.List `tfsdk:"scripts"` } @@ -14736,6 +14160,66 @@ func (o *ListInstancePools_SdkV2) SetInstancePools(ctx context.Context, v []Inst o.InstancePools = types.ListValueMust(t, vs) } +type ListInstancePoolsRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstancePoolsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListInstancePoolsRequest_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, ListInstancePoolsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListInstancePoolsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListInstancePoolsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListInstanceProfilesRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstanceProfilesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListInstanceProfilesRequest_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, ListInstanceProfilesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListInstanceProfilesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListInstanceProfilesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListInstanceProfilesResponse_SdkV2 struct { // A list of instance profiles that the user can access. InstanceProfiles types.List `tfsdk:"instance_profiles"` @@ -14814,6 +14298,36 @@ func (o *ListInstanceProfilesResponse_SdkV2) SetInstanceProfiles(ctx context.Con o.InstanceProfiles = types.ListValueMust(t, vs) } +type ListNodeTypesRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNodeTypesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListNodeTypesRequest_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, ListNodeTypesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListNodeTypesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNodeTypesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListNodeTypesResponse_SdkV2 struct { // The list of available Spark node types. NodeTypes types.List `tfsdk:"node_types"` @@ -15094,6 +14608,36 @@ func (o *ListPolicyFamiliesResponse_SdkV2) SetPolicyFamilies(ctx context.Context o.PolicyFamilies = types.ListValueMust(t, vs) } +type ListZonesRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListZonesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListZonesRequest_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, ListZonesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListZonesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListZonesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type LocalFileInfo_SdkV2 struct { // local file destination, e.g. `file:/my/local/file.sh` Destination types.String `tfsdk:"destination"` @@ -15689,18 +15233,6 @@ type PermanentDeleteCluster_SdkV2 struct { ClusterId types.String `tfsdk:"cluster_id"` } -func (newState *PermanentDeleteCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermanentDeleteCluster_SdkV2) { -} - -func (newState *PermanentDeleteCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermanentDeleteCluster_SdkV2) { -} - -func (c PermanentDeleteCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -15777,18 +15309,6 @@ type PinCluster_SdkV2 struct { ClusterId types.String `tfsdk:"cluster_id"` } -func (newState *PinCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PinCluster_SdkV2) { -} - -func (newState *PinCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState PinCluster_SdkV2) { -} - -func (c PinCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -16194,18 +15714,6 @@ type RemoveInstanceProfile_SdkV2 struct { InstanceProfileArn types.String `tfsdk:"instance_profile_arn"` } -func (newState *RemoveInstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveInstanceProfile_SdkV2) { -} - -func (newState *RemoveInstanceProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState RemoveInstanceProfile_SdkV2) { -} - -func (c RemoveInstanceProfile_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetRequired() - - return attrs -} - // 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 @@ -16298,21 +15806,6 @@ type ResizeCluster_SdkV2 struct { NumWorkers types.Int64 `tfsdk:"num_workers"` } -func (newState *ResizeCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResizeCluster_SdkV2) { -} - -func (newState *ResizeCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResizeCluster_SdkV2) { -} - -func (c ResizeCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["autoscale"] = attrs["autoscale"].SetOptional() - attrs["autoscale"] = attrs["autoscale"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["num_workers"] = attrs["num_workers"].SetOptional() - - return attrs -} - // 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 @@ -16426,19 +15919,6 @@ type RestartCluster_SdkV2 struct { RestartUser types.String `tfsdk:"restart_user"` } -func (newState *RestartCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestartCluster_SdkV2) { -} - -func (newState *RestartCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestartCluster_SdkV2) { -} - -func (c RestartCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["restart_user"] = attrs["restart_user"].SetOptional() - - return attrs -} - // 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 @@ -16983,21 +16463,39 @@ func (o SparkVersion_SdkV2) Type(ctx context.Context) attr.Type { } } -type StartCluster_SdkV2 struct { - // The cluster to be started. - ClusterId types.String `tfsdk:"cluster_id"` +type SparkVersionsRequest_SdkV2 struct { } -func (newState *StartCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartCluster_SdkV2) { +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkVersionsRequest. +// Container types (types.Map, types.List, types.Set) and 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 SparkVersionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -func (newState *StartCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartCluster_SdkV2) { +// 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, SparkVersionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SparkVersionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) } -func (c StartCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() +// Type implements basetypes.ObjectValuable. +func (o SparkVersionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} - return attrs +type StartCluster_SdkV2 struct { + // The cluster to be started. + ClusterId types.String `tfsdk:"cluster_id"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartCluster. @@ -17168,19 +16666,6 @@ type UninstallLibraries_SdkV2 struct { Libraries types.List `tfsdk:"libraries"` } -func (newState *UninstallLibraries_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UninstallLibraries_SdkV2) { -} - -func (newState *UninstallLibraries_SdkV2) SyncEffectiveFieldsDuringRead(existingState UninstallLibraries_SdkV2) { -} - -func (c UninstallLibraries_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["libraries"] = attrs["libraries"].SetRequired() - - return attrs -} - // 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 @@ -17289,18 +16774,6 @@ type UnpinCluster_SdkV2 struct { ClusterId types.String `tfsdk:"cluster_id"` } -func (newState *UnpinCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnpinCluster_SdkV2) { -} - -func (newState *UnpinCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnpinCluster_SdkV2) { -} - -func (c UnpinCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -17395,21 +16868,6 @@ type UpdateCluster_SdkV2 struct { UpdateMask types.String `tfsdk:"update_mask"` } -func (newState *UpdateCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCluster_SdkV2) { -} - -func (newState *UpdateCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCluster_SdkV2) { -} - -func (c UpdateCluster_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster"] = attrs["cluster"].SetOptional() - attrs["cluster"] = attrs["cluster"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["update_mask"] = attrs["update_mask"].SetRequired() - - return attrs -} - // 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 @@ -17514,35 +16972,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.List `tfsdk:"docker_image"` @@ -17581,23 +17011,7 @@ type UpdateClusterResource_SdkV2 struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -17669,7 +17083,7 @@ type UpdateClusterResource_SdkV2 struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. + WorkloadType types.List `tfsdk:"workload_type"` } diff --git a/internal/service/compute_tf/model.go b/internal/service/compute_tf/model.go index ab402c3d70..d2646026e5 100755 --- a/internal/service/compute_tf/model.go +++ b/internal/service/compute_tf/model.go @@ -51,21 +51,6 @@ type AddInstanceProfile struct { SkipValidation types.Bool `tfsdk:"skip_validation"` } -func (newState *AddInstanceProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddInstanceProfile) { -} - -func (newState *AddInstanceProfile) SyncEffectiveFieldsDuringRead(existingState AddInstanceProfile) { -} - -func (c AddInstanceProfile) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["iam_role_arn"] = attrs["iam_role_arn"].SetOptional() - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetRequired() - attrs["is_meta_instance_profile"] = attrs["is_meta_instance_profile"].SetOptional() - attrs["skip_validation"] = attrs["skip_validation"].SetOptional() - - return attrs -} - // 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 @@ -254,11 +239,6 @@ func (o AutoScale) Type(ctx context.Context) attr.Type { // Attributes set during cluster creation which are related to Amazon Web // Services. type AwsAttributes struct { - // Availability type used for all subsequent nodes past the - // `first_on_demand` ones. - // - // Note: If `first_on_demand` is zero, this availability type will be used - // for the entire cluster. Availability types.String `tfsdk:"availability"` // 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 @@ -520,20 +500,6 @@ type CancelCommand struct { ContextId types.String `tfsdk:"contextId"` } -func (newState *CancelCommand) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelCommand) { -} - -func (newState *CancelCommand) SyncEffectiveFieldsDuringRead(existingState CancelCommand) { -} - -func (c CancelCommand) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clusterId"] = attrs["clusterId"].SetOptional() - attrs["commandId"] = attrs["commandId"].SetOptional() - attrs["contextId"] = attrs["contextId"].SetOptional() - - return attrs -} - // 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 @@ -616,19 +582,6 @@ type ChangeClusterOwner struct { OwnerUsername types.String `tfsdk:"owner_username"` } -func (newState *ChangeClusterOwner) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChangeClusterOwner) { -} - -func (newState *ChangeClusterOwner) SyncEffectiveFieldsDuringRead(existingState ChangeClusterOwner) { -} - -func (c ChangeClusterOwner) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["owner_username"] = attrs["owner_username"].SetRequired() - - return attrs -} - // 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 @@ -885,7 +838,7 @@ func (o *CloudProviderNodeInfo) SetStatus(ctx context.Context, v []types.String) type ClusterAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -1080,35 +1033,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.Object `tfsdk:"docker_image"` @@ -1147,23 +1072,7 @@ type ClusterAttributes struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -1224,7 +1133,7 @@ type ClusterAttributes struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. + WorkloadType types.Object `tfsdk:"workload_type"` } @@ -1824,35 +1733,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Tags that are added by Databricks regardless of any `custom_tags`, // including: @@ -1913,23 +1794,7 @@ type ClusterDetails struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // the timestamp that the cluster was started/restarted LastRestartedTime types.Int64 `tfsdk:"last_restarted_time"` @@ -2028,7 +1893,7 @@ type ClusterDetails struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. + WorkloadType types.Object `tfsdk:"workload_type"` } @@ -3113,7 +2978,7 @@ type ClusterPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3285,7 +3150,7 @@ func (o *ClusterPermissions) SetAccessControlList(ctx context.Context, v []Clust type ClusterPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3341,19 +3206,6 @@ type ClusterPermissionsRequest struct { ClusterId types.String `tfsdk:"-"` } -func (newState *ClusterPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermissionsRequest) { -} - -func (newState *ClusterPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState ClusterPermissionsRequest) { -} - -func (c ClusterPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -3420,7 +3272,7 @@ func (o *ClusterPermissionsRequest) SetAccessControlList(ctx context.Context, v type ClusterPolicyAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -3582,7 +3434,7 @@ type ClusterPolicyPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3754,7 +3606,7 @@ func (o *ClusterPolicyPermissions) SetAccessControlList(ctx context.Context, v [ type ClusterPolicyPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3810,19 +3662,6 @@ type ClusterPolicyPermissionsRequest struct { ClusterPolicyId types.String `tfsdk:"-"` } -func (newState *ClusterPolicyPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermissionsRequest) { -} - -func (newState *ClusterPolicyPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissionsRequest) { -} - -func (c ClusterPolicyPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["cluster_policy_id"] = attrs["cluster_policy_id"].SetRequired() - - return attrs -} - // 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 @@ -4091,35 +3930,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.Object `tfsdk:"docker_image"` @@ -4158,23 +3969,7 @@ type ClusterSpec struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -4246,7 +4041,7 @@ type ClusterSpec struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. + WorkloadType types.Object `tfsdk:"workload_type"` } @@ -4782,21 +4577,6 @@ type Command struct { Language types.String `tfsdk:"language"` } -func (newState *Command) SyncEffectiveFieldsDuringCreateOrUpdate(plan Command) { -} - -func (newState *Command) SyncEffectiveFieldsDuringRead(existingState Command) { -} - -func (c Command) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clusterId"] = attrs["clusterId"].SetOptional() - attrs["command"] = attrs["command"].SetOptional() - attrs["contextId"] = attrs["contextId"].SetOptional() - attrs["language"] = attrs["language"].SetOptional() - - return attrs -} - // 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 @@ -5101,35 +4881,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.Object `tfsdk:"docker_image"` @@ -5168,23 +4920,7 @@ type CreateCluster struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -5256,52 +4992,8 @@ type CreateCluster struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. - WorkloadType types.Object `tfsdk:"workload_type"` -} - -func (newState *CreateCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCluster) { -} - -func (newState *CreateCluster) SyncEffectiveFieldsDuringRead(existingState CreateCluster) { -} - -func (c CreateCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["apply_policy_default_values"] = attrs["apply_policy_default_values"].SetOptional() - attrs["autoscale"] = attrs["autoscale"].SetOptional() - attrs["autotermination_minutes"] = attrs["autotermination_minutes"].SetOptional() - attrs["aws_attributes"] = attrs["aws_attributes"].SetOptional() - attrs["azure_attributes"] = attrs["azure_attributes"].SetOptional() - attrs["clone_from"] = attrs["clone_from"].SetOptional() - attrs["cluster_log_conf"] = attrs["cluster_log_conf"].SetOptional() - attrs["cluster_name"] = attrs["cluster_name"].SetOptional() - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["data_security_mode"] = attrs["data_security_mode"].SetOptional() - attrs["docker_image"] = attrs["docker_image"].SetOptional() - attrs["driver_instance_pool_id"] = attrs["driver_instance_pool_id"].SetOptional() - attrs["driver_node_type_id"] = attrs["driver_node_type_id"].SetOptional() - attrs["enable_elastic_disk"] = attrs["enable_elastic_disk"].SetOptional() - attrs["enable_local_disk_encryption"] = attrs["enable_local_disk_encryption"].SetOptional() - attrs["gcp_attributes"] = attrs["gcp_attributes"].SetOptional() - attrs["init_scripts"] = attrs["init_scripts"].SetOptional() - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetOptional() - attrs["is_single_node"] = attrs["is_single_node"].SetOptional() - attrs["kind"] = attrs["kind"].SetOptional() - attrs["node_type_id"] = attrs["node_type_id"].SetOptional() - attrs["num_workers"] = attrs["num_workers"].SetOptional() - attrs["policy_id"] = attrs["policy_id"].SetOptional() - attrs["remote_disk_throughput"] = attrs["remote_disk_throughput"].SetOptional() - attrs["runtime_engine"] = attrs["runtime_engine"].SetOptional() - attrs["single_user_name"] = attrs["single_user_name"].SetOptional() - attrs["spark_conf"] = attrs["spark_conf"].SetOptional() - attrs["spark_env_vars"] = attrs["spark_env_vars"].SetOptional() - attrs["spark_version"] = attrs["spark_version"].SetRequired() - attrs["ssh_public_keys"] = attrs["ssh_public_keys"].SetOptional() - attrs["total_initial_remote_disk_size"] = attrs["total_initial_remote_disk_size"].SetOptional() - attrs["use_ml_runtime"] = attrs["use_ml_runtime"].SetOptional() - attrs["workload_type"] = attrs["workload_type"].SetOptional() - return attrs + WorkloadType types.Object `tfsdk:"workload_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCluster. @@ -5831,19 +5523,6 @@ type CreateContext struct { Language types.String `tfsdk:"language"` } -func (newState *CreateContext) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateContext) { -} - -func (newState *CreateContext) SyncEffectiveFieldsDuringRead(existingState CreateContext) { -} - -func (c CreateContext) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clusterId"] = attrs["clusterId"].SetOptional() - attrs["language"] = attrs["language"].SetOptional() - - return attrs -} - // 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 @@ -5940,32 +5619,6 @@ type CreateInstancePool struct { TotalInitialRemoteDiskSize types.Int64 `tfsdk:"total_initial_remote_disk_size"` } -func (newState *CreateInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstancePool) { -} - -func (newState *CreateInstancePool) SyncEffectiveFieldsDuringRead(existingState CreateInstancePool) { -} - -func (c CreateInstancePool) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_attributes"] = attrs["aws_attributes"].SetOptional() - attrs["azure_attributes"] = attrs["azure_attributes"].SetOptional() - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["disk_spec"] = attrs["disk_spec"].SetOptional() - attrs["enable_elastic_disk"] = attrs["enable_elastic_disk"].SetOptional() - attrs["gcp_attributes"] = attrs["gcp_attributes"].SetOptional() - attrs["idle_instance_autotermination_minutes"] = attrs["idle_instance_autotermination_minutes"].SetOptional() - attrs["instance_pool_name"] = attrs["instance_pool_name"].SetRequired() - attrs["max_capacity"] = attrs["max_capacity"].SetOptional() - attrs["min_idle_instances"] = attrs["min_idle_instances"].SetOptional() - attrs["node_type_id"] = attrs["node_type_id"].SetRequired() - attrs["preloaded_docker_images"] = attrs["preloaded_docker_images"].SetOptional() - attrs["preloaded_spark_versions"] = attrs["preloaded_spark_versions"].SetOptional() - attrs["remote_disk_throughput"] = attrs["remote_disk_throughput"].SetOptional() - attrs["total_initial_remote_disk_size"] = attrs["total_initial_remote_disk_size"].SetOptional() - - return attrs -} - // 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 @@ -6313,24 +5966,6 @@ type CreatePolicy struct { PolicyFamilyId types.String `tfsdk:"policy_family_id"` } -func (newState *CreatePolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePolicy) { -} - -func (newState *CreatePolicy) SyncEffectiveFieldsDuringRead(existingState CreatePolicy) { -} - -func (c CreatePolicy) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["definition"] = attrs["definition"].SetOptional() - attrs["description"] = attrs["description"].SetOptional() - attrs["libraries"] = attrs["libraries"].SetOptional() - attrs["max_clusters_per_user"] = attrs["max_clusters_per_user"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["policy_family_definition_overrides"] = attrs["policy_family_definition_overrides"].SetOptional() - attrs["policy_family_id"] = attrs["policy_family_id"].SetOptional() - - return attrs -} - // 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 @@ -6718,18 +6353,6 @@ type DeleteCluster struct { ClusterId types.String `tfsdk:"cluster_id"` } -func (newState *DeleteCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCluster) { -} - -func (newState *DeleteCluster) SyncEffectiveFieldsDuringRead(existingState DeleteCluster) { -} - -func (c DeleteCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -6843,18 +6466,6 @@ type DeleteInstancePool struct { InstancePoolId types.String `tfsdk:"instance_pool_id"` } -func (newState *DeleteInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteInstancePool) { -} - -func (newState *DeleteInstancePool) SyncEffectiveFieldsDuringRead(existingState DeleteInstancePool) { -} - -func (c DeleteInstancePool) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetRequired() - - return attrs -} - // 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 @@ -6932,18 +6543,6 @@ type DeletePolicy struct { PolicyId types.String `tfsdk:"policy_id"` } -func (newState *DeletePolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePolicy) { -} - -func (newState *DeletePolicy) SyncEffectiveFieldsDuringRead(existingState DeletePolicy) { -} - -func (c DeletePolicy) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["policy_id"] = attrs["policy_id"].SetRequired() - - return attrs -} - // 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 @@ -7063,19 +6662,6 @@ type DestroyContext struct { ContextId types.String `tfsdk:"contextId"` } -func (newState *DestroyContext) SyncEffectiveFieldsDuringCreateOrUpdate(plan DestroyContext) { -} - -func (newState *DestroyContext) SyncEffectiveFieldsDuringRead(existingState DestroyContext) { -} - -func (c DestroyContext) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["clusterId"] = attrs["clusterId"].SetRequired() - attrs["contextId"] = attrs["contextId"].SetRequired() - - return attrs -} - // 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 @@ -7276,11 +6862,8 @@ func (o *DiskSpec) SetDiskType(ctx context.Context, v DiskType) { // Describes the disk type. type DiskType struct { - // All Azure Disk types that Databricks supports. See - // https://docs.microsoft.com/en-us/azure/storage/storage-about-disks-and-vhds-linux#types-of-disks AzureDiskVolumeType types.String `tfsdk:"azure_disk_volume_type"` - // All EBS volume types that Databricks supports. See - // https://aws.amazon.com/ebs/details/ for details. + EbsVolumeType types.String `tfsdk:"ebs_volume_type"` } @@ -7511,35 +7094,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.Object `tfsdk:"docker_image"` @@ -7578,23 +7133,7 @@ type EditCluster struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -7666,52 +7205,8 @@ type EditCluster struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. - WorkloadType types.Object `tfsdk:"workload_type"` -} - -func (newState *EditCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditCluster) { -} -func (newState *EditCluster) SyncEffectiveFieldsDuringRead(existingState EditCluster) { -} - -func (c EditCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["apply_policy_default_values"] = attrs["apply_policy_default_values"].SetOptional() - attrs["autoscale"] = attrs["autoscale"].SetOptional() - attrs["autotermination_minutes"] = attrs["autotermination_minutes"].SetOptional() - attrs["aws_attributes"] = attrs["aws_attributes"].SetOptional() - attrs["azure_attributes"] = attrs["azure_attributes"].SetOptional() - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["cluster_log_conf"] = attrs["cluster_log_conf"].SetOptional() - attrs["cluster_name"] = attrs["cluster_name"].SetOptional() - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["data_security_mode"] = attrs["data_security_mode"].SetOptional() - attrs["docker_image"] = attrs["docker_image"].SetOptional() - attrs["driver_instance_pool_id"] = attrs["driver_instance_pool_id"].SetOptional() - attrs["driver_node_type_id"] = attrs["driver_node_type_id"].SetOptional() - attrs["enable_elastic_disk"] = attrs["enable_elastic_disk"].SetOptional() - attrs["enable_local_disk_encryption"] = attrs["enable_local_disk_encryption"].SetOptional() - attrs["gcp_attributes"] = attrs["gcp_attributes"].SetOptional() - attrs["init_scripts"] = attrs["init_scripts"].SetOptional() - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetOptional() - attrs["is_single_node"] = attrs["is_single_node"].SetOptional() - attrs["kind"] = attrs["kind"].SetOptional() - attrs["node_type_id"] = attrs["node_type_id"].SetOptional() - attrs["num_workers"] = attrs["num_workers"].SetOptional() - attrs["policy_id"] = attrs["policy_id"].SetOptional() - attrs["remote_disk_throughput"] = attrs["remote_disk_throughput"].SetOptional() - attrs["runtime_engine"] = attrs["runtime_engine"].SetOptional() - attrs["single_user_name"] = attrs["single_user_name"].SetOptional() - attrs["spark_conf"] = attrs["spark_conf"].SetOptional() - attrs["spark_env_vars"] = attrs["spark_env_vars"].SetOptional() - attrs["spark_version"] = attrs["spark_version"].SetRequired() - attrs["ssh_public_keys"] = attrs["ssh_public_keys"].SetOptional() - attrs["total_initial_remote_disk_size"] = attrs["total_initial_remote_disk_size"].SetOptional() - attrs["use_ml_runtime"] = attrs["use_ml_runtime"].SetOptional() - attrs["workload_type"] = attrs["workload_type"].SetOptional() - - return attrs + WorkloadType types.Object `tfsdk:"workload_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditCluster. @@ -8239,26 +7734,6 @@ type EditInstancePool struct { TotalInitialRemoteDiskSize types.Int64 `tfsdk:"total_initial_remote_disk_size"` } -func (newState *EditInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditInstancePool) { -} - -func (newState *EditInstancePool) SyncEffectiveFieldsDuringRead(existingState EditInstancePool) { -} - -func (c EditInstancePool) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["idle_instance_autotermination_minutes"] = attrs["idle_instance_autotermination_minutes"].SetOptional() - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetRequired() - attrs["instance_pool_name"] = attrs["instance_pool_name"].SetRequired() - attrs["max_capacity"] = attrs["max_capacity"].SetOptional() - attrs["min_idle_instances"] = attrs["min_idle_instances"].SetOptional() - attrs["node_type_id"] = attrs["node_type_id"].SetRequired() - attrs["remote_disk_throughput"] = attrs["remote_disk_throughput"].SetOptional() - attrs["total_initial_remote_disk_size"] = attrs["total_initial_remote_disk_size"].SetOptional() - - return attrs -} - // 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 @@ -8415,25 +7890,6 @@ type EditPolicy struct { PolicyId types.String `tfsdk:"policy_id"` } -func (newState *EditPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPolicy) { -} - -func (newState *EditPolicy) SyncEffectiveFieldsDuringRead(existingState EditPolicy) { -} - -func (c EditPolicy) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["definition"] = attrs["definition"].SetOptional() - attrs["description"] = attrs["description"].SetOptional() - attrs["libraries"] = attrs["libraries"].SetOptional() - attrs["max_clusters_per_user"] = attrs["max_clusters_per_user"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["policy_family_definition_overrides"] = attrs["policy_family_definition_overrides"].SetOptional() - attrs["policy_family_id"] = attrs["policy_family_id"].SetOptional() - attrs["policy_id"] = attrs["policy_id"].SetRequired() - - return attrs -} - // 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 @@ -8599,19 +8055,6 @@ type EnforceClusterComplianceRequest struct { ValidateOnly types.Bool `tfsdk:"validate_only"` } -func (newState *EnforceClusterComplianceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforceClusterComplianceRequest) { -} - -func (newState *EnforceClusterComplianceRequest) SyncEffectiveFieldsDuringRead(existingState EnforceClusterComplianceRequest) { -} - -func (c EnforceClusterComplianceRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["validate_only"] = attrs["validate_only"].SetOptional() - - return attrs -} - // 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 @@ -10933,21 +10376,6 @@ type GlobalInitScriptCreateRequest struct { Script types.String `tfsdk:"script"` } -func (newState *GlobalInitScriptCreateRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptCreateRequest) { -} - -func (newState *GlobalInitScriptCreateRequest) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptCreateRequest) { -} - -func (c GlobalInitScriptCreateRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["enabled"] = attrs["enabled"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["position"] = attrs["position"].SetOptional() - attrs["script"] = attrs["script"].SetRequired() - - return attrs -} - // 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 @@ -11186,22 +10614,6 @@ type GlobalInitScriptUpdateRequest struct { ScriptId types.String `tfsdk:"-"` } -func (newState *GlobalInitScriptUpdateRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptUpdateRequest) { -} - -func (newState *GlobalInitScriptUpdateRequest) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptUpdateRequest) { -} - -func (c GlobalInitScriptUpdateRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["enabled"] = attrs["enabled"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["position"] = attrs["position"].SetOptional() - attrs["script"] = attrs["script"].SetRequired() - attrs["script_id"] = attrs["script_id"].SetRequired() - - return attrs -} - // 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 @@ -11972,19 +11384,6 @@ type InstallLibraries struct { Libraries types.List `tfsdk:"libraries"` } -func (newState *InstallLibraries) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstallLibraries) { -} - -func (newState *InstallLibraries) SyncEffectiveFieldsDuringRead(existingState InstallLibraries) { -} - -func (c InstallLibraries) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["libraries"] = attrs["libraries"].SetRequired() - - return attrs -} - // 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 @@ -12092,7 +11491,7 @@ func (o InstallLibrariesResponse) Type(ctx context.Context) attr.Type { type InstancePoolAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -12860,9 +12259,6 @@ func (o InstancePoolAzureAttributes) Type(ctx context.Context) attr.Type { // Attributes set during instance pool creation which are related to GCP. 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"` // 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 @@ -12943,7 +12339,7 @@ type InstancePoolPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -13115,7 +12511,7 @@ func (o *InstancePoolPermissions) SetAccessControlList(ctx context.Context, v [] type InstancePoolPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -13171,19 +12567,6 @@ type InstancePoolPermissionsRequest struct { InstancePoolId types.String `tfsdk:"-"` } -func (newState *InstancePoolPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermissionsRequest) { -} - -func (newState *InstancePoolPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissionsRequest) { -} - -func (c InstancePoolPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["instance_pool_id"] = attrs["instance_pool_id"].SetRequired() - - return attrs -} - // 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 @@ -13771,6 +13154,36 @@ func (o *LibraryFullStatus) SetMessages(ctx context.Context, v []types.String) { o.Messages = types.ListValueMust(t, vs) } +type ListAllClusterLibraryStatuses struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllClusterLibraryStatuses. +// Container types (types.Map, types.List, types.Set) and 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 ListAllClusterLibraryStatuses) 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, ListAllClusterLibraryStatuses +// only implements ToObjectValue() and Type(). +func (o ListAllClusterLibraryStatuses) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAllClusterLibraryStatuses) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListAllClusterLibraryStatusesResponse struct { // A list of cluster statuses. Statuses types.List `tfsdk:"statuses"` @@ -14491,6 +13904,36 @@ func (o ListClustersSortBy) Type(ctx context.Context) attr.Type { } } +type ListGlobalInitScriptsRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGlobalInitScriptsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListGlobalInitScriptsRequest) 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, ListGlobalInitScriptsRequest +// only implements ToObjectValue() and Type(). +func (o ListGlobalInitScriptsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListGlobalInitScriptsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListGlobalInitScriptsResponse struct { Scripts types.List `tfsdk:"scripts"` } @@ -14645,6 +14088,66 @@ func (o *ListInstancePools) SetInstancePools(ctx context.Context, v []InstancePo o.InstancePools = types.ListValueMust(t, vs) } +type ListInstancePoolsRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstancePoolsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListInstancePoolsRequest) 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, ListInstancePoolsRequest +// only implements ToObjectValue() and Type(). +func (o ListInstancePoolsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListInstancePoolsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListInstanceProfilesRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstanceProfilesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListInstanceProfilesRequest) 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, ListInstanceProfilesRequest +// only implements ToObjectValue() and Type(). +func (o ListInstanceProfilesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListInstanceProfilesRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListInstanceProfilesResponse struct { // A list of instance profiles that the user can access. InstanceProfiles types.List `tfsdk:"instance_profiles"` @@ -14723,6 +14226,36 @@ func (o *ListInstanceProfilesResponse) SetInstanceProfiles(ctx context.Context, o.InstanceProfiles = types.ListValueMust(t, vs) } +type ListNodeTypesRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNodeTypesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListNodeTypesRequest) 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, ListNodeTypesRequest +// only implements ToObjectValue() and Type(). +func (o ListNodeTypesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNodeTypesRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListNodeTypesResponse struct { // The list of available Spark node types. NodeTypes types.List `tfsdk:"node_types"` @@ -15003,6 +14536,36 @@ func (o *ListPolicyFamiliesResponse) SetPolicyFamilies(ctx context.Context, v [] o.PolicyFamilies = types.ListValueMust(t, vs) } +type ListZonesRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListZonesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListZonesRequest) 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, ListZonesRequest +// only implements ToObjectValue() and Type(). +func (o ListZonesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListZonesRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type LocalFileInfo struct { // local file destination, e.g. `file:/my/local/file.sh` Destination types.String `tfsdk:"destination"` @@ -15596,18 +15159,6 @@ type PermanentDeleteCluster struct { ClusterId types.String `tfsdk:"cluster_id"` } -func (newState *PermanentDeleteCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermanentDeleteCluster) { -} - -func (newState *PermanentDeleteCluster) SyncEffectiveFieldsDuringRead(existingState PermanentDeleteCluster) { -} - -func (c PermanentDeleteCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -15684,18 +15235,6 @@ type PinCluster struct { ClusterId types.String `tfsdk:"cluster_id"` } -func (newState *PinCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan PinCluster) { -} - -func (newState *PinCluster) SyncEffectiveFieldsDuringRead(existingState PinCluster) { -} - -func (c PinCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -16101,18 +15640,6 @@ type RemoveInstanceProfile struct { InstanceProfileArn types.String `tfsdk:"instance_profile_arn"` } -func (newState *RemoveInstanceProfile) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveInstanceProfile) { -} - -func (newState *RemoveInstanceProfile) SyncEffectiveFieldsDuringRead(existingState RemoveInstanceProfile) { -} - -func (c RemoveInstanceProfile) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetRequired() - - return attrs -} - // 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 @@ -16205,20 +15732,6 @@ type ResizeCluster struct { NumWorkers types.Int64 `tfsdk:"num_workers"` } -func (newState *ResizeCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResizeCluster) { -} - -func (newState *ResizeCluster) SyncEffectiveFieldsDuringRead(existingState ResizeCluster) { -} - -func (c ResizeCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["autoscale"] = attrs["autoscale"].SetOptional() - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["num_workers"] = attrs["num_workers"].SetOptional() - - return attrs -} - // 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 @@ -16332,19 +15845,6 @@ type RestartCluster struct { RestartUser types.String `tfsdk:"restart_user"` } -func (newState *RestartCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestartCluster) { -} - -func (newState *RestartCluster) SyncEffectiveFieldsDuringRead(existingState RestartCluster) { -} - -func (c RestartCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["restart_user"] = attrs["restart_user"].SetOptional() - - return attrs -} - // 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 @@ -16888,21 +16388,39 @@ func (o SparkVersion) Type(ctx context.Context) attr.Type { } } -type StartCluster struct { - // The cluster to be started. - ClusterId types.String `tfsdk:"cluster_id"` +type SparkVersionsRequest struct { } -func (newState *StartCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartCluster) { +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkVersionsRequest. +// Container types (types.Map, types.List, types.Set) and 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 SparkVersionsRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -func (newState *StartCluster) SyncEffectiveFieldsDuringRead(existingState StartCluster) { +// 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, SparkVersionsRequest +// only implements ToObjectValue() and Type(). +func (o SparkVersionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) } -func (c StartCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() +// Type implements basetypes.ObjectValuable. +func (o SparkVersionsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} - return attrs +type StartCluster struct { + // The cluster to be started. + ClusterId types.String `tfsdk:"cluster_id"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in StartCluster. @@ -17073,19 +16591,6 @@ type UninstallLibraries struct { Libraries types.List `tfsdk:"libraries"` } -func (newState *UninstallLibraries) SyncEffectiveFieldsDuringCreateOrUpdate(plan UninstallLibraries) { -} - -func (newState *UninstallLibraries) SyncEffectiveFieldsDuringRead(existingState UninstallLibraries) { -} - -func (c UninstallLibraries) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["libraries"] = attrs["libraries"].SetRequired() - - return attrs -} - // 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 @@ -17194,18 +16699,6 @@ type UnpinCluster struct { ClusterId types.String `tfsdk:"cluster_id"` } -func (newState *UnpinCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnpinCluster) { -} - -func (newState *UnpinCluster) SyncEffectiveFieldsDuringRead(existingState UnpinCluster) { -} - -func (c UnpinCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - - return attrs -} - // 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 @@ -17300,20 +16793,6 @@ type UpdateCluster struct { UpdateMask types.String `tfsdk:"update_mask"` } -func (newState *UpdateCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCluster) { -} - -func (newState *UpdateCluster) SyncEffectiveFieldsDuringRead(existingState UpdateCluster) { -} - -func (c UpdateCluster) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cluster"] = attrs["cluster"].SetOptional() - attrs["cluster_id"] = attrs["cluster_id"].SetRequired() - attrs["update_mask"] = attrs["update_mask"].SetRequired() - - return attrs -} - // 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 @@ -17418,35 +16897,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"` - // Data security mode decides what data governance model to use when - // accessing data from a cluster. - // - // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * - // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate - // access mode depending on your compute configuration. * - // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * - // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. - // - // The following modes can be used regardless of `kind`. * `NONE`: No - // security isolation for multiple users sharing the cluster. Data - // governance features are not available in this mode. * `SINGLE_USER`: A - // secure cluster that can only be exclusively used by a single user - // specified in `single_user_name`. Most programming languages, cluster - // features and data governance features are available in this mode. * - // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. - // Cluster users are fully isolated so that they cannot see each other's - // data and credentials. Most data governance features are supported in this - // mode. But programming languages and cluster features might be limited. - // - // The following modes are deprecated starting with Databricks Runtime 15.0 - // and will be removed for future Databricks Runtime versions: - // - // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table - // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating - // from legacy Passthrough on high concurrency clusters. * - // `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"` // Custom docker image BYOC DockerImage types.Object `tfsdk:"docker_image"` @@ -17485,23 +16936,7 @@ type UpdateClusterResource struct { // 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"` - // The kind of compute described by this compute specification. - // - // Depending on `kind`, different validations and default values will be - // applied. - // - // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, - // whereas clusters with no specified `kind` do not. * - // [is_single_node](/api/workspace/clusters/create#is_single_node) * - // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * - // [data_security_mode](/api/workspace/clusters/create#data_security_mode) - // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or - // `DATA_SECURITY_MODE_STANDARD` - // - // By using the [simple form], your clusters are automatically using `kind = - // CLASSIC_PREVIEW`. - // - // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind types.String `tfsdk:"kind"` // 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 @@ -17573,7 +17008,7 @@ type UpdateClusterResource struct { // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or // not. UseMlRuntime types.Bool `tfsdk:"use_ml_runtime"` - // Cluster Attributes showing for clusters workload types. + WorkloadType types.Object `tfsdk:"workload_type"` } diff --git a/internal/service/dashboards_tf/legacy_model.go b/internal/service/dashboards_tf/legacy_model.go index 8c6bd3c746..66a3bd622b 100755 --- a/internal/service/dashboards_tf/legacy_model.go +++ b/internal/service/dashboards_tf/legacy_model.go @@ -240,7 +240,7 @@ func (o *CreateDashboardRequest_SdkV2) SetDashboard(ctx context.Context, v Dashb type CreateScheduleRequest_SdkV2 struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - + // The schedule to create. A dashboard is limited to 10 schedules. Schedule types.List `tfsdk:"schedule"` } @@ -312,7 +312,7 @@ type CreateSubscriptionRequest_SdkV2 struct { DashboardId types.String `tfsdk:"-"` // UUID identifying the schedule to which the subscription belongs. ScheduleId types.String `tfsdk:"-"` - + // The subscription to create. A schedule is limited to 100 subscriptions. Subscription types.List `tfsdk:"subscription"` } @@ -592,36 +592,6 @@ func (o DeleteScheduleRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type DeleteScheduleResponse_SdkV2 struct { -} - -// 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 -// 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 DeleteScheduleResponse_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, DeleteScheduleResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteScheduleResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteScheduleResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteSubscriptionRequest_SdkV2 struct { // UUID identifying the dashboard which the subscription belongs. DashboardId types.String `tfsdk:"-"` @@ -671,36 +641,6 @@ func (o DeleteSubscriptionRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type DeleteSubscriptionResponse_SdkV2 struct { -} - -// 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 -// 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 DeleteSubscriptionResponse_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, DeleteSubscriptionResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteSubscriptionResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteSubscriptionResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - // Genie AI Response type GenieAttachment_SdkV2 struct { // Attachment ID @@ -899,157 +839,148 @@ func (o GenieConversation_SdkV2) Type(ctx context.Context) attr.Type { } } -type GenieCreateConversationMessageRequest_SdkV2 struct { - // User message content. - Content types.String `tfsdk:"content"` - // The ID associated with the conversation. - ConversationId types.String `tfsdk:"-"` - // The ID associated with the Genie space where the conversation is started. - SpaceId types.String `tfsdk:"-"` +type GenieConversationSummary_SdkV2 struct { + ConversationId types.String `tfsdk:"conversation_id"` + + CreatedTimestamp types.Int64 `tfsdk:"created_timestamp"` + + Title types.String `tfsdk:"title"` } -func (newState *GenieCreateConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieCreateConversationMessageRequest_SdkV2) { +func (newState *GenieConversationSummary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieConversationSummary_SdkV2) { } -func (newState *GenieCreateConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieCreateConversationMessageRequest_SdkV2) { +func (newState *GenieConversationSummary_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieConversationSummary_SdkV2) { } -func (c GenieCreateConversationMessageRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["content"] = attrs["content"].SetRequired() +func (c GenieConversationSummary_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["conversation_id"] = attrs["conversation_id"].SetRequired() - attrs["space_id"] = attrs["space_id"].SetRequired() + attrs["created_timestamp"] = attrs["created_timestamp"].SetRequired() + attrs["title"] = attrs["title"].SetRequired() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieCreateConversationMessageRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieConversationSummary. // Container types (types.Map, types.List, types.Set) and 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 GenieCreateConversationMessageRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieConversationSummary_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, GenieCreateConversationMessageRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieConversationSummary_SdkV2 // only implements ToObjectValue() and Type(). -func (o GenieCreateConversationMessageRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieConversationSummary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "content": o.Content, - "conversation_id": o.ConversationId, - "space_id": o.SpaceId, + "conversation_id": o.ConversationId, + "created_timestamp": o.CreatedTimestamp, + "title": o.Title, }) } // Type implements basetypes.ObjectValuable. -func (o GenieCreateConversationMessageRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o GenieConversationSummary_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "content": types.StringType, - "conversation_id": types.StringType, - "space_id": types.StringType, + "conversation_id": types.StringType, + "created_timestamp": types.Int64Type, + "title": types.StringType, }, } } -type GenieExecuteMessageAttachmentQueryRequest_SdkV2 struct { - // Attachment ID - AttachmentId types.String `tfsdk:"-"` - // Conversation ID +type GenieCreateConversationMessageRequest_SdkV2 struct { + // User message content. + Content types.String `tfsdk:"content"` + // The ID associated with the conversation. ConversationId types.String `tfsdk:"-"` - // Message ID - MessageId types.String `tfsdk:"-"` - // Genie space ID + // The ID associated with the Genie space where the conversation is started. SpaceId types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieExecuteMessageAttachmentQueryRequest. +// 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 // 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 GenieExecuteMessageAttachmentQueryRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieCreateConversationMessageRequest_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, GenieExecuteMessageAttachmentQueryRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieCreateConversationMessageRequest_SdkV2 // only implements ToObjectValue() and Type(). -func (o GenieExecuteMessageAttachmentQueryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieCreateConversationMessageRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "attachment_id": o.AttachmentId, + "content": o.Content, "conversation_id": o.ConversationId, - "message_id": o.MessageId, "space_id": o.SpaceId, }) } // Type implements basetypes.ObjectValuable. -func (o GenieExecuteMessageAttachmentQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o GenieCreateConversationMessageRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "attachment_id": types.StringType, + "content": types.StringType, "conversation_id": types.StringType, - "message_id": types.StringType, "space_id": types.StringType, }, } } -type GenieExecuteMessageQueryRequest_SdkV2 struct { - // Conversation ID +type GenieDeleteConversationRequest_SdkV2 struct { + // The ID of the conversation to delete. ConversationId types.String `tfsdk:"-"` - // Message ID - MessageId types.String `tfsdk:"-"` - // Genie space ID + // The ID associated with the Genie space where the conversation is located. SpaceId types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieExecuteMessageQueryRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieDeleteConversationRequest. // Container types (types.Map, types.List, types.Set) and 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 GenieExecuteMessageQueryRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieDeleteConversationRequest_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, GenieExecuteMessageQueryRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieDeleteConversationRequest_SdkV2 // only implements ToObjectValue() and Type(). -func (o GenieExecuteMessageQueryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieDeleteConversationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ "conversation_id": o.ConversationId, - "message_id": o.MessageId, "space_id": o.SpaceId, }) } // Type implements basetypes.ObjectValuable. -func (o GenieExecuteMessageQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o GenieDeleteConversationRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "conversation_id": types.StringType, - "message_id": types.StringType, "space_id": types.StringType, }, } } -type GenieGenerateDownloadFullQueryResultRequest_SdkV2 struct { +type GenieExecuteMessageAttachmentQueryRequest_SdkV2 struct { // Attachment ID AttachmentId types.String `tfsdk:"-"` // Conversation ID @@ -1060,21 +991,21 @@ type GenieGenerateDownloadFullQueryResultRequest_SdkV2 struct { SpaceId types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGenerateDownloadFullQueryResultRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieExecuteMessageAttachmentQueryRequest. // Container types (types.Map, types.List, types.Set) and 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 GenieGenerateDownloadFullQueryResultRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieExecuteMessageAttachmentQueryRequest_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, GenieGenerateDownloadFullQueryResultRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieExecuteMessageAttachmentQueryRequest_SdkV2 // only implements ToObjectValue() and Type(). -func (o GenieGenerateDownloadFullQueryResultRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieExecuteMessageAttachmentQueryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ @@ -1086,7 +1017,7 @@ func (o GenieGenerateDownloadFullQueryResultRequest_SdkV2) ToObjectValue(ctx con } // Type implements basetypes.ObjectValuable. -func (o GenieGenerateDownloadFullQueryResultRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o GenieExecuteMessageAttachmentQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "attachment_id": types.StringType, @@ -1097,51 +1028,46 @@ func (o GenieGenerateDownloadFullQueryResultRequest_SdkV2) Type(ctx context.Cont } } -type GenieGenerateDownloadFullQueryResultResponse_SdkV2 struct { - // Download ID. Use this ID to track the download request in subsequent - // polling calls - DownloadId types.String `tfsdk:"download_id"` -} - -func (newState *GenieGenerateDownloadFullQueryResultResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGenerateDownloadFullQueryResultResponse_SdkV2) { -} - -func (newState *GenieGenerateDownloadFullQueryResultResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieGenerateDownloadFullQueryResultResponse_SdkV2) { -} - -func (c GenieGenerateDownloadFullQueryResultResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["download_id"] = attrs["download_id"].SetOptional() - - return attrs +type GenieExecuteMessageQueryRequest_SdkV2 struct { + // Conversation ID + ConversationId types.String `tfsdk:"-"` + // Message ID + MessageId types.String `tfsdk:"-"` + // Genie space ID + SpaceId types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGenerateDownloadFullQueryResultResponse. +// 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 // 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 GenieGenerateDownloadFullQueryResultResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieExecuteMessageQueryRequest_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, GenieGenerateDownloadFullQueryResultResponse_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieExecuteMessageQueryRequest_SdkV2 // only implements ToObjectValue() and Type(). -func (o GenieGenerateDownloadFullQueryResultResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieExecuteMessageQueryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "download_id": o.DownloadId, + "conversation_id": o.ConversationId, + "message_id": o.MessageId, + "space_id": o.SpaceId, }) } // Type implements basetypes.ObjectValuable. -func (o GenieGenerateDownloadFullQueryResultResponse_SdkV2) Type(ctx context.Context) attr.Type { +func (o GenieExecuteMessageQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "download_id": types.StringType, + "conversation_id": types.StringType, + "message_id": types.StringType, + "space_id": types.StringType, }, } } @@ -1192,139 +1118,6 @@ func (o GenieGetConversationMessageRequest_SdkV2) Type(ctx context.Context) attr } } -type GenieGetDownloadFullQueryResultRequest_SdkV2 struct { - // Attachment ID - AttachmentId types.String `tfsdk:"-"` - // Conversation ID - ConversationId types.String `tfsdk:"-"` - // Download ID. This ID is provided by the [Generate Download - // endpoint](:method:genie/generateDownloadFullQueryResult) - DownloadId types.String `tfsdk:"-"` - // Message ID - MessageId types.String `tfsdk:"-"` - // Genie space ID - SpaceId types.String `tfsdk:"-"` -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetDownloadFullQueryResultRequest. -// Container types (types.Map, types.List, types.Set) and 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 GenieGetDownloadFullQueryResultRequest_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, GenieGetDownloadFullQueryResultRequest_SdkV2 -// only implements ToObjectValue() and Type(). -func (o GenieGetDownloadFullQueryResultRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{ - "attachment_id": o.AttachmentId, - "conversation_id": o.ConversationId, - "download_id": o.DownloadId, - "message_id": o.MessageId, - "space_id": o.SpaceId, - }) -} - -// Type implements basetypes.ObjectValuable. -func (o GenieGetDownloadFullQueryResultRequest_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "attachment_id": types.StringType, - "conversation_id": types.StringType, - "download_id": types.StringType, - "message_id": types.StringType, - "space_id": types.StringType, - }, - } -} - -type GenieGetDownloadFullQueryResultResponse_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"` -} - -func (newState *GenieGetDownloadFullQueryResultResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetDownloadFullQueryResultResponse_SdkV2) { -} - -func (newState *GenieGetDownloadFullQueryResultResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieGetDownloadFullQueryResultResponse_SdkV2) { -} - -func (c GenieGetDownloadFullQueryResultResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["statement_response"] = attrs["statement_response"].SetOptional() - attrs["statement_response"] = attrs["statement_response"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetDownloadFullQueryResultResponse. -// Container types (types.Map, types.List, types.Set) and 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 GenieGetDownloadFullQueryResultResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "statement_response": reflect.TypeOf(sql_tf.StatementResponse_SdkV2{}), - } -} - -// 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, GenieGetDownloadFullQueryResultResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o GenieGetDownloadFullQueryResultResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{ - "statement_response": o.StatementResponse, - }) -} - -// Type implements basetypes.ObjectValuable. -func (o GenieGetDownloadFullQueryResultResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "statement_response": basetypes.ListType{ - ElemType: sql_tf.StatementResponse_SdkV2{}.Type(ctx), - }, - }, - } -} - -// GetStatementResponse returns the value of the StatementResponse field in GenieGetDownloadFullQueryResultResponse_SdkV2 as -// a sql_tf.StatementResponse_SdkV2 value. -// If the field is unknown or null, the boolean return value is false. -func (o *GenieGetDownloadFullQueryResultResponse_SdkV2) GetStatementResponse(ctx context.Context) (sql_tf.StatementResponse_SdkV2, bool) { - var e sql_tf.StatementResponse_SdkV2 - if o.StatementResponse.IsNull() || o.StatementResponse.IsUnknown() { - return e, false - } - var v []sql_tf.StatementResponse_SdkV2 - d := o.StatementResponse.ElementsAs(ctx, &v, true) - if d.HasError() { - panic(pluginfwcommon.DiagToString(d)) - } - if len(v) == 0 { - return e, false - } - return v[0], true -} - -// SetStatementResponse sets the value of the StatementResponse field in GenieGetDownloadFullQueryResultResponse_SdkV2. -func (o *GenieGetDownloadFullQueryResultResponse_SdkV2) SetStatementResponse(ctx context.Context, v sql_tf.StatementResponse_SdkV2) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["statement_response"] - o.StatementResponse = types.ListValueMust(t, vs) -} - type GenieGetMessageAttachmentQueryResultRequest_SdkV2 struct { // Attachment ID AttachmentId types.String `tfsdk:"-"` @@ -1581,6 +1374,133 @@ func (o GenieGetSpaceRequest_SdkV2) Type(ctx context.Context) attr.Type { } } +type GenieListConversationsRequest_SdkV2 struct { + // Maximum number of conversations to return per page + PageSize types.Int64 `tfsdk:"-"` + // Token to get the next page of results + PageToken types.String `tfsdk:"-"` + // The ID of the Genie space to retrieve conversations from. + SpaceId types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieListConversationsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GenieListConversationsRequest_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, GenieListConversationsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieListConversationsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + "space_id": o.SpaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieListConversationsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + "space_id": types.StringType, + }, + } +} + +type GenieListConversationsResponse_SdkV2 struct { + // List of conversations in the Genie space + Conversations types.List `tfsdk:"conversations"` + // Token to get the next page of results + NextPageToken types.String `tfsdk:"next_page_token"` +} + +func (newState *GenieListConversationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieListConversationsResponse_SdkV2) { +} + +func (newState *GenieListConversationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieListConversationsResponse_SdkV2) { +} + +func (c GenieListConversationsResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["conversations"] = attrs["conversations"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieListConversationsResponse. +// Container types (types.Map, types.List, types.Set) and 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 GenieListConversationsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "conversations": reflect.TypeOf(GenieConversationSummary_SdkV2{}), + } +} + +// 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, GenieListConversationsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieListConversationsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "conversations": o.Conversations, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieListConversationsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "conversations": basetypes.ListType{ + ElemType: GenieConversationSummary_SdkV2{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetConversations returns the value of the Conversations field in GenieListConversationsResponse_SdkV2 as +// a slice of GenieConversationSummary_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieListConversationsResponse_SdkV2) GetConversations(ctx context.Context) ([]GenieConversationSummary_SdkV2, bool) { + if o.Conversations.IsNull() || o.Conversations.IsUnknown() { + return nil, false + } + var v []GenieConversationSummary_SdkV2 + d := o.Conversations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetConversations sets the value of the Conversations field in GenieListConversationsResponse_SdkV2. +func (o *GenieListConversationsResponse_SdkV2) SetConversations(ctx context.Context, v []GenieConversationSummary_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["conversations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Conversations = types.ListValueMust(t, vs) +} + type GenieListSpacesRequest_SdkV2 struct { // Maximum number of spaces to return per page PageSize types.Int64 `tfsdk:"-"` @@ -1727,23 +1647,7 @@ type GenieMessage_SdkV2 struct { QueryResult types.List `tfsdk:"query_result"` // Genie space ID SpaceId types.String `tfsdk:"space_id"` - // MessageStatus. The possible values are: * `FETCHING_METADATA`: Fetching - // metadata from the data sources. * `FILTERING_CONTEXT`: Running smart - // context step to determine relevant context. * `ASKING_AI`: Waiting for - // the LLM to respond to the user's question. * `PENDING_WAREHOUSE`: Waiting - // for warehouse before the SQL query can start executing. * - // `EXECUTING_QUERY`: Executing a generated SQL query. Get the SQL query - // result by calling - // [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) - // API. * `FAILED`: The response generation or query execution failed. See - // `error` field. * `COMPLETED`: Message processing is completed. Results - // are in the `attachments` field. Get the SQL query result by calling - // [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) - // API. * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: - // SQL result is not available anymore. The user needs to rerun the query. - // Rerun the SQL query result by calling - // [executeMessageAttachmentQuery](:method:genie/executeMessageAttachmentQuery) - // API. * `CANCELLED`: Message has been cancelled. + Status types.String `tfsdk:"status"` // ID of the user who created the message UserId types.Int64 `tfsdk:"user_id"` @@ -2145,19 +2049,6 @@ type GenieStartConversationMessageRequest_SdkV2 struct { SpaceId types.String `tfsdk:"-"` } -func (newState *GenieStartConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieStartConversationMessageRequest_SdkV2) { -} - -func (newState *GenieStartConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieStartConversationMessageRequest_SdkV2) { -} - -func (c GenieStartConversationMessageRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["content"] = attrs["content"].SetRequired() - attrs["space_id"] = attrs["space_id"].SetRequired() - - return attrs -} - // 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 @@ -2314,6 +2205,42 @@ func (o *GenieStartConversationResponse_SdkV2) SetMessage(ctx context.Context, v o.Message = types.ListValueMust(t, vs) } +type GenieTrashSpaceRequest_SdkV2 struct { + // The ID associated with the Genie space to be sent to the trash. + SpaceId types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieTrashSpaceRequest. +// Container types (types.Map, types.List, types.Set) and 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 GenieTrashSpaceRequest_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, GenieTrashSpaceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieTrashSpaceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "space_id": o.SpaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieTrashSpaceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "space_id": types.StringType, + }, + } +} + type GetDashboardRequest_SdkV2 struct { // UUID identifying the dashboard. DashboardId types.String `tfsdk:"-"` @@ -3069,21 +2996,6 @@ type MigrateDashboardRequest_SdkV2 struct { UpdateParameterSyntax types.Bool `tfsdk:"update_parameter_syntax"` } -func (newState *MigrateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigrateDashboardRequest_SdkV2) { -} - -func (newState *MigrateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState MigrateDashboardRequest_SdkV2) { -} - -func (c MigrateDashboardRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["display_name"] = attrs["display_name"].SetOptional() - attrs["parent_path"] = attrs["parent_path"].SetOptional() - attrs["source_dashboard_id"] = attrs["source_dashboard_id"].SetRequired() - attrs["update_parameter_syntax"] = attrs["update_parameter_syntax"].SetOptional() - - return attrs -} - // 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 @@ -3133,20 +3045,6 @@ type PublishRequest_SdkV2 struct { WarehouseId types.String `tfsdk:"warehouse_id"` } -func (newState *PublishRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishRequest_SdkV2) { -} - -func (newState *PublishRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublishRequest_SdkV2) { -} - -func (c PublishRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_id"] = attrs["dashboard_id"].SetRequired() - attrs["embed_credentials"] = attrs["embed_credentials"].SetOptional() - attrs["warehouse_id"] = attrs["warehouse_id"].SetOptional() - - return attrs -} - // 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 @@ -4037,7 +3935,7 @@ func (o *UpdateDashboardRequest_SdkV2) SetDashboard(ctx context.Context, v Dashb type UpdateScheduleRequest_SdkV2 struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - + // The schedule to update. Schedule types.List `tfsdk:"schedule"` // UUID identifying the schedule. ScheduleId types.String `tfsdk:"-"` diff --git a/internal/service/dashboards_tf/model.go b/internal/service/dashboards_tf/model.go index 5cd683ca9b..0e0a70f5fd 100755 --- a/internal/service/dashboards_tf/model.go +++ b/internal/service/dashboards_tf/model.go @@ -239,7 +239,7 @@ func (o *CreateDashboardRequest) SetDashboard(ctx context.Context, v Dashboard) type CreateScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - + // The schedule to create. A dashboard is limited to 10 schedules. Schedule types.Object `tfsdk:"schedule"` } @@ -311,7 +311,7 @@ type CreateSubscriptionRequest struct { DashboardId types.String `tfsdk:"-"` // UUID identifying the schedule to which the subscription belongs. ScheduleId types.String `tfsdk:"-"` - + // The subscription to create. A schedule is limited to 100 subscriptions. Subscription types.Object `tfsdk:"subscription"` } @@ -591,36 +591,6 @@ func (o DeleteScheduleRequest) Type(ctx context.Context) attr.Type { } } -type DeleteScheduleResponse struct { -} - -// 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 -// 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 DeleteScheduleResponse) 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, DeleteScheduleResponse -// only implements ToObjectValue() and Type(). -func (o DeleteScheduleResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteScheduleResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteSubscriptionRequest struct { // UUID identifying the dashboard which the subscription belongs. DashboardId types.String `tfsdk:"-"` @@ -670,36 +640,6 @@ func (o DeleteSubscriptionRequest) Type(ctx context.Context) attr.Type { } } -type DeleteSubscriptionResponse struct { -} - -// 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 -// 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 DeleteSubscriptionResponse) 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, DeleteSubscriptionResponse -// only implements ToObjectValue() and Type(). -func (o DeleteSubscriptionResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteSubscriptionResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - // Genie AI Response type GenieAttachment struct { // Attachment ID @@ -896,157 +836,148 @@ func (o GenieConversation) Type(ctx context.Context) attr.Type { } } -type GenieCreateConversationMessageRequest struct { - // User message content. - Content types.String `tfsdk:"content"` - // The ID associated with the conversation. - ConversationId types.String `tfsdk:"-"` - // The ID associated with the Genie space where the conversation is started. - SpaceId types.String `tfsdk:"-"` +type GenieConversationSummary struct { + ConversationId types.String `tfsdk:"conversation_id"` + + CreatedTimestamp types.Int64 `tfsdk:"created_timestamp"` + + Title types.String `tfsdk:"title"` } -func (newState *GenieCreateConversationMessageRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieCreateConversationMessageRequest) { +func (newState *GenieConversationSummary) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieConversationSummary) { } -func (newState *GenieCreateConversationMessageRequest) SyncEffectiveFieldsDuringRead(existingState GenieCreateConversationMessageRequest) { +func (newState *GenieConversationSummary) SyncEffectiveFieldsDuringRead(existingState GenieConversationSummary) { } -func (c GenieCreateConversationMessageRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["content"] = attrs["content"].SetRequired() +func (c GenieConversationSummary) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["conversation_id"] = attrs["conversation_id"].SetRequired() - attrs["space_id"] = attrs["space_id"].SetRequired() + attrs["created_timestamp"] = attrs["created_timestamp"].SetRequired() + attrs["title"] = attrs["title"].SetRequired() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieCreateConversationMessageRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieConversationSummary. // Container types (types.Map, types.List, types.Set) and 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 GenieCreateConversationMessageRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieConversationSummary) 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, GenieCreateConversationMessageRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieConversationSummary // only implements ToObjectValue() and Type(). -func (o GenieCreateConversationMessageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieConversationSummary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "content": o.Content, - "conversation_id": o.ConversationId, - "space_id": o.SpaceId, + "conversation_id": o.ConversationId, + "created_timestamp": o.CreatedTimestamp, + "title": o.Title, }) } // Type implements basetypes.ObjectValuable. -func (o GenieCreateConversationMessageRequest) Type(ctx context.Context) attr.Type { +func (o GenieConversationSummary) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "content": types.StringType, - "conversation_id": types.StringType, - "space_id": types.StringType, + "conversation_id": types.StringType, + "created_timestamp": types.Int64Type, + "title": types.StringType, }, } } -type GenieExecuteMessageAttachmentQueryRequest struct { - // Attachment ID - AttachmentId types.String `tfsdk:"-"` - // Conversation ID +type GenieCreateConversationMessageRequest struct { + // User message content. + Content types.String `tfsdk:"content"` + // The ID associated with the conversation. ConversationId types.String `tfsdk:"-"` - // Message ID - MessageId types.String `tfsdk:"-"` - // Genie space ID + // The ID associated with the Genie space where the conversation is started. SpaceId types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieExecuteMessageAttachmentQueryRequest. +// 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 // 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 GenieExecuteMessageAttachmentQueryRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieCreateConversationMessageRequest) 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, GenieExecuteMessageAttachmentQueryRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieCreateConversationMessageRequest // only implements ToObjectValue() and Type(). -func (o GenieExecuteMessageAttachmentQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieCreateConversationMessageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "attachment_id": o.AttachmentId, + "content": o.Content, "conversation_id": o.ConversationId, - "message_id": o.MessageId, "space_id": o.SpaceId, }) } // Type implements basetypes.ObjectValuable. -func (o GenieExecuteMessageAttachmentQueryRequest) Type(ctx context.Context) attr.Type { +func (o GenieCreateConversationMessageRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "attachment_id": types.StringType, + "content": types.StringType, "conversation_id": types.StringType, - "message_id": types.StringType, "space_id": types.StringType, }, } } -type GenieExecuteMessageQueryRequest struct { - // Conversation ID +type GenieDeleteConversationRequest struct { + // The ID of the conversation to delete. ConversationId types.String `tfsdk:"-"` - // Message ID - MessageId types.String `tfsdk:"-"` - // Genie space ID + // The ID associated with the Genie space where the conversation is located. SpaceId types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieExecuteMessageQueryRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieDeleteConversationRequest. // Container types (types.Map, types.List, types.Set) and 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 GenieExecuteMessageQueryRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieDeleteConversationRequest) 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, GenieExecuteMessageQueryRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieDeleteConversationRequest // only implements ToObjectValue() and Type(). -func (o GenieExecuteMessageQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieDeleteConversationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ "conversation_id": o.ConversationId, - "message_id": o.MessageId, "space_id": o.SpaceId, }) } // Type implements basetypes.ObjectValuable. -func (o GenieExecuteMessageQueryRequest) Type(ctx context.Context) attr.Type { +func (o GenieDeleteConversationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "conversation_id": types.StringType, - "message_id": types.StringType, "space_id": types.StringType, }, } } -type GenieGenerateDownloadFullQueryResultRequest struct { +type GenieExecuteMessageAttachmentQueryRequest struct { // Attachment ID AttachmentId types.String `tfsdk:"-"` // Conversation ID @@ -1057,21 +988,21 @@ type GenieGenerateDownloadFullQueryResultRequest struct { SpaceId types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGenerateDownloadFullQueryResultRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieExecuteMessageAttachmentQueryRequest. // Container types (types.Map, types.List, types.Set) and 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 GenieGenerateDownloadFullQueryResultRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieExecuteMessageAttachmentQueryRequest) 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, GenieGenerateDownloadFullQueryResultRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieExecuteMessageAttachmentQueryRequest // only implements ToObjectValue() and Type(). -func (o GenieGenerateDownloadFullQueryResultRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieExecuteMessageAttachmentQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ @@ -1083,7 +1014,7 @@ func (o GenieGenerateDownloadFullQueryResultRequest) ToObjectValue(ctx context.C } // Type implements basetypes.ObjectValuable. -func (o GenieGenerateDownloadFullQueryResultRequest) Type(ctx context.Context) attr.Type { +func (o GenieExecuteMessageAttachmentQueryRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "attachment_id": types.StringType, @@ -1094,51 +1025,46 @@ func (o GenieGenerateDownloadFullQueryResultRequest) Type(ctx context.Context) a } } -type GenieGenerateDownloadFullQueryResultResponse struct { - // Download ID. Use this ID to track the download request in subsequent - // polling calls - DownloadId types.String `tfsdk:"download_id"` -} - -func (newState *GenieGenerateDownloadFullQueryResultResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGenerateDownloadFullQueryResultResponse) { -} - -func (newState *GenieGenerateDownloadFullQueryResultResponse) SyncEffectiveFieldsDuringRead(existingState GenieGenerateDownloadFullQueryResultResponse) { -} - -func (c GenieGenerateDownloadFullQueryResultResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["download_id"] = attrs["download_id"].SetOptional() - - return attrs +type GenieExecuteMessageQueryRequest struct { + // Conversation ID + ConversationId types.String `tfsdk:"-"` + // Message ID + MessageId types.String `tfsdk:"-"` + // Genie space ID + SpaceId types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGenerateDownloadFullQueryResultResponse. +// 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 // 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 GenieGenerateDownloadFullQueryResultResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GenieExecuteMessageQueryRequest) 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, GenieGenerateDownloadFullQueryResultResponse +// interfere with how the plugin framework retrieves and sets values in state. Thus, GenieExecuteMessageQueryRequest // only implements ToObjectValue() and Type(). -func (o GenieGenerateDownloadFullQueryResultResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GenieExecuteMessageQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "download_id": o.DownloadId, + "conversation_id": o.ConversationId, + "message_id": o.MessageId, + "space_id": o.SpaceId, }) } // Type implements basetypes.ObjectValuable. -func (o GenieGenerateDownloadFullQueryResultResponse) Type(ctx context.Context) attr.Type { +func (o GenieExecuteMessageQueryRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "download_id": types.StringType, + "conversation_id": types.StringType, + "message_id": types.StringType, + "space_id": types.StringType, }, } } @@ -1189,138 +1115,6 @@ func (o GenieGetConversationMessageRequest) Type(ctx context.Context) attr.Type } } -type GenieGetDownloadFullQueryResultRequest struct { - // Attachment ID - AttachmentId types.String `tfsdk:"-"` - // Conversation ID - ConversationId types.String `tfsdk:"-"` - // Download ID. This ID is provided by the [Generate Download - // endpoint](:method:genie/generateDownloadFullQueryResult) - DownloadId types.String `tfsdk:"-"` - // Message ID - MessageId types.String `tfsdk:"-"` - // Genie space ID - SpaceId types.String `tfsdk:"-"` -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetDownloadFullQueryResultRequest. -// Container types (types.Map, types.List, types.Set) and 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 GenieGetDownloadFullQueryResultRequest) 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, GenieGetDownloadFullQueryResultRequest -// only implements ToObjectValue() and Type(). -func (o GenieGetDownloadFullQueryResultRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{ - "attachment_id": o.AttachmentId, - "conversation_id": o.ConversationId, - "download_id": o.DownloadId, - "message_id": o.MessageId, - "space_id": o.SpaceId, - }) -} - -// Type implements basetypes.ObjectValuable. -func (o GenieGetDownloadFullQueryResultRequest) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "attachment_id": types.StringType, - "conversation_id": types.StringType, - "download_id": types.StringType, - "message_id": types.StringType, - "space_id": types.StringType, - }, - } -} - -type GenieGetDownloadFullQueryResultResponse 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"` -} - -func (newState *GenieGetDownloadFullQueryResultResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetDownloadFullQueryResultResponse) { -} - -func (newState *GenieGetDownloadFullQueryResultResponse) SyncEffectiveFieldsDuringRead(existingState GenieGetDownloadFullQueryResultResponse) { -} - -func (c GenieGetDownloadFullQueryResultResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["statement_response"] = attrs["statement_response"].SetOptional() - - return attrs -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetDownloadFullQueryResultResponse. -// Container types (types.Map, types.List, types.Set) and 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 GenieGetDownloadFullQueryResultResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "statement_response": reflect.TypeOf(sql_tf.StatementResponse{}), - } -} - -// 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, GenieGetDownloadFullQueryResultResponse -// only implements ToObjectValue() and Type(). -func (o GenieGetDownloadFullQueryResultResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{ - "statement_response": o.StatementResponse, - }) -} - -// Type implements basetypes.ObjectValuable. -func (o GenieGetDownloadFullQueryResultResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "statement_response": sql_tf.StatementResponse{}.Type(ctx), - }, - } -} - -// GetStatementResponse returns the value of the StatementResponse field in GenieGetDownloadFullQueryResultResponse as -// a sql_tf.StatementResponse value. -// If the field is unknown or null, the boolean return value is false. -func (o *GenieGetDownloadFullQueryResultResponse) GetStatementResponse(ctx context.Context) (sql_tf.StatementResponse, bool) { - var e sql_tf.StatementResponse - if o.StatementResponse.IsNull() || o.StatementResponse.IsUnknown() { - return e, false - } - var v []sql_tf.StatementResponse - d := o.StatementResponse.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 -} - -// SetStatementResponse sets the value of the StatementResponse field in GenieGetDownloadFullQueryResultResponse. -func (o *GenieGetDownloadFullQueryResultResponse) SetStatementResponse(ctx context.Context, v sql_tf.StatementResponse) { - vs := v.ToObjectValue(ctx) - o.StatementResponse = vs -} - type GenieGetMessageAttachmentQueryResultRequest struct { // Attachment ID AttachmentId types.String `tfsdk:"-"` @@ -1576,6 +1370,133 @@ func (o GenieGetSpaceRequest) Type(ctx context.Context) attr.Type { } } +type GenieListConversationsRequest struct { + // Maximum number of conversations to return per page + PageSize types.Int64 `tfsdk:"-"` + // Token to get the next page of results + PageToken types.String `tfsdk:"-"` + // The ID of the Genie space to retrieve conversations from. + SpaceId types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieListConversationsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GenieListConversationsRequest) 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, GenieListConversationsRequest +// only implements ToObjectValue() and Type(). +func (o GenieListConversationsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + "space_id": o.SpaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieListConversationsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + "space_id": types.StringType, + }, + } +} + +type GenieListConversationsResponse struct { + // List of conversations in the Genie space + Conversations types.List `tfsdk:"conversations"` + // Token to get the next page of results + NextPageToken types.String `tfsdk:"next_page_token"` +} + +func (newState *GenieListConversationsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieListConversationsResponse) { +} + +func (newState *GenieListConversationsResponse) SyncEffectiveFieldsDuringRead(existingState GenieListConversationsResponse) { +} + +func (c GenieListConversationsResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["conversations"] = attrs["conversations"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieListConversationsResponse. +// Container types (types.Map, types.List, types.Set) and 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 GenieListConversationsResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "conversations": reflect.TypeOf(GenieConversationSummary{}), + } +} + +// 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, GenieListConversationsResponse +// only implements ToObjectValue() and Type(). +func (o GenieListConversationsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "conversations": o.Conversations, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieListConversationsResponse) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "conversations": basetypes.ListType{ + ElemType: GenieConversationSummary{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetConversations returns the value of the Conversations field in GenieListConversationsResponse as +// a slice of GenieConversationSummary values. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieListConversationsResponse) GetConversations(ctx context.Context) ([]GenieConversationSummary, bool) { + if o.Conversations.IsNull() || o.Conversations.IsUnknown() { + return nil, false + } + var v []GenieConversationSummary + d := o.Conversations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetConversations sets the value of the Conversations field in GenieListConversationsResponse. +func (o *GenieListConversationsResponse) SetConversations(ctx context.Context, v []GenieConversationSummary) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["conversations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Conversations = types.ListValueMust(t, vs) +} + type GenieListSpacesRequest struct { // Maximum number of spaces to return per page PageSize types.Int64 `tfsdk:"-"` @@ -1722,23 +1643,7 @@ type GenieMessage struct { QueryResult types.Object `tfsdk:"query_result"` // Genie space ID SpaceId types.String `tfsdk:"space_id"` - // MessageStatus. The possible values are: * `FETCHING_METADATA`: Fetching - // metadata from the data sources. * `FILTERING_CONTEXT`: Running smart - // context step to determine relevant context. * `ASKING_AI`: Waiting for - // the LLM to respond to the user's question. * `PENDING_WAREHOUSE`: Waiting - // for warehouse before the SQL query can start executing. * - // `EXECUTING_QUERY`: Executing a generated SQL query. Get the SQL query - // result by calling - // [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) - // API. * `FAILED`: The response generation or query execution failed. See - // `error` field. * `COMPLETED`: Message processing is completed. Results - // are in the `attachments` field. Get the SQL query result by calling - // [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) - // API. * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: - // SQL result is not available anymore. The user needs to rerun the query. - // Rerun the SQL query result by calling - // [executeMessageAttachmentQuery](:method:genie/executeMessageAttachmentQuery) - // API. * `CANCELLED`: Message has been cancelled. + Status types.String `tfsdk:"status"` // ID of the user who created the message UserId types.Int64 `tfsdk:"user_id"` @@ -2137,19 +2042,6 @@ type GenieStartConversationMessageRequest struct { SpaceId types.String `tfsdk:"-"` } -func (newState *GenieStartConversationMessageRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieStartConversationMessageRequest) { -} - -func (newState *GenieStartConversationMessageRequest) SyncEffectiveFieldsDuringRead(existingState GenieStartConversationMessageRequest) { -} - -func (c GenieStartConversationMessageRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["content"] = attrs["content"].SetRequired() - attrs["space_id"] = attrs["space_id"].SetRequired() - - return attrs -} - // 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 @@ -2304,6 +2196,42 @@ func (o *GenieStartConversationResponse) SetMessage(ctx context.Context, v Genie o.Message = vs } +type GenieTrashSpaceRequest struct { + // The ID associated with the Genie space to be sent to the trash. + SpaceId types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieTrashSpaceRequest. +// Container types (types.Map, types.List, types.Set) and 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 GenieTrashSpaceRequest) 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, GenieTrashSpaceRequest +// only implements ToObjectValue() and Type(). +func (o GenieTrashSpaceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "space_id": o.SpaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieTrashSpaceRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "space_id": types.StringType, + }, + } +} + type GetDashboardRequest struct { // UUID identifying the dashboard. DashboardId types.String `tfsdk:"-"` @@ -3059,21 +2987,6 @@ type MigrateDashboardRequest struct { UpdateParameterSyntax types.Bool `tfsdk:"update_parameter_syntax"` } -func (newState *MigrateDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigrateDashboardRequest) { -} - -func (newState *MigrateDashboardRequest) SyncEffectiveFieldsDuringRead(existingState MigrateDashboardRequest) { -} - -func (c MigrateDashboardRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["display_name"] = attrs["display_name"].SetOptional() - attrs["parent_path"] = attrs["parent_path"].SetOptional() - attrs["source_dashboard_id"] = attrs["source_dashboard_id"].SetRequired() - attrs["update_parameter_syntax"] = attrs["update_parameter_syntax"].SetOptional() - - return attrs -} - // 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 @@ -3123,20 +3036,6 @@ type PublishRequest struct { WarehouseId types.String `tfsdk:"warehouse_id"` } -func (newState *PublishRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishRequest) { -} - -func (newState *PublishRequest) SyncEffectiveFieldsDuringRead(existingState PublishRequest) { -} - -func (c PublishRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_id"] = attrs["dashboard_id"].SetRequired() - attrs["embed_credentials"] = attrs["embed_credentials"].SetOptional() - attrs["warehouse_id"] = attrs["warehouse_id"].SetOptional() - - return attrs -} - // 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 @@ -4023,7 +3922,7 @@ func (o *UpdateDashboardRequest) SetDashboard(ctx context.Context, v Dashboard) type UpdateScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - + // The schedule to update. Schedule types.Object `tfsdk:"schedule"` // UUID identifying the schedule. ScheduleId types.String `tfsdk:"-"` diff --git a/internal/service/database_tf/legacy_model.go b/internal/service/database_tf/legacy_model.go index 4d52480f2e..8ad13acff3 100755 --- a/internal/service/database_tf/legacy_model.go +++ b/internal/service/database_tf/legacy_model.go @@ -89,8 +89,7 @@ func (o *CreateDatabaseCatalogRequest_SdkV2) SetCatalog(ctx context.Context, v D } type CreateDatabaseInstanceRequest_SdkV2 struct { - // A DatabaseInstance represents a logical Postgres instance, comprised of - // both compute and storage. + // Instance to create. DatabaseInstance types.List `tfsdk:"database_instance"` } @@ -155,8 +154,76 @@ func (o *CreateDatabaseInstanceRequest_SdkV2) SetDatabaseInstance(ctx context.Co o.DatabaseInstance = types.ListValueMust(t, vs) } +type CreateDatabaseInstanceRoleRequest_SdkV2 struct { + DatabaseInstanceRole types.List `tfsdk:"database_instance_role"` + + InstanceName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDatabaseInstanceRoleRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateDatabaseInstanceRoleRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "database_instance_role": reflect.TypeOf(DatabaseInstanceRole_SdkV2{}), + } +} + +// 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, CreateDatabaseInstanceRoleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateDatabaseInstanceRoleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "database_instance_role": o.DatabaseInstanceRole, + "instance_name": o.InstanceName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateDatabaseInstanceRoleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "database_instance_role": basetypes.ListType{ + ElemType: DatabaseInstanceRole_SdkV2{}.Type(ctx), + }, + "instance_name": types.StringType, + }, + } +} + +// GetDatabaseInstanceRole returns the value of the DatabaseInstanceRole field in CreateDatabaseInstanceRoleRequest_SdkV2 as +// a DatabaseInstanceRole_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateDatabaseInstanceRoleRequest_SdkV2) GetDatabaseInstanceRole(ctx context.Context) (DatabaseInstanceRole_SdkV2, bool) { + var e DatabaseInstanceRole_SdkV2 + if o.DatabaseInstanceRole.IsNull() || o.DatabaseInstanceRole.IsUnknown() { + return e, false + } + var v []DatabaseInstanceRole_SdkV2 + d := o.DatabaseInstanceRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDatabaseInstanceRole sets the value of the DatabaseInstanceRole field in CreateDatabaseInstanceRoleRequest_SdkV2. +func (o *CreateDatabaseInstanceRoleRequest_SdkV2) SetDatabaseInstanceRole(ctx context.Context, v DatabaseInstanceRole_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["database_instance_role"] + o.DatabaseInstanceRole = types.ListValueMust(t, vs) +} + type CreateDatabaseTableRequest_SdkV2 struct { - // Next field marker: 13 Table types.List `tfsdk:"table"` } @@ -222,7 +289,6 @@ func (o *CreateDatabaseTableRequest_SdkV2) SetTable(ctx context.Context, v Datab } type CreateSyncedDatabaseTableRequest_SdkV2 struct { - // Next field marker: 12 SyncedTable types.List `tfsdk:"synced_table"` } @@ -411,22 +477,63 @@ func (o DatabaseCredential_SdkV2) Type(ctx context.Context) attr.Type { type DatabaseInstance_SdkV2 struct { // The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8". Capacity types.String `tfsdk:"capacity"` + // The refs of the child instances. This is only available if the instance + // is parent instance. + ChildInstanceRefs types.List `tfsdk:"child_instance_refs"` // The timestamp when the instance was created. CreationTime types.String `tfsdk:"creation_time"` // The email of the creator of the instance. Creator types.String `tfsdk:"creator"` + // xref AIP-129. `enable_readable_secondaries` is owned by the client, while + // `effective_enable_readable_secondaries` is owned by the server. + // `enable_readable_secondaries` will only be set in Create/Update response + // messages if and only if the user provides the field via the request. + // `effective_enable_readable_secondaries` on the other hand will always bet + // set in all response messages (Create/Update/Get/List). + EffectiveEnableReadableSecondaries types.Bool `tfsdk:"effective_enable_readable_secondaries"` + // xref AIP-129. `node_count` is owned by the client, while + // `effective_node_count` is owned by the server. `node_count` will only be + // set in Create/Update response messages if and only if the user provides + // the field via the request. `effective_node_count` on the other hand will + // always bet set in all response messages (Create/Update/Get/List). + EffectiveNodeCount types.Int64 `tfsdk:"effective_node_count"` + // xref AIP-129. `retention_window_in_days` is owned by the client, while + // `effective_retention_window_in_days` is owned by the server. + // `retention_window_in_days` will only be set in Create/Update response + // messages if and only if the user provides the field via the request. + // `effective_retention_window_in_days` on the other hand will always bet + // set in all response messages (Create/Update/Get/List). + EffectiveRetentionWindowInDays types.Int64 `tfsdk:"effective_retention_window_in_days"` // xref AIP-129. `stopped` is owned by the client, while `effective_stopped` // is owned by the server. `stopped` will only be set in Create/Update // response messages if and only if the user provides the field via the // request. `effective_stopped` on the other hand will always bet set in all // response messages (Create/Update/Get/List). EffectiveStopped types.Bool `tfsdk:"effective_stopped"` + // Whether to enable secondaries to serve read-only traffic. Defaults to + // false. + EnableReadableSecondaries types.Bool `tfsdk:"enable_readable_secondaries"` // The name of the instance. This is the unique identifier for the instance. Name types.String `tfsdk:"name"` + // The number of nodes in the instance, composed of 1 primary and 0 or more + // secondaries. Defaults to 1 primary and 0 secondaries. + NodeCount types.Int64 `tfsdk:"node_count"` + // The ref of the parent instance. This is only available if the instance is + // child instance. Input: For specifying the parent instance to create a + // child instance. Optional. Output: Only populated if provided as input to + // create a child instance. + ParentInstanceRef types.List `tfsdk:"parent_instance_ref"` // The version of Postgres running on the instance. PgVersion types.String `tfsdk:"pg_version"` + // The DNS endpoint to connect to the instance for read only access. This is + // only available if enable_readable_secondaries is true. + ReadOnlyDns types.String `tfsdk:"read_only_dns"` // The DNS endpoint to connect to the instance for read+write access. ReadWriteDns types.String `tfsdk:"read_write_dns"` + // The retention window for the instance. This is the time window in days + // for which the historical data is retained. The default value is 7 days. + // Valid values are 2 to 35 days. + RetentionWindowInDays types.Int64 `tfsdk:"retention_window_in_days"` // The current state of the instance. State types.String `tfsdk:"state"` // Whether the instance is stopped. @@ -443,12 +550,22 @@ func (newState *DatabaseInstance_SdkV2) SyncEffectiveFieldsDuringRead(existingSt func (c DatabaseInstance_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["capacity"] = attrs["capacity"].SetOptional() + attrs["child_instance_refs"] = attrs["child_instance_refs"].SetComputed() attrs["creation_time"] = attrs["creation_time"].SetComputed() attrs["creator"] = attrs["creator"].SetComputed() + attrs["effective_enable_readable_secondaries"] = attrs["effective_enable_readable_secondaries"].SetComputed() + attrs["effective_node_count"] = attrs["effective_node_count"].SetComputed() + attrs["effective_retention_window_in_days"] = attrs["effective_retention_window_in_days"].SetComputed() attrs["effective_stopped"] = attrs["effective_stopped"].SetComputed() + attrs["enable_readable_secondaries"] = attrs["enable_readable_secondaries"].SetOptional() attrs["name"] = attrs["name"].SetRequired() + attrs["node_count"] = attrs["node_count"].SetOptional() + attrs["parent_instance_ref"] = attrs["parent_instance_ref"].SetOptional() + attrs["parent_instance_ref"] = attrs["parent_instance_ref"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["pg_version"] = attrs["pg_version"].SetComputed() + attrs["read_only_dns"] = attrs["read_only_dns"].SetComputed() attrs["read_write_dns"] = attrs["read_write_dns"].SetComputed() + attrs["retention_window_in_days"] = attrs["retention_window_in_days"].SetOptional() attrs["state"] = attrs["state"].SetComputed() attrs["stopped"] = attrs["stopped"].SetOptional() attrs["uid"] = attrs["uid"].SetComputed() @@ -464,7 +581,10 @@ func (c DatabaseInstance_SdkV2) ApplySchemaCustomizations(attrs map[string]tfsch // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a DatabaseInstance_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "child_instance_refs": reflect.TypeOf(DatabaseInstanceRef_SdkV2{}), + "parent_instance_ref": reflect.TypeOf(DatabaseInstanceRef_SdkV2{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -474,16 +594,25 @@ func (o DatabaseInstance_SdkV2) ToObjectValue(ctx context.Context) basetypes.Obj return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "capacity": o.Capacity, - "creation_time": o.CreationTime, - "creator": o.Creator, - "effective_stopped": o.EffectiveStopped, - "name": o.Name, - "pg_version": o.PgVersion, - "read_write_dns": o.ReadWriteDns, - "state": o.State, - "stopped": o.Stopped, - "uid": o.Uid, + "capacity": o.Capacity, + "child_instance_refs": o.ChildInstanceRefs, + "creation_time": o.CreationTime, + "creator": o.Creator, + "effective_enable_readable_secondaries": o.EffectiveEnableReadableSecondaries, + "effective_node_count": o.EffectiveNodeCount, + "effective_retention_window_in_days": o.EffectiveRetentionWindowInDays, + "effective_stopped": o.EffectiveStopped, + "enable_readable_secondaries": o.EnableReadableSecondaries, + "name": o.Name, + "node_count": o.NodeCount, + "parent_instance_ref": o.ParentInstanceRef, + "pg_version": o.PgVersion, + "read_only_dns": o.ReadOnlyDns, + "read_write_dns": o.ReadWriteDns, + "retention_window_in_days": o.RetentionWindowInDays, + "state": o.State, + "stopped": o.Stopped, + "uid": o.Uid, }) } @@ -491,16 +620,331 @@ func (o DatabaseInstance_SdkV2) ToObjectValue(ctx context.Context) basetypes.Obj func (o DatabaseInstance_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "capacity": types.StringType, - "creation_time": types.StringType, - "creator": types.StringType, - "effective_stopped": types.BoolType, - "name": types.StringType, - "pg_version": types.StringType, - "read_write_dns": types.StringType, - "state": types.StringType, - "stopped": types.BoolType, - "uid": types.StringType, + "capacity": types.StringType, + "child_instance_refs": basetypes.ListType{ + ElemType: DatabaseInstanceRef_SdkV2{}.Type(ctx), + }, + "creation_time": types.StringType, + "creator": types.StringType, + "effective_enable_readable_secondaries": types.BoolType, + "effective_node_count": types.Int64Type, + "effective_retention_window_in_days": types.Int64Type, + "effective_stopped": types.BoolType, + "enable_readable_secondaries": types.BoolType, + "name": types.StringType, + "node_count": types.Int64Type, + "parent_instance_ref": basetypes.ListType{ + ElemType: DatabaseInstanceRef_SdkV2{}.Type(ctx), + }, + "pg_version": types.StringType, + "read_only_dns": types.StringType, + "read_write_dns": types.StringType, + "retention_window_in_days": types.Int64Type, + "state": types.StringType, + "stopped": types.BoolType, + "uid": types.StringType, + }, + } +} + +// GetChildInstanceRefs returns the value of the ChildInstanceRefs field in DatabaseInstance_SdkV2 as +// a slice of DatabaseInstanceRef_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DatabaseInstance_SdkV2) GetChildInstanceRefs(ctx context.Context) ([]DatabaseInstanceRef_SdkV2, bool) { + if o.ChildInstanceRefs.IsNull() || o.ChildInstanceRefs.IsUnknown() { + return nil, false + } + var v []DatabaseInstanceRef_SdkV2 + d := o.ChildInstanceRefs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetChildInstanceRefs sets the value of the ChildInstanceRefs field in DatabaseInstance_SdkV2. +func (o *DatabaseInstance_SdkV2) SetChildInstanceRefs(ctx context.Context, v []DatabaseInstanceRef_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["child_instance_refs"] + t = t.(attr.TypeWithElementType).ElementType() + o.ChildInstanceRefs = types.ListValueMust(t, vs) +} + +// GetParentInstanceRef returns the value of the ParentInstanceRef field in DatabaseInstance_SdkV2 as +// a DatabaseInstanceRef_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DatabaseInstance_SdkV2) GetParentInstanceRef(ctx context.Context) (DatabaseInstanceRef_SdkV2, bool) { + var e DatabaseInstanceRef_SdkV2 + if o.ParentInstanceRef.IsNull() || o.ParentInstanceRef.IsUnknown() { + return e, false + } + var v []DatabaseInstanceRef_SdkV2 + d := o.ParentInstanceRef.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetParentInstanceRef sets the value of the ParentInstanceRef field in DatabaseInstance_SdkV2. +func (o *DatabaseInstance_SdkV2) SetParentInstanceRef(ctx context.Context, v DatabaseInstanceRef_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["parent_instance_ref"] + o.ParentInstanceRef = types.ListValueMust(t, vs) +} + +// DatabaseInstanceRef is a reference to a database instance. It is used in the +// DatabaseInstance object to refer to the parent instance of an instance and to +// refer the child instances of an instance. To specify as a parent instance +// during creation of an instance, the lsn and branch_time fields are optional. +// If not specified, the child instance will be created from the latest lsn of +// the parent. If both lsn and branch_time are specified, the lsn will be used +// to create the child instance. +type DatabaseInstanceRef_SdkV2 struct { + // Branch time of the ref database instance. For a parent ref instance, this + // is the point in time on the parent instance from which the instance was + // created. For a child ref instance, this is the point in time on the + // instance from which the child instance was created. Input: For specifying + // the point in time to create a child instance. Optional. Output: Only + // populated if provided as input to create a child instance. + BranchTime types.String `tfsdk:"branch_time"` + // xref AIP-129. `lsn` is owned by the client, while `effective_lsn` is + // owned by the server. `lsn` will only be set in Create/Update response + // messages if and only if the user provides the field via the request. + // `effective_lsn` on the other hand will always bet set in all response + // messages (Create/Update/Get/List). For a parent ref instance, this is the + // LSN on the parent instance from which the instance was created. For a + // child ref instance, this is the LSN on the instance from which the child + // instance was created. + EffectiveLsn types.String `tfsdk:"effective_lsn"` + // User-specified WAL LSN of the ref database instance. + // + // Input: For specifying the WAL LSN to create a child instance. Optional. + // Output: Only populated if provided as input to create a child instance. + Lsn types.String `tfsdk:"lsn"` + // Name of the ref database instance. + Name types.String `tfsdk:"name"` + // Id of the ref database instance. + Uid types.String `tfsdk:"uid"` +} + +func (newState *DatabaseInstanceRef_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabaseInstanceRef_SdkV2) { +} + +func (newState *DatabaseInstanceRef_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabaseInstanceRef_SdkV2) { +} + +func (c DatabaseInstanceRef_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["branch_time"] = attrs["branch_time"].SetOptional() + attrs["effective_lsn"] = attrs["effective_lsn"].SetComputed() + attrs["lsn"] = attrs["lsn"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + attrs["uid"] = attrs["uid"].SetComputed() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabaseInstanceRef. +// Container types (types.Map, types.List, types.Set) and 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 DatabaseInstanceRef_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, DatabaseInstanceRef_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DatabaseInstanceRef_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "branch_time": o.BranchTime, + "effective_lsn": o.EffectiveLsn, + "lsn": o.Lsn, + "name": o.Name, + "uid": o.Uid, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatabaseInstanceRef_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "branch_time": types.StringType, + "effective_lsn": types.StringType, + "lsn": types.StringType, + "name": types.StringType, + "uid": types.StringType, + }, + } +} + +// A DatabaseInstanceRole represents a Postgres role in a database instance. +type DatabaseInstanceRole_SdkV2 struct { + // API-exposed Postgres role attributes + Attributes types.List `tfsdk:"attributes"` + // The type of the role. + IdentityType types.String `tfsdk:"identity_type"` + // An enum value for a standard role that this role is a member of. + MembershipRole types.String `tfsdk:"membership_role"` + // The name of the role. This is the unique identifier for the role in an + // instance. + Name types.String `tfsdk:"name"` +} + +func (newState *DatabaseInstanceRole_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabaseInstanceRole_SdkV2) { +} + +func (newState *DatabaseInstanceRole_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabaseInstanceRole_SdkV2) { +} + +func (c DatabaseInstanceRole_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["attributes"] = attrs["attributes"].SetOptional() + attrs["attributes"] = attrs["attributes"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["identity_type"] = attrs["identity_type"].SetOptional() + attrs["membership_role"] = attrs["membership_role"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabaseInstanceRole. +// Container types (types.Map, types.List, types.Set) and 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 DatabaseInstanceRole_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "attributes": reflect.TypeOf(DatabaseInstanceRoleAttributes_SdkV2{}), + } +} + +// 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, DatabaseInstanceRole_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DatabaseInstanceRole_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "identity_type": o.IdentityType, + "membership_role": o.MembershipRole, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatabaseInstanceRole_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": basetypes.ListType{ + ElemType: DatabaseInstanceRoleAttributes_SdkV2{}.Type(ctx), + }, + "identity_type": types.StringType, + "membership_role": types.StringType, + "name": types.StringType, + }, + } +} + +// GetAttributes returns the value of the Attributes field in DatabaseInstanceRole_SdkV2 as +// a DatabaseInstanceRoleAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DatabaseInstanceRole_SdkV2) GetAttributes(ctx context.Context) (DatabaseInstanceRoleAttributes_SdkV2, bool) { + var e DatabaseInstanceRoleAttributes_SdkV2 + if o.Attributes.IsNull() || o.Attributes.IsUnknown() { + return e, false + } + var v []DatabaseInstanceRoleAttributes_SdkV2 + d := o.Attributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAttributes sets the value of the Attributes field in DatabaseInstanceRole_SdkV2. +func (o *DatabaseInstanceRole_SdkV2) SetAttributes(ctx context.Context, v DatabaseInstanceRoleAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["attributes"] + o.Attributes = types.ListValueMust(t, vs) +} + +// Attributes that can be granted to a Postgres role. We are only implementing a +// subset for now, see xref: +// https://www.postgresql.org/docs/16/sql-createrole.html The values follow +// Postgres keyword naming e.g. CREATEDB, BYPASSRLS, etc. which is why they +// don't include typical underscores between words. We were requested to make +// this a nested object/struct representation since these are knobs from an +// external spec. +type DatabaseInstanceRoleAttributes_SdkV2 struct { + Bypassrls types.Bool `tfsdk:"bypassrls"` + + Createdb types.Bool `tfsdk:"createdb"` + + Createrole types.Bool `tfsdk:"createrole"` +} + +func (newState *DatabaseInstanceRoleAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabaseInstanceRoleAttributes_SdkV2) { +} + +func (newState *DatabaseInstanceRoleAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabaseInstanceRoleAttributes_SdkV2) { +} + +func (c DatabaseInstanceRoleAttributes_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["bypassrls"] = attrs["bypassrls"].SetOptional() + attrs["createdb"] = attrs["createdb"].SetOptional() + attrs["createrole"] = attrs["createrole"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabaseInstanceRoleAttributes. +// Container types (types.Map, types.List, types.Set) and 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 DatabaseInstanceRoleAttributes_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, DatabaseInstanceRoleAttributes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DatabaseInstanceRoleAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bypassrls": o.Bypassrls, + "createdb": o.Createdb, + "createrole": o.Createrole, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatabaseInstanceRoleAttributes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bypassrls": types.BoolType, + "createdb": types.BoolType, + "createrole": types.BoolType, }, } } @@ -515,7 +959,6 @@ type DatabaseTable_SdkV2 struct { // rejected). DatabaseInstanceName types.String `tfsdk:"database_instance_name"` // Target Postgres database object (logical database) name for this table. - // This field is optional in all scenarios. // // When creating a table in a registered Postgres catalog, the target // Postgres database name is inferred to be that of the registered catalog. @@ -523,11 +966,9 @@ type DatabaseTable_SdkV2 struct { // MUST match that of the registered catalog (or the request will be // rejected). // - // When creating a table in a standard catalog, the target database name is - // inferred to be that of the standard catalog. In this scenario, specifying - // this field will allow targeting an arbitrary postgres database. Note that - // this has implications for the `create_database_objects_is_missing` field - // in `spec`. + // When creating a table in a standard catalog, this field is required. In + // this scenario, specifying this field will allow targeting an arbitrary + // postgres database. LogicalDatabaseName types.String `tfsdk:"logical_database_name"` // Full three-part (catalog, schema, table) name of the table. Name types.String `tfsdk:"name"` @@ -617,36 +1058,6 @@ func (o DeleteDatabaseCatalogRequest_SdkV2) Type(ctx context.Context) attr.Type } } -type DeleteDatabaseCatalogResponse_SdkV2 struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDatabaseCatalogResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteDatabaseCatalogResponse_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, DeleteDatabaseCatalogResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteDatabaseCatalogResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteDatabaseCatalogResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteDatabaseInstanceRequest_SdkV2 struct { // By default, a instance cannot be deleted if it has descendant instances // created via PITR. If this flag is specified as true, all descendent @@ -700,33 +1111,52 @@ func (o DeleteDatabaseInstanceRequest_SdkV2) Type(ctx context.Context) attr.Type } } -type DeleteDatabaseInstanceResponse_SdkV2 struct { +type DeleteDatabaseInstanceRoleRequest_SdkV2 struct { + // This is the AIP standard name for the equivalent of Postgres' `IF EXISTS` + // option + AllowMissing types.Bool `tfsdk:"-"` + + InstanceName types.String `tfsdk:"-"` + + Name types.String `tfsdk:"-"` + + ReassignOwnedTo types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDatabaseInstanceResponse. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDatabaseInstanceRoleRequest. // Container types (types.Map, types.List, types.Set) and 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 DeleteDatabaseInstanceResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a DeleteDatabaseInstanceRoleRequest_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, DeleteDatabaseInstanceResponse_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteDatabaseInstanceRoleRequest_SdkV2 // only implements ToObjectValue() and Type(). -func (o DeleteDatabaseInstanceResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o DeleteDatabaseInstanceRoleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "instance_name": o.InstanceName, + "name": o.Name, + "reassign_owned_to": o.ReassignOwnedTo, + }) } // Type implements basetypes.ObjectValuable. -func (o DeleteDatabaseInstanceResponse_SdkV2) Type(ctx context.Context) attr.Type { +func (o DeleteDatabaseInstanceRoleRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "instance_name": types.StringType, + "name": types.StringType, + "reassign_owned_to": types.StringType, + }, } } @@ -765,36 +1195,6 @@ func (o DeleteDatabaseTableRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type DeleteDatabaseTableResponse_SdkV2 struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDatabaseTableResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteDatabaseTableResponse_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, DeleteDatabaseTableResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteDatabaseTableResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteDatabaseTableResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteSyncedDatabaseTableRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } @@ -830,33 +1230,58 @@ func (o DeleteSyncedDatabaseTableRequest_SdkV2) Type(ctx context.Context) attr.T } } -type DeleteSyncedDatabaseTableResponse_SdkV2 struct { +type DeltaTableSyncInfo_SdkV2 struct { + // The timestamp when the above Delta version was committed in the source + // Delta table. Note: This is the Delta commit time, not the time the data + // was written to the synced table. + DeltaCommitTimestamp types.String `tfsdk:"delta_commit_timestamp"` + // The Delta Lake commit version that was last successfully synced. + DeltaCommitVersion types.Int64 `tfsdk:"delta_commit_version"` +} + +func (newState *DeltaTableSyncInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeltaTableSyncInfo_SdkV2) { } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSyncedDatabaseTableResponse. +func (newState *DeltaTableSyncInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeltaTableSyncInfo_SdkV2) { +} + +func (c DeltaTableSyncInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["delta_commit_timestamp"] = attrs["delta_commit_timestamp"].SetOptional() + attrs["delta_commit_version"] = attrs["delta_commit_version"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaTableSyncInfo. // Container types (types.Map, types.List, types.Set) and 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 DeleteSyncedDatabaseTableResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a DeltaTableSyncInfo_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, DeleteSyncedDatabaseTableResponse_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeltaTableSyncInfo_SdkV2 // only implements ToObjectValue() and Type(). -func (o DeleteSyncedDatabaseTableResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o DeltaTableSyncInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "delta_commit_timestamp": o.DeltaCommitTimestamp, + "delta_commit_version": o.DeltaCommitVersion, + }) } // Type implements basetypes.ObjectValuable. -func (o DeleteSyncedDatabaseTableResponse_SdkV2) Type(ctx context.Context) attr.Type { +func (o DeltaTableSyncInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "delta_commit_timestamp": types.StringType, + "delta_commit_version": types.Int64Type, + }, } } @@ -898,25 +1323,16 @@ func (o FindDatabaseInstanceByUidRequest_SdkV2) Type(ctx context.Context) attr.T // Generates a credential that can be used to access database instances type GenerateDatabaseCredentialRequest_SdkV2 struct { + // The returned token will be scoped to the union of instance_names and + // instances containing the specified UC tables, so instance_names is + // allowed to be empty. + Claims types.List `tfsdk:"claims"` // Instances to which the token will be scoped. InstanceNames types.List `tfsdk:"instance_names"` RequestId types.String `tfsdk:"request_id"` } -func (newState *GenerateDatabaseCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateDatabaseCredentialRequest_SdkV2) { -} - -func (newState *GenerateDatabaseCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateDatabaseCredentialRequest_SdkV2) { -} - -func (c GenerateDatabaseCredentialRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["instance_names"] = attrs["instance_names"].SetOptional() - attrs["request_id"] = attrs["request_id"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateDatabaseCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -926,6 +1342,7 @@ func (c GenerateDatabaseCredentialRequest_SdkV2) ApplySchemaCustomizations(attrs // SDK values. func (a GenerateDatabaseCredentialRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ + "claims": reflect.TypeOf(RequestedClaims_SdkV2{}), "instance_names": reflect.TypeOf(types.String{}), } } @@ -937,6 +1354,7 @@ func (o GenerateDatabaseCredentialRequest_SdkV2) ToObjectValue(ctx context.Conte return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ + "claims": o.Claims, "instance_names": o.InstanceNames, "request_id": o.RequestId, }) @@ -946,6 +1364,9 @@ func (o GenerateDatabaseCredentialRequest_SdkV2) ToObjectValue(ctx context.Conte func (o GenerateDatabaseCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ + "claims": basetypes.ListType{ + ElemType: RequestedClaims_SdkV2{}.Type(ctx), + }, "instance_names": basetypes.ListType{ ElemType: types.StringType, }, @@ -954,6 +1375,32 @@ func (o GenerateDatabaseCredentialRequest_SdkV2) Type(ctx context.Context) attr. } } +// GetClaims returns the value of the Claims field in GenerateDatabaseCredentialRequest_SdkV2 as +// a slice of RequestedClaims_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateDatabaseCredentialRequest_SdkV2) GetClaims(ctx context.Context) ([]RequestedClaims_SdkV2, bool) { + if o.Claims.IsNull() || o.Claims.IsUnknown() { + return nil, false + } + var v []RequestedClaims_SdkV2 + d := o.Claims.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetClaims sets the value of the Claims field in GenerateDatabaseCredentialRequest_SdkV2. +func (o *GenerateDatabaseCredentialRequest_SdkV2) SetClaims(ctx context.Context, v []RequestedClaims_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["claims"] + t = t.(attr.TypeWithElementType).ElementType() + o.Claims = types.ListValueMust(t, vs) +} + // GetInstanceNames returns the value of the InstanceNames field in GenerateDatabaseCredentialRequest_SdkV2 as // a slice of types.String values. // If the field is unknown or null, the boolean return value is false. @@ -969,36 +1416,146 @@ func (o *GenerateDatabaseCredentialRequest_SdkV2) GetInstanceNames(ctx context.C return v, true } -// SetInstanceNames sets the value of the InstanceNames field in GenerateDatabaseCredentialRequest_SdkV2. -func (o *GenerateDatabaseCredentialRequest_SdkV2) SetInstanceNames(ctx context.Context, v []types.String) { - vs := make([]attr.Value, 0, len(v)) - for _, e := range v { - vs = append(vs, e) +// SetInstanceNames sets the value of the InstanceNames field in GenerateDatabaseCredentialRequest_SdkV2. +func (o *GenerateDatabaseCredentialRequest_SdkV2) SetInstanceNames(ctx context.Context, v []types.String) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["instance_names"] + t = t.(attr.TypeWithElementType).ElementType() + o.InstanceNames = types.ListValueMust(t, vs) +} + +type GetDatabaseCatalogRequest_SdkV2 struct { + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseCatalogRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetDatabaseCatalogRequest_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, GetDatabaseCatalogRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDatabaseCatalogRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDatabaseCatalogRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type GetDatabaseInstanceRequest_SdkV2 struct { + // Name of the cluster to get. + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseInstanceRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetDatabaseInstanceRequest_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, GetDatabaseInstanceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDatabaseInstanceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDatabaseInstanceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type GetDatabaseInstanceRoleRequest_SdkV2 struct { + InstanceName types.String `tfsdk:"-"` + + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseInstanceRoleRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetDatabaseInstanceRoleRequest_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, GetDatabaseInstanceRoleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDatabaseInstanceRoleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_name": o.InstanceName, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDatabaseInstanceRoleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_name": types.StringType, + "name": types.StringType, + }, } - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["instance_names"] - t = t.(attr.TypeWithElementType).ElementType() - o.InstanceNames = types.ListValueMust(t, vs) } -type GetDatabaseCatalogRequest_SdkV2 struct { +type GetDatabaseTableRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseCatalogRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseTableRequest. // Container types (types.Map, types.List, types.Set) and 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 GetDatabaseCatalogRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GetDatabaseTableRequest_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, GetDatabaseCatalogRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GetDatabaseTableRequest_SdkV2 // only implements ToObjectValue() and Type(). -func (o GetDatabaseCatalogRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GetDatabaseTableRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ @@ -1007,7 +1564,7 @@ func (o GetDatabaseCatalogRequest_SdkV2) ToObjectValue(ctx context.Context) base } // Type implements basetypes.ObjectValuable. -func (o GetDatabaseCatalogRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o GetDatabaseTableRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "name": types.StringType, @@ -1015,26 +1572,25 @@ func (o GetDatabaseCatalogRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type GetDatabaseInstanceRequest_SdkV2 struct { - // Name of the cluster to get. +type GetSyncedDatabaseTableRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseInstanceRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSyncedDatabaseTableRequest. // Container types (types.Map, types.List, types.Set) and 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 GetDatabaseInstanceRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GetSyncedDatabaseTableRequest_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, GetDatabaseInstanceRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GetSyncedDatabaseTableRequest_SdkV2 // only implements ToObjectValue() and Type(). -func (o GetDatabaseInstanceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GetSyncedDatabaseTableRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ @@ -1043,7 +1599,7 @@ func (o GetDatabaseInstanceRequest_SdkV2) ToObjectValue(ctx context.Context) bas } // Type implements basetypes.ObjectValuable. -func (o GetDatabaseInstanceRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o GetSyncedDatabaseTableRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "name": types.StringType, @@ -1051,76 +1607,133 @@ func (o GetDatabaseInstanceRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type GetDatabaseTableRequest_SdkV2 struct { - Name types.String `tfsdk:"-"` +type ListDatabaseInstanceRolesRequest_SdkV2 struct { + InstanceName types.String `tfsdk:"-"` + // Upper bound for items returned. + PageSize types.Int64 `tfsdk:"-"` + // Pagination token to go to the next page of Database Instances. Requests + // first page if absent. + PageToken types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseTableRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDatabaseInstanceRolesRequest. // Container types (types.Map, types.List, types.Set) and 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 GetDatabaseTableRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a ListDatabaseInstanceRolesRequest_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, GetDatabaseTableRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListDatabaseInstanceRolesRequest_SdkV2 // only implements ToObjectValue() and Type(). -func (o GetDatabaseTableRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ListDatabaseInstanceRolesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "name": o.Name, + "instance_name": o.InstanceName, + "page_size": o.PageSize, + "page_token": o.PageToken, }) } // Type implements basetypes.ObjectValuable. -func (o GetDatabaseTableRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o ListDatabaseInstanceRolesRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "name": types.StringType, + "instance_name": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, }, } } -type GetSyncedDatabaseTableRequest_SdkV2 struct { - Name types.String `tfsdk:"-"` +type ListDatabaseInstanceRolesResponse_SdkV2 struct { + // List of database instance roles. + DatabaseInstanceRoles types.List `tfsdk:"database_instance_roles"` + // Pagination token to request the next page of instances. + NextPageToken types.String `tfsdk:"next_page_token"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSyncedDatabaseTableRequest. +func (newState *ListDatabaseInstanceRolesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDatabaseInstanceRolesResponse_SdkV2) { +} + +func (newState *ListDatabaseInstanceRolesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDatabaseInstanceRolesResponse_SdkV2) { +} + +func (c ListDatabaseInstanceRolesResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["database_instance_roles"] = attrs["database_instance_roles"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDatabaseInstanceRolesResponse. // Container types (types.Map, types.List, types.Set) and 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 GetSyncedDatabaseTableRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} +func (a ListDatabaseInstanceRolesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "database_instance_roles": reflect.TypeOf(DatabaseInstanceRole_SdkV2{}), + } } // 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, GetSyncedDatabaseTableRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListDatabaseInstanceRolesResponse_SdkV2 // only implements ToObjectValue() and Type(). -func (o GetSyncedDatabaseTableRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ListDatabaseInstanceRolesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "name": o.Name, + "database_instance_roles": o.DatabaseInstanceRoles, + "next_page_token": o.NextPageToken, }) } // Type implements basetypes.ObjectValuable. -func (o GetSyncedDatabaseTableRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o ListDatabaseInstanceRolesResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "name": types.StringType, + "database_instance_roles": basetypes.ListType{ + ElemType: DatabaseInstanceRole_SdkV2{}.Type(ctx), + }, + "next_page_token": types.StringType, }, } } +// GetDatabaseInstanceRoles returns the value of the DatabaseInstanceRoles field in ListDatabaseInstanceRolesResponse_SdkV2 as +// a slice of DatabaseInstanceRole_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListDatabaseInstanceRolesResponse_SdkV2) GetDatabaseInstanceRoles(ctx context.Context) ([]DatabaseInstanceRole_SdkV2, bool) { + if o.DatabaseInstanceRoles.IsNull() || o.DatabaseInstanceRoles.IsUnknown() { + return nil, false + } + var v []DatabaseInstanceRole_SdkV2 + d := o.DatabaseInstanceRoles.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDatabaseInstanceRoles sets the value of the DatabaseInstanceRoles field in ListDatabaseInstanceRolesResponse_SdkV2. +func (o *ListDatabaseInstanceRolesResponse_SdkV2) SetDatabaseInstanceRoles(ctx context.Context, v []DatabaseInstanceRole_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["database_instance_roles"] + t = t.(attr.TypeWithElementType).ElementType() + o.DatabaseInstanceRoles = types.ListValueMust(t, vs) +} + type ListDatabaseInstancesRequest_SdkV2 struct { // Upper bound for items returned. PageSize types.Int64 `tfsdk:"-"` @@ -1305,6 +1918,140 @@ func (o NewPipelineSpec_SdkV2) Type(ctx context.Context) attr.Type { } } +type RequestedClaims_SdkV2 struct { + PermissionSet types.String `tfsdk:"permission_set"` + + Resources types.List `tfsdk:"resources"` +} + +func (newState *RequestedClaims_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RequestedClaims_SdkV2) { +} + +func (newState *RequestedClaims_SdkV2) SyncEffectiveFieldsDuringRead(existingState RequestedClaims_SdkV2) { +} + +func (c RequestedClaims_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["permission_set"] = attrs["permission_set"].SetOptional() + attrs["resources"] = attrs["resources"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RequestedClaims. +// Container types (types.Map, types.List, types.Set) and 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 RequestedClaims_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "resources": reflect.TypeOf(RequestedResource_SdkV2{}), + } +} + +// 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, RequestedClaims_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RequestedClaims_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_set": o.PermissionSet, + "resources": o.Resources, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RequestedClaims_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_set": types.StringType, + "resources": basetypes.ListType{ + ElemType: RequestedResource_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetResources returns the value of the Resources field in RequestedClaims_SdkV2 as +// a slice of RequestedResource_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RequestedClaims_SdkV2) GetResources(ctx context.Context) ([]RequestedResource_SdkV2, bool) { + if o.Resources.IsNull() || o.Resources.IsUnknown() { + return nil, false + } + var v []RequestedResource_SdkV2 + d := o.Resources.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResources sets the value of the Resources field in RequestedClaims_SdkV2. +func (o *RequestedClaims_SdkV2) SetResources(ctx context.Context, v []RequestedResource_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["resources"] + t = t.(attr.TypeWithElementType).ElementType() + o.Resources = types.ListValueMust(t, vs) +} + +type RequestedResource_SdkV2 struct { + TableName types.String `tfsdk:"table_name"` + + UnspecifiedResourceName types.String `tfsdk:"unspecified_resource_name"` +} + +func (newState *RequestedResource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RequestedResource_SdkV2) { +} + +func (newState *RequestedResource_SdkV2) SyncEffectiveFieldsDuringRead(existingState RequestedResource_SdkV2) { +} + +func (c RequestedResource_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["table_name"] = attrs["table_name"].SetOptional() + attrs["unspecified_resource_name"] = attrs["unspecified_resource_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RequestedResource. +// Container types (types.Map, types.List, types.Set) and 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 RequestedResource_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, RequestedResource_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RequestedResource_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table_name": o.TableName, + "unspecified_resource_name": o.UnspecifiedResourceName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RequestedResource_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table_name": types.StringType, + "unspecified_resource_name": types.StringType, + }, + } +} + // Next field marker: 12 type SyncedDatabaseTable_SdkV2 struct { // Synced Table data synchronization status @@ -1317,7 +2064,6 @@ type SyncedDatabaseTable_SdkV2 struct { // the request will be rejected). DatabaseInstanceName types.String `tfsdk:"database_instance_name"` // Target Postgres database object (logical database) name for this table. - // This field is optional in all scenarios. // // When creating a synced table in a registered Postgres catalog, the target // Postgres database name is inferred to be that of the registered catalog. @@ -1325,14 +2071,14 @@ type SyncedDatabaseTable_SdkV2 struct { // MUST match that of the registered catalog (or the request will be // rejected). // - // When creating a synced table in a standard catalog, the target database - // name is inferred to be that of the standard catalog. In this scenario, - // specifying this field will allow targeting an arbitrary postgres - // database. + // When creating a synced table in a standard catalog, this field is + // required. In this scenario, specifying this field will allow targeting an + // arbitrary postgres database. Note that this has implications for the + // `create_database_objects_is_missing` field in `spec`. LogicalDatabaseName types.String `tfsdk:"logical_database_name"` // Full three-part (catalog, schema, table) name of the table. Name types.String `tfsdk:"name"` - // Specification of a synced database table. + Spec types.List `tfsdk:"spec"` // The provisioning state of the synced table entity in Unity Catalog. This // is distinct from the state of the data synchronization pipeline (i.e. the @@ -1465,12 +2211,12 @@ func (o *SyncedDatabaseTable_SdkV2) SetSpec(ctx context.Context, v SyncedTableSp type SyncedTableContinuousUpdateStatus_SdkV2 struct { // Progress of the initial data synchronization. InitialPipelineSyncProgress types.List `tfsdk:"initial_pipeline_sync_progress"` - // The last source table Delta version that was synced to the synced table. - // Note that this Delta version may not be completely synced to the synced - // table yet. + // The last source table Delta version that was successfully synced to the + // synced table. LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version"` - // The timestamp of the last time any data was synchronized from the source - // table to the synced table. + // The end timestamp of the last time any data was synchronized from the + // source table to the synced table. This is when the data is available in + // the synced table. Timestamp types.String `tfsdk:"timestamp"` } @@ -1557,14 +2303,14 @@ func (o *SyncedTableContinuousUpdateStatus_SdkV2) SetInitialPipelineSyncProgress // Detailed status of a synced table. Shown if the synced table is in the // OFFLINE_FAILED or the SYNCED_PIPELINE_FAILED state. type SyncedTableFailedStatus_SdkV2 struct { - // The last source table Delta version that was synced to the synced table. - // Note that this Delta version may only be partially synced to the synced - // table. Only populated if the table is still synced and available for - // serving. + // The last source table Delta version that was successfully synced to the + // synced table. The last source table Delta version that was synced to the + // synced table. Only populated if the table is still synced and available + // for serving. LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version"` - // The timestamp of the last time any data was synchronized from the source - // table to the synced table. Only populated if the table is still synced - // and available for serving. + // The end timestamp of the last time any data was synchronized from the + // source table to the synced table. Only populated if the table is still + // synced and available for serving. Timestamp types.String `tfsdk:"timestamp"` } @@ -1685,6 +2431,98 @@ func (o SyncedTablePipelineProgress_SdkV2) Type(ctx context.Context) attr.Type { } } +type SyncedTablePosition_SdkV2 struct { + DeltaTableSyncInfo types.List `tfsdk:"delta_table_sync_info"` + // The end timestamp of the most recent successful synchronization. This is + // the time when the data is available in the synced table. + SyncEndTimestamp types.String `tfsdk:"sync_end_timestamp"` + // The starting timestamp of the most recent successful synchronization from + // the source table to the destination (synced) table. Note this is the + // starting timestamp of the sync operation, not the end time. E.g., for a + // batch, this is the time when the sync operation started. + SyncStartTimestamp types.String `tfsdk:"sync_start_timestamp"` +} + +func (newState *SyncedTablePosition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SyncedTablePosition_SdkV2) { +} + +func (newState *SyncedTablePosition_SdkV2) SyncEffectiveFieldsDuringRead(existingState SyncedTablePosition_SdkV2) { +} + +func (c SyncedTablePosition_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["delta_table_sync_info"] = attrs["delta_table_sync_info"].SetOptional() + attrs["delta_table_sync_info"] = attrs["delta_table_sync_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["sync_end_timestamp"] = attrs["sync_end_timestamp"].SetOptional() + attrs["sync_start_timestamp"] = attrs["sync_start_timestamp"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SyncedTablePosition. +// Container types (types.Map, types.List, types.Set) and 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 SyncedTablePosition_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "delta_table_sync_info": reflect.TypeOf(DeltaTableSyncInfo_SdkV2{}), + } +} + +// 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, SyncedTablePosition_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SyncedTablePosition_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "delta_table_sync_info": o.DeltaTableSyncInfo, + "sync_end_timestamp": o.SyncEndTimestamp, + "sync_start_timestamp": o.SyncStartTimestamp, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SyncedTablePosition_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "delta_table_sync_info": basetypes.ListType{ + ElemType: DeltaTableSyncInfo_SdkV2{}.Type(ctx), + }, + "sync_end_timestamp": types.StringType, + "sync_start_timestamp": types.StringType, + }, + } +} + +// GetDeltaTableSyncInfo returns the value of the DeltaTableSyncInfo field in SyncedTablePosition_SdkV2 as +// a DeltaTableSyncInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SyncedTablePosition_SdkV2) GetDeltaTableSyncInfo(ctx context.Context) (DeltaTableSyncInfo_SdkV2, bool) { + var e DeltaTableSyncInfo_SdkV2 + if o.DeltaTableSyncInfo.IsNull() || o.DeltaTableSyncInfo.IsUnknown() { + return e, false + } + var v []DeltaTableSyncInfo_SdkV2 + d := o.DeltaTableSyncInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeltaTableSyncInfo sets the value of the DeltaTableSyncInfo field in SyncedTablePosition_SdkV2. +func (o *SyncedTablePosition_SdkV2) SetDeltaTableSyncInfo(ctx context.Context, v DeltaTableSyncInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["delta_table_sync_info"] + o.DeltaTableSyncInfo = types.ListValueMust(t, vs) +} + // Detailed status of a synced table. Shown if the synced table is in the // PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state. type SyncedTableProvisioningStatus_SdkV2 struct { @@ -1916,26 +2754,34 @@ func (o *SyncedTableSpec_SdkV2) SetPrimaryKeyColumns(ctx context.Context, v []ty // Status of a synced table. type SyncedTableStatus_SdkV2 struct { - // Detailed status of a synced table. Shown if the synced table is in the - // SYNCED_CONTINUOUS_UPDATE or the SYNCED_UPDATING_PIPELINE_RESOURCES state. ContinuousUpdateStatus types.List `tfsdk:"continuous_update_status"` // The state of the synced table. DetailedState types.String `tfsdk:"detailed_state"` - // Detailed status of a synced table. Shown if the synced table is in the - // OFFLINE_FAILED or the SYNCED_PIPELINE_FAILED state. + FailedStatus types.List `tfsdk:"failed_status"` + // Summary of the last successful synchronization from source to + // destination. + // + // Will always be present if there has been a successful sync. Even if the + // most recent syncs have failed. + // + // Limitation: The only exception is if the synced table is doing a FULL + // REFRESH, then the last sync information will not be available until the + // full refresh is complete. This limitation will be addressed in a future + // version. + // + // This top-level field is a convenience for consumers who want easy access + // to last sync information without having to traverse detailed_status. + LastSync types.List `tfsdk:"last_sync"` // A text description of the current state of the synced table. Message types.String `tfsdk:"message"` // ID of the associated pipeline. The pipeline ID may have been provided by // the client (in the case of bin packing), or generated by the server (when // creating a new pipeline). PipelineId types.String `tfsdk:"pipeline_id"` - // Detailed status of a synced table. Shown if the synced table is in the - // PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT - // state. + ProvisioningStatus types.List `tfsdk:"provisioning_status"` - // Detailed status of a synced table. Shown if the synced table is in the - // SYNCED_TRIGGERED_UPDATE or the SYNCED_NO_PENDING_UPDATE state. + TriggeredUpdateStatus types.List `tfsdk:"triggered_update_status"` } @@ -1951,6 +2797,8 @@ func (c SyncedTableStatus_SdkV2) ApplySchemaCustomizations(attrs map[string]tfsc attrs["detailed_state"] = attrs["detailed_state"].SetOptional() attrs["failed_status"] = attrs["failed_status"].SetOptional() attrs["failed_status"] = attrs["failed_status"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["last_sync"] = attrs["last_sync"].SetOptional() + attrs["last_sync"] = attrs["last_sync"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["message"] = attrs["message"].SetOptional() attrs["pipeline_id"] = attrs["pipeline_id"].SetOptional() attrs["provisioning_status"] = attrs["provisioning_status"].SetOptional() @@ -1972,6 +2820,7 @@ func (a SyncedTableStatus_SdkV2) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{ "continuous_update_status": reflect.TypeOf(SyncedTableContinuousUpdateStatus_SdkV2{}), "failed_status": reflect.TypeOf(SyncedTableFailedStatus_SdkV2{}), + "last_sync": reflect.TypeOf(SyncedTablePosition_SdkV2{}), "provisioning_status": reflect.TypeOf(SyncedTableProvisioningStatus_SdkV2{}), "triggered_update_status": reflect.TypeOf(SyncedTableTriggeredUpdateStatus_SdkV2{}), } @@ -1987,6 +2836,7 @@ func (o SyncedTableStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.Ob "continuous_update_status": o.ContinuousUpdateStatus, "detailed_state": o.DetailedState, "failed_status": o.FailedStatus, + "last_sync": o.LastSync, "message": o.Message, "pipeline_id": o.PipelineId, "provisioning_status": o.ProvisioningStatus, @@ -2005,6 +2855,9 @@ func (o SyncedTableStatus_SdkV2) Type(ctx context.Context) attr.Type { "failed_status": basetypes.ListType{ ElemType: SyncedTableFailedStatus_SdkV2{}.Type(ctx), }, + "last_sync": basetypes.ListType{ + ElemType: SyncedTablePosition_SdkV2{}.Type(ctx), + }, "message": types.StringType, "pipeline_id": types.StringType, "provisioning_status": basetypes.ListType{ @@ -2069,6 +2922,32 @@ func (o *SyncedTableStatus_SdkV2) SetFailedStatus(ctx context.Context, v SyncedT o.FailedStatus = types.ListValueMust(t, vs) } +// GetLastSync returns the value of the LastSync field in SyncedTableStatus_SdkV2 as +// a SyncedTablePosition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SyncedTableStatus_SdkV2) GetLastSync(ctx context.Context) (SyncedTablePosition_SdkV2, bool) { + var e SyncedTablePosition_SdkV2 + if o.LastSync.IsNull() || o.LastSync.IsUnknown() { + return e, false + } + var v []SyncedTablePosition_SdkV2 + d := o.LastSync.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetLastSync sets the value of the LastSync field in SyncedTableStatus_SdkV2. +func (o *SyncedTableStatus_SdkV2) SetLastSync(ctx context.Context, v SyncedTablePosition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["last_sync"] + o.LastSync = types.ListValueMust(t, vs) +} + // GetProvisioningStatus returns the value of the ProvisioningStatus field in SyncedTableStatus_SdkV2 as // a SyncedTableProvisioningStatus_SdkV2 value. // If the field is unknown or null, the boolean return value is false. @@ -2124,12 +3003,12 @@ func (o *SyncedTableStatus_SdkV2) SetTriggeredUpdateStatus(ctx context.Context, // Detailed status of a synced table. Shown if the synced table is in the // SYNCED_TRIGGERED_UPDATE or the SYNCED_NO_PENDING_UPDATE state. type SyncedTableTriggeredUpdateStatus_SdkV2 struct { - // The last source table Delta version that was synced to the synced table. - // Note that this Delta version may not be completely synced to the synced - // table yet. + // The last source table Delta version that was successfully synced to the + // synced table. LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version"` - // The timestamp of the last time any data was synchronized from the source - // table to the synced table. + // The end timestamp of the last time any data was synchronized from the + // source table to the synced table. This is when the data is available in + // the synced table. Timestamp types.String `tfsdk:"timestamp"` // Progress of the active data synchronization pipeline. TriggeredUpdateProgress types.List `tfsdk:"triggered_update_progress"` @@ -2216,8 +3095,6 @@ func (o *SyncedTableTriggeredUpdateStatus_SdkV2) SetTriggeredUpdateProgress(ctx } type UpdateDatabaseInstanceRequest_SdkV2 struct { - // A DatabaseInstance represents a logical Postgres instance, comprised of - // both compute and storage. DatabaseInstance types.List `tfsdk:"database_instance"` // The name of the instance. This is the unique identifier for the instance. Name types.String `tfsdk:"-"` diff --git a/internal/service/database_tf/model.go b/internal/service/database_tf/model.go index 45a28d8104..ec40f567ad 100755 --- a/internal/service/database_tf/model.go +++ b/internal/service/database_tf/model.go @@ -88,8 +88,7 @@ func (o *CreateDatabaseCatalogRequest) SetCatalog(ctx context.Context, v Databas } type CreateDatabaseInstanceRequest struct { - // A DatabaseInstance represents a logical Postgres instance, comprised of - // both compute and storage. + // Instance to create. DatabaseInstance types.Object `tfsdk:"database_instance"` } @@ -154,8 +153,76 @@ func (o *CreateDatabaseInstanceRequest) SetDatabaseInstance(ctx context.Context, o.DatabaseInstance = vs } +type CreateDatabaseInstanceRoleRequest struct { + DatabaseInstanceRole types.Object `tfsdk:"database_instance_role"` + + InstanceName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDatabaseInstanceRoleRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateDatabaseInstanceRoleRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "database_instance_role": reflect.TypeOf(DatabaseInstanceRole{}), + } +} + +// 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, CreateDatabaseInstanceRoleRequest +// only implements ToObjectValue() and Type(). +func (o CreateDatabaseInstanceRoleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "database_instance_role": o.DatabaseInstanceRole, + "instance_name": o.InstanceName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateDatabaseInstanceRoleRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "database_instance_role": DatabaseInstanceRole{}.Type(ctx), + "instance_name": types.StringType, + }, + } +} + +// GetDatabaseInstanceRole returns the value of the DatabaseInstanceRole field in CreateDatabaseInstanceRoleRequest as +// a DatabaseInstanceRole value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateDatabaseInstanceRoleRequest) GetDatabaseInstanceRole(ctx context.Context) (DatabaseInstanceRole, bool) { + var e DatabaseInstanceRole + if o.DatabaseInstanceRole.IsNull() || o.DatabaseInstanceRole.IsUnknown() { + return e, false + } + var v []DatabaseInstanceRole + d := o.DatabaseInstanceRole.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 +} + +// SetDatabaseInstanceRole sets the value of the DatabaseInstanceRole field in CreateDatabaseInstanceRoleRequest. +func (o *CreateDatabaseInstanceRoleRequest) SetDatabaseInstanceRole(ctx context.Context, v DatabaseInstanceRole) { + vs := v.ToObjectValue(ctx) + o.DatabaseInstanceRole = vs +} + type CreateDatabaseTableRequest struct { - // Next field marker: 13 Table types.Object `tfsdk:"table"` } @@ -221,7 +288,6 @@ func (o *CreateDatabaseTableRequest) SetTable(ctx context.Context, v DatabaseTab } type CreateSyncedDatabaseTableRequest struct { - // Next field marker: 12 SyncedTable types.Object `tfsdk:"synced_table"` } @@ -410,22 +476,63 @@ func (o DatabaseCredential) Type(ctx context.Context) attr.Type { type DatabaseInstance struct { // The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8". Capacity types.String `tfsdk:"capacity"` + // The refs of the child instances. This is only available if the instance + // is parent instance. + ChildInstanceRefs types.List `tfsdk:"child_instance_refs"` // The timestamp when the instance was created. CreationTime types.String `tfsdk:"creation_time"` // The email of the creator of the instance. Creator types.String `tfsdk:"creator"` + // xref AIP-129. `enable_readable_secondaries` is owned by the client, while + // `effective_enable_readable_secondaries` is owned by the server. + // `enable_readable_secondaries` will only be set in Create/Update response + // messages if and only if the user provides the field via the request. + // `effective_enable_readable_secondaries` on the other hand will always bet + // set in all response messages (Create/Update/Get/List). + EffectiveEnableReadableSecondaries types.Bool `tfsdk:"effective_enable_readable_secondaries"` + // xref AIP-129. `node_count` is owned by the client, while + // `effective_node_count` is owned by the server. `node_count` will only be + // set in Create/Update response messages if and only if the user provides + // the field via the request. `effective_node_count` on the other hand will + // always bet set in all response messages (Create/Update/Get/List). + EffectiveNodeCount types.Int64 `tfsdk:"effective_node_count"` + // xref AIP-129. `retention_window_in_days` is owned by the client, while + // `effective_retention_window_in_days` is owned by the server. + // `retention_window_in_days` will only be set in Create/Update response + // messages if and only if the user provides the field via the request. + // `effective_retention_window_in_days` on the other hand will always bet + // set in all response messages (Create/Update/Get/List). + EffectiveRetentionWindowInDays types.Int64 `tfsdk:"effective_retention_window_in_days"` // xref AIP-129. `stopped` is owned by the client, while `effective_stopped` // is owned by the server. `stopped` will only be set in Create/Update // response messages if and only if the user provides the field via the // request. `effective_stopped` on the other hand will always bet set in all // response messages (Create/Update/Get/List). EffectiveStopped types.Bool `tfsdk:"effective_stopped"` + // Whether to enable secondaries to serve read-only traffic. Defaults to + // false. + EnableReadableSecondaries types.Bool `tfsdk:"enable_readable_secondaries"` // The name of the instance. This is the unique identifier for the instance. Name types.String `tfsdk:"name"` + // The number of nodes in the instance, composed of 1 primary and 0 or more + // secondaries. Defaults to 1 primary and 0 secondaries. + NodeCount types.Int64 `tfsdk:"node_count"` + // The ref of the parent instance. This is only available if the instance is + // child instance. Input: For specifying the parent instance to create a + // child instance. Optional. Output: Only populated if provided as input to + // create a child instance. + ParentInstanceRef types.Object `tfsdk:"parent_instance_ref"` // The version of Postgres running on the instance. PgVersion types.String `tfsdk:"pg_version"` + // The DNS endpoint to connect to the instance for read only access. This is + // only available if enable_readable_secondaries is true. + ReadOnlyDns types.String `tfsdk:"read_only_dns"` // The DNS endpoint to connect to the instance for read+write access. ReadWriteDns types.String `tfsdk:"read_write_dns"` + // The retention window for the instance. This is the time window in days + // for which the historical data is retained. The default value is 7 days. + // Valid values are 2 to 35 days. + RetentionWindowInDays types.Int64 `tfsdk:"retention_window_in_days"` // The current state of the instance. State types.String `tfsdk:"state"` // Whether the instance is stopped. @@ -442,12 +549,21 @@ func (newState *DatabaseInstance) SyncEffectiveFieldsDuringRead(existingState Da func (c DatabaseInstance) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["capacity"] = attrs["capacity"].SetOptional() + attrs["child_instance_refs"] = attrs["child_instance_refs"].SetComputed() attrs["creation_time"] = attrs["creation_time"].SetComputed() attrs["creator"] = attrs["creator"].SetComputed() + attrs["effective_enable_readable_secondaries"] = attrs["effective_enable_readable_secondaries"].SetComputed() + attrs["effective_node_count"] = attrs["effective_node_count"].SetComputed() + attrs["effective_retention_window_in_days"] = attrs["effective_retention_window_in_days"].SetComputed() attrs["effective_stopped"] = attrs["effective_stopped"].SetComputed() + attrs["enable_readable_secondaries"] = attrs["enable_readable_secondaries"].SetOptional() attrs["name"] = attrs["name"].SetRequired() + attrs["node_count"] = attrs["node_count"].SetOptional() + attrs["parent_instance_ref"] = attrs["parent_instance_ref"].SetOptional() attrs["pg_version"] = attrs["pg_version"].SetComputed() + attrs["read_only_dns"] = attrs["read_only_dns"].SetComputed() attrs["read_write_dns"] = attrs["read_write_dns"].SetComputed() + attrs["retention_window_in_days"] = attrs["retention_window_in_days"].SetOptional() attrs["state"] = attrs["state"].SetComputed() attrs["stopped"] = attrs["stopped"].SetOptional() attrs["uid"] = attrs["uid"].SetComputed() @@ -463,7 +579,10 @@ func (c DatabaseInstance) ApplySchemaCustomizations(attrs map[string]tfschema.At // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a DatabaseInstance) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "child_instance_refs": reflect.TypeOf(DatabaseInstanceRef{}), + "parent_instance_ref": reflect.TypeOf(DatabaseInstanceRef{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -473,16 +592,25 @@ func (o DatabaseInstance) ToObjectValue(ctx context.Context) basetypes.ObjectVal return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "capacity": o.Capacity, - "creation_time": o.CreationTime, - "creator": o.Creator, - "effective_stopped": o.EffectiveStopped, - "name": o.Name, - "pg_version": o.PgVersion, - "read_write_dns": o.ReadWriteDns, - "state": o.State, - "stopped": o.Stopped, - "uid": o.Uid, + "capacity": o.Capacity, + "child_instance_refs": o.ChildInstanceRefs, + "creation_time": o.CreationTime, + "creator": o.Creator, + "effective_enable_readable_secondaries": o.EffectiveEnableReadableSecondaries, + "effective_node_count": o.EffectiveNodeCount, + "effective_retention_window_in_days": o.EffectiveRetentionWindowInDays, + "effective_stopped": o.EffectiveStopped, + "enable_readable_secondaries": o.EnableReadableSecondaries, + "name": o.Name, + "node_count": o.NodeCount, + "parent_instance_ref": o.ParentInstanceRef, + "pg_version": o.PgVersion, + "read_only_dns": o.ReadOnlyDns, + "read_write_dns": o.ReadWriteDns, + "retention_window_in_days": o.RetentionWindowInDays, + "state": o.State, + "stopped": o.Stopped, + "uid": o.Uid, }) } @@ -490,16 +618,330 @@ func (o DatabaseInstance) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o DatabaseInstance) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "capacity": types.StringType, - "creation_time": types.StringType, - "creator": types.StringType, - "effective_stopped": types.BoolType, - "name": types.StringType, - "pg_version": types.StringType, - "read_write_dns": types.StringType, - "state": types.StringType, - "stopped": types.BoolType, - "uid": types.StringType, + "capacity": types.StringType, + "child_instance_refs": basetypes.ListType{ + ElemType: DatabaseInstanceRef{}.Type(ctx), + }, + "creation_time": types.StringType, + "creator": types.StringType, + "effective_enable_readable_secondaries": types.BoolType, + "effective_node_count": types.Int64Type, + "effective_retention_window_in_days": types.Int64Type, + "effective_stopped": types.BoolType, + "enable_readable_secondaries": types.BoolType, + "name": types.StringType, + "node_count": types.Int64Type, + "parent_instance_ref": DatabaseInstanceRef{}.Type(ctx), + "pg_version": types.StringType, + "read_only_dns": types.StringType, + "read_write_dns": types.StringType, + "retention_window_in_days": types.Int64Type, + "state": types.StringType, + "stopped": types.BoolType, + "uid": types.StringType, + }, + } +} + +// GetChildInstanceRefs returns the value of the ChildInstanceRefs field in DatabaseInstance as +// a slice of DatabaseInstanceRef values. +// If the field is unknown or null, the boolean return value is false. +func (o *DatabaseInstance) GetChildInstanceRefs(ctx context.Context) ([]DatabaseInstanceRef, bool) { + if o.ChildInstanceRefs.IsNull() || o.ChildInstanceRefs.IsUnknown() { + return nil, false + } + var v []DatabaseInstanceRef + d := o.ChildInstanceRefs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetChildInstanceRefs sets the value of the ChildInstanceRefs field in DatabaseInstance. +func (o *DatabaseInstance) SetChildInstanceRefs(ctx context.Context, v []DatabaseInstanceRef) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["child_instance_refs"] + t = t.(attr.TypeWithElementType).ElementType() + o.ChildInstanceRefs = types.ListValueMust(t, vs) +} + +// GetParentInstanceRef returns the value of the ParentInstanceRef field in DatabaseInstance as +// a DatabaseInstanceRef value. +// If the field is unknown or null, the boolean return value is false. +func (o *DatabaseInstance) GetParentInstanceRef(ctx context.Context) (DatabaseInstanceRef, bool) { + var e DatabaseInstanceRef + if o.ParentInstanceRef.IsNull() || o.ParentInstanceRef.IsUnknown() { + return e, false + } + var v []DatabaseInstanceRef + d := o.ParentInstanceRef.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 +} + +// SetParentInstanceRef sets the value of the ParentInstanceRef field in DatabaseInstance. +func (o *DatabaseInstance) SetParentInstanceRef(ctx context.Context, v DatabaseInstanceRef) { + vs := v.ToObjectValue(ctx) + o.ParentInstanceRef = vs +} + +// DatabaseInstanceRef is a reference to a database instance. It is used in the +// DatabaseInstance object to refer to the parent instance of an instance and to +// refer the child instances of an instance. To specify as a parent instance +// during creation of an instance, the lsn and branch_time fields are optional. +// If not specified, the child instance will be created from the latest lsn of +// the parent. If both lsn and branch_time are specified, the lsn will be used +// to create the child instance. +type DatabaseInstanceRef struct { + // Branch time of the ref database instance. For a parent ref instance, this + // is the point in time on the parent instance from which the instance was + // created. For a child ref instance, this is the point in time on the + // instance from which the child instance was created. Input: For specifying + // the point in time to create a child instance. Optional. Output: Only + // populated if provided as input to create a child instance. + BranchTime types.String `tfsdk:"branch_time"` + // xref AIP-129. `lsn` is owned by the client, while `effective_lsn` is + // owned by the server. `lsn` will only be set in Create/Update response + // messages if and only if the user provides the field via the request. + // `effective_lsn` on the other hand will always bet set in all response + // messages (Create/Update/Get/List). For a parent ref instance, this is the + // LSN on the parent instance from which the instance was created. For a + // child ref instance, this is the LSN on the instance from which the child + // instance was created. + EffectiveLsn types.String `tfsdk:"effective_lsn"` + // User-specified WAL LSN of the ref database instance. + // + // Input: For specifying the WAL LSN to create a child instance. Optional. + // Output: Only populated if provided as input to create a child instance. + Lsn types.String `tfsdk:"lsn"` + // Name of the ref database instance. + Name types.String `tfsdk:"name"` + // Id of the ref database instance. + Uid types.String `tfsdk:"uid"` +} + +func (newState *DatabaseInstanceRef) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabaseInstanceRef) { +} + +func (newState *DatabaseInstanceRef) SyncEffectiveFieldsDuringRead(existingState DatabaseInstanceRef) { +} + +func (c DatabaseInstanceRef) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["branch_time"] = attrs["branch_time"].SetOptional() + attrs["effective_lsn"] = attrs["effective_lsn"].SetComputed() + attrs["lsn"] = attrs["lsn"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + attrs["uid"] = attrs["uid"].SetComputed() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabaseInstanceRef. +// Container types (types.Map, types.List, types.Set) and 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 DatabaseInstanceRef) 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, DatabaseInstanceRef +// only implements ToObjectValue() and Type(). +func (o DatabaseInstanceRef) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "branch_time": o.BranchTime, + "effective_lsn": o.EffectiveLsn, + "lsn": o.Lsn, + "name": o.Name, + "uid": o.Uid, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatabaseInstanceRef) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "branch_time": types.StringType, + "effective_lsn": types.StringType, + "lsn": types.StringType, + "name": types.StringType, + "uid": types.StringType, + }, + } +} + +// A DatabaseInstanceRole represents a Postgres role in a database instance. +type DatabaseInstanceRole struct { + // API-exposed Postgres role attributes + Attributes types.Object `tfsdk:"attributes"` + // The type of the role. + IdentityType types.String `tfsdk:"identity_type"` + // An enum value for a standard role that this role is a member of. + MembershipRole types.String `tfsdk:"membership_role"` + // The name of the role. This is the unique identifier for the role in an + // instance. + Name types.String `tfsdk:"name"` +} + +func (newState *DatabaseInstanceRole) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabaseInstanceRole) { +} + +func (newState *DatabaseInstanceRole) SyncEffectiveFieldsDuringRead(existingState DatabaseInstanceRole) { +} + +func (c DatabaseInstanceRole) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["attributes"] = attrs["attributes"].SetOptional() + attrs["identity_type"] = attrs["identity_type"].SetOptional() + attrs["membership_role"] = attrs["membership_role"].SetOptional() + attrs["name"] = attrs["name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabaseInstanceRole. +// Container types (types.Map, types.List, types.Set) and 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 DatabaseInstanceRole) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "attributes": reflect.TypeOf(DatabaseInstanceRoleAttributes{}), + } +} + +// 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, DatabaseInstanceRole +// only implements ToObjectValue() and Type(). +func (o DatabaseInstanceRole) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "identity_type": o.IdentityType, + "membership_role": o.MembershipRole, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatabaseInstanceRole) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": DatabaseInstanceRoleAttributes{}.Type(ctx), + "identity_type": types.StringType, + "membership_role": types.StringType, + "name": types.StringType, + }, + } +} + +// GetAttributes returns the value of the Attributes field in DatabaseInstanceRole as +// a DatabaseInstanceRoleAttributes value. +// If the field is unknown or null, the boolean return value is false. +func (o *DatabaseInstanceRole) GetAttributes(ctx context.Context) (DatabaseInstanceRoleAttributes, bool) { + var e DatabaseInstanceRoleAttributes + if o.Attributes.IsNull() || o.Attributes.IsUnknown() { + return e, false + } + var v []DatabaseInstanceRoleAttributes + d := o.Attributes.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 +} + +// SetAttributes sets the value of the Attributes field in DatabaseInstanceRole. +func (o *DatabaseInstanceRole) SetAttributes(ctx context.Context, v DatabaseInstanceRoleAttributes) { + vs := v.ToObjectValue(ctx) + o.Attributes = vs +} + +// Attributes that can be granted to a Postgres role. We are only implementing a +// subset for now, see xref: +// https://www.postgresql.org/docs/16/sql-createrole.html The values follow +// Postgres keyword naming e.g. CREATEDB, BYPASSRLS, etc. which is why they +// don't include typical underscores between words. We were requested to make +// this a nested object/struct representation since these are knobs from an +// external spec. +type DatabaseInstanceRoleAttributes struct { + Bypassrls types.Bool `tfsdk:"bypassrls"` + + Createdb types.Bool `tfsdk:"createdb"` + + Createrole types.Bool `tfsdk:"createrole"` +} + +func (newState *DatabaseInstanceRoleAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabaseInstanceRoleAttributes) { +} + +func (newState *DatabaseInstanceRoleAttributes) SyncEffectiveFieldsDuringRead(existingState DatabaseInstanceRoleAttributes) { +} + +func (c DatabaseInstanceRoleAttributes) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["bypassrls"] = attrs["bypassrls"].SetOptional() + attrs["createdb"] = attrs["createdb"].SetOptional() + attrs["createrole"] = attrs["createrole"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabaseInstanceRoleAttributes. +// Container types (types.Map, types.List, types.Set) and 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 DatabaseInstanceRoleAttributes) 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, DatabaseInstanceRoleAttributes +// only implements ToObjectValue() and Type(). +func (o DatabaseInstanceRoleAttributes) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bypassrls": o.Bypassrls, + "createdb": o.Createdb, + "createrole": o.Createrole, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatabaseInstanceRoleAttributes) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bypassrls": types.BoolType, + "createdb": types.BoolType, + "createrole": types.BoolType, }, } } @@ -514,7 +956,6 @@ type DatabaseTable struct { // rejected). DatabaseInstanceName types.String `tfsdk:"database_instance_name"` // Target Postgres database object (logical database) name for this table. - // This field is optional in all scenarios. // // When creating a table in a registered Postgres catalog, the target // Postgres database name is inferred to be that of the registered catalog. @@ -522,11 +963,9 @@ type DatabaseTable struct { // MUST match that of the registered catalog (or the request will be // rejected). // - // When creating a table in a standard catalog, the target database name is - // inferred to be that of the standard catalog. In this scenario, specifying - // this field will allow targeting an arbitrary postgres database. Note that - // this has implications for the `create_database_objects_is_missing` field - // in `spec`. + // When creating a table in a standard catalog, this field is required. In + // this scenario, specifying this field will allow targeting an arbitrary + // postgres database. LogicalDatabaseName types.String `tfsdk:"logical_database_name"` // Full three-part (catalog, schema, table) name of the table. Name types.String `tfsdk:"name"` @@ -616,36 +1055,6 @@ func (o DeleteDatabaseCatalogRequest) Type(ctx context.Context) attr.Type { } } -type DeleteDatabaseCatalogResponse struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDatabaseCatalogResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteDatabaseCatalogResponse) 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, DeleteDatabaseCatalogResponse -// only implements ToObjectValue() and Type(). -func (o DeleteDatabaseCatalogResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteDatabaseCatalogResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteDatabaseInstanceRequest struct { // By default, a instance cannot be deleted if it has descendant instances // created via PITR. If this flag is specified as true, all descendent @@ -699,33 +1108,52 @@ func (o DeleteDatabaseInstanceRequest) Type(ctx context.Context) attr.Type { } } -type DeleteDatabaseInstanceResponse struct { +type DeleteDatabaseInstanceRoleRequest struct { + // This is the AIP standard name for the equivalent of Postgres' `IF EXISTS` + // option + AllowMissing types.Bool `tfsdk:"-"` + + InstanceName types.String `tfsdk:"-"` + + Name types.String `tfsdk:"-"` + + ReassignOwnedTo types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDatabaseInstanceResponse. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDatabaseInstanceRoleRequest. // Container types (types.Map, types.List, types.Set) and 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 DeleteDatabaseInstanceResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a DeleteDatabaseInstanceRoleRequest) 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, DeleteDatabaseInstanceResponse +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteDatabaseInstanceRoleRequest // only implements ToObjectValue() and Type(). -func (o DeleteDatabaseInstanceResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o DeleteDatabaseInstanceRoleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "instance_name": o.InstanceName, + "name": o.Name, + "reassign_owned_to": o.ReassignOwnedTo, + }) } // Type implements basetypes.ObjectValuable. -func (o DeleteDatabaseInstanceResponse) Type(ctx context.Context) attr.Type { +func (o DeleteDatabaseInstanceRoleRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "instance_name": types.StringType, + "name": types.StringType, + "reassign_owned_to": types.StringType, + }, } } @@ -764,36 +1192,6 @@ func (o DeleteDatabaseTableRequest) Type(ctx context.Context) attr.Type { } } -type DeleteDatabaseTableResponse struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDatabaseTableResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteDatabaseTableResponse) 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, DeleteDatabaseTableResponse -// only implements ToObjectValue() and Type(). -func (o DeleteDatabaseTableResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteDatabaseTableResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteSyncedDatabaseTableRequest struct { Name types.String `tfsdk:"-"` } @@ -829,33 +1227,58 @@ func (o DeleteSyncedDatabaseTableRequest) Type(ctx context.Context) attr.Type { } } -type DeleteSyncedDatabaseTableResponse struct { +type DeltaTableSyncInfo struct { + // The timestamp when the above Delta version was committed in the source + // Delta table. Note: This is the Delta commit time, not the time the data + // was written to the synced table. + DeltaCommitTimestamp types.String `tfsdk:"delta_commit_timestamp"` + // The Delta Lake commit version that was last successfully synced. + DeltaCommitVersion types.Int64 `tfsdk:"delta_commit_version"` +} + +func (newState *DeltaTableSyncInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeltaTableSyncInfo) { +} + +func (newState *DeltaTableSyncInfo) SyncEffectiveFieldsDuringRead(existingState DeltaTableSyncInfo) { +} + +func (c DeltaTableSyncInfo) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["delta_commit_timestamp"] = attrs["delta_commit_timestamp"].SetOptional() + attrs["delta_commit_version"] = attrs["delta_commit_version"].SetOptional() + + return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSyncedDatabaseTableResponse. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaTableSyncInfo. // Container types (types.Map, types.List, types.Set) and 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 DeleteSyncedDatabaseTableResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a DeltaTableSyncInfo) 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, DeleteSyncedDatabaseTableResponse +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeltaTableSyncInfo // only implements ToObjectValue() and Type(). -func (o DeleteSyncedDatabaseTableResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o DeltaTableSyncInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "delta_commit_timestamp": o.DeltaCommitTimestamp, + "delta_commit_version": o.DeltaCommitVersion, + }) } // Type implements basetypes.ObjectValuable. -func (o DeleteSyncedDatabaseTableResponse) Type(ctx context.Context) attr.Type { +func (o DeltaTableSyncInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "delta_commit_timestamp": types.StringType, + "delta_commit_version": types.Int64Type, + }, } } @@ -897,25 +1320,16 @@ func (o FindDatabaseInstanceByUidRequest) Type(ctx context.Context) attr.Type { // Generates a credential that can be used to access database instances type GenerateDatabaseCredentialRequest struct { + // The returned token will be scoped to the union of instance_names and + // instances containing the specified UC tables, so instance_names is + // allowed to be empty. + Claims types.List `tfsdk:"claims"` // Instances to which the token will be scoped. InstanceNames types.List `tfsdk:"instance_names"` RequestId types.String `tfsdk:"request_id"` } -func (newState *GenerateDatabaseCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateDatabaseCredentialRequest) { -} - -func (newState *GenerateDatabaseCredentialRequest) SyncEffectiveFieldsDuringRead(existingState GenerateDatabaseCredentialRequest) { -} - -func (c GenerateDatabaseCredentialRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["instance_names"] = attrs["instance_names"].SetOptional() - attrs["request_id"] = attrs["request_id"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateDatabaseCredentialRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -925,6 +1339,7 @@ func (c GenerateDatabaseCredentialRequest) ApplySchemaCustomizations(attrs map[s // SDK values. func (a GenerateDatabaseCredentialRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ + "claims": reflect.TypeOf(RequestedClaims{}), "instance_names": reflect.TypeOf(types.String{}), } } @@ -936,6 +1351,7 @@ func (o GenerateDatabaseCredentialRequest) ToObjectValue(ctx context.Context) ba return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ + "claims": o.Claims, "instance_names": o.InstanceNames, "request_id": o.RequestId, }) @@ -945,6 +1361,9 @@ func (o GenerateDatabaseCredentialRequest) ToObjectValue(ctx context.Context) ba func (o GenerateDatabaseCredentialRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ + "claims": basetypes.ListType{ + ElemType: RequestedClaims{}.Type(ctx), + }, "instance_names": basetypes.ListType{ ElemType: types.StringType, }, @@ -953,6 +1372,32 @@ func (o GenerateDatabaseCredentialRequest) Type(ctx context.Context) attr.Type { } } +// GetClaims returns the value of the Claims field in GenerateDatabaseCredentialRequest as +// a slice of RequestedClaims values. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateDatabaseCredentialRequest) GetClaims(ctx context.Context) ([]RequestedClaims, bool) { + if o.Claims.IsNull() || o.Claims.IsUnknown() { + return nil, false + } + var v []RequestedClaims + d := o.Claims.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetClaims sets the value of the Claims field in GenerateDatabaseCredentialRequest. +func (o *GenerateDatabaseCredentialRequest) SetClaims(ctx context.Context, v []RequestedClaims) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["claims"] + t = t.(attr.TypeWithElementType).ElementType() + o.Claims = types.ListValueMust(t, vs) +} + // GetInstanceNames returns the value of the InstanceNames field in GenerateDatabaseCredentialRequest as // a slice of types.String values. // If the field is unknown or null, the boolean return value is false. @@ -974,30 +1419,140 @@ func (o *GenerateDatabaseCredentialRequest) SetInstanceNames(ctx context.Context for _, e := range v { vs = append(vs, e) } - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["instance_names"] - t = t.(attr.TypeWithElementType).ElementType() - o.InstanceNames = types.ListValueMust(t, vs) + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["instance_names"] + t = t.(attr.TypeWithElementType).ElementType() + o.InstanceNames = types.ListValueMust(t, vs) +} + +type GetDatabaseCatalogRequest struct { + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseCatalogRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetDatabaseCatalogRequest) 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, GetDatabaseCatalogRequest +// only implements ToObjectValue() and Type(). +func (o GetDatabaseCatalogRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDatabaseCatalogRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type GetDatabaseInstanceRequest struct { + // Name of the cluster to get. + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseInstanceRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetDatabaseInstanceRequest) 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, GetDatabaseInstanceRequest +// only implements ToObjectValue() and Type(). +func (o GetDatabaseInstanceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDatabaseInstanceRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type GetDatabaseInstanceRoleRequest struct { + InstanceName types.String `tfsdk:"-"` + + Name types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseInstanceRoleRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetDatabaseInstanceRoleRequest) 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, GetDatabaseInstanceRoleRequest +// only implements ToObjectValue() and Type(). +func (o GetDatabaseInstanceRoleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_name": o.InstanceName, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDatabaseInstanceRoleRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_name": types.StringType, + "name": types.StringType, + }, + } } -type GetDatabaseCatalogRequest struct { +type GetDatabaseTableRequest struct { Name types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseCatalogRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseTableRequest. // Container types (types.Map, types.List, types.Set) and 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 GetDatabaseCatalogRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GetDatabaseTableRequest) 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, GetDatabaseCatalogRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, GetDatabaseTableRequest // only implements ToObjectValue() and Type(). -func (o GetDatabaseCatalogRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GetDatabaseTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ @@ -1006,7 +1561,7 @@ func (o GetDatabaseCatalogRequest) ToObjectValue(ctx context.Context) basetypes. } // Type implements basetypes.ObjectValuable. -func (o GetDatabaseCatalogRequest) Type(ctx context.Context) attr.Type { +func (o GetDatabaseTableRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "name": types.StringType, @@ -1014,26 +1569,25 @@ func (o GetDatabaseCatalogRequest) Type(ctx context.Context) attr.Type { } } -type GetDatabaseInstanceRequest struct { - // Name of the cluster to get. +type GetSyncedDatabaseTableRequest struct { Name types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseInstanceRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSyncedDatabaseTableRequest. // Container types (types.Map, types.List, types.Set) and 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 GetDatabaseInstanceRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GetSyncedDatabaseTableRequest) 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, GetDatabaseInstanceRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, GetSyncedDatabaseTableRequest // only implements ToObjectValue() and Type(). -func (o GetDatabaseInstanceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o GetSyncedDatabaseTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ @@ -1042,7 +1596,7 @@ func (o GetDatabaseInstanceRequest) ToObjectValue(ctx context.Context) basetypes } // Type implements basetypes.ObjectValuable. -func (o GetDatabaseInstanceRequest) Type(ctx context.Context) attr.Type { +func (o GetSyncedDatabaseTableRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "name": types.StringType, @@ -1050,76 +1604,133 @@ func (o GetDatabaseInstanceRequest) Type(ctx context.Context) attr.Type { } } -type GetDatabaseTableRequest struct { - Name types.String `tfsdk:"-"` +type ListDatabaseInstanceRolesRequest struct { + InstanceName types.String `tfsdk:"-"` + // Upper bound for items returned. + PageSize types.Int64 `tfsdk:"-"` + // Pagination token to go to the next page of Database Instances. Requests + // first page if absent. + PageToken types.String `tfsdk:"-"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDatabaseTableRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDatabaseInstanceRolesRequest. // Container types (types.Map, types.List, types.Set) and 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 GetDatabaseTableRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a ListDatabaseInstanceRolesRequest) 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, GetDatabaseTableRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListDatabaseInstanceRolesRequest // only implements ToObjectValue() and Type(). -func (o GetDatabaseTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ListDatabaseInstanceRolesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "name": o.Name, + "instance_name": o.InstanceName, + "page_size": o.PageSize, + "page_token": o.PageToken, }) } // Type implements basetypes.ObjectValuable. -func (o GetDatabaseTableRequest) Type(ctx context.Context) attr.Type { +func (o ListDatabaseInstanceRolesRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "name": types.StringType, + "instance_name": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, }, } } -type GetSyncedDatabaseTableRequest struct { - Name types.String `tfsdk:"-"` +type ListDatabaseInstanceRolesResponse struct { + // List of database instance roles. + DatabaseInstanceRoles types.List `tfsdk:"database_instance_roles"` + // Pagination token to request the next page of instances. + NextPageToken types.String `tfsdk:"next_page_token"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSyncedDatabaseTableRequest. +func (newState *ListDatabaseInstanceRolesResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDatabaseInstanceRolesResponse) { +} + +func (newState *ListDatabaseInstanceRolesResponse) SyncEffectiveFieldsDuringRead(existingState ListDatabaseInstanceRolesResponse) { +} + +func (c ListDatabaseInstanceRolesResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["database_instance_roles"] = attrs["database_instance_roles"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDatabaseInstanceRolesResponse. // Container types (types.Map, types.List, types.Set) and 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 GetSyncedDatabaseTableRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} +func (a ListDatabaseInstanceRolesResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "database_instance_roles": reflect.TypeOf(DatabaseInstanceRole{}), + } } // 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, GetSyncedDatabaseTableRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListDatabaseInstanceRolesResponse // only implements ToObjectValue() and Type(). -func (o GetSyncedDatabaseTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ListDatabaseInstanceRolesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "name": o.Name, + "database_instance_roles": o.DatabaseInstanceRoles, + "next_page_token": o.NextPageToken, }) } // Type implements basetypes.ObjectValuable. -func (o GetSyncedDatabaseTableRequest) Type(ctx context.Context) attr.Type { +func (o ListDatabaseInstanceRolesResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "name": types.StringType, + "database_instance_roles": basetypes.ListType{ + ElemType: DatabaseInstanceRole{}.Type(ctx), + }, + "next_page_token": types.StringType, }, } } +// GetDatabaseInstanceRoles returns the value of the DatabaseInstanceRoles field in ListDatabaseInstanceRolesResponse as +// a slice of DatabaseInstanceRole values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListDatabaseInstanceRolesResponse) GetDatabaseInstanceRoles(ctx context.Context) ([]DatabaseInstanceRole, bool) { + if o.DatabaseInstanceRoles.IsNull() || o.DatabaseInstanceRoles.IsUnknown() { + return nil, false + } + var v []DatabaseInstanceRole + d := o.DatabaseInstanceRoles.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDatabaseInstanceRoles sets the value of the DatabaseInstanceRoles field in ListDatabaseInstanceRolesResponse. +func (o *ListDatabaseInstanceRolesResponse) SetDatabaseInstanceRoles(ctx context.Context, v []DatabaseInstanceRole) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["database_instance_roles"] + t = t.(attr.TypeWithElementType).ElementType() + o.DatabaseInstanceRoles = types.ListValueMust(t, vs) +} + type ListDatabaseInstancesRequest struct { // Upper bound for items returned. PageSize types.Int64 `tfsdk:"-"` @@ -1304,6 +1915,140 @@ func (o NewPipelineSpec) Type(ctx context.Context) attr.Type { } } +type RequestedClaims struct { + PermissionSet types.String `tfsdk:"permission_set"` + + Resources types.List `tfsdk:"resources"` +} + +func (newState *RequestedClaims) SyncEffectiveFieldsDuringCreateOrUpdate(plan RequestedClaims) { +} + +func (newState *RequestedClaims) SyncEffectiveFieldsDuringRead(existingState RequestedClaims) { +} + +func (c RequestedClaims) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["permission_set"] = attrs["permission_set"].SetOptional() + attrs["resources"] = attrs["resources"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RequestedClaims. +// Container types (types.Map, types.List, types.Set) and 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 RequestedClaims) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "resources": reflect.TypeOf(RequestedResource{}), + } +} + +// 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, RequestedClaims +// only implements ToObjectValue() and Type(). +func (o RequestedClaims) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_set": o.PermissionSet, + "resources": o.Resources, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RequestedClaims) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_set": types.StringType, + "resources": basetypes.ListType{ + ElemType: RequestedResource{}.Type(ctx), + }, + }, + } +} + +// GetResources returns the value of the Resources field in RequestedClaims as +// a slice of RequestedResource values. +// If the field is unknown or null, the boolean return value is false. +func (o *RequestedClaims) GetResources(ctx context.Context) ([]RequestedResource, bool) { + if o.Resources.IsNull() || o.Resources.IsUnknown() { + return nil, false + } + var v []RequestedResource + d := o.Resources.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResources sets the value of the Resources field in RequestedClaims. +func (o *RequestedClaims) SetResources(ctx context.Context, v []RequestedResource) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["resources"] + t = t.(attr.TypeWithElementType).ElementType() + o.Resources = types.ListValueMust(t, vs) +} + +type RequestedResource struct { + TableName types.String `tfsdk:"table_name"` + + UnspecifiedResourceName types.String `tfsdk:"unspecified_resource_name"` +} + +func (newState *RequestedResource) SyncEffectiveFieldsDuringCreateOrUpdate(plan RequestedResource) { +} + +func (newState *RequestedResource) SyncEffectiveFieldsDuringRead(existingState RequestedResource) { +} + +func (c RequestedResource) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["table_name"] = attrs["table_name"].SetOptional() + attrs["unspecified_resource_name"] = attrs["unspecified_resource_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RequestedResource. +// Container types (types.Map, types.List, types.Set) and 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 RequestedResource) 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, RequestedResource +// only implements ToObjectValue() and Type(). +func (o RequestedResource) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table_name": o.TableName, + "unspecified_resource_name": o.UnspecifiedResourceName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RequestedResource) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table_name": types.StringType, + "unspecified_resource_name": types.StringType, + }, + } +} + // Next field marker: 12 type SyncedDatabaseTable struct { // Synced Table data synchronization status @@ -1316,7 +2061,6 @@ type SyncedDatabaseTable struct { // the request will be rejected). DatabaseInstanceName types.String `tfsdk:"database_instance_name"` // Target Postgres database object (logical database) name for this table. - // This field is optional in all scenarios. // // When creating a synced table in a registered Postgres catalog, the target // Postgres database name is inferred to be that of the registered catalog. @@ -1324,14 +2068,14 @@ type SyncedDatabaseTable struct { // MUST match that of the registered catalog (or the request will be // rejected). // - // When creating a synced table in a standard catalog, the target database - // name is inferred to be that of the standard catalog. In this scenario, - // specifying this field will allow targeting an arbitrary postgres - // database. + // When creating a synced table in a standard catalog, this field is + // required. In this scenario, specifying this field will allow targeting an + // arbitrary postgres database. Note that this has implications for the + // `create_database_objects_is_missing` field in `spec`. LogicalDatabaseName types.String `tfsdk:"logical_database_name"` // Full three-part (catalog, schema, table) name of the table. Name types.String `tfsdk:"name"` - // Specification of a synced database table. + Spec types.Object `tfsdk:"spec"` // The provisioning state of the synced table entity in Unity Catalog. This // is distinct from the state of the data synchronization pipeline (i.e. the @@ -1462,12 +2206,12 @@ func (o *SyncedDatabaseTable) SetSpec(ctx context.Context, v SyncedTableSpec) { type SyncedTableContinuousUpdateStatus struct { // Progress of the initial data synchronization. InitialPipelineSyncProgress types.Object `tfsdk:"initial_pipeline_sync_progress"` - // The last source table Delta version that was synced to the synced table. - // Note that this Delta version may not be completely synced to the synced - // table yet. + // The last source table Delta version that was successfully synced to the + // synced table. LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version"` - // The timestamp of the last time any data was synchronized from the source - // table to the synced table. + // The end timestamp of the last time any data was synchronized from the + // source table to the synced table. This is when the data is available in + // the synced table. Timestamp types.String `tfsdk:"timestamp"` } @@ -1553,14 +2297,14 @@ func (o *SyncedTableContinuousUpdateStatus) SetInitialPipelineSyncProgress(ctx c // Detailed status of a synced table. Shown if the synced table is in the // OFFLINE_FAILED or the SYNCED_PIPELINE_FAILED state. type SyncedTableFailedStatus struct { - // The last source table Delta version that was synced to the synced table. - // Note that this Delta version may only be partially synced to the synced - // table. Only populated if the table is still synced and available for - // serving. + // The last source table Delta version that was successfully synced to the + // synced table. The last source table Delta version that was synced to the + // synced table. Only populated if the table is still synced and available + // for serving. LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version"` - // The timestamp of the last time any data was synchronized from the source - // table to the synced table. Only populated if the table is still synced - // and available for serving. + // The end timestamp of the last time any data was synchronized from the + // source table to the synced table. Only populated if the table is still + // synced and available for serving. Timestamp types.String `tfsdk:"timestamp"` } @@ -1681,6 +2425,97 @@ func (o SyncedTablePipelineProgress) Type(ctx context.Context) attr.Type { } } +type SyncedTablePosition struct { + DeltaTableSyncInfo types.Object `tfsdk:"delta_table_sync_info"` + // The end timestamp of the most recent successful synchronization. This is + // the time when the data is available in the synced table. + SyncEndTimestamp types.String `tfsdk:"sync_end_timestamp"` + // The starting timestamp of the most recent successful synchronization from + // the source table to the destination (synced) table. Note this is the + // starting timestamp of the sync operation, not the end time. E.g., for a + // batch, this is the time when the sync operation started. + SyncStartTimestamp types.String `tfsdk:"sync_start_timestamp"` +} + +func (newState *SyncedTablePosition) SyncEffectiveFieldsDuringCreateOrUpdate(plan SyncedTablePosition) { +} + +func (newState *SyncedTablePosition) SyncEffectiveFieldsDuringRead(existingState SyncedTablePosition) { +} + +func (c SyncedTablePosition) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["delta_table_sync_info"] = attrs["delta_table_sync_info"].SetOptional() + attrs["sync_end_timestamp"] = attrs["sync_end_timestamp"].SetOptional() + attrs["sync_start_timestamp"] = attrs["sync_start_timestamp"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SyncedTablePosition. +// Container types (types.Map, types.List, types.Set) and 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 SyncedTablePosition) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "delta_table_sync_info": reflect.TypeOf(DeltaTableSyncInfo{}), + } +} + +// 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, SyncedTablePosition +// only implements ToObjectValue() and Type(). +func (o SyncedTablePosition) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "delta_table_sync_info": o.DeltaTableSyncInfo, + "sync_end_timestamp": o.SyncEndTimestamp, + "sync_start_timestamp": o.SyncStartTimestamp, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SyncedTablePosition) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "delta_table_sync_info": DeltaTableSyncInfo{}.Type(ctx), + "sync_end_timestamp": types.StringType, + "sync_start_timestamp": types.StringType, + }, + } +} + +// GetDeltaTableSyncInfo returns the value of the DeltaTableSyncInfo field in SyncedTablePosition as +// a DeltaTableSyncInfo value. +// If the field is unknown or null, the boolean return value is false. +func (o *SyncedTablePosition) GetDeltaTableSyncInfo(ctx context.Context) (DeltaTableSyncInfo, bool) { + var e DeltaTableSyncInfo + if o.DeltaTableSyncInfo.IsNull() || o.DeltaTableSyncInfo.IsUnknown() { + return e, false + } + var v []DeltaTableSyncInfo + d := o.DeltaTableSyncInfo.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 +} + +// SetDeltaTableSyncInfo sets the value of the DeltaTableSyncInfo field in SyncedTablePosition. +func (o *SyncedTablePosition) SetDeltaTableSyncInfo(ctx context.Context, v DeltaTableSyncInfo) { + vs := v.ToObjectValue(ctx) + o.DeltaTableSyncInfo = vs +} + // Detailed status of a synced table. Shown if the synced table is in the // PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state. type SyncedTableProvisioningStatus struct { @@ -1910,26 +2745,34 @@ func (o *SyncedTableSpec) SetPrimaryKeyColumns(ctx context.Context, v []types.St // Status of a synced table. type SyncedTableStatus struct { - // Detailed status of a synced table. Shown if the synced table is in the - // SYNCED_CONTINUOUS_UPDATE or the SYNCED_UPDATING_PIPELINE_RESOURCES state. ContinuousUpdateStatus types.Object `tfsdk:"continuous_update_status"` // The state of the synced table. DetailedState types.String `tfsdk:"detailed_state"` - // Detailed status of a synced table. Shown if the synced table is in the - // OFFLINE_FAILED or the SYNCED_PIPELINE_FAILED state. + FailedStatus types.Object `tfsdk:"failed_status"` + // Summary of the last successful synchronization from source to + // destination. + // + // Will always be present if there has been a successful sync. Even if the + // most recent syncs have failed. + // + // Limitation: The only exception is if the synced table is doing a FULL + // REFRESH, then the last sync information will not be available until the + // full refresh is complete. This limitation will be addressed in a future + // version. + // + // This top-level field is a convenience for consumers who want easy access + // to last sync information without having to traverse detailed_status. + LastSync types.Object `tfsdk:"last_sync"` // A text description of the current state of the synced table. Message types.String `tfsdk:"message"` // ID of the associated pipeline. The pipeline ID may have been provided by // the client (in the case of bin packing), or generated by the server (when // creating a new pipeline). PipelineId types.String `tfsdk:"pipeline_id"` - // Detailed status of a synced table. Shown if the synced table is in the - // PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT - // state. + ProvisioningStatus types.Object `tfsdk:"provisioning_status"` - // Detailed status of a synced table. Shown if the synced table is in the - // SYNCED_TRIGGERED_UPDATE or the SYNCED_NO_PENDING_UPDATE state. + TriggeredUpdateStatus types.Object `tfsdk:"triggered_update_status"` } @@ -1943,6 +2786,7 @@ func (c SyncedTableStatus) ApplySchemaCustomizations(attrs map[string]tfschema.A attrs["continuous_update_status"] = attrs["continuous_update_status"].SetOptional() attrs["detailed_state"] = attrs["detailed_state"].SetOptional() attrs["failed_status"] = attrs["failed_status"].SetOptional() + attrs["last_sync"] = attrs["last_sync"].SetOptional() attrs["message"] = attrs["message"].SetOptional() attrs["pipeline_id"] = attrs["pipeline_id"].SetOptional() attrs["provisioning_status"] = attrs["provisioning_status"].SetOptional() @@ -1962,6 +2806,7 @@ func (a SyncedTableStatus) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{ "continuous_update_status": reflect.TypeOf(SyncedTableContinuousUpdateStatus{}), "failed_status": reflect.TypeOf(SyncedTableFailedStatus{}), + "last_sync": reflect.TypeOf(SyncedTablePosition{}), "provisioning_status": reflect.TypeOf(SyncedTableProvisioningStatus{}), "triggered_update_status": reflect.TypeOf(SyncedTableTriggeredUpdateStatus{}), } @@ -1977,6 +2822,7 @@ func (o SyncedTableStatus) ToObjectValue(ctx context.Context) basetypes.ObjectVa "continuous_update_status": o.ContinuousUpdateStatus, "detailed_state": o.DetailedState, "failed_status": o.FailedStatus, + "last_sync": o.LastSync, "message": o.Message, "pipeline_id": o.PipelineId, "provisioning_status": o.ProvisioningStatus, @@ -1991,6 +2837,7 @@ func (o SyncedTableStatus) Type(ctx context.Context) attr.Type { "continuous_update_status": SyncedTableContinuousUpdateStatus{}.Type(ctx), "detailed_state": types.StringType, "failed_status": SyncedTableFailedStatus{}.Type(ctx), + "last_sync": SyncedTablePosition{}.Type(ctx), "message": types.StringType, "pipeline_id": types.StringType, "provisioning_status": SyncedTableProvisioningStatus{}.Type(ctx), @@ -2055,6 +2902,34 @@ func (o *SyncedTableStatus) SetFailedStatus(ctx context.Context, v SyncedTableFa o.FailedStatus = vs } +// GetLastSync returns the value of the LastSync field in SyncedTableStatus as +// a SyncedTablePosition value. +// If the field is unknown or null, the boolean return value is false. +func (o *SyncedTableStatus) GetLastSync(ctx context.Context) (SyncedTablePosition, bool) { + var e SyncedTablePosition + if o.LastSync.IsNull() || o.LastSync.IsUnknown() { + return e, false + } + var v []SyncedTablePosition + d := o.LastSync.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 +} + +// SetLastSync sets the value of the LastSync field in SyncedTableStatus. +func (o *SyncedTableStatus) SetLastSync(ctx context.Context, v SyncedTablePosition) { + vs := v.ToObjectValue(ctx) + o.LastSync = vs +} + // GetProvisioningStatus returns the value of the ProvisioningStatus field in SyncedTableStatus as // a SyncedTableProvisioningStatus value. // If the field is unknown or null, the boolean return value is false. @@ -2114,12 +2989,12 @@ func (o *SyncedTableStatus) SetTriggeredUpdateStatus(ctx context.Context, v Sync // Detailed status of a synced table. Shown if the synced table is in the // SYNCED_TRIGGERED_UPDATE or the SYNCED_NO_PENDING_UPDATE state. type SyncedTableTriggeredUpdateStatus struct { - // The last source table Delta version that was synced to the synced table. - // Note that this Delta version may not be completely synced to the synced - // table yet. + // The last source table Delta version that was successfully synced to the + // synced table. LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version"` - // The timestamp of the last time any data was synchronized from the source - // table to the synced table. + // The end timestamp of the last time any data was synchronized from the + // source table to the synced table. This is when the data is available in + // the synced table. Timestamp types.String `tfsdk:"timestamp"` // Progress of the active data synchronization pipeline. TriggeredUpdateProgress types.Object `tfsdk:"triggered_update_progress"` @@ -2205,8 +3080,6 @@ func (o *SyncedTableTriggeredUpdateStatus) SetTriggeredUpdateProgress(ctx contex } type UpdateDatabaseInstanceRequest struct { - // A DatabaseInstance represents a logical Postgres instance, comprised of - // both compute and storage. DatabaseInstance types.Object `tfsdk:"database_instance"` // The name of the instance. This is the unique identifier for the instance. Name types.String `tfsdk:"-"` diff --git a/internal/service/files_tf/legacy_model.go b/internal/service/files_tf/legacy_model.go index 18b32cacbf..af29f78899 100755 --- a/internal/service/files_tf/legacy_model.go +++ b/internal/service/files_tf/legacy_model.go @@ -30,19 +30,6 @@ type AddBlock_SdkV2 struct { Handle types.Int64 `tfsdk:"handle"` } -func (newState *AddBlock_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddBlock_SdkV2) { -} - -func (newState *AddBlock_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddBlock_SdkV2) { -} - -func (c AddBlock_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["data"] = attrs["data"].SetRequired() - attrs["handle"] = attrs["handle"].SetRequired() - - return attrs -} - // 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 @@ -122,18 +109,6 @@ type Close_SdkV2 struct { Handle types.Int64 `tfsdk:"handle"` } -func (newState *Close_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Close_SdkV2) { -} - -func (newState *Close_SdkV2) SyncEffectiveFieldsDuringRead(existingState Close_SdkV2) { -} - -func (c Close_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["handle"] = attrs["handle"].SetRequired() - - return attrs -} - // 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 @@ -213,19 +188,6 @@ type Create_SdkV2 struct { Path types.String `tfsdk:"path"` } -func (newState *Create_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Create_SdkV2) { -} - -func (newState *Create_SdkV2) SyncEffectiveFieldsDuringRead(existingState Create_SdkV2) { -} - -func (c Create_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["overwrite"] = attrs["overwrite"].SetOptional() - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 @@ -383,19 +345,6 @@ type Delete_SdkV2 struct { Recursive types.Bool `tfsdk:"recursive"` } -func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete_SdkV2) { -} - -func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringRead(existingState Delete_SdkV2) { -} - -func (c Delete_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetRequired() - attrs["recursive"] = attrs["recursive"].SetOptional() - - return attrs -} - // 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 @@ -1235,18 +1184,6 @@ type MkDirs_SdkV2 struct { Path types.String `tfsdk:"path"` } -func (newState *MkDirs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MkDirs_SdkV2) { -} - -func (newState *MkDirs_SdkV2) SyncEffectiveFieldsDuringRead(existingState MkDirs_SdkV2) { -} - -func (c MkDirs_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 @@ -1328,19 +1265,6 @@ type Move_SdkV2 struct { SourcePath types.String `tfsdk:"source_path"` } -func (newState *Move_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Move_SdkV2) { -} - -func (newState *Move_SdkV2) SyncEffectiveFieldsDuringRead(existingState Move_SdkV2) { -} - -func (c Move_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["destination_path"] = attrs["destination_path"].SetRequired() - attrs["source_path"] = attrs["source_path"].SetRequired() - - return attrs -} - // 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 @@ -1424,20 +1348,6 @@ type Put_SdkV2 struct { Path types.String `tfsdk:"path"` } -func (newState *Put_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Put_SdkV2) { -} - -func (newState *Put_SdkV2) SyncEffectiveFieldsDuringRead(existingState Put_SdkV2) { -} - -func (c Put_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["contents"] = attrs["contents"].SetOptional() - attrs["overwrite"] = attrs["overwrite"].SetOptional() - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/files_tf/model.go b/internal/service/files_tf/model.go index 306c4b2d34..60d01b9db9 100755 --- a/internal/service/files_tf/model.go +++ b/internal/service/files_tf/model.go @@ -30,19 +30,6 @@ type AddBlock struct { Handle types.Int64 `tfsdk:"handle"` } -func (newState *AddBlock) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddBlock) { -} - -func (newState *AddBlock) SyncEffectiveFieldsDuringRead(existingState AddBlock) { -} - -func (c AddBlock) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["data"] = attrs["data"].SetRequired() - attrs["handle"] = attrs["handle"].SetRequired() - - return attrs -} - // 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 @@ -122,18 +109,6 @@ type Close struct { Handle types.Int64 `tfsdk:"handle"` } -func (newState *Close) SyncEffectiveFieldsDuringCreateOrUpdate(plan Close) { -} - -func (newState *Close) SyncEffectiveFieldsDuringRead(existingState Close) { -} - -func (c Close) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["handle"] = attrs["handle"].SetRequired() - - return attrs -} - // 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 @@ -213,19 +188,6 @@ type Create struct { Path types.String `tfsdk:"path"` } -func (newState *Create) SyncEffectiveFieldsDuringCreateOrUpdate(plan Create) { -} - -func (newState *Create) SyncEffectiveFieldsDuringRead(existingState Create) { -} - -func (c Create) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["overwrite"] = attrs["overwrite"].SetOptional() - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 @@ -383,19 +345,6 @@ type Delete struct { Recursive types.Bool `tfsdk:"recursive"` } -func (newState *Delete) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete) { -} - -func (newState *Delete) SyncEffectiveFieldsDuringRead(existingState Delete) { -} - -func (c Delete) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetRequired() - attrs["recursive"] = attrs["recursive"].SetOptional() - - return attrs -} - // 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 @@ -1235,18 +1184,6 @@ type MkDirs struct { Path types.String `tfsdk:"path"` } -func (newState *MkDirs) SyncEffectiveFieldsDuringCreateOrUpdate(plan MkDirs) { -} - -func (newState *MkDirs) SyncEffectiveFieldsDuringRead(existingState MkDirs) { -} - -func (c MkDirs) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 @@ -1328,19 +1265,6 @@ type Move struct { SourcePath types.String `tfsdk:"source_path"` } -func (newState *Move) SyncEffectiveFieldsDuringCreateOrUpdate(plan Move) { -} - -func (newState *Move) SyncEffectiveFieldsDuringRead(existingState Move) { -} - -func (c Move) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["destination_path"] = attrs["destination_path"].SetRequired() - attrs["source_path"] = attrs["source_path"].SetRequired() - - return attrs -} - // 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 @@ -1424,20 +1348,6 @@ type Put struct { Path types.String `tfsdk:"path"` } -func (newState *Put) SyncEffectiveFieldsDuringCreateOrUpdate(plan Put) { -} - -func (newState *Put) SyncEffectiveFieldsDuringRead(existingState Put) { -} - -func (c Put) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["contents"] = attrs["contents"].SetOptional() - attrs["overwrite"] = attrs["overwrite"].SetOptional() - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/iam_tf/legacy_model.go b/internal/service/iam_tf/legacy_model.go index 1341040da0..5be5c53f2c 100755 --- a/internal/service/iam_tf/legacy_model.go +++ b/internal/service/iam_tf/legacy_model.go @@ -26,7 +26,7 @@ import ( type AccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -1056,6 +1056,36 @@ func (o GetGroupRequest_SdkV2) Type(ctx context.Context) attr.Type { } } +type GetPasswordPermissionLevelsRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPasswordPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetPasswordPermissionLevelsRequest_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, GetPasswordPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPasswordPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPasswordPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetPasswordPermissionLevelsResponse_SdkV2 struct { // Specific permission levels PermissionLevels types.List `tfsdk:"permission_levels"` @@ -1134,6 +1164,36 @@ func (o *GetPasswordPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx cont o.PermissionLevels = types.ListValueMust(t, vs) } +type GetPasswordPermissionsRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPasswordPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetPasswordPermissionsRequest_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, GetPasswordPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPasswordPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPasswordPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetPermissionLevelsRequest_SdkV2 struct { RequestObjectId types.String `tfsdk:"-"` // The type of the request object. Can be one of the following: alerts, @@ -2674,6 +2734,36 @@ func (o ListWorkspaceAssignmentRequest_SdkV2) Type(ctx context.Context) attr.Typ } } +type MeRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MeRequest. +// Container types (types.Map, types.List, types.Set) and 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 MeRequest_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, MeRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MeRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o MeRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type MigratePermissionsRequest_SdkV2 struct { // The name of the workspace group that permissions will be migrated from. FromWorkspaceGroupName types.String `tfsdk:"from_workspace_group_name"` @@ -2686,21 +2776,6 @@ type MigratePermissionsRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"workspace_id"` } -func (newState *MigratePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigratePermissionsRequest_SdkV2) { -} - -func (newState *MigratePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState MigratePermissionsRequest_SdkV2) { -} - -func (c MigratePermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["from_workspace_group_name"] = attrs["from_workspace_group_name"].SetRequired() - attrs["size"] = attrs["size"].SetOptional() - attrs["to_account_group_name"] = attrs["to_account_group_name"].SetRequired() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 @@ -2936,20 +3011,6 @@ type PartialUpdate_SdkV2 struct { Schemas types.List `tfsdk:"schemas"` } -func (newState *PartialUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartialUpdate_SdkV2) { -} - -func (newState *PartialUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState PartialUpdate_SdkV2) { -} - -func (c PartialUpdate_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["Operations"] = attrs["Operations"].SetOptional() - attrs["schemas"] = attrs["schemas"].SetOptional() - - return attrs -} - // 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 @@ -3435,18 +3496,6 @@ type PasswordPermissionsRequest_SdkV2 struct { AccessControlList types.List `tfsdk:"access_control_list"` } -func (newState *PasswordPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissionsRequest_SdkV2) { -} - -func (newState *PasswordPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordPermissionsRequest_SdkV2) { -} - -func (c PasswordPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - - return attrs -} - // 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 @@ -3600,7 +3649,7 @@ type Permission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3936,7 +3985,7 @@ func (o PermissionOutput_SdkV2) Type(ctx context.Context) attr.Type { type PermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4565,20 +4614,6 @@ type SetObjectPermissions_SdkV2 struct { RequestObjectType types.String `tfsdk:"-"` } -func (newState *SetObjectPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetObjectPermissions_SdkV2) { -} - -func (newState *SetObjectPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetObjectPermissions_SdkV2) { -} - -func (c SetObjectPermissions_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["request_object_id"] = attrs["request_object_id"].SetRequired() - attrs["request_object_type"] = attrs["request_object_type"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetObjectPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4656,20 +4691,6 @@ type UpdateObjectPermissions_SdkV2 struct { RequestObjectType types.String `tfsdk:"-"` } -func (newState *UpdateObjectPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateObjectPermissions_SdkV2) { -} - -func (newState *UpdateObjectPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateObjectPermissions_SdkV2) { -} - -func (c UpdateObjectPermissions_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["request_object_id"] = attrs["request_object_id"].SetRequired() - attrs["request_object_type"] = attrs["request_object_type"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateObjectPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4772,20 +4793,6 @@ type UpdateRuleSetRequest_SdkV2 struct { RuleSet types.List `tfsdk:"rule_set"` } -func (newState *UpdateRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRuleSetRequest_SdkV2) { -} - -func (newState *UpdateRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRuleSetRequest_SdkV2) { -} - -func (c UpdateRuleSetRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["rule_set"] = attrs["rule_set"].SetRequired() - attrs["rule_set"] = attrs["rule_set"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -4863,20 +4870,6 @@ type UpdateWorkspaceAssignments_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *UpdateWorkspaceAssignments_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceAssignments_SdkV2) { -} - -func (newState *UpdateWorkspaceAssignments_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceAssignments_SdkV2) { -} - -func (c UpdateWorkspaceAssignments_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["permissions"] = attrs["permissions"].SetOptional() - attrs["principal_id"] = attrs["principal_id"].SetRequired() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/iam_tf/model.go b/internal/service/iam_tf/model.go index 14cb3e7372..5617f27dbf 100755 --- a/internal/service/iam_tf/model.go +++ b/internal/service/iam_tf/model.go @@ -25,7 +25,7 @@ import ( type AccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -1054,6 +1054,36 @@ func (o GetGroupRequest) Type(ctx context.Context) attr.Type { } } +type GetPasswordPermissionLevelsRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPasswordPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetPasswordPermissionLevelsRequest) 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, GetPasswordPermissionLevelsRequest +// only implements ToObjectValue() and Type(). +func (o GetPasswordPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPasswordPermissionLevelsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetPasswordPermissionLevelsResponse struct { // Specific permission levels PermissionLevels types.List `tfsdk:"permission_levels"` @@ -1132,6 +1162,36 @@ func (o *GetPasswordPermissionLevelsResponse) SetPermissionLevels(ctx context.Co o.PermissionLevels = types.ListValueMust(t, vs) } +type GetPasswordPermissionsRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPasswordPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetPasswordPermissionsRequest) 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, GetPasswordPermissionsRequest +// only implements ToObjectValue() and Type(). +func (o GetPasswordPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPasswordPermissionsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetPermissionLevelsRequest struct { RequestObjectId types.String `tfsdk:"-"` // The type of the request object. Can be one of the following: alerts, @@ -2671,6 +2731,36 @@ func (o ListWorkspaceAssignmentRequest) Type(ctx context.Context) attr.Type { } } +type MeRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MeRequest. +// Container types (types.Map, types.List, types.Set) and 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 MeRequest) 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, MeRequest +// only implements ToObjectValue() and Type(). +func (o MeRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o MeRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type MigratePermissionsRequest struct { // The name of the workspace group that permissions will be migrated from. FromWorkspaceGroupName types.String `tfsdk:"from_workspace_group_name"` @@ -2683,21 +2773,6 @@ type MigratePermissionsRequest struct { WorkspaceId types.Int64 `tfsdk:"workspace_id"` } -func (newState *MigratePermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigratePermissionsRequest) { -} - -func (newState *MigratePermissionsRequest) SyncEffectiveFieldsDuringRead(existingState MigratePermissionsRequest) { -} - -func (c MigratePermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["from_workspace_group_name"] = attrs["from_workspace_group_name"].SetRequired() - attrs["size"] = attrs["size"].SetOptional() - attrs["to_account_group_name"] = attrs["to_account_group_name"].SetRequired() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 @@ -2933,20 +3008,6 @@ type PartialUpdate struct { Schemas types.List `tfsdk:"schemas"` } -func (newState *PartialUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartialUpdate) { -} - -func (newState *PartialUpdate) SyncEffectiveFieldsDuringRead(existingState PartialUpdate) { -} - -func (c PartialUpdate) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["Operations"] = attrs["Operations"].SetOptional() - attrs["schemas"] = attrs["schemas"].SetOptional() - - return attrs -} - // 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 @@ -3432,18 +3493,6 @@ type PasswordPermissionsRequest struct { AccessControlList types.List `tfsdk:"access_control_list"` } -func (newState *PasswordPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissionsRequest) { -} - -func (newState *PasswordPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState PasswordPermissionsRequest) { -} - -func (c PasswordPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - - return attrs -} - // 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 @@ -3597,7 +3646,7 @@ type Permission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3932,7 +3981,7 @@ func (o PermissionOutput) Type(ctx context.Context) attr.Type { type PermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4561,20 +4610,6 @@ type SetObjectPermissions struct { RequestObjectType types.String `tfsdk:"-"` } -func (newState *SetObjectPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetObjectPermissions) { -} - -func (newState *SetObjectPermissions) SyncEffectiveFieldsDuringRead(existingState SetObjectPermissions) { -} - -func (c SetObjectPermissions) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["request_object_id"] = attrs["request_object_id"].SetRequired() - attrs["request_object_type"] = attrs["request_object_type"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetObjectPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4652,20 +4687,6 @@ type UpdateObjectPermissions struct { RequestObjectType types.String `tfsdk:"-"` } -func (newState *UpdateObjectPermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateObjectPermissions) { -} - -func (newState *UpdateObjectPermissions) SyncEffectiveFieldsDuringRead(existingState UpdateObjectPermissions) { -} - -func (c UpdateObjectPermissions) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["request_object_id"] = attrs["request_object_id"].SetRequired() - attrs["request_object_type"] = attrs["request_object_type"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateObjectPermissions. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4768,19 +4789,6 @@ type UpdateRuleSetRequest struct { RuleSet types.Object `tfsdk:"rule_set"` } -func (newState *UpdateRuleSetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRuleSetRequest) { -} - -func (newState *UpdateRuleSetRequest) SyncEffectiveFieldsDuringRead(existingState UpdateRuleSetRequest) { -} - -func (c UpdateRuleSetRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["rule_set"] = attrs["rule_set"].SetRequired() - - return attrs -} - // 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 @@ -4858,20 +4866,6 @@ type UpdateWorkspaceAssignments struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *UpdateWorkspaceAssignments) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceAssignments) { -} - -func (newState *UpdateWorkspaceAssignments) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceAssignments) { -} - -func (c UpdateWorkspaceAssignments) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["permissions"] = attrs["permissions"].SetOptional() - attrs["principal_id"] = attrs["principal_id"].SetRequired() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/jobs_tf/legacy_model.go b/internal/service/jobs_tf/legacy_model.go index 235f04d622..a46ba15dc4 100755 --- a/internal/service/jobs_tf/legacy_model.go +++ b/internal/service/jobs_tf/legacy_model.go @@ -275,12 +275,7 @@ type BaseRun_SdkV2 struct { RunName types.String `tfsdk:"run_name"` // The URL to the detail page of the run. RunPageUrl types.String `tfsdk:"run_page_url"` - // 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"` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. @@ -300,7 +295,7 @@ type BaseRun_SdkV2 struct { StartTime types.Int64 `tfsdk:"start_time"` // Deprecated. Please use the `status` field instead. State types.List `tfsdk:"state"` - // The current status of the run + Status types.List `tfsdk:"status"` // 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. If @@ -308,22 +303,9 @@ type BaseRun_SdkV2 struct { // :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"` - // The type of trigger that fired this run. - // - // * `PERIODIC`: Schedules that periodically trigger runs, such as a cron - // scheduler. * `ONE_TIME`: One time triggers that fire a single run. This - // occurs you triggered a single run on demand through the UI or the API. * - // `RETRY`: Indicates a run that is triggered as a retry of a previously - // failed run. This occurs when you request to re-run the job in case of - // failures. * `RUN_JOB_TASK`: Indicates a run that is triggered using a Run - // Job task. * `FILE_ARRIVAL`: Indicates a run that is triggered by a file - // arrival. * `CONTINUOUS`: Indicates a run that is triggered by a - // continuous job. * `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. * `MODEL`: Indicates a run that is - // triggered by a model update. + Trigger types.String `tfsdk:"trigger"` - // Additional details about what triggered the run + TriggerInfo types.List `tfsdk:"trigger_info"` } @@ -831,19 +813,6 @@ type CancelAllRuns_SdkV2 struct { JobId types.Int64 `tfsdk:"job_id"` } -func (newState *CancelAllRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelAllRuns_SdkV2) { -} - -func (newState *CancelAllRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelAllRuns_SdkV2) { -} - -func (c CancelAllRuns_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["all_queued_runs"] = attrs["all_queued_runs"].SetOptional() - attrs["job_id"] = attrs["job_id"].SetOptional() - - return attrs -} - // 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 @@ -912,18 +881,6 @@ type CancelRun_SdkV2 struct { RunId types.Int64 `tfsdk:"run_id"` } -func (newState *CancelRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRun_SdkV2) { -} - -func (newState *CancelRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelRun_SdkV2) { -} - -func (c CancelRun_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -1706,7 +1663,7 @@ 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"` - // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health"` // 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. @@ -1742,11 +1699,7 @@ type CreateJob_SdkV2 struct { PerformanceTarget types.String `tfsdk:"performance_target"` // The queue settings of the job. Queue types.List `tfsdk:"queue"` - // 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"` // 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 @@ -1777,53 +1730,6 @@ type CreateJob_SdkV2 struct { WebhookNotifications types.List `tfsdk:"webhook_notifications"` } -func (newState *CreateJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateJob_SdkV2) { -} - -func (newState *CreateJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateJob_SdkV2) { -} - -func (c CreateJob_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["continuous"] = attrs["continuous"].SetOptional() - attrs["continuous"] = attrs["continuous"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["deployment"] = attrs["deployment"].SetOptional() - attrs["deployment"] = attrs["deployment"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["description"] = attrs["description"].SetOptional() - attrs["edit_mode"] = attrs["edit_mode"].SetOptional() - attrs["email_notifications"] = attrs["email_notifications"].SetOptional() - attrs["email_notifications"] = attrs["email_notifications"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["environment"] = attrs["environment"].SetOptional() - attrs["format"] = attrs["format"].SetOptional() - attrs["git_source"] = attrs["git_source"].SetOptional() - attrs["git_source"] = attrs["git_source"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["health"] = attrs["health"].SetOptional() - attrs["health"] = attrs["health"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["job_cluster"] = attrs["job_cluster"].SetOptional() - attrs["max_concurrent_runs"] = attrs["max_concurrent_runs"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["notification_settings"] = attrs["notification_settings"].SetOptional() - attrs["notification_settings"] = attrs["notification_settings"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["parameter"] = attrs["parameter"].SetOptional() - attrs["performance_target"] = attrs["performance_target"].SetOptional() - attrs["queue"] = attrs["queue"].SetOptional() - attrs["queue"] = attrs["queue"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["run_as"] = attrs["run_as"].SetOptional() - attrs["run_as"] = attrs["run_as"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["schedule"] = attrs["schedule"].SetOptional() - attrs["schedule"] = attrs["schedule"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["tags"] = attrs["tags"].SetOptional() - attrs["task"] = attrs["task"].SetOptional() - attrs["timeout_seconds"] = attrs["timeout_seconds"].SetOptional() - attrs["trigger"] = attrs["trigger"].SetOptional() - attrs["trigger"] = attrs["trigger"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["webhook_notifications"] = attrs["webhook_notifications"].SetOptional() - attrs["webhook_notifications"] = attrs["webhook_notifications"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -3416,18 +3322,6 @@ type DeleteJob_SdkV2 struct { JobId types.Int64 `tfsdk:"job_id"` } -func (newState *DeleteJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteJob_SdkV2) { -} - -func (newState *DeleteJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteJob_SdkV2) { -} - -func (c DeleteJob_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["job_id"] = attrs["job_id"].SetRequired() - - return attrs -} - // 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 @@ -3494,18 +3388,6 @@ type DeleteRun_SdkV2 struct { RunId types.Int64 `tfsdk:"run_id"` } -func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRun_SdkV2) { -} - -func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRun_SdkV2) { -} - -func (c DeleteRun_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -3642,19 +3524,6 @@ type EnforcePolicyComplianceRequest_SdkV2 struct { ValidateOnly types.Bool `tfsdk:"validate_only"` } -func (newState *EnforcePolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceRequest_SdkV2) { -} - -func (newState *EnforcePolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceRequest_SdkV2) { -} - -func (c EnforcePolicyComplianceRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["job_id"] = attrs["job_id"].SetRequired() - attrs["validate_only"] = attrs["validate_only"].SetOptional() - - return attrs -} - // 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 @@ -4993,8 +4862,7 @@ type GitSource_SdkV2 struct { // Unique identifier of the service used to host the Git repository. The // value is case insensitive. GitProvider types.String `tfsdk:"provider"` - // 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"` // 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. @@ -5298,7 +5166,7 @@ func (o *Job_SdkV2) SetTriggerState(ctx context.Context, v TriggerStateProto_Sdk type JobAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -5932,10 +5800,7 @@ func (o *JobEmailNotifications_SdkV2) SetOnSuccess(ctx context.Context, v []type type JobEnvironment_SdkV2 struct { // The key of an environment. It has to be unique within a job. EnvironmentKey types.String `tfsdk:"environment_key"` - // The environment entity used to preserve serverless environment side - // panel, jobs' environment for non-notebook task, and DLT's environment for - // classic and serverless pipelines. In this minimal environment spec, only - // pip dependencies are supported. + Spec types.List `tfsdk:"spec"` } @@ -6187,7 +6052,7 @@ type JobPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -6359,7 +6224,7 @@ func (o *JobPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []Job type JobPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -6415,19 +6280,6 @@ type JobPermissionsRequest_SdkV2 struct { JobId types.String `tfsdk:"-"` } -func (newState *JobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermissionsRequest_SdkV2) { -} - -func (newState *JobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobPermissionsRequest_SdkV2) { -} - -func (c JobPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["job_id"] = attrs["job_id"].SetRequired() - - return attrs -} - // 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 @@ -6596,7 +6448,7 @@ 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"` - // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health"` // 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. @@ -6632,11 +6484,7 @@ type JobSettings_SdkV2 struct { PerformanceTarget types.String `tfsdk:"performance_target"` // The queue settings of the job. Queue types.List `tfsdk:"queue"` - // 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"` // 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 @@ -7324,21 +7172,8 @@ func (o JobSource_SdkV2) Type(ctx context.Context) attr.Type { } type JobsHealthRule_SdkV2 struct { - // Specifies the health metric that is being evaluated for a particular - // health rule. - // - // * `RUN_DURATION_SECONDS`: Expected total time for a run in seconds. * - // `STREAMING_BACKLOG_BYTES`: An estimate of the maximum bytes of data - // waiting to be consumed across all streams. This metric is in Public - // Preview. * `STREAMING_BACKLOG_RECORDS`: An estimate of the maximum offset - // lag across all streams. This metric is in Public Preview. * - // `STREAMING_BACKLOG_SECONDS`: An estimate of the maximum consumer delay - // across all streams. This metric is in Public Preview. * - // `STREAMING_BACKLOG_FILES`: An estimate of the maximum number of - // outstanding files across all streams. This metric is in Public Preview. Metric types.String `tfsdk:"metric"` - // Specifies the operator used to compare the health metric value with the - // specified threshold. + Op types.String `tfsdk:"op"` // Specifies the threshold value that the health metric should obey to // satisfy the health rule. @@ -8736,12 +8571,6 @@ func (o *PythonWheelTask_SdkV2) SetParameters(ctx context.Context, v []types.Str } type QueueDetails_SdkV2 struct { - // The reason for queuing the run. * `ACTIVE_RUNS_LIMIT_REACHED`: The run - // was queued due to reaching the workspace limit of active task runs. * - // `MAX_CONCURRENT_RUNS_REACHED`: The run was queued due to reaching the - // 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"` // A descriptive message with the queuing details. This field is // unstructured, and its exact format is subject to change. @@ -8861,7 +8690,7 @@ type RepairHistoryItem_SdkV2 struct { StartTime types.Int64 `tfsdk:"start_time"` // Deprecated. Please use the `status` field instead. State types.List `tfsdk:"state"` - // The current status of the run + Status types.List `tfsdk:"status"` // The run IDs of the task runs that ran as part of this repair history // item. @@ -9137,33 +8966,6 @@ type RepairRun_SdkV2 struct { SqlParams types.Map `tfsdk:"sql_params"` } -func (newState *RepairRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairRun_SdkV2) { -} - -func (newState *RepairRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepairRun_SdkV2) { -} - -func (c RepairRun_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dbt_commands"] = attrs["dbt_commands"].SetOptional() - attrs["jar_params"] = attrs["jar_params"].SetOptional() - attrs["job_parameters"] = attrs["job_parameters"].SetOptional() - attrs["latest_repair_id"] = attrs["latest_repair_id"].SetOptional() - attrs["notebook_params"] = attrs["notebook_params"].SetOptional() - attrs["performance_target"] = attrs["performance_target"].SetOptional() - attrs["pipeline_params"] = attrs["pipeline_params"].SetOptional() - attrs["pipeline_params"] = attrs["pipeline_params"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["python_named_params"] = attrs["python_named_params"].SetOptional() - attrs["python_params"] = attrs["python_params"].SetOptional() - attrs["rerun_all_failed_tasks"] = attrs["rerun_all_failed_tasks"].SetOptional() - attrs["rerun_dependent_tasks"] = attrs["rerun_dependent_tasks"].SetOptional() - attrs["rerun_tasks"] = attrs["rerun_tasks"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetRequired() - attrs["spark_submit_params"] = attrs["spark_submit_params"].SetOptional() - attrs["sql_params"] = attrs["sql_params"].SetOptional() - - return attrs -} - // 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 @@ -9575,20 +9377,6 @@ type ResetJob_SdkV2 struct { NewSettings types.List `tfsdk:"new_settings"` } -func (newState *ResetJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResetJob_SdkV2) { -} - -func (newState *ResetJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResetJob_SdkV2) { -} - -func (c ResetJob_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["job_id"] = attrs["job_id"].SetRequired() - attrs["new_settings"] = attrs["new_settings"].SetRequired() - attrs["new_settings"] = attrs["new_settings"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -10764,12 +10552,7 @@ type Run_SdkV2 struct { RunName types.String `tfsdk:"run_name"` // The URL to the detail page of the run. RunPageUrl types.String `tfsdk:"run_page_url"` - // 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"` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. @@ -10789,7 +10572,7 @@ type Run_SdkV2 struct { StartTime types.Int64 `tfsdk:"start_time"` // Deprecated. Please use the `status` field instead. State types.List `tfsdk:"state"` - // The current status of the run + Status types.List `tfsdk:"status"` // 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. If @@ -10797,22 +10580,9 @@ type Run_SdkV2 struct { // :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"` - // The type of trigger that fired this run. - // - // * `PERIODIC`: Schedules that periodically trigger runs, such as a cron - // scheduler. * `ONE_TIME`: One time triggers that fire a single run. This - // occurs you triggered a single run on demand through the UI or the API. * - // `RETRY`: Indicates a run that is triggered as a retry of a previously - // failed run. This occurs when you request to re-run the job in case of - // failures. * `RUN_JOB_TASK`: Indicates a run that is triggered using a Run - // Job task. * `FILE_ARRIVAL`: Indicates a run that is triggered by a file - // arrival. * `CONTINUOUS`: Indicates a run that is triggered by a - // continuous job. * `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. * `MODEL`: Indicates a run that is - // triggered by a model update. + Trigger types.String `tfsdk:"trigger"` - // Additional details about what triggered the run + TriggerInfo types.List `tfsdk:"trigger_info"` } @@ -12139,33 +11909,6 @@ type RunNow_SdkV2 struct { SqlParams types.Map `tfsdk:"sql_params"` } -func (newState *RunNow_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNow_SdkV2) { -} - -func (newState *RunNow_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunNow_SdkV2) { -} - -func (c RunNow_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dbt_commands"] = attrs["dbt_commands"].SetOptional() - attrs["idempotency_token"] = attrs["idempotency_token"].SetOptional() - attrs["jar_params"] = attrs["jar_params"].SetOptional() - attrs["job_id"] = attrs["job_id"].SetRequired() - attrs["job_parameters"] = attrs["job_parameters"].SetOptional() - attrs["notebook_params"] = attrs["notebook_params"].SetOptional() - attrs["only"] = attrs["only"].SetOptional() - attrs["performance_target"] = attrs["performance_target"].SetOptional() - attrs["pipeline_params"] = attrs["pipeline_params"].SetOptional() - attrs["pipeline_params"] = attrs["pipeline_params"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["python_named_params"] = attrs["python_named_params"].SetOptional() - attrs["python_params"] = attrs["python_params"].SetOptional() - attrs["queue"] = attrs["queue"].SetOptional() - attrs["queue"] = attrs["queue"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["spark_submit_params"] = attrs["spark_submit_params"].SetOptional() - attrs["sql_params"] = attrs["sql_params"].SetOptional() - - return attrs -} - // 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 @@ -13461,7 +13204,7 @@ func (o RunState_SdkV2) Type(ctx context.Context) attr.Type { type RunStatus_SdkV2 struct { // If the run was queued, details about the reason for queuing the run. QueueDetails types.List `tfsdk:"queue_details"` - // The current state of the run. + State types.String `tfsdk:"state"` // If the run is in a TERMINATING or TERMINATED state, details about the // reason for terminating the run. @@ -13758,7 +13501,7 @@ type RunTask_SdkV2 struct { StartTime types.Int64 `tfsdk:"start_time"` // Deprecated. Please use the `status` field instead. State types.List `tfsdk:"state"` - // The current status of the run + Status types.List `tfsdk:"status"` // 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 @@ -15086,11 +14829,6 @@ func (o *SparkSubmitTask_SdkV2) SetParameters(ctx context.Context, v []types.Str } type SqlAlertOutput_SdkV2 struct { - // The state of the SQL alert. - // - // * 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"` // The link to find the output results. OutputLink types.String `tfsdk:"output_link"` @@ -16323,7 +16061,7 @@ 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"` - // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health"` // 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 @@ -16362,38 +16100,6 @@ type SubmitRun_SdkV2 struct { WebhookNotifications types.List `tfsdk:"webhook_notifications"` } -func (newState *SubmitRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRun_SdkV2) { -} - -func (newState *SubmitRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubmitRun_SdkV2) { -} - -func (c SubmitRun_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["email_notifications"] = attrs["email_notifications"].SetOptional() - attrs["email_notifications"] = attrs["email_notifications"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["environments"] = attrs["environments"].SetOptional() - attrs["git_source"] = attrs["git_source"].SetOptional() - attrs["git_source"] = attrs["git_source"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["health"] = attrs["health"].SetOptional() - attrs["health"] = attrs["health"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["idempotency_token"] = attrs["idempotency_token"].SetOptional() - attrs["notification_settings"] = attrs["notification_settings"].SetOptional() - attrs["notification_settings"] = attrs["notification_settings"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["queue"] = attrs["queue"].SetOptional() - attrs["queue"] = attrs["queue"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["run_as"] = attrs["run_as"].SetOptional() - attrs["run_as"] = attrs["run_as"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["run_name"] = attrs["run_name"].SetOptional() - attrs["tasks"] = attrs["tasks"].SetOptional() - attrs["timeout_seconds"] = attrs["timeout_seconds"].SetOptional() - attrs["webhook_notifications"] = attrs["webhook_notifications"].SetOptional() - attrs["webhook_notifications"] = attrs["webhook_notifications"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -16837,7 +16543,7 @@ type SubmitTask_SdkV2 struct { ForEachTask types.List `tfsdk:"for_each_task"` GenAiComputeTask types.List `tfsdk:"gen_ai_compute_task"` - // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health"` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. @@ -18049,7 +17755,7 @@ type Task_SdkV2 struct { ForEachTask types.List `tfsdk:"for_each_task"` GenAiComputeTask types.List `tfsdk:"gen_ai_compute_task"` - // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health"` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. @@ -19361,66 +19067,11 @@ func (o TaskNotificationSettings_SdkV2) Type(ctx context.Context) attr.Type { } type TerminationDetails_SdkV2 struct { - // The code indicates why the run was terminated. Additional codes might be - // introduced in future releases. * `SUCCESS`: The run was completed - // successfully. * `SUCCESS_WITH_FAILURES`: The run was completed - // successfully but some child runs failed. * `USER_CANCELED`: The run was - // successfully canceled during execution by a user. * `CANCELED`: The run - // was canceled during execution by the Databricks platform; for example, if - // the maximum run duration was exceeded. * `SKIPPED`: Run was never - // executed, for example, if the upstream task run failed, the dependency - // type condition was not met, or there were no material tasks to execute. * - // `INTERNAL_ERROR`: The run encountered an unexpected error. Refer to the - // state message for further details. * `DRIVER_ERROR`: The run encountered - // an error while communicating with the Spark Driver. * `CLUSTER_ERROR`: - // The run failed due to a cluster error. Refer to the state message for - // further details. * `REPOSITORY_CHECKOUT_FAILED`: Failed to complete the - // checkout due to an error when communicating with the third party service. - // * `INVALID_CLUSTER_REQUEST`: The run failed because it issued an invalid - // request to start the cluster. * `WORKSPACE_RUN_LIMIT_EXCEEDED`: The - // workspace has reached the quota for the maximum number of concurrent - // active runs. Consider scheduling the runs over a larger time frame. * - // `FEATURE_DISABLED`: The run failed because it tried to access a feature - // unavailable for the workspace. * `CLUSTER_REQUEST_LIMIT_EXCEEDED`: The - // number of cluster creation, start, and upsize requests have exceeded the - // allotted rate limit. Consider spreading the run execution over a larger - // time frame. * `STORAGE_ACCESS_ERROR`: The run failed due to an error when - // accessing the customer blob storage. Refer to the state message for - // further details. * `RUN_EXECUTION_ERROR`: The run was completed with task - // failures. For more details, refer to the state message or run output. * - // `UNAUTHORIZED_ERROR`: The run failed due to a permission issue while - // accessing a resource. Refer to the state message for further details. * - // `LIBRARY_INSTALLATION_ERROR`: The run failed while installing the - // user-requested library. Refer to the state message for further details. - // The causes might include, but are not limited to: The provided library is - // invalid, there are insufficient permissions to install the library, and - // so forth. * `MAX_CONCURRENT_RUNS_EXCEEDED`: The scheduled run exceeds the - // limit of maximum concurrent runs set for the job. * - // `MAX_SPARK_CONTEXTS_EXCEEDED`: The run is scheduled on a cluster that has - // already reached the maximum number of contexts it is configured to - // create. See: [Link]. * `RESOURCE_NOT_FOUND`: A resource necessary for run - // execution does not exist. Refer to the state message for further details. - // * `INVALID_RUN_CONFIGURATION`: The run failed due to an invalid - // configuration. Refer to the state message for further details. * - // `CLOUD_FAILURE`: The run failed due to a cloud provider issue. Refer to - // the state message for further details. * `MAX_JOB_QUEUE_SIZE_EXCEEDED`: - // The run was skipped due to reaching the job level queue size limit. * - // `DISABLED`: The run was never executed because it was disabled explicitly - // by the user. - // - // [Link]: https://kb.databricks.com/en_US/notebooks/too-many-execution-contexts-are-open-right-now Code types.String `tfsdk:"code"` // A descriptive message with the termination details. This field is // unstructured and the format might change. Message types.String `tfsdk:"message"` - // * `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 - // was terminated because of an error caused by user input or the job - // configuration. * `CLOUD_FAILURE`: The run was terminated because of an - // issue with your cloud provider. - // - // [status page]: https://status.databricks.com/ + Type_ types.String `tfsdk:"type"` } @@ -19810,21 +19461,6 @@ type UpdateJob_SdkV2 struct { NewSettings types.List `tfsdk:"new_settings"` } -func (newState *UpdateJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateJob_SdkV2) { -} - -func (newState *UpdateJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateJob_SdkV2) { -} - -func (c UpdateJob_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["fields_to_remove"] = attrs["fields_to_remove"].SetOptional() - attrs["job_id"] = attrs["job_id"].SetRequired() - attrs["new_settings"] = attrs["new_settings"].SetOptional() - attrs["new_settings"] = attrs["new_settings"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 diff --git a/internal/service/jobs_tf/model.go b/internal/service/jobs_tf/model.go index d6fe88160d..e24b3f04fe 100755 --- a/internal/service/jobs_tf/model.go +++ b/internal/service/jobs_tf/model.go @@ -272,12 +272,7 @@ type BaseRun struct { RunName types.String `tfsdk:"run_name"` // The URL to the detail page of the run. RunPageUrl types.String `tfsdk:"run_page_url"` - // 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"` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. @@ -297,7 +292,7 @@ type BaseRun struct { StartTime types.Int64 `tfsdk:"start_time"` // Deprecated. Please use the `status` field instead. State types.Object `tfsdk:"state"` - // The current status of the run + Status types.Object `tfsdk:"status"` // 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. If @@ -305,22 +300,9 @@ type BaseRun struct { // :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"` - // The type of trigger that fired this run. - // - // * `PERIODIC`: Schedules that periodically trigger runs, such as a cron - // scheduler. * `ONE_TIME`: One time triggers that fire a single run. This - // occurs you triggered a single run on demand through the UI or the API. * - // `RETRY`: Indicates a run that is triggered as a retry of a previously - // failed run. This occurs when you request to re-run the job in case of - // failures. * `RUN_JOB_TASK`: Indicates a run that is triggered using a Run - // Job task. * `FILE_ARRIVAL`: Indicates a run that is triggered by a file - // arrival. * `CONTINUOUS`: Indicates a run that is triggered by a - // continuous job. * `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. * `MODEL`: Indicates a run that is - // triggered by a model update. + Trigger types.String `tfsdk:"trigger"` - // Additional details about what triggered the run + TriggerInfo types.Object `tfsdk:"trigger_info"` } @@ -820,19 +802,6 @@ type CancelAllRuns struct { JobId types.Int64 `tfsdk:"job_id"` } -func (newState *CancelAllRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelAllRuns) { -} - -func (newState *CancelAllRuns) SyncEffectiveFieldsDuringRead(existingState CancelAllRuns) { -} - -func (c CancelAllRuns) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["all_queued_runs"] = attrs["all_queued_runs"].SetOptional() - attrs["job_id"] = attrs["job_id"].SetOptional() - - return attrs -} - // 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 @@ -901,18 +870,6 @@ type CancelRun struct { RunId types.Int64 `tfsdk:"run_id"` } -func (newState *CancelRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRun) { -} - -func (newState *CancelRun) SyncEffectiveFieldsDuringRead(existingState CancelRun) { -} - -func (c CancelRun) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -1691,7 +1648,7 @@ 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"` - // An optional set of health rules that can be defined for this job. + Health types.Object `tfsdk:"health"` // 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. @@ -1727,11 +1684,7 @@ type CreateJob struct { PerformanceTarget types.String `tfsdk:"performance_target"` // The queue settings of the job. Queue types.Object `tfsdk:"queue"` - // 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"` // 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 @@ -1762,42 +1715,6 @@ type CreateJob struct { WebhookNotifications types.Object `tfsdk:"webhook_notifications"` } -func (newState *CreateJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateJob) { -} - -func (newState *CreateJob) SyncEffectiveFieldsDuringRead(existingState CreateJob) { -} - -func (c CreateJob) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["continuous"] = attrs["continuous"].SetOptional() - attrs["deployment"] = attrs["deployment"].SetOptional() - attrs["description"] = attrs["description"].SetOptional() - attrs["edit_mode"] = attrs["edit_mode"].SetOptional() - attrs["email_notifications"] = attrs["email_notifications"].SetOptional() - attrs["environment"] = attrs["environment"].SetOptional() - attrs["format"] = attrs["format"].SetOptional() - attrs["git_source"] = attrs["git_source"].SetOptional() - attrs["health"] = attrs["health"].SetOptional() - attrs["job_cluster"] = attrs["job_cluster"].SetOptional() - attrs["max_concurrent_runs"] = attrs["max_concurrent_runs"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["notification_settings"] = attrs["notification_settings"].SetOptional() - attrs["parameter"] = attrs["parameter"].SetOptional() - attrs["performance_target"] = attrs["performance_target"].SetOptional() - attrs["queue"] = attrs["queue"].SetOptional() - attrs["run_as"] = attrs["run_as"].SetOptional() - attrs["schedule"] = attrs["schedule"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["task"] = attrs["task"].SetOptional() - attrs["timeout_seconds"] = attrs["timeout_seconds"].SetOptional() - attrs["trigger"] = attrs["trigger"].SetOptional() - attrs["webhook_notifications"] = attrs["webhook_notifications"].SetOptional() - - return attrs -} - // 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 @@ -3389,18 +3306,6 @@ type DeleteJob struct { JobId types.Int64 `tfsdk:"job_id"` } -func (newState *DeleteJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteJob) { -} - -func (newState *DeleteJob) SyncEffectiveFieldsDuringRead(existingState DeleteJob) { -} - -func (c DeleteJob) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["job_id"] = attrs["job_id"].SetRequired() - - return attrs -} - // 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 @@ -3467,18 +3372,6 @@ type DeleteRun struct { RunId types.Int64 `tfsdk:"run_id"` } -func (newState *DeleteRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRun) { -} - -func (newState *DeleteRun) SyncEffectiveFieldsDuringRead(existingState DeleteRun) { -} - -func (c DeleteRun) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -3615,19 +3508,6 @@ type EnforcePolicyComplianceRequest struct { ValidateOnly types.Bool `tfsdk:"validate_only"` } -func (newState *EnforcePolicyComplianceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceRequest) { -} - -func (newState *EnforcePolicyComplianceRequest) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceRequest) { -} - -func (c EnforcePolicyComplianceRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["job_id"] = attrs["job_id"].SetRequired() - attrs["validate_only"] = attrs["validate_only"].SetOptional() - - return attrs -} - // 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 @@ -4962,8 +4842,7 @@ type GitSource struct { // Unique identifier of the service used to host the Git repository. The // value is case insensitive. GitProvider types.String `tfsdk:"provider"` - // 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"` // 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. @@ -5263,7 +5142,7 @@ func (o *Job) SetTriggerState(ctx context.Context, v TriggerStateProto) { type JobAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -5896,10 +5775,7 @@ func (o *JobEmailNotifications) SetOnSuccess(ctx context.Context, v []types.Stri type JobEnvironment struct { // The key of an environment. It has to be unique within a job. EnvironmentKey types.String `tfsdk:"environment_key"` - // The environment entity used to preserve serverless environment side - // panel, jobs' environment for non-notebook task, and DLT's environment for - // classic and serverless pipelines. In this minimal environment spec, only - // pip dependencies are supported. + Spec types.Object `tfsdk:"spec"` } @@ -6150,7 +6026,7 @@ type JobPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -6322,7 +6198,7 @@ func (o *JobPermissions) SetAccessControlList(ctx context.Context, v []JobAccess type JobPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -6378,19 +6254,6 @@ type JobPermissionsRequest struct { JobId types.String `tfsdk:"-"` } -func (newState *JobPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermissionsRequest) { -} - -func (newState *JobPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState JobPermissionsRequest) { -} - -func (c JobPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["job_id"] = attrs["job_id"].SetRequired() - - return attrs -} - // 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 @@ -6559,7 +6422,7 @@ 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"` - // An optional set of health rules that can be defined for this job. + Health types.Object `tfsdk:"health"` // 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. @@ -6595,11 +6458,7 @@ type JobSettings struct { PerformanceTarget types.String `tfsdk:"performance_target"` // The queue settings of the job. Queue types.Object `tfsdk:"queue"` - // 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"` // 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 @@ -7276,21 +7135,8 @@ func (o JobSource) Type(ctx context.Context) attr.Type { } type JobsHealthRule struct { - // Specifies the health metric that is being evaluated for a particular - // health rule. - // - // * `RUN_DURATION_SECONDS`: Expected total time for a run in seconds. * - // `STREAMING_BACKLOG_BYTES`: An estimate of the maximum bytes of data - // waiting to be consumed across all streams. This metric is in Public - // Preview. * `STREAMING_BACKLOG_RECORDS`: An estimate of the maximum offset - // lag across all streams. This metric is in Public Preview. * - // `STREAMING_BACKLOG_SECONDS`: An estimate of the maximum consumer delay - // across all streams. This metric is in Public Preview. * - // `STREAMING_BACKLOG_FILES`: An estimate of the maximum number of - // outstanding files across all streams. This metric is in Public Preview. Metric types.String `tfsdk:"metric"` - // Specifies the operator used to compare the health metric value with the - // specified threshold. + Op types.String `tfsdk:"op"` // Specifies the threshold value that the health metric should obey to // satisfy the health rule. @@ -8687,12 +8533,6 @@ func (o *PythonWheelTask) SetParameters(ctx context.Context, v []types.String) { } type QueueDetails struct { - // The reason for queuing the run. * `ACTIVE_RUNS_LIMIT_REACHED`: The run - // was queued due to reaching the workspace limit of active task runs. * - // `MAX_CONCURRENT_RUNS_REACHED`: The run was queued due to reaching the - // 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"` // A descriptive message with the queuing details. This field is // unstructured, and its exact format is subject to change. @@ -8812,7 +8652,7 @@ type RepairHistoryItem struct { StartTime types.Int64 `tfsdk:"start_time"` // Deprecated. Please use the `status` field instead. State types.Object `tfsdk:"state"` - // The current status of the run + Status types.Object `tfsdk:"status"` // The run IDs of the task runs that ran as part of this repair history // item. @@ -9086,32 +8926,6 @@ type RepairRun struct { SqlParams types.Map `tfsdk:"sql_params"` } -func (newState *RepairRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairRun) { -} - -func (newState *RepairRun) SyncEffectiveFieldsDuringRead(existingState RepairRun) { -} - -func (c RepairRun) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dbt_commands"] = attrs["dbt_commands"].SetOptional() - attrs["jar_params"] = attrs["jar_params"].SetOptional() - attrs["job_parameters"] = attrs["job_parameters"].SetOptional() - attrs["latest_repair_id"] = attrs["latest_repair_id"].SetOptional() - attrs["notebook_params"] = attrs["notebook_params"].SetOptional() - attrs["performance_target"] = attrs["performance_target"].SetOptional() - attrs["pipeline_params"] = attrs["pipeline_params"].SetOptional() - attrs["python_named_params"] = attrs["python_named_params"].SetOptional() - attrs["python_params"] = attrs["python_params"].SetOptional() - attrs["rerun_all_failed_tasks"] = attrs["rerun_all_failed_tasks"].SetOptional() - attrs["rerun_dependent_tasks"] = attrs["rerun_dependent_tasks"].SetOptional() - attrs["rerun_tasks"] = attrs["rerun_tasks"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetRequired() - attrs["spark_submit_params"] = attrs["spark_submit_params"].SetOptional() - attrs["sql_params"] = attrs["sql_params"].SetOptional() - - return attrs -} - // 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 @@ -9523,19 +9337,6 @@ type ResetJob struct { NewSettings types.Object `tfsdk:"new_settings"` } -func (newState *ResetJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResetJob) { -} - -func (newState *ResetJob) SyncEffectiveFieldsDuringRead(existingState ResetJob) { -} - -func (c ResetJob) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["job_id"] = attrs["job_id"].SetRequired() - attrs["new_settings"] = attrs["new_settings"].SetRequired() - - return attrs -} - // 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 @@ -10701,12 +10502,7 @@ type Run struct { RunName types.String `tfsdk:"run_name"` // The URL to the detail page of the run. RunPageUrl types.String `tfsdk:"run_page_url"` - // 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"` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. @@ -10726,7 +10522,7 @@ type Run struct { StartTime types.Int64 `tfsdk:"start_time"` // Deprecated. Please use the `status` field instead. State types.Object `tfsdk:"state"` - // The current status of the run + Status types.Object `tfsdk:"status"` // 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. If @@ -10734,22 +10530,9 @@ type Run struct { // :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"` - // The type of trigger that fired this run. - // - // * `PERIODIC`: Schedules that periodically trigger runs, such as a cron - // scheduler. * `ONE_TIME`: One time triggers that fire a single run. This - // occurs you triggered a single run on demand through the UI or the API. * - // `RETRY`: Indicates a run that is triggered as a retry of a previously - // failed run. This occurs when you request to re-run the job in case of - // failures. * `RUN_JOB_TASK`: Indicates a run that is triggered using a Run - // Job task. * `FILE_ARRIVAL`: Indicates a run that is triggered by a file - // arrival. * `CONTINUOUS`: Indicates a run that is triggered by a - // continuous job. * `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. * `MODEL`: Indicates a run that is - // triggered by a model update. + Trigger types.String `tfsdk:"trigger"` - // Additional details about what triggered the run + TriggerInfo types.Object `tfsdk:"trigger_info"` } @@ -12065,31 +11848,6 @@ type RunNow struct { SqlParams types.Map `tfsdk:"sql_params"` } -func (newState *RunNow) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNow) { -} - -func (newState *RunNow) SyncEffectiveFieldsDuringRead(existingState RunNow) { -} - -func (c RunNow) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dbt_commands"] = attrs["dbt_commands"].SetOptional() - attrs["idempotency_token"] = attrs["idempotency_token"].SetOptional() - attrs["jar_params"] = attrs["jar_params"].SetOptional() - attrs["job_id"] = attrs["job_id"].SetRequired() - attrs["job_parameters"] = attrs["job_parameters"].SetOptional() - attrs["notebook_params"] = attrs["notebook_params"].SetOptional() - attrs["only"] = attrs["only"].SetOptional() - attrs["performance_target"] = attrs["performance_target"].SetOptional() - attrs["pipeline_params"] = attrs["pipeline_params"].SetOptional() - attrs["python_named_params"] = attrs["python_named_params"].SetOptional() - attrs["python_params"] = attrs["python_params"].SetOptional() - attrs["queue"] = attrs["queue"].SetOptional() - attrs["spark_submit_params"] = attrs["spark_submit_params"].SetOptional() - attrs["sql_params"] = attrs["sql_params"].SetOptional() - - return attrs -} - // 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 @@ -13375,7 +13133,7 @@ func (o RunState) Type(ctx context.Context) attr.Type { type RunStatus struct { // If the run was queued, details about the reason for queuing the run. QueueDetails types.Object `tfsdk:"queue_details"` - // The current state of the run. + State types.String `tfsdk:"state"` // If the run is in a TERMINATING or TERMINATED state, details about the // reason for terminating the run. @@ -13670,7 +13428,7 @@ type RunTask struct { StartTime types.Int64 `tfsdk:"start_time"` // Deprecated. Please use the `status` field instead. State types.Object `tfsdk:"state"` - // The current status of the run + Status types.Object `tfsdk:"status"` // 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 @@ -14972,11 +14730,6 @@ func (o *SparkSubmitTask) SetParameters(ctx context.Context, v []types.String) { } type SqlAlertOutput struct { - // The state of the SQL alert. - // - // * 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"` // The link to find the output results. OutputLink types.String `tfsdk:"output_link"` @@ -16201,7 +15954,7 @@ 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"` - // An optional set of health rules that can be defined for this job. + Health types.Object `tfsdk:"health"` // 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 @@ -16240,31 +15993,6 @@ type SubmitRun struct { WebhookNotifications types.Object `tfsdk:"webhook_notifications"` } -func (newState *SubmitRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRun) { -} - -func (newState *SubmitRun) SyncEffectiveFieldsDuringRead(existingState SubmitRun) { -} - -func (c SubmitRun) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["email_notifications"] = attrs["email_notifications"].SetOptional() - attrs["environments"] = attrs["environments"].SetOptional() - attrs["git_source"] = attrs["git_source"].SetOptional() - attrs["health"] = attrs["health"].SetOptional() - attrs["idempotency_token"] = attrs["idempotency_token"].SetOptional() - attrs["notification_settings"] = attrs["notification_settings"].SetOptional() - attrs["queue"] = attrs["queue"].SetOptional() - attrs["run_as"] = attrs["run_as"].SetOptional() - attrs["run_name"] = attrs["run_name"].SetOptional() - attrs["tasks"] = attrs["tasks"].SetOptional() - attrs["timeout_seconds"] = attrs["timeout_seconds"].SetOptional() - attrs["webhook_notifications"] = attrs["webhook_notifications"].SetOptional() - - return attrs -} - // 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 @@ -16708,7 +16436,7 @@ type SubmitTask struct { ForEachTask types.Object `tfsdk:"for_each_task"` GenAiComputeTask types.Object `tfsdk:"gen_ai_compute_task"` - // An optional set of health rules that can be defined for this job. + Health types.Object `tfsdk:"health"` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. @@ -17898,7 +17626,7 @@ type Task struct { ForEachTask types.Object `tfsdk:"for_each_task"` GenAiComputeTask types.Object `tfsdk:"gen_ai_compute_task"` - // An optional set of health rules that can be defined for this job. + Health types.Object `tfsdk:"health"` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. @@ -19188,66 +18916,11 @@ func (o TaskNotificationSettings) Type(ctx context.Context) attr.Type { } type TerminationDetails struct { - // The code indicates why the run was terminated. Additional codes might be - // introduced in future releases. * `SUCCESS`: The run was completed - // successfully. * `SUCCESS_WITH_FAILURES`: The run was completed - // successfully but some child runs failed. * `USER_CANCELED`: The run was - // successfully canceled during execution by a user. * `CANCELED`: The run - // was canceled during execution by the Databricks platform; for example, if - // the maximum run duration was exceeded. * `SKIPPED`: Run was never - // executed, for example, if the upstream task run failed, the dependency - // type condition was not met, or there were no material tasks to execute. * - // `INTERNAL_ERROR`: The run encountered an unexpected error. Refer to the - // state message for further details. * `DRIVER_ERROR`: The run encountered - // an error while communicating with the Spark Driver. * `CLUSTER_ERROR`: - // The run failed due to a cluster error. Refer to the state message for - // further details. * `REPOSITORY_CHECKOUT_FAILED`: Failed to complete the - // checkout due to an error when communicating with the third party service. - // * `INVALID_CLUSTER_REQUEST`: The run failed because it issued an invalid - // request to start the cluster. * `WORKSPACE_RUN_LIMIT_EXCEEDED`: The - // workspace has reached the quota for the maximum number of concurrent - // active runs. Consider scheduling the runs over a larger time frame. * - // `FEATURE_DISABLED`: The run failed because it tried to access a feature - // unavailable for the workspace. * `CLUSTER_REQUEST_LIMIT_EXCEEDED`: The - // number of cluster creation, start, and upsize requests have exceeded the - // allotted rate limit. Consider spreading the run execution over a larger - // time frame. * `STORAGE_ACCESS_ERROR`: The run failed due to an error when - // accessing the customer blob storage. Refer to the state message for - // further details. * `RUN_EXECUTION_ERROR`: The run was completed with task - // failures. For more details, refer to the state message or run output. * - // `UNAUTHORIZED_ERROR`: The run failed due to a permission issue while - // accessing a resource. Refer to the state message for further details. * - // `LIBRARY_INSTALLATION_ERROR`: The run failed while installing the - // user-requested library. Refer to the state message for further details. - // The causes might include, but are not limited to: The provided library is - // invalid, there are insufficient permissions to install the library, and - // so forth. * `MAX_CONCURRENT_RUNS_EXCEEDED`: The scheduled run exceeds the - // limit of maximum concurrent runs set for the job. * - // `MAX_SPARK_CONTEXTS_EXCEEDED`: The run is scheduled on a cluster that has - // already reached the maximum number of contexts it is configured to - // create. See: [Link]. * `RESOURCE_NOT_FOUND`: A resource necessary for run - // execution does not exist. Refer to the state message for further details. - // * `INVALID_RUN_CONFIGURATION`: The run failed due to an invalid - // configuration. Refer to the state message for further details. * - // `CLOUD_FAILURE`: The run failed due to a cloud provider issue. Refer to - // the state message for further details. * `MAX_JOB_QUEUE_SIZE_EXCEEDED`: - // The run was skipped due to reaching the job level queue size limit. * - // `DISABLED`: The run was never executed because it was disabled explicitly - // by the user. - // - // [Link]: https://kb.databricks.com/en_US/notebooks/too-many-execution-contexts-are-open-right-now Code types.String `tfsdk:"code"` // A descriptive message with the termination details. This field is // unstructured and the format might change. Message types.String `tfsdk:"message"` - // * `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 - // was terminated because of an error caused by user input or the job - // configuration. * `CLOUD_FAILURE`: The run was terminated because of an - // issue with your cloud provider. - // - // [status page]: https://status.databricks.com/ + Type_ types.String `tfsdk:"type"` } @@ -19632,20 +19305,6 @@ type UpdateJob struct { NewSettings types.Object `tfsdk:"new_settings"` } -func (newState *UpdateJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateJob) { -} - -func (newState *UpdateJob) SyncEffectiveFieldsDuringRead(existingState UpdateJob) { -} - -func (c UpdateJob) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["fields_to_remove"] = attrs["fields_to_remove"].SetOptional() - attrs["job_id"] = attrs["job_id"].SetRequired() - attrs["new_settings"] = attrs["new_settings"].SetOptional() - - return attrs -} - // 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 diff --git a/internal/service/marketplace_tf/legacy_model.go b/internal/service/marketplace_tf/legacy_model.go index f7e47610fd..5ead4bcfdb 100755 --- a/internal/service/marketplace_tf/legacy_model.go +++ b/internal/service/marketplace_tf/legacy_model.go @@ -29,19 +29,6 @@ type AddExchangeForListingRequest_SdkV2 struct { ListingId types.String `tfsdk:"listing_id"` } -func (newState *AddExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddExchangeForListingRequest_SdkV2) { -} - -func (newState *AddExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddExchangeForListingRequest_SdkV2) { -} - -func (c AddExchangeForListingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["exchange_id"] = attrs["exchange_id"].SetRequired() - attrs["listing_id"] = attrs["listing_id"].SetRequired() - - return attrs -} - // 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 @@ -552,19 +539,6 @@ type CreateExchangeFilterRequest_SdkV2 struct { Filter types.List `tfsdk:"filter"` } -func (newState *CreateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeFilterRequest_SdkV2) { -} - -func (newState *CreateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeFilterRequest_SdkV2) { -} - -func (c CreateExchangeFilterRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["filter"] = attrs["filter"].SetRequired() - attrs["filter"] = attrs["filter"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -677,19 +651,6 @@ type CreateExchangeRequest_SdkV2 struct { Exchange types.List `tfsdk:"exchange"` } -func (newState *CreateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeRequest_SdkV2) { -} - -func (newState *CreateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeRequest_SdkV2) { -} - -func (c CreateExchangeRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["exchange"] = attrs["exchange"].SetRequired() - attrs["exchange"] = attrs["exchange"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -808,22 +769,6 @@ type CreateFileRequest_SdkV2 struct { MimeType types.String `tfsdk:"mime_type"` } -func (newState *CreateFileRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFileRequest_SdkV2) { -} - -func (newState *CreateFileRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFileRequest_SdkV2) { -} - -func (c CreateFileRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["display_name"] = attrs["display_name"].SetOptional() - attrs["file_parent"] = attrs["file_parent"].SetRequired() - attrs["file_parent"] = attrs["file_parent"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["marketplace_file_type"] = attrs["marketplace_file_type"].SetRequired() - attrs["mime_type"] = attrs["mime_type"].SetRequired() - - return attrs -} - // 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 @@ -988,25 +933,6 @@ type CreateInstallationRequest_SdkV2 struct { ShareName types.String `tfsdk:"share_name"` } -func (newState *CreateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstallationRequest_SdkV2) { -} - -func (newState *CreateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateInstallationRequest_SdkV2) { -} - -func (c CreateInstallationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["accepted_consumer_terms"] = attrs["accepted_consumer_terms"].SetOptional() - attrs["accepted_consumer_terms"] = attrs["accepted_consumer_terms"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["catalog_name"] = attrs["catalog_name"].SetOptional() - attrs["listing_id"] = attrs["listing_id"].SetRequired() - attrs["recipient_type"] = attrs["recipient_type"].SetOptional() - attrs["repo_detail"] = attrs["repo_detail"].SetOptional() - attrs["repo_detail"] = attrs["repo_detail"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["share_name"] = attrs["share_name"].SetOptional() - - return attrs -} - // 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 @@ -1111,19 +1037,6 @@ type CreateListingRequest_SdkV2 struct { Listing types.List `tfsdk:"listing"` } -func (newState *CreateListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateListingRequest_SdkV2) { -} - -func (newState *CreateListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateListingRequest_SdkV2) { -} - -func (c CreateListingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["listing"] = attrs["listing"].SetRequired() - attrs["listing"] = attrs["listing"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -1253,27 +1166,6 @@ type CreatePersonalizationRequest_SdkV2 struct { RecipientType types.String `tfsdk:"recipient_type"` } -func (newState *CreatePersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePersonalizationRequest_SdkV2) { -} - -func (newState *CreatePersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePersonalizationRequest_SdkV2) { -} - -func (c CreatePersonalizationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["accepted_consumer_terms"] = attrs["accepted_consumer_terms"].SetRequired() - attrs["accepted_consumer_terms"] = attrs["accepted_consumer_terms"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["comment"] = attrs["comment"].SetOptional() - attrs["company"] = attrs["company"].SetOptional() - attrs["first_name"] = attrs["first_name"].SetOptional() - attrs["intended_use"] = attrs["intended_use"].SetRequired() - attrs["is_from_lighthouse"] = attrs["is_from_lighthouse"].SetOptional() - attrs["last_name"] = attrs["last_name"].SetOptional() - attrs["listing_id"] = attrs["listing_id"].SetRequired() - attrs["recipient_type"] = attrs["recipient_type"].SetOptional() - - return attrs -} - // 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 @@ -1398,21 +1290,38 @@ func (o CreatePersonalizationRequestResponse_SdkV2) Type(ctx context.Context) at } } -type CreateProviderRequest_SdkV2 struct { - Provider types.List `tfsdk:"provider"` +type CreateProviderAnalyticsDashboardRequest_SdkV2 struct { } -func (newState *CreateProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProviderRequest_SdkV2) { +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderAnalyticsDashboardRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateProviderAnalyticsDashboardRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -func (newState *CreateProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateProviderRequest_SdkV2) { +// 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, CreateProviderAnalyticsDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateProviderAnalyticsDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) } -func (c CreateProviderRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["provider"] = attrs["provider"].SetRequired() - attrs["provider"] = attrs["provider"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) +// Type implements basetypes.ObjectValuable. +func (o CreateProviderAnalyticsDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} - return attrs +type CreateProviderRequest_SdkV2 struct { + Provider types.List `tfsdk:"provider"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderRequest. @@ -2747,6 +2656,36 @@ func (o *GetFileResponse_SdkV2) SetFileInfo(ctx context.Context, v FileInfo_SdkV o.FileInfo = types.ListValueMust(t, vs) } +type GetLatestVersionProviderAnalyticsDashboardRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionProviderAnalyticsDashboardRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetLatestVersionProviderAnalyticsDashboardRequest_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, GetLatestVersionProviderAnalyticsDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetLatestVersionProviderAnalyticsDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetLatestVersionProviderAnalyticsDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2 struct { // version here is latest logical version of the dashboard template Version types.Int64 `tfsdk:"version"` @@ -5034,6 +4973,36 @@ func (o *ListListingsResponse_SdkV2) SetListings(ctx context.Context, v []Listin o.Listings = types.ListValueMust(t, vs) } +type ListProviderAnalyticsDashboardRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProviderAnalyticsDashboardRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListProviderAnalyticsDashboardRequest_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, ListProviderAnalyticsDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListProviderAnalyticsDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListProviderAnalyticsDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListProviderAnalyticsDashboardResponse_SdkV2 struct { // dashboard_id will be used to open Lakeview dashboard. DashboardId types.String `tfsdk:"dashboard_id"` @@ -5864,7 +5833,7 @@ type ListingSummary_SdkV2 struct { Setting types.List `tfsdk:"setting"` Share types.List `tfsdk:"share"` - // Enums + Status types.String `tfsdk:"status"` Subtitle types.String `tfsdk:"subtitle"` @@ -6240,8 +6209,7 @@ type PersonalizationRequest_SdkV2 struct { Comment types.String `tfsdk:"comment"` ConsumerRegion types.List `tfsdk:"consumer_region"` - // contact info for the consumer requesting data or performing a listing - // installation + ContactInfo types.List `tfsdk:"contact_info"` CreatedAt types.Int64 `tfsdk:"created_at"` @@ -7329,20 +7297,6 @@ type UpdateExchangeFilterRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *UpdateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeFilterRequest_SdkV2) { -} - -func (newState *UpdateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeFilterRequest_SdkV2) { -} - -func (c UpdateExchangeFilterRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["filter"] = attrs["filter"].SetRequired() - attrs["filter"] = attrs["filter"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // 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 @@ -7490,20 +7444,6 @@ type UpdateExchangeRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *UpdateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeRequest_SdkV2) { -} - -func (newState *UpdateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeRequest_SdkV2) { -} - -func (c UpdateExchangeRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["exchange"] = attrs["exchange"].SetRequired() - attrs["exchange"] = attrs["exchange"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // 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 @@ -7655,22 +7595,6 @@ type UpdateInstallationRequest_SdkV2 struct { RotateToken types.Bool `tfsdk:"rotate_token"` } -func (newState *UpdateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInstallationRequest_SdkV2) { -} - -func (newState *UpdateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateInstallationRequest_SdkV2) { -} - -func (c UpdateInstallationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["installation"] = attrs["installation"].SetRequired() - attrs["installation"] = attrs["installation"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["installation_id"] = attrs["installation_id"].SetRequired() - attrs["listing_id"] = attrs["listing_id"].SetRequired() - attrs["rotate_token"] = attrs["rotate_token"].SetOptional() - - return attrs -} - // 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 @@ -7822,20 +7746,6 @@ type UpdateListingRequest_SdkV2 struct { Listing types.List `tfsdk:"listing"` } -func (newState *UpdateListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateListingRequest_SdkV2) { -} - -func (newState *UpdateListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateListingRequest_SdkV2) { -} - -func (c UpdateListingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["listing"] = attrs["listing"].SetRequired() - attrs["listing"] = attrs["listing"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -7989,23 +7899,6 @@ type UpdatePersonalizationRequestRequest_SdkV2 struct { Status types.String `tfsdk:"status"` } -func (newState *UpdatePersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalizationRequestRequest_SdkV2) { -} - -func (newState *UpdatePersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalizationRequestRequest_SdkV2) { -} - -func (c UpdatePersonalizationRequestRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["listing_id"] = attrs["listing_id"].SetRequired() - attrs["reason"] = attrs["reason"].SetOptional() - attrs["request_id"] = attrs["request_id"].SetRequired() - attrs["share"] = attrs["share"].SetOptional() - attrs["share"] = attrs["share"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["status"] = attrs["status"].SetRequired() - - return attrs -} - // 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 @@ -8162,19 +8055,6 @@ type UpdateProviderAnalyticsDashboardRequest_SdkV2 struct { Version types.Int64 `tfsdk:"version"` } -func (newState *UpdateProviderAnalyticsDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderAnalyticsDashboardRequest_SdkV2) { -} - -func (newState *UpdateProviderAnalyticsDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderAnalyticsDashboardRequest_SdkV2) { -} - -func (c UpdateProviderAnalyticsDashboardRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["version"] = attrs["version"].SetOptional() - - return attrs -} - // 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 @@ -8272,20 +8152,6 @@ type UpdateProviderRequest_SdkV2 struct { Provider types.List `tfsdk:"provider"` } -func (newState *UpdateProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderRequest_SdkV2) { -} - -func (newState *UpdateProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderRequest_SdkV2) { -} - -func (c UpdateProviderRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["provider"] = attrs["provider"].SetRequired() - attrs["provider"] = attrs["provider"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 diff --git a/internal/service/marketplace_tf/model.go b/internal/service/marketplace_tf/model.go index 2ef9d76572..6727c78da2 100755 --- a/internal/service/marketplace_tf/model.go +++ b/internal/service/marketplace_tf/model.go @@ -28,19 +28,6 @@ type AddExchangeForListingRequest struct { ListingId types.String `tfsdk:"listing_id"` } -func (newState *AddExchangeForListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddExchangeForListingRequest) { -} - -func (newState *AddExchangeForListingRequest) SyncEffectiveFieldsDuringRead(existingState AddExchangeForListingRequest) { -} - -func (c AddExchangeForListingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["exchange_id"] = attrs["exchange_id"].SetRequired() - attrs["listing_id"] = attrs["listing_id"].SetRequired() - - return attrs -} - // 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 @@ -550,18 +537,6 @@ type CreateExchangeFilterRequest struct { Filter types.Object `tfsdk:"filter"` } -func (newState *CreateExchangeFilterRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeFilterRequest) { -} - -func (newState *CreateExchangeFilterRequest) SyncEffectiveFieldsDuringRead(existingState CreateExchangeFilterRequest) { -} - -func (c CreateExchangeFilterRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["filter"] = attrs["filter"].SetRequired() - - return attrs -} - // 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 @@ -674,18 +649,6 @@ type CreateExchangeRequest struct { Exchange types.Object `tfsdk:"exchange"` } -func (newState *CreateExchangeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeRequest) { -} - -func (newState *CreateExchangeRequest) SyncEffectiveFieldsDuringRead(existingState CreateExchangeRequest) { -} - -func (c CreateExchangeRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["exchange"] = attrs["exchange"].SetRequired() - - return attrs -} - // 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 @@ -804,21 +767,6 @@ type CreateFileRequest struct { MimeType types.String `tfsdk:"mime_type"` } -func (newState *CreateFileRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFileRequest) { -} - -func (newState *CreateFileRequest) SyncEffectiveFieldsDuringRead(existingState CreateFileRequest) { -} - -func (c CreateFileRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["display_name"] = attrs["display_name"].SetOptional() - attrs["file_parent"] = attrs["file_parent"].SetRequired() - attrs["marketplace_file_type"] = attrs["marketplace_file_type"].SetRequired() - attrs["mime_type"] = attrs["mime_type"].SetRequired() - - return attrs -} - // 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 @@ -982,23 +930,6 @@ type CreateInstallationRequest struct { ShareName types.String `tfsdk:"share_name"` } -func (newState *CreateInstallationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstallationRequest) { -} - -func (newState *CreateInstallationRequest) SyncEffectiveFieldsDuringRead(existingState CreateInstallationRequest) { -} - -func (c CreateInstallationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["accepted_consumer_terms"] = attrs["accepted_consumer_terms"].SetOptional() - attrs["catalog_name"] = attrs["catalog_name"].SetOptional() - attrs["listing_id"] = attrs["listing_id"].SetRequired() - attrs["recipient_type"] = attrs["recipient_type"].SetOptional() - attrs["repo_detail"] = attrs["repo_detail"].SetOptional() - attrs["share_name"] = attrs["share_name"].SetOptional() - - return attrs -} - // 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 @@ -1103,18 +1034,6 @@ type CreateListingRequest struct { Listing types.Object `tfsdk:"listing"` } -func (newState *CreateListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateListingRequest) { -} - -func (newState *CreateListingRequest) SyncEffectiveFieldsDuringRead(existingState CreateListingRequest) { -} - -func (c CreateListingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["listing"] = attrs["listing"].SetRequired() - - return attrs -} - // 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 @@ -1244,26 +1163,6 @@ type CreatePersonalizationRequest struct { RecipientType types.String `tfsdk:"recipient_type"` } -func (newState *CreatePersonalizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePersonalizationRequest) { -} - -func (newState *CreatePersonalizationRequest) SyncEffectiveFieldsDuringRead(existingState CreatePersonalizationRequest) { -} - -func (c CreatePersonalizationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["accepted_consumer_terms"] = attrs["accepted_consumer_terms"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["company"] = attrs["company"].SetOptional() - attrs["first_name"] = attrs["first_name"].SetOptional() - attrs["intended_use"] = attrs["intended_use"].SetRequired() - attrs["is_from_lighthouse"] = attrs["is_from_lighthouse"].SetOptional() - attrs["last_name"] = attrs["last_name"].SetOptional() - attrs["listing_id"] = attrs["listing_id"].SetRequired() - attrs["recipient_type"] = attrs["recipient_type"].SetOptional() - - return attrs -} - // 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 @@ -1388,20 +1287,38 @@ func (o CreatePersonalizationRequestResponse) Type(ctx context.Context) attr.Typ } } -type CreateProviderRequest struct { - Provider types.Object `tfsdk:"provider"` +type CreateProviderAnalyticsDashboardRequest struct { } -func (newState *CreateProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProviderRequest) { +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderAnalyticsDashboardRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateProviderAnalyticsDashboardRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -func (newState *CreateProviderRequest) SyncEffectiveFieldsDuringRead(existingState CreateProviderRequest) { +// 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, CreateProviderAnalyticsDashboardRequest +// only implements ToObjectValue() and Type(). +func (o CreateProviderAnalyticsDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) } -func (c CreateProviderRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["provider"] = attrs["provider"].SetRequired() +// Type implements basetypes.ObjectValuable. +func (o CreateProviderAnalyticsDashboardRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} - return attrs +type CreateProviderRequest struct { + Provider types.Object `tfsdk:"provider"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderRequest. @@ -2733,6 +2650,36 @@ func (o *GetFileResponse) SetFileInfo(ctx context.Context, v FileInfo) { o.FileInfo = vs } +type GetLatestVersionProviderAnalyticsDashboardRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionProviderAnalyticsDashboardRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetLatestVersionProviderAnalyticsDashboardRequest) 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, GetLatestVersionProviderAnalyticsDashboardRequest +// only implements ToObjectValue() and Type(). +func (o GetLatestVersionProviderAnalyticsDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetLatestVersionProviderAnalyticsDashboardRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetLatestVersionProviderAnalyticsDashboardResponse struct { // version here is latest logical version of the dashboard template Version types.Int64 `tfsdk:"version"` @@ -5016,6 +4963,36 @@ func (o *ListListingsResponse) SetListings(ctx context.Context, v []Listing) { o.Listings = types.ListValueMust(t, vs) } +type ListProviderAnalyticsDashboardRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProviderAnalyticsDashboardRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListProviderAnalyticsDashboardRequest) 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, ListProviderAnalyticsDashboardRequest +// only implements ToObjectValue() and Type(). +func (o ListProviderAnalyticsDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListProviderAnalyticsDashboardRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListProviderAnalyticsDashboardResponse struct { // dashboard_id will be used to open Lakeview dashboard. DashboardId types.String `tfsdk:"dashboard_id"` @@ -5840,7 +5817,7 @@ type ListingSummary struct { Setting types.Object `tfsdk:"setting"` Share types.Object `tfsdk:"share"` - // Enums + Status types.String `tfsdk:"status"` Subtitle types.String `tfsdk:"subtitle"` @@ -6212,8 +6189,7 @@ type PersonalizationRequest struct { Comment types.String `tfsdk:"comment"` ConsumerRegion types.Object `tfsdk:"consumer_region"` - // contact info for the consumer requesting data or performing a listing - // installation + ContactInfo types.Object `tfsdk:"contact_info"` CreatedAt types.Int64 `tfsdk:"created_at"` @@ -7298,19 +7274,6 @@ type UpdateExchangeFilterRequest struct { Id types.String `tfsdk:"-"` } -func (newState *UpdateExchangeFilterRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeFilterRequest) { -} - -func (newState *UpdateExchangeFilterRequest) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeFilterRequest) { -} - -func (c UpdateExchangeFilterRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["filter"] = attrs["filter"].SetRequired() - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // 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 @@ -7457,19 +7420,6 @@ type UpdateExchangeRequest struct { Id types.String `tfsdk:"-"` } -func (newState *UpdateExchangeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeRequest) { -} - -func (newState *UpdateExchangeRequest) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeRequest) { -} - -func (c UpdateExchangeRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["exchange"] = attrs["exchange"].SetRequired() - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // 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 @@ -7620,21 +7570,6 @@ type UpdateInstallationRequest struct { RotateToken types.Bool `tfsdk:"rotate_token"` } -func (newState *UpdateInstallationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInstallationRequest) { -} - -func (newState *UpdateInstallationRequest) SyncEffectiveFieldsDuringRead(existingState UpdateInstallationRequest) { -} - -func (c UpdateInstallationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["installation"] = attrs["installation"].SetRequired() - attrs["installation_id"] = attrs["installation_id"].SetRequired() - attrs["listing_id"] = attrs["listing_id"].SetRequired() - attrs["rotate_token"] = attrs["rotate_token"].SetOptional() - - return attrs -} - // 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 @@ -7785,19 +7720,6 @@ type UpdateListingRequest struct { Listing types.Object `tfsdk:"listing"` } -func (newState *UpdateListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateListingRequest) { -} - -func (newState *UpdateListingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateListingRequest) { -} - -func (c UpdateListingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["listing"] = attrs["listing"].SetRequired() - - return attrs -} - // 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 @@ -7950,22 +7872,6 @@ type UpdatePersonalizationRequestRequest struct { Status types.String `tfsdk:"status"` } -func (newState *UpdatePersonalizationRequestRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalizationRequestRequest) { -} - -func (newState *UpdatePersonalizationRequestRequest) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalizationRequestRequest) { -} - -func (c UpdatePersonalizationRequestRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["listing_id"] = attrs["listing_id"].SetRequired() - attrs["reason"] = attrs["reason"].SetOptional() - attrs["request_id"] = attrs["request_id"].SetRequired() - attrs["share"] = attrs["share"].SetOptional() - attrs["status"] = attrs["status"].SetRequired() - - return attrs -} - // 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 @@ -8121,19 +8027,6 @@ type UpdateProviderAnalyticsDashboardRequest struct { Version types.Int64 `tfsdk:"version"` } -func (newState *UpdateProviderAnalyticsDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderAnalyticsDashboardRequest) { -} - -func (newState *UpdateProviderAnalyticsDashboardRequest) SyncEffectiveFieldsDuringRead(existingState UpdateProviderAnalyticsDashboardRequest) { -} - -func (c UpdateProviderAnalyticsDashboardRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["version"] = attrs["version"].SetOptional() - - return attrs -} - // 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 @@ -8231,19 +8124,6 @@ type UpdateProviderRequest struct { Provider types.Object `tfsdk:"provider"` } -func (newState *UpdateProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderRequest) { -} - -func (newState *UpdateProviderRequest) SyncEffectiveFieldsDuringRead(existingState UpdateProviderRequest) { -} - -func (c UpdateProviderRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["provider"] = attrs["provider"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/ml_tf/legacy_model.go b/internal/service/ml_tf/legacy_model.go index bd6d1c05dc..e644f202d7 100755 --- a/internal/service/ml_tf/legacy_model.go +++ b/internal/service/ml_tf/legacy_model.go @@ -23,24 +23,13 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -// Activity recorded for the action. +// For activities, this contains the activity recorded for the action. For +// comments, this contains the comment details. For transition requests, this +// contains the transition request details. type Activity_SdkV2 struct { - // Type of activity. Valid values are: * `APPLIED_TRANSITION`: User applied - // the corresponding stage transition. - // - // * `REQUESTED_TRANSITION`: User requested the corresponding stage - // transition. - // - // * `CANCELLED_REQUEST`: User cancelled an existing transition request. - // - // * `APPROVED_REQUEST`: User approved the corresponding stage transition. - // - // * `REJECTED_REQUEST`: User rejected the coressponding stage transition. - // - // * `SYSTEM_TRANSITION`: For events performed as a side effect, such as - // archiving existing model versions in a stage. ActivityType types.String `tfsdk:"activity_type"` - // User-provided comment associated with the activity. + // User-provided comment associated with the activity, comment, or + // transition request. Comment types.String `tfsdk:"comment"` // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp types.Int64 `tfsdk:"creation_timestamp"` @@ -146,6 +135,8 @@ func (o Activity_SdkV2) Type(ctx context.Context) attr.Type { } } +// Details required to identify and approve a model version stage transition +// request. type ApproveTransitionRequest_SdkV2 struct { // Specifies whether to archive all current model versions in the target // stage. @@ -168,22 +159,6 @@ type ApproveTransitionRequest_SdkV2 struct { Version types.String `tfsdk:"version"` } -func (newState *ApproveTransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApproveTransitionRequest_SdkV2) { -} - -func (newState *ApproveTransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ApproveTransitionRequest_SdkV2) { -} - -func (c ApproveTransitionRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["archive_existing_versions"] = attrs["archive_existing_versions"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["stage"] = attrs["stage"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -224,7 +199,7 @@ func (o ApproveTransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { } type ApproveTransitionRequestResponse_SdkV2 struct { - // Activity recorded for the action. + // New activity generated as a result of this operation. Activity types.List `tfsdk:"activity"` } @@ -302,15 +277,18 @@ func (o *ApproveTransitionRequestResponse_SdkV2) SetActivity(ctx context.Context o.Activity = types.ListValueMust(t, vs) } -// Comment details. +// For activities, this contains the activity recorded for the action. For +// comments, this contains the comment details. For transition requests, this +// contains the transition request details. type CommentObject_SdkV2 struct { // Array of actions on the activity allowed for the current viewer. AvailableActions types.List `tfsdk:"available_actions"` - // User-provided comment on the action. + // User-provided comment associated with the activity, comment, or + // transition request. Comment types.String `tfsdk:"comment"` // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp types.Int64 `tfsdk:"creation_timestamp"` - // Comment ID + // Unique identifier for the object. Id types.String `tfsdk:"id"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp"` @@ -406,6 +384,7 @@ func (o *CommentObject_SdkV2) SetAvailableActions(ctx context.Context, v []types o.AvailableActions = types.ListValueMust(t, vs) } +// Details required to create a comment on a model version. type CreateComment_SdkV2 struct { // User-provided comment on the action. Comment types.String `tfsdk:"comment"` @@ -415,20 +394,6 @@ type CreateComment_SdkV2 struct { Version types.String `tfsdk:"version"` } -func (newState *CreateComment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateComment_SdkV2) { -} - -func (newState *CreateComment_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateComment_SdkV2) { -} - -func (c CreateComment_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -465,7 +430,7 @@ func (o CreateComment_SdkV2) Type(ctx context.Context) attr.Type { } type CreateCommentResponse_SdkV2 struct { - // Comment details. + // New comment object Comment types.List `tfsdk:"comment"` } @@ -557,20 +522,6 @@ type CreateExperiment_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExperiment_SdkV2) { -} - -func (newState *CreateExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExperiment_SdkV2) { -} - -func (c CreateExperiment_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["artifact_location"] = attrs["artifact_location"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -684,6 +635,79 @@ func (o CreateExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { } } +type CreateFeatureTagRequest_SdkV2 struct { + FeatureName types.String `tfsdk:"-"` + + FeatureTag types.List `tfsdk:"feature_tag"` + + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFeatureTagRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateFeatureTagRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "feature_tag": reflect.TypeOf(FeatureTag_SdkV2{}), + } +} + +// 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, CreateFeatureTagRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateFeatureTagRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "feature_tag": o.FeatureTag, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateFeatureTagRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "feature_tag": basetypes.ListType{ + ElemType: FeatureTag_SdkV2{}.Type(ctx), + }, + "table_name": types.StringType, + }, + } +} + +// GetFeatureTag returns the value of the FeatureTag field in CreateFeatureTagRequest_SdkV2 as +// a FeatureTag_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateFeatureTagRequest_SdkV2) GetFeatureTag(ctx context.Context) (FeatureTag_SdkV2, bool) { + var e FeatureTag_SdkV2 + if o.FeatureTag.IsNull() || o.FeatureTag.IsUnknown() { + return e, false + } + var v []FeatureTag_SdkV2 + d := o.FeatureTag.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFeatureTag sets the value of the FeatureTag field in CreateFeatureTagRequest_SdkV2. +func (o *CreateFeatureTagRequest_SdkV2) SetFeatureTag(ctx context.Context, v FeatureTag_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["feature_tag"] + o.FeatureTag = types.ListValueMust(t, vs) +} + type CreateForecastingExperimentRequest_SdkV2 struct { // The column in the training table used to customize weights for each time // series. @@ -747,34 +771,6 @@ type CreateForecastingExperimentRequest_SdkV2 struct { TrainingFrameworks types.List `tfsdk:"training_frameworks"` } -func (newState *CreateForecastingExperimentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateForecastingExperimentRequest_SdkV2) { -} - -func (newState *CreateForecastingExperimentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateForecastingExperimentRequest_SdkV2) { -} - -func (c CreateForecastingExperimentRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["custom_weights_column"] = attrs["custom_weights_column"].SetOptional() - attrs["experiment_path"] = attrs["experiment_path"].SetOptional() - attrs["forecast_granularity"] = attrs["forecast_granularity"].SetRequired() - attrs["forecast_horizon"] = attrs["forecast_horizon"].SetRequired() - attrs["future_feature_data_path"] = attrs["future_feature_data_path"].SetOptional() - attrs["holiday_regions"] = attrs["holiday_regions"].SetOptional() - attrs["include_features"] = attrs["include_features"].SetOptional() - attrs["max_runtime"] = attrs["max_runtime"].SetOptional() - attrs["prediction_data_path"] = attrs["prediction_data_path"].SetOptional() - attrs["primary_metric"] = attrs["primary_metric"].SetOptional() - attrs["register_to"] = attrs["register_to"].SetOptional() - attrs["split_column"] = attrs["split_column"].SetOptional() - attrs["target_column"] = attrs["target_column"].SetRequired() - attrs["time_column"] = attrs["time_column"].SetRequired() - attrs["timeseries_identifier_columns"] = attrs["timeseries_identifier_columns"].SetOptional() - attrs["train_data_path"] = attrs["train_data_path"].SetRequired() - attrs["training_frameworks"] = attrs["training_frameworks"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateForecastingExperimentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1018,23 +1014,6 @@ type CreateLoggedModelRequest_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateLoggedModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateLoggedModelRequest_SdkV2) { -} - -func (newState *CreateLoggedModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateLoggedModelRequest_SdkV2) { -} - -func (c CreateLoggedModelRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["model_type"] = attrs["model_type"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["params"] = attrs["params"].SetOptional() - attrs["source_run_id"] = attrs["source_run_id"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateLoggedModelRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1223,20 +1202,6 @@ type CreateModelRequest_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelRequest_SdkV2) { -} - -func (newState *CreateModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelRequest_SdkV2) { -} - -func (c CreateModelRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -1397,23 +1362,6 @@ type CreateModelVersionRequest_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelVersionRequest_SdkV2) { -} - -func (newState *CreateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelVersionRequest_SdkV2) { -} - -func (c CreateModelVersionRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_link"] = attrs["run_link"].SetOptional() - attrs["source"] = attrs["source"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -1565,8 +1513,7 @@ func (o *CreateModelVersionResponse_SdkV2) SetModelVersion(ctx context.Context, } type CreateOnlineStoreRequest_SdkV2 struct { - // An OnlineStore is a logical database instance that stores and serves - // features online. + // Online store to create. OnlineStore types.List `tfsdk:"online_store"` } @@ -1631,6 +1578,7 @@ func (o *CreateOnlineStoreRequest_SdkV2) SetOnlineStore(ctx context.Context, v O o.OnlineStore = types.ListValueMust(t, vs) } +// Details required to create a registry webhook. type CreateRegistryWebhook_SdkV2 struct { // User-specified description for the webhook. Description types.String `tfsdk:"description"` @@ -1668,9 +1616,9 @@ type CreateRegistryWebhook_SdkV2 struct { // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model // version be archived. Events types.List `tfsdk:"events"` - + // External HTTPS URL called on event trigger (by using a POST request). HttpUrlSpec types.List `tfsdk:"http_url_spec"` - + // ID of the job that the webhook runs. JobSpec types.List `tfsdk:"job_spec"` // If model name is not specified, a registry-wide webhook is created that // listens for the specified events across all versions of all registered @@ -1687,25 +1635,6 @@ type CreateRegistryWebhook_SdkV2 struct { Status types.String `tfsdk:"status"` } -func (newState *CreateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegistryWebhook_SdkV2) { -} - -func (newState *CreateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRegistryWebhook_SdkV2) { -} - -func (c CreateRegistryWebhook_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["events"] = attrs["events"].SetRequired() - attrs["http_url_spec"] = attrs["http_url_spec"].SetOptional() - attrs["http_url_spec"] = attrs["http_url_spec"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["job_spec"] = attrs["job_spec"].SetOptional() - attrs["job_spec"] = attrs["job_spec"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["model_name"] = attrs["model_name"].SetOptional() - attrs["status"] = attrs["status"].SetOptional() - - return attrs -} - // 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 @@ -1850,22 +1779,6 @@ type CreateRun_SdkV2 struct { UserId types.String `tfsdk:"user_id"` } -func (newState *CreateRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRun_SdkV2) { -} - -func (newState *CreateRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRun_SdkV2) { -} - -func (c CreateRun_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetOptional() - attrs["run_name"] = attrs["run_name"].SetOptional() - attrs["start_time"] = attrs["start_time"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["user_id"] = attrs["user_id"].SetOptional() - - return attrs -} - // 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 @@ -2014,6 +1927,7 @@ func (o *CreateRunResponse_SdkV2) SetRun(ctx context.Context, v Run_SdkV2) { o.Run = types.ListValueMust(t, vs) } +// Details required to create a model version stage transition request. type CreateTransitionRequest_SdkV2 struct { // User-provided comment on the action. Comment types.String `tfsdk:"comment"` @@ -2033,21 +1947,6 @@ type CreateTransitionRequest_SdkV2 struct { Version types.String `tfsdk:"version"` } -func (newState *CreateTransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTransitionRequest_SdkV2) { -} - -func (newState *CreateTransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTransitionRequest_SdkV2) { -} - -func (c CreateTransitionRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["stage"] = attrs["stage"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -2086,7 +1985,7 @@ func (o CreateTransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { } type CreateTransitionRequestResponse_SdkV2 struct { - // Transition request details. + // New activity generated for stage transition request. Request types.List `tfsdk:"request"` } @@ -2479,6 +2378,17 @@ 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) { +} + +func (c DeleteCommentResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -2511,18 +2421,6 @@ type DeleteExperiment_SdkV2 struct { ExperimentId types.String `tfsdk:"experiment_id"` } -func (newState *DeleteExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExperiment_SdkV2) { -} - -func (newState *DeleteExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExperiment_SdkV2) { -} - -func (c DeleteExperiment_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - - return attrs -} - // 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 @@ -2595,6 +2493,50 @@ func (o DeleteExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { } } +type DeleteFeatureTagRequest_SdkV2 struct { + // The name of the feature within the feature table. + FeatureName types.String `tfsdk:"-"` + // The key of the tag to delete. + Key types.String `tfsdk:"-"` + // The name of the feature table. + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFeatureTagRequest. +// Container types (types.Map, types.List, types.Set) and 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 DeleteFeatureTagRequest_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, DeleteFeatureTagRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteFeatureTagRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "key": o.Key, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteFeatureTagRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "key": types.StringType, + "table_name": types.StringType, + }, + } +} + type DeleteLoggedModelRequest_SdkV2 struct { // The ID of the logged model to delete. ModelId types.String `tfsdk:"-"` @@ -2792,6 +2734,17 @@ 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) { +} + +func (c DeleteModelResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -2863,6 +2816,17 @@ 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) { +} + +func (c DeleteModelTagResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -2933,6 +2897,17 @@ 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) { +} + +func (c DeleteModelVersionResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -3008,6 +2983,17 @@ 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) { +} + +func (c DeleteModelVersionTagResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -3071,73 +3057,31 @@ func (o DeleteOnlineStoreRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type DeleteOnlineStoreResponse_SdkV2 struct { +type DeleteRun_SdkV2 struct { + // ID of the run to delete. + RunId types.String `tfsdk:"run_id"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteOnlineStoreResponse. +// 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 // 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 DeleteOnlineStoreResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a DeleteRun_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, DeleteOnlineStoreResponse_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteRun_SdkV2 // only implements ToObjectValue() and Type(). -func (o DeleteOnlineStoreResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o DeleteRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteOnlineStoreResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - -type DeleteRun_SdkV2 struct { - // ID of the run to delete. - RunId types.String `tfsdk:"run_id"` -} - -func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRun_SdkV2) { -} - -func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRun_SdkV2) { -} - -func (c DeleteRun_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - -// 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 -// 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 DeleteRun_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, DeleteRun_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{ - "run_id": o.RunId, - }) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -3202,20 +3146,6 @@ type DeleteRuns_SdkV2 struct { MaxTimestampMillis types.Int64 `tfsdk:"max_timestamp_millis"` } -func (newState *DeleteRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRuns_SdkV2) { -} - -func (newState *DeleteRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRuns_SdkV2) { -} - -func (c DeleteRuns_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["max_runs"] = attrs["max_runs"].SetOptional() - attrs["max_timestamp_millis"] = attrs["max_timestamp_millis"].SetRequired() - - return attrs -} - // 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 @@ -3306,19 +3236,6 @@ type DeleteTag_SdkV2 struct { RunId types.String `tfsdk:"run_id"` } -func (newState *DeleteTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTag_SdkV2) { -} - -func (newState *DeleteTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTag_SdkV2) { -} - -func (c DeleteTag_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -3456,6 +3373,21 @@ func (o DeleteTransitionRequestRequest_SdkV2) Type(ctx context.Context) attr.Typ } type DeleteTransitionRequestResponse_SdkV2 struct { + // New activity generated as a result of this operation. + Activity types.List `tfsdk:"activity"` +} + +func (newState *DeleteTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTransitionRequestResponse_SdkV2) { +} + +func (newState *DeleteTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTransitionRequestResponse_SdkV2) { +} + +func (c DeleteTransitionRequestResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["activity"] = attrs["activity"].SetOptional() + attrs["activity"] = attrs["activity"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTransitionRequestResponse. @@ -3466,7 +3398,9 @@ type DeleteTransitionRequestResponse_SdkV2 struct { // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a DeleteTransitionRequestResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "activity": reflect.TypeOf(Activity_SdkV2{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -3475,14 +3409,46 @@ func (a DeleteTransitionRequestResponse_SdkV2) GetComplexFieldTypes(ctx context. func (o DeleteTransitionRequestResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "activity": o.Activity, + }) } // Type implements basetypes.ObjectValuable. func (o DeleteTransitionRequestResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "activity": basetypes.ListType{ + ElemType: Activity_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetActivity returns the value of the Activity field in DeleteTransitionRequestResponse_SdkV2 as +// a Activity_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteTransitionRequestResponse_SdkV2) GetActivity(ctx context.Context) (Activity_SdkV2, bool) { + var e Activity_SdkV2 + if o.Activity.IsNull() || o.Activity.IsUnknown() { + return e, false + } + var v []Activity_SdkV2 + d := o.Activity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetActivity sets the value of the Activity field in DeleteTransitionRequestResponse_SdkV2. +func (o *DeleteTransitionRequestResponse_SdkV2) SetActivity(ctx context.Context, v Activity_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["activity"] + o.Activity = types.ListValueMust(t, vs) } type DeleteWebhookRequest_SdkV2 struct { @@ -3524,6 +3490,17 @@ 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) { +} + +func (c DeleteWebhookResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -3664,7 +3641,7 @@ 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"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -3826,7 +3803,7 @@ type ExperimentPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3998,7 +3975,7 @@ func (o *ExperimentPermissions_SdkV2) SetAccessControlList(ctx context.Context, type ExperimentPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4054,19 +4031,6 @@ type ExperimentPermissionsRequest_SdkV2 struct { ExperimentId types.String `tfsdk:"-"` } -func (newState *ExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermissionsRequest_SdkV2) { -} - -func (newState *ExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissionsRequest_SdkV2) { -} - -func (c ExperimentPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - - return attrs -} - // 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 @@ -4184,175 +4148,652 @@ func (o ExperimentTag_SdkV2) Type(ctx context.Context) attr.Type { } } -// Metadata of a single artifact file or directory. -type FileInfo_SdkV2 struct { - // The size in bytes of the file. Unset for directories. - FileSize types.Int64 `tfsdk:"file_size"` - // Whether the path is a directory. - IsDir types.Bool `tfsdk:"is_dir"` - // The path relative to the root artifact directory run. - Path types.String `tfsdk:"path"` +// Feature for model version. +type Feature_SdkV2 struct { + // Feature name + FeatureName types.String `tfsdk:"feature_name"` + // Feature table id + FeatureTableId types.String `tfsdk:"feature_table_id"` + // Feature table name + FeatureTableName types.String `tfsdk:"feature_table_name"` } -func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo_SdkV2) { +func (newState *Feature_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Feature_SdkV2) { } -func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileInfo_SdkV2) { +func (newState *Feature_SdkV2) SyncEffectiveFieldsDuringRead(existingState Feature_SdkV2) { } -func (c FileInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["file_size"] = attrs["file_size"].SetOptional() - attrs["is_dir"] = attrs["is_dir"].SetOptional() - attrs["path"] = attrs["path"].SetOptional() +func (c Feature_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["feature_name"] = attrs["feature_name"].SetOptional() + attrs["feature_table_id"] = attrs["feature_table_id"].SetOptional() + attrs["feature_table_name"] = attrs["feature_table_name"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in FileInfo. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Feature. // Container types (types.Map, types.List, types.Set) and 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 FileInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a Feature_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, FileInfo_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, Feature_SdkV2 // only implements ToObjectValue() and Type(). -func (o FileInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o Feature_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "file_size": o.FileSize, - "is_dir": o.IsDir, - "path": o.Path, + "feature_name": o.FeatureName, + "feature_table_id": o.FeatureTableId, + "feature_table_name": o.FeatureTableName, }) } // Type implements basetypes.ObjectValuable. -func (o FileInfo_SdkV2) Type(ctx context.Context) attr.Type { +func (o Feature_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "file_size": types.Int64Type, - "is_dir": types.BoolType, - "path": types.StringType, + "feature_name": types.StringType, + "feature_table_id": types.StringType, + "feature_table_name": types.StringType, }, } } -type FinalizeLoggedModelRequest_SdkV2 struct { - // The ID of the logged model to finalize. - ModelId types.String `tfsdk:"-"` - // Whether or not the model is ready for use. - // ``"LOGGED_MODEL_UPLOAD_FAILED"`` indicates that something went wrong when - // logging the model weights / agent code. - Status types.String `tfsdk:"status"` +type FeatureLineage_SdkV2 struct { + // List of feature specs that contain this feature. + FeatureSpecs types.List `tfsdk:"feature_specs"` + // List of Unity Catalog models that were trained on this feature. + Models types.List `tfsdk:"models"` + // List of online features that use this feature as source. + OnlineFeatures types.List `tfsdk:"online_features"` } -func (newState *FinalizeLoggedModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FinalizeLoggedModelRequest_SdkV2) { +func (newState *FeatureLineage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureLineage_SdkV2) { } -func (newState *FinalizeLoggedModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState FinalizeLoggedModelRequest_SdkV2) { +func (newState *FeatureLineage_SdkV2) SyncEffectiveFieldsDuringRead(existingState FeatureLineage_SdkV2) { } -func (c FinalizeLoggedModelRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_id"] = attrs["model_id"].SetRequired() - attrs["status"] = attrs["status"].SetRequired() +func (c FeatureLineage_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["feature_specs"] = attrs["feature_specs"].SetOptional() + attrs["models"] = attrs["models"].SetOptional() + attrs["online_features"] = attrs["online_features"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in FinalizeLoggedModelRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureLineage. // Container types (types.Map, types.List, types.Set) and 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 FinalizeLoggedModelRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} +func (a FeatureLineage_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "feature_specs": reflect.TypeOf(FeatureLineageFeatureSpec_SdkV2{}), + "models": reflect.TypeOf(FeatureLineageModel_SdkV2{}), + "online_features": reflect.TypeOf(FeatureLineageOnlineFeature_SdkV2{}), + } } // 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, FinalizeLoggedModelRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, FeatureLineage_SdkV2 // only implements ToObjectValue() and Type(). -func (o FinalizeLoggedModelRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o FeatureLineage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "model_id": o.ModelId, - "status": o.Status, + "feature_specs": o.FeatureSpecs, + "models": o.Models, + "online_features": o.OnlineFeatures, }) } // Type implements basetypes.ObjectValuable. -func (o FinalizeLoggedModelRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o FeatureLineage_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "model_id": types.StringType, - "status": types.StringType, + "feature_specs": basetypes.ListType{ + ElemType: FeatureLineageFeatureSpec_SdkV2{}.Type(ctx), + }, + "models": basetypes.ListType{ + ElemType: FeatureLineageModel_SdkV2{}.Type(ctx), + }, + "online_features": basetypes.ListType{ + ElemType: FeatureLineageOnlineFeature_SdkV2{}.Type(ctx), + }, }, } } -type FinalizeLoggedModelResponse_SdkV2 struct { - // The updated logged model. - Model types.List `tfsdk:"model"` +// GetFeatureSpecs returns the value of the FeatureSpecs field in FeatureLineage_SdkV2 as +// a slice of FeatureLineageFeatureSpec_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *FeatureLineage_SdkV2) GetFeatureSpecs(ctx context.Context) ([]FeatureLineageFeatureSpec_SdkV2, bool) { + if o.FeatureSpecs.IsNull() || o.FeatureSpecs.IsUnknown() { + return nil, false + } + var v []FeatureLineageFeatureSpec_SdkV2 + d := o.FeatureSpecs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true } -func (newState *FinalizeLoggedModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FinalizeLoggedModelResponse_SdkV2) { +// SetFeatureSpecs sets the value of the FeatureSpecs field in FeatureLineage_SdkV2. +func (o *FeatureLineage_SdkV2) SetFeatureSpecs(ctx context.Context, v []FeatureLineageFeatureSpec_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["feature_specs"] + t = t.(attr.TypeWithElementType).ElementType() + o.FeatureSpecs = types.ListValueMust(t, vs) } -func (newState *FinalizeLoggedModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState FinalizeLoggedModelResponse_SdkV2) { +// GetModels returns the value of the Models field in FeatureLineage_SdkV2 as +// a slice of FeatureLineageModel_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *FeatureLineage_SdkV2) GetModels(ctx context.Context) ([]FeatureLineageModel_SdkV2, bool) { + if o.Models.IsNull() || o.Models.IsUnknown() { + return nil, false + } + var v []FeatureLineageModel_SdkV2 + d := o.Models.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true } -func (c FinalizeLoggedModelResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model"] = attrs["model"].SetOptional() - attrs["model"] = attrs["model"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) +// SetModels sets the value of the Models field in FeatureLineage_SdkV2. +func (o *FeatureLineage_SdkV2) SetModels(ctx context.Context, v []FeatureLineageModel_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["models"] + t = t.(attr.TypeWithElementType).ElementType() + o.Models = types.ListValueMust(t, vs) +} + +// GetOnlineFeatures returns the value of the OnlineFeatures field in FeatureLineage_SdkV2 as +// a slice of FeatureLineageOnlineFeature_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *FeatureLineage_SdkV2) GetOnlineFeatures(ctx context.Context) ([]FeatureLineageOnlineFeature_SdkV2, bool) { + if o.OnlineFeatures.IsNull() || o.OnlineFeatures.IsUnknown() { + return nil, false + } + var v []FeatureLineageOnlineFeature_SdkV2 + d := o.OnlineFeatures.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnlineFeatures sets the value of the OnlineFeatures field in FeatureLineage_SdkV2. +func (o *FeatureLineage_SdkV2) SetOnlineFeatures(ctx context.Context, v []FeatureLineageOnlineFeature_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["online_features"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnlineFeatures = types.ListValueMust(t, vs) +} + +type FeatureLineageFeatureSpec_SdkV2 struct { + // The full name of the feature spec in Unity Catalog. + Name types.String `tfsdk:"name"` +} + +func (newState *FeatureLineageFeatureSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureLineageFeatureSpec_SdkV2) { +} + +func (newState *FeatureLineageFeatureSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState FeatureLineageFeatureSpec_SdkV2) { +} + +func (c FeatureLineageFeatureSpec_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in FinalizeLoggedModelResponse. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureLineageFeatureSpec. // Container types (types.Map, types.List, types.Set) and 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 FinalizeLoggedModelResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "model": reflect.TypeOf(LoggedModel_SdkV2{}), - } +func (a FeatureLineageFeatureSpec_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, FinalizeLoggedModelResponse_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, FeatureLineageFeatureSpec_SdkV2 // only implements ToObjectValue() and Type(). -func (o FinalizeLoggedModelResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o FeatureLineageFeatureSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "model": o.Model, + "name": o.Name, }) } // Type implements basetypes.ObjectValuable. -func (o FinalizeLoggedModelResponse_SdkV2) Type(ctx context.Context) attr.Type { +func (o FeatureLineageFeatureSpec_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "model": basetypes.ListType{ - ElemType: LoggedModel_SdkV2{}.Type(ctx), - }, + "name": types.StringType, }, } } -// GetModel returns the value of the Model field in FinalizeLoggedModelResponse_SdkV2 as -// a LoggedModel_SdkV2 value. +type FeatureLineageModel_SdkV2 struct { + // The full name of the model in Unity Catalog. + Name types.String `tfsdk:"name"` + // The version of the model. + Version types.Int64 `tfsdk:"version"` +} + +func (newState *FeatureLineageModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureLineageModel_SdkV2) { +} + +func (newState *FeatureLineageModel_SdkV2) SyncEffectiveFieldsDuringRead(existingState FeatureLineageModel_SdkV2) { +} + +func (c FeatureLineageModel_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() + attrs["version"] = attrs["version"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureLineageModel. +// Container types (types.Map, types.List, types.Set) and 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 FeatureLineageModel_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, FeatureLineageModel_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FeatureLineageModel_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FeatureLineageModel_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "version": types.Int64Type, + }, + } +} + +type FeatureLineageOnlineFeature_SdkV2 struct { + // The name of the online feature (column name). + FeatureName types.String `tfsdk:"feature_name"` + // The full name of the online table in Unity Catalog. + TableName types.String `tfsdk:"table_name"` +} + +func (newState *FeatureLineageOnlineFeature_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureLineageOnlineFeature_SdkV2) { +} + +func (newState *FeatureLineageOnlineFeature_SdkV2) SyncEffectiveFieldsDuringRead(existingState FeatureLineageOnlineFeature_SdkV2) { +} + +func (c FeatureLineageOnlineFeature_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["feature_name"] = attrs["feature_name"].SetOptional() + attrs["table_name"] = attrs["table_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureLineageOnlineFeature. +// Container types (types.Map, types.List, types.Set) and 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 FeatureLineageOnlineFeature_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, FeatureLineageOnlineFeature_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FeatureLineageOnlineFeature_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FeatureLineageOnlineFeature_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "table_name": types.StringType, + }, + } +} + +// Feature list wrap all the features for a model version +type FeatureList_SdkV2 struct { + Features types.List `tfsdk:"features"` +} + +func (newState *FeatureList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureList_SdkV2) { +} + +func (newState *FeatureList_SdkV2) SyncEffectiveFieldsDuringRead(existingState FeatureList_SdkV2) { +} + +func (c FeatureList_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["features"] = attrs["features"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureList. +// Container types (types.Map, types.List, types.Set) and 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 FeatureList_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "features": reflect.TypeOf(Feature_SdkV2{}), + } +} + +// 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, FeatureList_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FeatureList_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "features": o.Features, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FeatureList_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "features": basetypes.ListType{ + ElemType: Feature_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetFeatures returns the value of the Features field in FeatureList_SdkV2 as +// a slice of Feature_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *FeatureList_SdkV2) GetFeatures(ctx context.Context) ([]Feature_SdkV2, bool) { + if o.Features.IsNull() || o.Features.IsUnknown() { + return nil, false + } + var v []Feature_SdkV2 + d := o.Features.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFeatures sets the value of the Features field in FeatureList_SdkV2. +func (o *FeatureList_SdkV2) SetFeatures(ctx context.Context, v []Feature_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["features"] + t = t.(attr.TypeWithElementType).ElementType() + o.Features = types.ListValueMust(t, vs) +} + +// Represents a tag on a feature in a feature table. +type FeatureTag_SdkV2 struct { + Key types.String `tfsdk:"key"` + + Value types.String `tfsdk:"value"` +} + +func (newState *FeatureTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureTag_SdkV2) { +} + +func (newState *FeatureTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState FeatureTag_SdkV2) { +} + +func (c FeatureTag_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["key"] = attrs["key"].SetRequired() + attrs["value"] = attrs["value"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureTag. +// Container types (types.Map, types.List, types.Set) and 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 FeatureTag_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, FeatureTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FeatureTag_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FeatureTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +// Metadata of a single artifact file or directory. +type FileInfo_SdkV2 struct { + // The size in bytes of the file. Unset for directories. + FileSize types.Int64 `tfsdk:"file_size"` + // Whether the path is a directory. + IsDir types.Bool `tfsdk:"is_dir"` + // The path relative to the root artifact directory run. + Path types.String `tfsdk:"path"` +} + +func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo_SdkV2) { +} + +func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileInfo_SdkV2) { +} + +func (c FileInfo_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["file_size"] = attrs["file_size"].SetOptional() + attrs["is_dir"] = attrs["is_dir"].SetOptional() + attrs["path"] = attrs["path"].SetOptional() + + return attrs +} + +// 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 +// 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 FileInfo_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, FileInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FileInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_size": o.FileSize, + "is_dir": o.IsDir, + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FileInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_size": types.Int64Type, + "is_dir": types.BoolType, + "path": types.StringType, + }, + } +} + +type FinalizeLoggedModelRequest_SdkV2 struct { + // The ID of the logged model to finalize. + ModelId types.String `tfsdk:"-"` + // Whether or not the model is ready for use. + // ``"LOGGED_MODEL_UPLOAD_FAILED"`` indicates that something went wrong when + // logging the model weights / agent code. + Status types.String `tfsdk:"status"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FinalizeLoggedModelRequest. +// Container types (types.Map, types.List, types.Set) and 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 FinalizeLoggedModelRequest_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, FinalizeLoggedModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FinalizeLoggedModelRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_id": o.ModelId, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FinalizeLoggedModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_id": types.StringType, + "status": types.StringType, + }, + } +} + +type FinalizeLoggedModelResponse_SdkV2 struct { + // The updated logged model. + Model types.List `tfsdk:"model"` +} + +func (newState *FinalizeLoggedModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FinalizeLoggedModelResponse_SdkV2) { +} + +func (newState *FinalizeLoggedModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState FinalizeLoggedModelResponse_SdkV2) { +} + +func (c FinalizeLoggedModelResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["model"] = attrs["model"].SetOptional() + attrs["model"] = attrs["model"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FinalizeLoggedModelResponse. +// Container types (types.Map, types.List, types.Set) and 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 FinalizeLoggedModelResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "model": reflect.TypeOf(LoggedModel_SdkV2{}), + } +} + +// 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, FinalizeLoggedModelResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FinalizeLoggedModelResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model": o.Model, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FinalizeLoggedModelResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model": basetypes.ListType{ + ElemType: LoggedModel_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetModel returns the value of the Model field in FinalizeLoggedModelResponse_SdkV2 as +// a LoggedModel_SdkV2 value. // If the field is unknown or null, the boolean return value is false. func (o *FinalizeLoggedModelResponse_SdkV2) GetModel(ctx context.Context) (LoggedModel_SdkV2, bool) { var e LoggedModel_SdkV2 @@ -4817,6 +5258,89 @@ func (o *GetExperimentResponse_SdkV2) SetExperiment(ctx context.Context, v Exper o.Experiment = types.ListValueMust(t, vs) } +type GetFeatureLineageRequest_SdkV2 struct { + // The name of the feature. + FeatureName types.String `tfsdk:"-"` + // The full name of the feature table in Unity Catalog. + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFeatureLineageRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetFeatureLineageRequest_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, GetFeatureLineageRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetFeatureLineageRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetFeatureLineageRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "table_name": types.StringType, + }, + } +} + +type GetFeatureTagRequest_SdkV2 struct { + FeatureName types.String `tfsdk:"-"` + + Key types.String `tfsdk:"-"` + + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFeatureTagRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetFeatureTagRequest_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, GetFeatureTagRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetFeatureTagRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "key": o.Key, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetFeatureTagRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "key": types.StringType, + "table_name": types.StringType, + }, + } +} + type GetForecastingExperimentRequest_SdkV2 struct { // The unique ID of a forecasting experiment ExperimentId types.String `tfsdk:"-"` @@ -4915,19 +5439,6 @@ type GetLatestVersionsRequest_SdkV2 struct { Stages types.List `tfsdk:"stages"` } -func (newState *GetLatestVersionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionsRequest_SdkV2) { -} - -func (newState *GetLatestVersionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionsRequest_SdkV2) { -} - -func (c GetLatestVersionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["stages"] = attrs["stages"].SetOptional() - - return attrs -} - // 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 @@ -6151,9 +6662,9 @@ 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"` - // 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. + // 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"` } @@ -6385,99 +6896,229 @@ func (o ListExperimentsRequest_SdkV2) ToObjectValue(ctx context.Context) basetyp } // Type implements basetypes.ObjectValuable. -func (o ListExperimentsRequest_SdkV2) Type(ctx context.Context) attr.Type { +func (o ListExperimentsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "page_token": types.StringType, + "view_type": types.StringType, + }, + } +} + +type ListExperimentsResponse_SdkV2 struct { + // Paginated Experiments beginning with the first item on the requested + // page. + Experiments types.List `tfsdk:"experiments"` + // 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"` +} + +func (newState *ListExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsResponse_SdkV2) { +} + +func (newState *ListExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExperimentsResponse_SdkV2) { +} + +func (c ListExperimentsResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["experiments"] = attrs["experiments"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// 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 +// 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 ListExperimentsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "experiments": reflect.TypeOf(Experiment_SdkV2{}), + } +} + +// 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, ListExperimentsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExperimentsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiments": o.Experiments, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExperimentsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiments": basetypes.ListType{ + ElemType: Experiment_SdkV2{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetExperiments returns the value of the Experiments field in ListExperimentsResponse_SdkV2 as +// a slice of Experiment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExperimentsResponse_SdkV2) GetExperiments(ctx context.Context) ([]Experiment_SdkV2, bool) { + if o.Experiments.IsNull() || o.Experiments.IsUnknown() { + return nil, false + } + var v []Experiment_SdkV2 + d := o.Experiments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExperiments sets the value of the Experiments field in ListExperimentsResponse_SdkV2. +func (o *ListExperimentsResponse_SdkV2) SetExperiments(ctx context.Context, v []Experiment_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["experiments"] + t = t.(attr.TypeWithElementType).ElementType() + o.Experiments = types.ListValueMust(t, vs) +} + +type ListFeatureTagsRequest_SdkV2 struct { + FeatureName types.String `tfsdk:"-"` + // The maximum number of results to return. + PageSize types.Int64 `tfsdk:"-"` + // Pagination token to go to the next page based on a previous query. + PageToken types.String `tfsdk:"-"` + + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFeatureTagsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListFeatureTagsRequest_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, ListFeatureTagsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListFeatureTagsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "page_size": o.PageSize, + "page_token": o.PageToken, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListFeatureTagsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "max_results": types.Int64Type, - "page_token": types.StringType, - "view_type": types.StringType, + "feature_name": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + "table_name": types.StringType, }, } } -type ListExperimentsResponse_SdkV2 struct { - // Paginated Experiments beginning with the first item on the requested - // page. - Experiments types.List `tfsdk:"experiments"` - // Token that can be used to retrieve the next page of experiments. Empty - // token means no more experiment is available for retrieval. +// Response message for ListFeatureTag. +type ListFeatureTagsResponse_SdkV2 struct { + FeatureTags types.List `tfsdk:"feature_tags"` + // Pagination token to request the next page of results for this query. NextPageToken types.String `tfsdk:"next_page_token"` } -func (newState *ListExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsResponse_SdkV2) { +func (newState *ListFeatureTagsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFeatureTagsResponse_SdkV2) { } -func (newState *ListExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExperimentsResponse_SdkV2) { +func (newState *ListFeatureTagsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFeatureTagsResponse_SdkV2) { } -func (c ListExperimentsResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiments"] = attrs["experiments"].SetOptional() +func (c ListFeatureTagsResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["feature_tags"] = attrs["feature_tags"].SetOptional() attrs["next_page_token"] = attrs["next_page_token"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExperimentsResponse. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFeatureTagsResponse. // Container types (types.Map, types.List, types.Set) and 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 ListExperimentsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a ListFeatureTagsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "experiments": reflect.TypeOf(Experiment_SdkV2{}), + "feature_tags": reflect.TypeOf(FeatureTag_SdkV2{}), } } // 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, ListExperimentsResponse_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListFeatureTagsResponse_SdkV2 // only implements ToObjectValue() and Type(). -func (o ListExperimentsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ListFeatureTagsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "experiments": o.Experiments, + "feature_tags": o.FeatureTags, "next_page_token": o.NextPageToken, }) } // Type implements basetypes.ObjectValuable. -func (o ListExperimentsResponse_SdkV2) Type(ctx context.Context) attr.Type { +func (o ListFeatureTagsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "experiments": basetypes.ListType{ - ElemType: Experiment_SdkV2{}.Type(ctx), + "feature_tags": basetypes.ListType{ + ElemType: FeatureTag_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, } } -// GetExperiments returns the value of the Experiments field in ListExperimentsResponse_SdkV2 as -// a slice of Experiment_SdkV2 values. +// GetFeatureTags returns the value of the FeatureTags field in ListFeatureTagsResponse_SdkV2 as +// a slice of FeatureTag_SdkV2 values. // If the field is unknown or null, the boolean return value is false. -func (o *ListExperimentsResponse_SdkV2) GetExperiments(ctx context.Context) ([]Experiment_SdkV2, bool) { - if o.Experiments.IsNull() || o.Experiments.IsUnknown() { +func (o *ListFeatureTagsResponse_SdkV2) GetFeatureTags(ctx context.Context) ([]FeatureTag_SdkV2, bool) { + if o.FeatureTags.IsNull() || o.FeatureTags.IsUnknown() { return nil, false } - var v []Experiment_SdkV2 - d := o.Experiments.ElementsAs(ctx, &v, true) + var v []FeatureTag_SdkV2 + d := o.FeatureTags.ElementsAs(ctx, &v, true) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } return v, true } -// SetExperiments sets the value of the Experiments field in ListExperimentsResponse_SdkV2. -func (o *ListExperimentsResponse_SdkV2) SetExperiments(ctx context.Context, v []Experiment_SdkV2) { +// SetFeatureTags sets the value of the FeatureTags field in ListFeatureTagsResponse_SdkV2. +func (o *ListFeatureTagsResponse_SdkV2) SetFeatureTags(ctx context.Context, v []FeatureTag_SdkV2) { vs := make([]attr.Value, 0, len(v)) for _, e := range v { vs = append(vs, e.ToObjectValue(ctx)) } - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["experiments"] + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["feature_tags"] t = t.(attr.TypeWithElementType).ElementType() - o.Experiments = types.ListValueMust(t, vs) + o.FeatureTags = types.ListValueMust(t, vs) } type ListModelsRequest_SdkV2 struct { @@ -6811,7 +7452,7 @@ func (o *ListRegistryWebhooks_SdkV2) SetWebhooks(ctx context.Context, v []Regist } type ListTransitionRequestsRequest_SdkV2 struct { - // Name of the model. + // Name of the registered model. Name types.String `tfsdk:"-"` // Version of the model. Version types.String `tfsdk:"-"` @@ -6929,12 +7570,48 @@ func (o *ListTransitionRequestsResponse_SdkV2) SetRequests(ctx context.Context, } type ListWebhooksRequest_SdkV2 struct { + // Events that trigger the webhook. * `MODEL_VERSION_CREATED`: A new model + // version was created for the associated model. + // + // * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was + // changed. + // + // * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s + // stage be transitioned. + // + // * `COMMENT_CREATED`: A user wrote a comment on a registered model. + // + // * `REGISTERED_MODEL_CREATED`: A new registered model was created. This + // event type can only be specified for a registry-wide webhook, which can + // be created by not specifying a model name in the create request. + // + // * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version. + // + // * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was + // transitioned to staging. + // + // * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was + // transitioned to production. + // + // * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived. + // + // * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model + // version be transitioned to staging. + // + // * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model + // version be transitioned to production. + // + // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model + // version be archived. + // // If `events` is specified, any webhook with one or more of the specified // trigger events is included in the output. If `events` is not specified, // webhooks of all event types are included in the output. Events types.List `tfsdk:"-"` - // If not specified, all webhooks associated with the specified events are - // listed, regardless of their associated model. + + MaxResults types.Int64 `tfsdk:"-"` + // Registered model name If not specified, all webhooks associated with the + // specified events are listed, regardless of their associated model. ModelName types.String `tfsdk:"-"` // Token indicating the page of artifact results to fetch PageToken types.String `tfsdk:"-"` @@ -6960,9 +7637,10 @@ func (o ListWebhooksRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes. return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "events": o.Events, - "model_name": o.ModelName, - "page_token": o.PageToken, + "events": o.Events, + "max_results": o.MaxResults, + "model_name": o.ModelName, + "page_token": o.PageToken, }) } @@ -6973,8 +7651,9 @@ func (o ListWebhooksRequest_SdkV2) Type(ctx context.Context) attr.Type { "events": basetypes.ListType{ ElemType: types.StringType, }, - "model_name": types.StringType, - "page_token": types.StringType, + "max_results": types.Int64Type, + "model_name": types.StringType, + "page_token": types.StringType, }, } } @@ -7019,21 +7698,6 @@ type LogBatch_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *LogBatch_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogBatch_SdkV2) { -} - -func (newState *LogBatch_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogBatch_SdkV2) { -} - -func (c LogBatch_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metrics"] = attrs["metrics"].SetOptional() - attrs["params"] = attrs["params"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -7209,20 +7873,6 @@ type LogInputs_SdkV2 struct { RunId types.String `tfsdk:"run_id"` } -func (newState *LogInputs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogInputs_SdkV2) { -} - -func (newState *LogInputs_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogInputs_SdkV2) { -} - -func (c LogInputs_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["datasets"] = attrs["datasets"].SetOptional() - attrs["models"] = attrs["models"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -7365,19 +8015,6 @@ type LogLoggedModelParamsRequest_SdkV2 struct { Params types.List `tfsdk:"params"` } -func (newState *LogLoggedModelParamsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogLoggedModelParamsRequest_SdkV2) { -} - -func (newState *LogLoggedModelParamsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogLoggedModelParamsRequest_SdkV2) { -} - -func (c LogLoggedModelParamsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_id"] = attrs["model_id"].SetRequired() - attrs["params"] = attrs["params"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogLoggedModelParamsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7507,26 +8144,6 @@ type LogMetric_SdkV2 struct { Value types.Float64 `tfsdk:"value"` } -func (newState *LogMetric_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogMetric_SdkV2) { -} - -func (newState *LogMetric_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogMetric_SdkV2) { -} - -func (c LogMetric_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dataset_digest"] = attrs["dataset_digest"].SetOptional() - attrs["dataset_name"] = attrs["dataset_name"].SetOptional() - attrs["key"] = attrs["key"].SetRequired() - attrs["model_id"] = attrs["model_id"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_uuid"] = attrs["run_uuid"].SetOptional() - attrs["step"] = attrs["step"].SetOptional() - attrs["timestamp"] = attrs["timestamp"].SetRequired() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -7622,19 +8239,6 @@ type LogModel_SdkV2 struct { RunId types.String `tfsdk:"run_id"` } -func (newState *LogModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogModel_SdkV2) { -} - -func (newState *LogModel_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogModel_SdkV2) { -} - -func (c LogModel_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_json"] = attrs["model_json"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetOptional() - - return attrs -} - // 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 @@ -7716,19 +8320,6 @@ type LogOutputsRequest_SdkV2 struct { RunId types.String `tfsdk:"run_id"` } -func (newState *LogOutputsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogOutputsRequest_SdkV2) { -} - -func (newState *LogOutputsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogOutputsRequest_SdkV2) { -} - -func (c LogOutputsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["models"] = attrs["models"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogOutputsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7845,21 +8436,6 @@ type LogParam_SdkV2 struct { Value types.String `tfsdk:"value"` } -func (newState *LogParam_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogParam_SdkV2) { -} - -func (newState *LogParam_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogParam_SdkV2) { -} - -func (c LogParam_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_uuid"] = attrs["run_uuid"].SetOptional() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -8646,14 +9222,13 @@ type ModelDatabricks_SdkV2 struct { Description types.String `tfsdk:"description"` // Unique identifier for the object. Id types.String `tfsdk:"id"` - // Time of the object at last update, as a Unix timestamp in milliseconds. + // Last update time of the object, as a Unix timestamp in milliseconds. LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp"` // Array of model versions, each the latest version for its stage. LatestVersions types.List `tfsdk:"latest_versions"` // Name of the model. Name types.String `tfsdk:"name"` - // Permission level of the requesting user on the object. For what is - // allowed at each level, see [MLflow Model permissions](..). + // Permission level granted for the requesting user on this registered model PermissionLevel types.String `tfsdk:"permission_level"` // Array of tags associated with the model. Tags types.List `tfsdk:"tags"` @@ -8890,6 +9465,7 @@ func (o ModelOutput_SdkV2) Type(ctx context.Context) attr.Type { } } +// Tag for a registered model type ModelTag_SdkV2 struct { // The tag key. Key types.String `tfsdk:"key"` @@ -9087,24 +9663,25 @@ 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"` - // Stage of the model version. Valid values are: - // - // * `None`: The initial stage of a model version. - // - // * `Staging`: Staging or pre-production stage. - // - // * `Production`: Production stage. - // - // * `Archived`: Archived stage. + CurrentStage types.String `tfsdk:"current_stage"` // User-specified description for the object. Description types.String `tfsdk:"description"` + // Email Subscription Status: This is the subscription status of the user to + // the model version Users get subscribed by interacting with the model + // version. + EmailSubscriptionStatus types.String `tfsdk:"email_subscription_status"` + // Feature lineage of `model_version`. + FeatureList types.List `tfsdk:"feature_list"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp"` // Name of the model. Name types.String `tfsdk:"name"` - // Permission level of the requesting user on the object. For what is - // allowed at each level, see [MLflow Model permissions](..). + // Open requests for this `model_versions`. Gap in sequence number is + // intentional and is done in order to match field sequence numbers of + // `ModelVersion` proto message + OpenRequests types.List `tfsdk:"open_requests"` + PermissionLevel types.String `tfsdk:"permission_level"` // Unique identifier for the MLflow tracking run associated with the source // model artifacts. @@ -9116,14 +9693,7 @@ type ModelVersionDatabricks_SdkV2 struct { // URI that indicates the location of the source model artifacts. This is // used when creating the model version. Source types.String `tfsdk:"source"` - // 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. - // - // * `FAILED_REGISTRATION`: Request to register a new model version has - // failed. - // - // * `READY`: Model version is ready for use. + Status types.String `tfsdk:"status"` // Details on the current status, for example why registration failed. StatusMessage types.String `tfsdk:"status_message"` @@ -9145,8 +9715,12 @@ func (c ModelVersionDatabricks_SdkV2) ApplySchemaCustomizations(attrs map[string attrs["creation_timestamp"] = attrs["creation_timestamp"].SetOptional() attrs["current_stage"] = attrs["current_stage"].SetOptional() attrs["description"] = attrs["description"].SetOptional() + attrs["email_subscription_status"] = attrs["email_subscription_status"].SetOptional() + attrs["feature_list"] = attrs["feature_list"].SetOptional() + attrs["feature_list"] = attrs["feature_list"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["last_updated_timestamp"] = attrs["last_updated_timestamp"].SetOptional() attrs["name"] = attrs["name"].SetOptional() + attrs["open_requests"] = attrs["open_requests"].SetOptional() attrs["permission_level"] = attrs["permission_level"].SetOptional() attrs["run_id"] = attrs["run_id"].SetOptional() attrs["run_link"] = attrs["run_link"].SetOptional() @@ -9169,7 +9743,9 @@ func (c ModelVersionDatabricks_SdkV2) ApplySchemaCustomizations(attrs map[string // SDK values. func (a ModelVersionDatabricks_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "tags": reflect.TypeOf(ModelVersionTag_SdkV2{}), + "feature_list": reflect.TypeOf(FeatureList_SdkV2{}), + "open_requests": reflect.TypeOf(Activity_SdkV2{}), + "tags": reflect.TypeOf(ModelVersionTag_SdkV2{}), } } @@ -9180,20 +9756,23 @@ func (o ModelVersionDatabricks_SdkV2) ToObjectValue(ctx context.Context) basetyp return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "creation_timestamp": o.CreationTimestamp, - "current_stage": o.CurrentStage, - "description": o.Description, - "last_updated_timestamp": o.LastUpdatedTimestamp, - "name": o.Name, - "permission_level": o.PermissionLevel, - "run_id": o.RunId, - "run_link": o.RunLink, - "source": o.Source, - "status": o.Status, - "status_message": o.StatusMessage, - "tags": o.Tags, - "user_id": o.UserId, - "version": o.Version, + "creation_timestamp": o.CreationTimestamp, + "current_stage": o.CurrentStage, + "description": o.Description, + "email_subscription_status": o.EmailSubscriptionStatus, + "feature_list": o.FeatureList, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "name": o.Name, + "open_requests": o.OpenRequests, + "permission_level": o.PermissionLevel, + "run_id": o.RunId, + "run_link": o.RunLink, + "source": o.Source, + "status": o.Status, + "status_message": o.StatusMessage, + "tags": o.Tags, + "user_id": o.UserId, + "version": o.Version, }) } @@ -9201,17 +9780,24 @@ func (o ModelVersionDatabricks_SdkV2) ToObjectValue(ctx context.Context) basetyp func (o ModelVersionDatabricks_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "creation_timestamp": types.Int64Type, - "current_stage": types.StringType, - "description": types.StringType, + "creation_timestamp": types.Int64Type, + "current_stage": types.StringType, + "description": types.StringType, + "email_subscription_status": types.StringType, + "feature_list": basetypes.ListType{ + ElemType: FeatureList_SdkV2{}.Type(ctx), + }, "last_updated_timestamp": types.Int64Type, "name": types.StringType, - "permission_level": types.StringType, - "run_id": types.StringType, - "run_link": types.StringType, - "source": types.StringType, - "status": types.StringType, - "status_message": types.StringType, + "open_requests": basetypes.ListType{ + ElemType: Activity_SdkV2{}.Type(ctx), + }, + "permission_level": types.StringType, + "run_id": types.StringType, + "run_link": types.StringType, + "source": types.StringType, + "status": types.StringType, + "status_message": types.StringType, "tags": basetypes.ListType{ ElemType: ModelVersionTag_SdkV2{}.Type(ctx), }, @@ -9221,6 +9807,58 @@ func (o ModelVersionDatabricks_SdkV2) Type(ctx context.Context) attr.Type { } } +// GetFeatureList returns the value of the FeatureList field in ModelVersionDatabricks_SdkV2 as +// a FeatureList_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelVersionDatabricks_SdkV2) GetFeatureList(ctx context.Context) (FeatureList_SdkV2, bool) { + var e FeatureList_SdkV2 + if o.FeatureList.IsNull() || o.FeatureList.IsUnknown() { + return e, false + } + var v []FeatureList_SdkV2 + d := o.FeatureList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFeatureList sets the value of the FeatureList field in ModelVersionDatabricks_SdkV2. +func (o *ModelVersionDatabricks_SdkV2) SetFeatureList(ctx context.Context, v FeatureList_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["feature_list"] + o.FeatureList = types.ListValueMust(t, vs) +} + +// GetOpenRequests returns the value of the OpenRequests field in ModelVersionDatabricks_SdkV2 as +// a slice of Activity_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelVersionDatabricks_SdkV2) GetOpenRequests(ctx context.Context) ([]Activity_SdkV2, bool) { + if o.OpenRequests.IsNull() || o.OpenRequests.IsUnknown() { + return nil, false + } + var v []Activity_SdkV2 + d := o.OpenRequests.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOpenRequests sets the value of the OpenRequests field in ModelVersionDatabricks_SdkV2. +func (o *ModelVersionDatabricks_SdkV2) SetOpenRequests(ctx context.Context, v []Activity_SdkV2) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["open_requests"] + t = t.(attr.TypeWithElementType).ElementType() + o.OpenRequests = types.ListValueMust(t, vs) +} + // GetTags returns the value of the Tags field in ModelVersionDatabricks_SdkV2 as // a slice of ModelVersionTag_SdkV2 values. // If the field is unknown or null, the boolean return value is false. @@ -9324,7 +9962,7 @@ func (newState *OnlineStore_SdkV2) SyncEffectiveFieldsDuringRead(existingState O } func (c OnlineStore_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["capacity"] = attrs["capacity"].SetOptional() + attrs["capacity"] = attrs["capacity"].SetRequired() attrs["creation_time"] = attrs["creation_time"].SetComputed() attrs["creator"] = attrs["creator"].SetComputed() attrs["name"] = attrs["name"].SetRequired() @@ -9430,7 +10068,6 @@ type PublishSpec_SdkV2 struct { // The name of the target online store. OnlineStore types.String `tfsdk:"online_store"` // The full three-part (catalog, schema, table) name of the online table. - // Auto-generated if not specified. OnlineTableName types.String `tfsdk:"online_table_name"` // The publish mode of the pipeline that syncs the online table with the // source table. Defaults to TRIGGERED if not specified. All publish modes @@ -9446,7 +10083,7 @@ func (newState *PublishSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState P func (c PublishSpec_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["online_store"] = attrs["online_store"].SetRequired() - attrs["online_table_name"] = attrs["online_table_name"].SetOptional() + attrs["online_table_name"] = attrs["online_table_name"].SetRequired() attrs["publish_mode"] = attrs["publish_mode"].SetOptional() return attrs @@ -9494,20 +10131,6 @@ type PublishTableRequest_SdkV2 struct { SourceTableName types.String `tfsdk:"-"` } -func (newState *PublishTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishTableRequest_SdkV2) { -} - -func (newState *PublishTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublishTableRequest_SdkV2) { -} - -func (c PublishTableRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["publish_spec"] = attrs["publish_spec"].SetRequired() - attrs["publish_spec"] = attrs["publish_spec"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["source_table_name"] = attrs["source_table_name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9627,7 +10250,7 @@ func (o PublishTableResponse_SdkV2) Type(ctx context.Context) attr.Type { type RegisteredModelAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -9789,7 +10412,7 @@ type RegisteredModelPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -9961,7 +10584,7 @@ func (o *RegisteredModelPermissions_SdkV2) SetAccessControlList(ctx context.Cont type RegisteredModelPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -10011,23 +10634,10 @@ func (o RegisteredModelPermissionsDescription_SdkV2) Type(ctx context.Context) a } } -type RegisteredModelPermissionsRequest_SdkV2 struct { - AccessControlList types.List `tfsdk:"access_control_list"` - // The registered model for which to get or manage permissions. - RegisteredModelId types.String `tfsdk:"-"` -} - -func (newState *RegisteredModelPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermissionsRequest_SdkV2) { -} - -func (newState *RegisteredModelPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissionsRequest_SdkV2) { -} - -func (c RegisteredModelPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["registered_model_id"] = attrs["registered_model_id"].SetRequired() - - return attrs +type RegisteredModelPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list"` + // The registered model for which to get or manage permissions. + RegisteredModelId types.String `tfsdk:"-"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissionsRequest. @@ -10142,14 +10752,7 @@ type RegistryWebhook_SdkV2 struct { LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp"` // Name of the model whose events would trigger this webhook. ModelName types.String `tfsdk:"model_name"` - // 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. - // - // * `DISABLED`: Webhook is not triggered. - // - // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is - // not triggered on a real event. + Status types.String `tfsdk:"status"` } @@ -10310,6 +10913,8 @@ func (o *RegistryWebhook_SdkV2) SetJobSpec(ctx context.Context, v JobSpecWithout o.JobSpec = types.ListValueMust(t, vs) } +// Details required to identify and reject a model version stage transition +// request. type RejectTransitionRequest_SdkV2 struct { // User-provided comment on the action. Comment types.String `tfsdk:"comment"` @@ -10329,21 +10934,6 @@ type RejectTransitionRequest_SdkV2 struct { Version types.String `tfsdk:"version"` } -func (newState *RejectTransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RejectTransitionRequest_SdkV2) { -} - -func (newState *RejectTransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RejectTransitionRequest_SdkV2) { -} - -func (c RejectTransitionRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["stage"] = attrs["stage"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -10382,7 +10972,7 @@ func (o RejectTransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { } type RejectTransitionRequestResponse_SdkV2 struct { - // Activity recorded for the action. + // New activity generated as a result of this operation. Activity types.List `tfsdk:"activity"` } @@ -10467,19 +11057,6 @@ type RenameModelRequest_SdkV2 struct { NewName types.String `tfsdk:"new_name"` } -func (newState *RenameModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RenameModelRequest_SdkV2) { -} - -func (newState *RenameModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RenameModelRequest_SdkV2) { -} - -func (c RenameModelRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - - return attrs -} - // 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 @@ -10596,18 +11173,6 @@ type RestoreExperiment_SdkV2 struct { ExperimentId types.String `tfsdk:"experiment_id"` } -func (newState *RestoreExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreExperiment_SdkV2) { -} - -func (newState *RestoreExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreExperiment_SdkV2) { -} - -func (c RestoreExperiment_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - - return attrs -} - // 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 @@ -10685,18 +11250,6 @@ type RestoreRun_SdkV2 struct { RunId types.String `tfsdk:"run_id"` } -func (newState *RestoreRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRun_SdkV2) { -} - -func (newState *RestoreRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRun_SdkV2) { -} - -func (c RestoreRun_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -10781,20 +11334,6 @@ type RestoreRuns_SdkV2 struct { MinTimestampMillis types.Int64 `tfsdk:"min_timestamp_millis"` } -func (newState *RestoreRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRuns_SdkV2) { -} - -func (newState *RestoreRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRuns_SdkV2) { -} - -func (c RestoreRuns_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["max_runs"] = attrs["max_runs"].SetOptional() - attrs["min_timestamp_millis"] = attrs["min_timestamp_millis"].SetRequired() - - return attrs -} - // 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 @@ -11460,22 +11999,6 @@ type SearchExperiments_SdkV2 struct { ViewType types.String `tfsdk:"view_type"` } -func (newState *SearchExperiments_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchExperiments_SdkV2) { -} - -func (newState *SearchExperiments_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchExperiments_SdkV2) { -} - -func (c SearchExperiments_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["filter"] = attrs["filter"].SetOptional() - attrs["max_results"] = attrs["max_results"].SetOptional() - attrs["order_by"] = attrs["order_by"].SetOptional() - attrs["page_token"] = attrs["page_token"].SetOptional() - attrs["view_type"] = attrs["view_type"].SetOptional() - - return attrs -} - // 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 @@ -11776,23 +12299,6 @@ type SearchLoggedModelsRequest_SdkV2 struct { PageToken types.String `tfsdk:"page_token"` } -func (newState *SearchLoggedModelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchLoggedModelsRequest_SdkV2) { -} - -func (newState *SearchLoggedModelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchLoggedModelsRequest_SdkV2) { -} - -func (c SearchLoggedModelsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["datasets"] = attrs["datasets"].SetOptional() - attrs["experiment_ids"] = attrs["experiment_ids"].SetOptional() - attrs["filter"] = attrs["filter"].SetOptional() - attrs["max_results"] = attrs["max_results"].SetOptional() - attrs["order_by"] = attrs["order_by"].SetOptional() - attrs["page_token"] = attrs["page_token"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchLoggedModelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12368,23 +12874,6 @@ type SearchRuns_SdkV2 struct { RunViewType types.String `tfsdk:"run_view_type"` } -func (newState *SearchRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchRuns_SdkV2) { -} - -func (newState *SearchRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchRuns_SdkV2) { -} - -func (c SearchRuns_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_ids"] = attrs["experiment_ids"].SetOptional() - attrs["filter"] = attrs["filter"].SetOptional() - attrs["max_results"] = attrs["max_results"].SetOptional() - attrs["order_by"] = attrs["order_by"].SetOptional() - attrs["page_token"] = attrs["page_token"].SetOptional() - attrs["run_view_type"] = attrs["run_view_type"].SetOptional() - - return attrs -} - // 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 @@ -12578,20 +13067,6 @@ type SetExperimentTag_SdkV2 struct { Value types.String `tfsdk:"value"` } -func (newState *SetExperimentTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetExperimentTag_SdkV2) { -} - -func (newState *SetExperimentTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetExperimentTag_SdkV2) { -} - -func (c SetExperimentTag_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["key"] = attrs["key"].SetRequired() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -12675,19 +13150,6 @@ type SetLoggedModelTagsRequest_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *SetLoggedModelTagsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetLoggedModelTagsRequest_SdkV2) { -} - -func (newState *SetLoggedModelTagsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetLoggedModelTagsRequest_SdkV2) { -} - -func (c SetLoggedModelTagsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_id"] = attrs["model_id"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetLoggedModelTagsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12806,20 +13268,6 @@ type SetModelTagRequest_SdkV2 struct { Value types.String `tfsdk:"value"` } -func (newState *SetModelTagRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetModelTagRequest_SdkV2) { -} - -func (newState *SetModelTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelTagRequest_SdkV2) { -} - -func (c SetModelTagRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -12912,21 +13360,6 @@ type SetModelVersionTagRequest_SdkV2 struct { Version types.String `tfsdk:"version"` } -func (newState *SetModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetModelVersionTagRequest_SdkV2) { -} - -func (newState *SetModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelVersionTagRequest_SdkV2) { -} - -func (c SetModelVersionTagRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["value"] = attrs["value"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -13018,21 +13451,6 @@ type SetTag_SdkV2 struct { Value types.String `tfsdk:"value"` } -func (newState *SetTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetTag_SdkV2) { -} - -func (newState *SetTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetTag_SdkV2) { -} - -func (c SetTag_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_uuid"] = attrs["run_uuid"].SetOptional() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -13111,60 +13529,7 @@ 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"` - // Status code returned by the webhook URL - StatusCode types.Int64 `tfsdk:"status_code"` -} - -func (newState *TestRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhook_SdkV2) { -} - -func (newState *TestRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhook_SdkV2) { -} - -func (c TestRegistryWebhook_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["body"] = attrs["body"].SetOptional() - attrs["status_code"] = attrs["status_code"].SetOptional() - - return attrs -} - -// 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 -// 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 TestRegistryWebhook_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, TestRegistryWebhook_SdkV2 -// only implements ToObjectValue() and Type(). -func (o TestRegistryWebhook_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{ - "body": o.Body, - "status_code": o.StatusCode, - }) -} - -// Type implements basetypes.ObjectValuable. -func (o TestRegistryWebhook_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "body": types.StringType, - "status_code": types.Int64Type, - }, - } -} - +// Details required to test a registry webhook. 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 @@ -13174,19 +13539,6 @@ type TestRegistryWebhookRequest_SdkV2 struct { Id types.String `tfsdk:"id"` } -func (newState *TestRegistryWebhookRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhookRequest_SdkV2) { -} - -func (newState *TestRegistryWebhookRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhookRequest_SdkV2) { -} - -func (c TestRegistryWebhookRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["event"] = attrs["event"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // 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 @@ -13221,8 +13573,10 @@ func (o TestRegistryWebhookRequest_SdkV2) Type(ctx context.Context) attr.Type { } type TestRegistryWebhookResponse_SdkV2 struct { - // Test webhook response object. - Webhook types.List `tfsdk:"webhook"` + // Body of the response from the webhook URL + Body types.String `tfsdk:"body"` + // Status code returned by the webhook URL + StatusCode types.Int64 `tfsdk:"status_code"` } func (newState *TestRegistryWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhookResponse_SdkV2) { @@ -13232,8 +13586,8 @@ func (newState *TestRegistryWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead } func (c TestRegistryWebhookResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["webhook"] = attrs["webhook"].SetOptional() - attrs["webhook"] = attrs["webhook"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["body"] = attrs["body"].SetOptional() + attrs["status_code"] = attrs["status_code"].SetOptional() return attrs } @@ -13246,9 +13600,7 @@ func (c TestRegistryWebhookResponse_SdkV2) ApplySchemaCustomizations(attrs map[s // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a TestRegistryWebhookResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "webhook": reflect.TypeOf(TestRegistryWebhook_SdkV2{}), - } + return map[string]reflect.Type{} } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -13258,7 +13610,8 @@ func (o TestRegistryWebhookResponse_SdkV2) ToObjectValue(ctx context.Context) ba return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "webhook": o.Webhook, + "body": o.Body, + "status_code": o.StatusCode, }) } @@ -13266,39 +13619,13 @@ func (o TestRegistryWebhookResponse_SdkV2) ToObjectValue(ctx context.Context) ba func (o TestRegistryWebhookResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "webhook": basetypes.ListType{ - ElemType: TestRegistryWebhook_SdkV2{}.Type(ctx), - }, + "body": types.StringType, + "status_code": types.Int64Type, }, } } -// GetWebhook returns the value of the Webhook field in TestRegistryWebhookResponse_SdkV2 as -// a TestRegistryWebhook_SdkV2 value. -// If the field is unknown or null, the boolean return value is false. -func (o *TestRegistryWebhookResponse_SdkV2) GetWebhook(ctx context.Context) (TestRegistryWebhook_SdkV2, bool) { - var e TestRegistryWebhook_SdkV2 - if o.Webhook.IsNull() || o.Webhook.IsUnknown() { - return e, false - } - var v []TestRegistryWebhook_SdkV2 - d := o.Webhook.ElementsAs(ctx, &v, true) - if d.HasError() { - panic(pluginfwcommon.DiagToString(d)) - } - if len(v) == 0 { - return e, false - } - return v[0], true -} - -// SetWebhook sets the value of the Webhook field in TestRegistryWebhookResponse_SdkV2. -func (o *TestRegistryWebhookResponse_SdkV2) SetWebhook(ctx context.Context, v TestRegistryWebhook_SdkV2) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook"] - o.Webhook = types.ListValueMust(t, vs) -} - +// Details required to transition a model version's stage. type TransitionModelVersionStageDatabricks_SdkV2 struct { // Specifies whether to archive all current model versions in the target // stage. @@ -13321,22 +13648,6 @@ type TransitionModelVersionStageDatabricks_SdkV2 struct { Version types.String `tfsdk:"version"` } -func (newState *TransitionModelVersionStageDatabricks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionModelVersionStageDatabricks_SdkV2) { -} - -func (newState *TransitionModelVersionStageDatabricks_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransitionModelVersionStageDatabricks_SdkV2) { -} - -func (c TransitionModelVersionStageDatabricks_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["archive_existing_versions"] = attrs["archive_existing_versions"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["stage"] = attrs["stage"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -13376,11 +13687,14 @@ func (o TransitionModelVersionStageDatabricks_SdkV2) Type(ctx context.Context) a } } -// Transition request details. +// For activities, this contains the activity recorded for the action. For +// comments, this contains the comment details. For transition requests, this +// contains the transition request details. type TransitionRequest_SdkV2 struct { // Array of actions on the activity allowed for the current viewer. AvailableActions types.List `tfsdk:"available_actions"` - // User-provided comment associated with the transition request. + // User-provided comment associated with the activity, comment, or + // transition request. Comment types.String `tfsdk:"comment"` // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp types.Int64 `tfsdk:"creation_timestamp"` @@ -13485,7 +13799,8 @@ func (o *TransitionRequest_SdkV2) SetAvailableActions(ctx context.Context, v []t } type TransitionStageResponse_SdkV2 struct { - ModelVersion types.List `tfsdk:"model_version"` + // Updated model version + ModelVersionDatabricks types.List `tfsdk:"model_version_databricks"` } func (newState *TransitionStageResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionStageResponse_SdkV2) { @@ -13495,8 +13810,8 @@ func (newState *TransitionStageResponse_SdkV2) SyncEffectiveFieldsDuringRead(exi } func (c TransitionStageResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_version"] = attrs["model_version"].SetOptional() - attrs["model_version"] = attrs["model_version"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + attrs["model_version_databricks"] = attrs["model_version_databricks"].SetOptional() + attrs["model_version_databricks"] = attrs["model_version_databricks"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) return attrs } @@ -13510,7 +13825,7 @@ func (c TransitionStageResponse_SdkV2) ApplySchemaCustomizations(attrs map[strin // SDK values. func (a TransitionStageResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "model_version": reflect.TypeOf(ModelVersionDatabricks_SdkV2{}), + "model_version_databricks": reflect.TypeOf(ModelVersionDatabricks_SdkV2{}), } } @@ -13521,7 +13836,7 @@ func (o TransitionStageResponse_SdkV2) ToObjectValue(ctx context.Context) basety return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "model_version": o.ModelVersion, + "model_version_databricks": o.ModelVersionDatabricks, }) } @@ -13529,23 +13844,23 @@ func (o TransitionStageResponse_SdkV2) ToObjectValue(ctx context.Context) basety func (o TransitionStageResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "model_version": basetypes.ListType{ + "model_version_databricks": basetypes.ListType{ ElemType: ModelVersionDatabricks_SdkV2{}.Type(ctx), }, }, } } -// GetModelVersion returns the value of the ModelVersion field in TransitionStageResponse_SdkV2 as +// GetModelVersionDatabricks returns the value of the ModelVersionDatabricks field in TransitionStageResponse_SdkV2 as // a ModelVersionDatabricks_SdkV2 value. // If the field is unknown or null, the boolean return value is false. -func (o *TransitionStageResponse_SdkV2) GetModelVersion(ctx context.Context) (ModelVersionDatabricks_SdkV2, bool) { +func (o *TransitionStageResponse_SdkV2) GetModelVersionDatabricks(ctx context.Context) (ModelVersionDatabricks_SdkV2, bool) { var e ModelVersionDatabricks_SdkV2 - if o.ModelVersion.IsNull() || o.ModelVersion.IsUnknown() { + if o.ModelVersionDatabricks.IsNull() || o.ModelVersionDatabricks.IsUnknown() { return e, false } var v []ModelVersionDatabricks_SdkV2 - d := o.ModelVersion.ElementsAs(ctx, &v, true) + d := o.ModelVersionDatabricks.ElementsAs(ctx, &v, true) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13555,31 +13870,19 @@ func (o *TransitionStageResponse_SdkV2) GetModelVersion(ctx context.Context) (Mo return v[0], true } -// SetModelVersion sets the value of the ModelVersion field in TransitionStageResponse_SdkV2. -func (o *TransitionStageResponse_SdkV2) SetModelVersion(ctx context.Context, v ModelVersionDatabricks_SdkV2) { +// SetModelVersionDatabricks sets the value of the ModelVersionDatabricks field in TransitionStageResponse_SdkV2. +func (o *TransitionStageResponse_SdkV2) SetModelVersionDatabricks(ctx context.Context, v ModelVersionDatabricks_SdkV2) { vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_version"] - o.ModelVersion = types.ListValueMust(t, vs) + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_version_databricks"] + o.ModelVersionDatabricks = types.ListValueMust(t, vs) } +// Details required to edit a comment on a model version. type UpdateComment_SdkV2 struct { // User-provided comment on the action. Comment types.String `tfsdk:"comment"` - // Unique identifier of an activity - Id types.String `tfsdk:"id"` -} - -func (newState *UpdateComment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateComment_SdkV2) { -} - -func (newState *UpdateComment_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateComment_SdkV2) { -} - -func (c UpdateComment_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetRequired() - attrs["id"] = attrs["id"].SetRequired() - - return attrs + // Unique identifier of an activity + Id types.String `tfsdk:"id"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateComment. @@ -13616,7 +13919,7 @@ func (o UpdateComment_SdkV2) Type(ctx context.Context) attr.Type { } type UpdateCommentResponse_SdkV2 struct { - // Comment details. + // Updated comment object Comment types.List `tfsdk:"comment"` } @@ -13702,19 +14005,6 @@ type UpdateExperiment_SdkV2 struct { NewName types.String `tfsdk:"new_name"` } -func (newState *UpdateExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExperiment_SdkV2) { -} - -func (newState *UpdateExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExperiment_SdkV2) { -} - -func (c UpdateExperiment_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - - return attrs -} - // 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 @@ -13789,24 +14079,92 @@ 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"` - // Registered model unique name identifier. - Name types.String `tfsdk:"name"` +type UpdateFeatureTagRequest_SdkV2 struct { + FeatureName types.String `tfsdk:"-"` + + FeatureTag types.List `tfsdk:"feature_tag"` + + Key types.String `tfsdk:"-"` + + TableName types.String `tfsdk:"-"` + // The list of fields to update. + UpdateMask types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateFeatureTagRequest. +// Container types (types.Map, types.List, types.Set) and 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 UpdateFeatureTagRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "feature_tag": reflect.TypeOf(FeatureTag_SdkV2{}), + } +} + +// 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, UpdateFeatureTagRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateFeatureTagRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "feature_tag": o.FeatureTag, + "key": o.Key, + "table_name": o.TableName, + "update_mask": o.UpdateMask, + }) } -func (newState *UpdateModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelRequest_SdkV2) { +// Type implements basetypes.ObjectValuable. +func (o UpdateFeatureTagRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "feature_tag": basetypes.ListType{ + ElemType: FeatureTag_SdkV2{}.Type(ctx), + }, + "key": types.StringType, + "table_name": types.StringType, + "update_mask": types.StringType, + }, + } } -func (newState *UpdateModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelRequest_SdkV2) { +// GetFeatureTag returns the value of the FeatureTag field in UpdateFeatureTagRequest_SdkV2 as +// a FeatureTag_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateFeatureTagRequest_SdkV2) GetFeatureTag(ctx context.Context) (FeatureTag_SdkV2, bool) { + var e FeatureTag_SdkV2 + if o.FeatureTag.IsNull() || o.FeatureTag.IsUnknown() { + return e, false + } + var v []FeatureTag_SdkV2 + d := o.FeatureTag.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true } -func (c UpdateModelRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() +// SetFeatureTag sets the value of the FeatureTag field in UpdateFeatureTagRequest_SdkV2. +func (o *UpdateFeatureTagRequest_SdkV2) SetFeatureTag(ctx context.Context, v FeatureTag_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["feature_tag"] + o.FeatureTag = types.ListValueMust(t, vs) +} - return attrs +type UpdateModelRequest_SdkV2 struct { + // If provided, updates the description for this `registered_model`. + Description types.String `tfsdk:"description"` + // Registered model unique name identifier. + Name types.String `tfsdk:"name"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelRequest. @@ -13843,6 +14201,20 @@ func (o UpdateModelRequest_SdkV2) Type(ctx context.Context) attr.Type { } type UpdateModelResponse_SdkV2 struct { + RegisteredModel types.List `tfsdk:"registered_model"` +} + +func (newState *UpdateModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelResponse_SdkV2) { +} + +func (newState *UpdateModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelResponse_SdkV2) { +} + +func (c UpdateModelResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["registered_model"] = attrs["registered_model"].SetOptional() + attrs["registered_model"] = attrs["registered_model"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelResponse. @@ -13853,7 +14225,9 @@ type UpdateModelResponse_SdkV2 struct { // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a UpdateModelResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "registered_model": reflect.TypeOf(Model_SdkV2{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -13862,14 +14236,46 @@ func (a UpdateModelResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map func (o UpdateModelResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "registered_model": o.RegisteredModel, + }) } // Type implements basetypes.ObjectValuable. func (o UpdateModelResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "registered_model": basetypes.ListType{ + ElemType: Model_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetRegisteredModel returns the value of the RegisteredModel field in UpdateModelResponse_SdkV2 as +// a Model_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateModelResponse_SdkV2) GetRegisteredModel(ctx context.Context) (Model_SdkV2, bool) { + var e Model_SdkV2 + if o.RegisteredModel.IsNull() || o.RegisteredModel.IsUnknown() { + return e, false + } + var v []Model_SdkV2 + d := o.RegisteredModel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false } + return v[0], true +} + +// SetRegisteredModel sets the value of the RegisteredModel field in UpdateModelResponse_SdkV2. +func (o *UpdateModelResponse_SdkV2) SetRegisteredModel(ctx context.Context, v Model_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["registered_model"] + o.RegisteredModel = types.ListValueMust(t, vs) } type UpdateModelVersionRequest_SdkV2 struct { @@ -13881,20 +14287,6 @@ type UpdateModelVersionRequest_SdkV2 struct { Version types.String `tfsdk:"version"` } -func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionRequest_SdkV2) { -} - -func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest_SdkV2) { -} - -func (c UpdateModelVersionRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -13931,6 +14323,21 @@ func (o UpdateModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { } type UpdateModelVersionResponse_SdkV2 struct { + // Return new version number generated for this model in registry. + ModelVersion types.List `tfsdk:"model_version"` +} + +func (newState *UpdateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionResponse_SdkV2) { +} + +func (newState *UpdateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionResponse_SdkV2) { +} + +func (c UpdateModelVersionResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["model_version"] = attrs["model_version"].SetOptional() + attrs["model_version"] = attrs["model_version"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelVersionResponse. @@ -13941,7 +14348,9 @@ type UpdateModelVersionResponse_SdkV2 struct { // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a UpdateModelVersionResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "model_version": reflect.TypeOf(ModelVersion_SdkV2{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -13950,22 +14359,53 @@ func (a UpdateModelVersionResponse_SdkV2) GetComplexFieldTypes(ctx context.Conte func (o UpdateModelVersionResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "model_version": o.ModelVersion, + }) } // Type implements basetypes.ObjectValuable. func (o UpdateModelVersionResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "model_version": basetypes.ListType{ + ElemType: ModelVersion_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetModelVersion returns the value of the ModelVersion field in UpdateModelVersionResponse_SdkV2 as +// a ModelVersion_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateModelVersionResponse_SdkV2) GetModelVersion(ctx context.Context) (ModelVersion_SdkV2, bool) { + var e ModelVersion_SdkV2 + if o.ModelVersion.IsNull() || o.ModelVersion.IsUnknown() { + return e, false + } + var v []ModelVersion_SdkV2 + d := o.ModelVersion.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false } + return v[0], true +} + +// SetModelVersion sets the value of the ModelVersion field in UpdateModelVersionResponse_SdkV2. +func (o *UpdateModelVersionResponse_SdkV2) SetModelVersion(ctx context.Context, v ModelVersion_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_version"] + o.ModelVersion = types.ListValueMust(t, vs) } type UpdateOnlineStoreRequest_SdkV2 struct { // The name of the online store. This is the unique identifier for the // online store. Name types.String `tfsdk:"-"` - // An OnlineStore is a logical database instance that stores and serves - // features online. + // Online store to update. OnlineStore types.List `tfsdk:"online_store"` // The list of fields to update. UpdateMask types.String `tfsdk:"-"` @@ -14036,6 +14476,9 @@ func (o *UpdateOnlineStoreRequest_SdkV2) SetOnlineStore(ctx context.Context, v O o.OnlineStore = types.ListValueMust(t, vs) } +// Details required to update a registry webhook. Only the fields that need to +// be updated should be specified, and both `http_url_spec` and `job_spec` +// should not be specified in the same request. type UpdateRegistryWebhook_SdkV2 struct { // User-specified description for the webhook. Description types.String `tfsdk:"description"` @@ -14079,34 +14522,8 @@ type UpdateRegistryWebhook_SdkV2 struct { Id types.String `tfsdk:"id"` JobSpec types.List `tfsdk:"job_spec"` - // 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. - // - // * `DISABLED`: Webhook is not triggered. - // - // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is - // not triggered on a real event. - Status types.String `tfsdk:"status"` -} - -func (newState *UpdateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegistryWebhook_SdkV2) { -} - -func (newState *UpdateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRegistryWebhook_SdkV2) { -} - -func (c UpdateRegistryWebhook_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["events"] = attrs["events"].SetOptional() - attrs["http_url_spec"] = attrs["http_url_spec"].SetOptional() - attrs["http_url_spec"] = attrs["http_url_spec"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["id"] = attrs["id"].SetRequired() - attrs["job_spec"] = attrs["job_spec"].SetOptional() - attrs["job_spec"] = attrs["job_spec"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["status"] = attrs["status"].SetOptional() - return attrs + Status types.String `tfsdk:"status"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRegistryWebhook. @@ -14252,22 +14669,6 @@ type UpdateRun_SdkV2 struct { Status types.String `tfsdk:"status"` } -func (newState *UpdateRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRun_SdkV2) { -} - -func (newState *UpdateRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRun_SdkV2) { -} - -func (c UpdateRun_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["end_time"] = attrs["end_time"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_name"] = attrs["run_name"].SetOptional() - attrs["run_uuid"] = attrs["run_uuid"].SetOptional() - attrs["status"] = attrs["status"].SetOptional() - - return attrs -} - // 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 @@ -14387,6 +14788,20 @@ func (o *UpdateRunResponse_SdkV2) SetRunInfo(ctx context.Context, v RunInfo_SdkV } type UpdateWebhookResponse_SdkV2 struct { + Webhook types.List `tfsdk:"webhook"` +} + +func (newState *UpdateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWebhookResponse_SdkV2) { +} + +func (newState *UpdateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWebhookResponse_SdkV2) { +} + +func (c UpdateWebhookResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["webhook"] = attrs["webhook"].SetOptional() + attrs["webhook"] = attrs["webhook"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) + + return attrs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWebhookResponse. @@ -14397,7 +14812,9 @@ type UpdateWebhookResponse_SdkV2 struct { // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a UpdateWebhookResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "webhook": reflect.TypeOf(RegistryWebhook_SdkV2{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -14406,12 +14823,44 @@ func (a UpdateWebhookResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) m func (o UpdateWebhookResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "webhook": o.Webhook, + }) } // Type implements basetypes.ObjectValuable. func (o UpdateWebhookResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "webhook": basetypes.ListType{ + ElemType: RegistryWebhook_SdkV2{}.Type(ctx), + }, + }, + } +} + +// GetWebhook returns the value of the Webhook field in UpdateWebhookResponse_SdkV2 as +// a RegistryWebhook_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateWebhookResponse_SdkV2) GetWebhook(ctx context.Context) (RegistryWebhook_SdkV2, bool) { + var e RegistryWebhook_SdkV2 + if o.Webhook.IsNull() || o.Webhook.IsUnknown() { + return e, false + } + var v []RegistryWebhook_SdkV2 + d := o.Webhook.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false } + return v[0], true +} + +// SetWebhook sets the value of the Webhook field in UpdateWebhookResponse_SdkV2. +func (o *UpdateWebhookResponse_SdkV2) SetWebhook(ctx context.Context, v RegistryWebhook_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook"] + o.Webhook = types.ListValueMust(t, vs) } diff --git a/internal/service/ml_tf/model.go b/internal/service/ml_tf/model.go index dbb05d66aa..2c32dc7533 100755 --- a/internal/service/ml_tf/model.go +++ b/internal/service/ml_tf/model.go @@ -22,24 +22,13 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -// Activity recorded for the action. +// For activities, this contains the activity recorded for the action. For +// comments, this contains the comment details. For transition requests, this +// contains the transition request details. type Activity struct { - // Type of activity. Valid values are: * `APPLIED_TRANSITION`: User applied - // the corresponding stage transition. - // - // * `REQUESTED_TRANSITION`: User requested the corresponding stage - // transition. - // - // * `CANCELLED_REQUEST`: User cancelled an existing transition request. - // - // * `APPROVED_REQUEST`: User approved the corresponding stage transition. - // - // * `REJECTED_REQUEST`: User rejected the coressponding stage transition. - // - // * `SYSTEM_TRANSITION`: For events performed as a side effect, such as - // archiving existing model versions in a stage. ActivityType types.String `tfsdk:"activity_type"` - // User-provided comment associated with the activity. + // User-provided comment associated with the activity, comment, or + // transition request. Comment types.String `tfsdk:"comment"` // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp types.Int64 `tfsdk:"creation_timestamp"` @@ -145,6 +134,8 @@ func (o Activity) Type(ctx context.Context) attr.Type { } } +// Details required to identify and approve a model version stage transition +// request. type ApproveTransitionRequest struct { // Specifies whether to archive all current model versions in the target // stage. @@ -167,22 +158,6 @@ type ApproveTransitionRequest struct { Version types.String `tfsdk:"version"` } -func (newState *ApproveTransitionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApproveTransitionRequest) { -} - -func (newState *ApproveTransitionRequest) SyncEffectiveFieldsDuringRead(existingState ApproveTransitionRequest) { -} - -func (c ApproveTransitionRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["archive_existing_versions"] = attrs["archive_existing_versions"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["stage"] = attrs["stage"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -223,7 +198,7 @@ func (o ApproveTransitionRequest) Type(ctx context.Context) attr.Type { } type ApproveTransitionRequestResponse struct { - // Activity recorded for the action. + // New activity generated as a result of this operation. Activity types.Object `tfsdk:"activity"` } @@ -300,15 +275,18 @@ func (o *ApproveTransitionRequestResponse) SetActivity(ctx context.Context, v Ac o.Activity = vs } -// Comment details. +// For activities, this contains the activity recorded for the action. For +// comments, this contains the comment details. For transition requests, this +// contains the transition request details. type CommentObject struct { // Array of actions on the activity allowed for the current viewer. AvailableActions types.List `tfsdk:"available_actions"` - // User-provided comment on the action. + // User-provided comment associated with the activity, comment, or + // transition request. Comment types.String `tfsdk:"comment"` // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp types.Int64 `tfsdk:"creation_timestamp"` - // Comment ID + // Unique identifier for the object. Id types.String `tfsdk:"id"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp"` @@ -404,6 +382,7 @@ func (o *CommentObject) SetAvailableActions(ctx context.Context, v []types.Strin o.AvailableActions = types.ListValueMust(t, vs) } +// Details required to create a comment on a model version. type CreateComment struct { // User-provided comment on the action. Comment types.String `tfsdk:"comment"` @@ -413,20 +392,6 @@ type CreateComment struct { Version types.String `tfsdk:"version"` } -func (newState *CreateComment) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateComment) { -} - -func (newState *CreateComment) SyncEffectiveFieldsDuringRead(existingState CreateComment) { -} - -func (c CreateComment) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -463,7 +428,7 @@ func (o CreateComment) Type(ctx context.Context) attr.Type { } type CreateCommentResponse struct { - // Comment details. + // New comment object Comment types.Object `tfsdk:"comment"` } @@ -554,20 +519,6 @@ type CreateExperiment struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExperiment) { -} - -func (newState *CreateExperiment) SyncEffectiveFieldsDuringRead(existingState CreateExperiment) { -} - -func (c CreateExperiment) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["artifact_location"] = attrs["artifact_location"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -681,6 +632,79 @@ func (o CreateExperimentResponse) Type(ctx context.Context) attr.Type { } } +type CreateFeatureTagRequest struct { + FeatureName types.String `tfsdk:"-"` + + FeatureTag types.Object `tfsdk:"feature_tag"` + + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFeatureTagRequest. +// Container types (types.Map, types.List, types.Set) and 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 CreateFeatureTagRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "feature_tag": reflect.TypeOf(FeatureTag{}), + } +} + +// 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, CreateFeatureTagRequest +// only implements ToObjectValue() and Type(). +func (o CreateFeatureTagRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "feature_tag": o.FeatureTag, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateFeatureTagRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "feature_tag": FeatureTag{}.Type(ctx), + "table_name": types.StringType, + }, + } +} + +// GetFeatureTag returns the value of the FeatureTag field in CreateFeatureTagRequest as +// a FeatureTag value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateFeatureTagRequest) GetFeatureTag(ctx context.Context) (FeatureTag, bool) { + var e FeatureTag + if o.FeatureTag.IsNull() || o.FeatureTag.IsUnknown() { + return e, false + } + var v []FeatureTag + d := o.FeatureTag.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 +} + +// SetFeatureTag sets the value of the FeatureTag field in CreateFeatureTagRequest. +func (o *CreateFeatureTagRequest) SetFeatureTag(ctx context.Context, v FeatureTag) { + vs := v.ToObjectValue(ctx) + o.FeatureTag = vs +} + type CreateForecastingExperimentRequest struct { // The column in the training table used to customize weights for each time // series. @@ -744,34 +768,6 @@ type CreateForecastingExperimentRequest struct { TrainingFrameworks types.List `tfsdk:"training_frameworks"` } -func (newState *CreateForecastingExperimentRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateForecastingExperimentRequest) { -} - -func (newState *CreateForecastingExperimentRequest) SyncEffectiveFieldsDuringRead(existingState CreateForecastingExperimentRequest) { -} - -func (c CreateForecastingExperimentRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["custom_weights_column"] = attrs["custom_weights_column"].SetOptional() - attrs["experiment_path"] = attrs["experiment_path"].SetOptional() - attrs["forecast_granularity"] = attrs["forecast_granularity"].SetRequired() - attrs["forecast_horizon"] = attrs["forecast_horizon"].SetRequired() - attrs["future_feature_data_path"] = attrs["future_feature_data_path"].SetOptional() - attrs["holiday_regions"] = attrs["holiday_regions"].SetOptional() - attrs["include_features"] = attrs["include_features"].SetOptional() - attrs["max_runtime"] = attrs["max_runtime"].SetOptional() - attrs["prediction_data_path"] = attrs["prediction_data_path"].SetOptional() - attrs["primary_metric"] = attrs["primary_metric"].SetOptional() - attrs["register_to"] = attrs["register_to"].SetOptional() - attrs["split_column"] = attrs["split_column"].SetOptional() - attrs["target_column"] = attrs["target_column"].SetRequired() - attrs["time_column"] = attrs["time_column"].SetRequired() - attrs["timeseries_identifier_columns"] = attrs["timeseries_identifier_columns"].SetOptional() - attrs["train_data_path"] = attrs["train_data_path"].SetRequired() - attrs["training_frameworks"] = attrs["training_frameworks"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateForecastingExperimentRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -1015,23 +1011,6 @@ type CreateLoggedModelRequest struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateLoggedModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateLoggedModelRequest) { -} - -func (newState *CreateLoggedModelRequest) SyncEffectiveFieldsDuringRead(existingState CreateLoggedModelRequest) { -} - -func (c CreateLoggedModelRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["model_type"] = attrs["model_type"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["params"] = attrs["params"].SetOptional() - attrs["source_run_id"] = attrs["source_run_id"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateLoggedModelRequest. // Container types (types.Map, types.List, types.Set) and 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,20 +1198,6 @@ type CreateModelRequest struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelRequest) { -} - -func (newState *CreateModelRequest) SyncEffectiveFieldsDuringRead(existingState CreateModelRequest) { -} - -func (c CreateModelRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -1392,23 +1357,6 @@ type CreateModelVersionRequest struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelVersionRequest) { -} - -func (newState *CreateModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState CreateModelVersionRequest) { -} - -func (c CreateModelVersionRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_link"] = attrs["run_link"].SetOptional() - attrs["source"] = attrs["source"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -1559,8 +1507,7 @@ func (o *CreateModelVersionResponse) SetModelVersion(ctx context.Context, v Mode } type CreateOnlineStoreRequest struct { - // An OnlineStore is a logical database instance that stores and serves - // features online. + // Online store to create. OnlineStore types.Object `tfsdk:"online_store"` } @@ -1625,6 +1572,7 @@ func (o *CreateOnlineStoreRequest) SetOnlineStore(ctx context.Context, v OnlineS o.OnlineStore = vs } +// Details required to create a registry webhook. type CreateRegistryWebhook struct { // User-specified description for the webhook. Description types.String `tfsdk:"description"` @@ -1662,9 +1610,9 @@ type CreateRegistryWebhook struct { // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model // version be archived. Events types.List `tfsdk:"events"` - + // External HTTPS URL called on event trigger (by using a POST request). HttpUrlSpec types.Object `tfsdk:"http_url_spec"` - + // ID of the job that the webhook runs. JobSpec types.Object `tfsdk:"job_spec"` // If model name is not specified, a registry-wide webhook is created that // listens for the specified events across all versions of all registered @@ -1681,23 +1629,6 @@ type CreateRegistryWebhook struct { Status types.String `tfsdk:"status"` } -func (newState *CreateRegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegistryWebhook) { -} - -func (newState *CreateRegistryWebhook) SyncEffectiveFieldsDuringRead(existingState CreateRegistryWebhook) { -} - -func (c CreateRegistryWebhook) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["events"] = attrs["events"].SetRequired() - attrs["http_url_spec"] = attrs["http_url_spec"].SetOptional() - attrs["job_spec"] = attrs["job_spec"].SetOptional() - attrs["model_name"] = attrs["model_name"].SetOptional() - attrs["status"] = attrs["status"].SetOptional() - - return attrs -} - // 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 @@ -1842,22 +1773,6 @@ type CreateRun struct { UserId types.String `tfsdk:"user_id"` } -func (newState *CreateRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRun) { -} - -func (newState *CreateRun) SyncEffectiveFieldsDuringRead(existingState CreateRun) { -} - -func (c CreateRun) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetOptional() - attrs["run_name"] = attrs["run_name"].SetOptional() - attrs["start_time"] = attrs["start_time"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["user_id"] = attrs["user_id"].SetOptional() - - return attrs -} - // 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 @@ -2005,6 +1920,7 @@ func (o *CreateRunResponse) SetRun(ctx context.Context, v Run) { o.Run = vs } +// Details required to create a model version stage transition request. type CreateTransitionRequest struct { // User-provided comment on the action. Comment types.String `tfsdk:"comment"` @@ -2024,21 +1940,6 @@ type CreateTransitionRequest struct { Version types.String `tfsdk:"version"` } -func (newState *CreateTransitionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTransitionRequest) { -} - -func (newState *CreateTransitionRequest) SyncEffectiveFieldsDuringRead(existingState CreateTransitionRequest) { -} - -func (c CreateTransitionRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["stage"] = attrs["stage"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -2077,7 +1978,7 @@ func (o CreateTransitionRequest) Type(ctx context.Context) attr.Type { } type CreateTransitionRequestResponse struct { - // Transition request details. + // New activity generated for stage transition request. Request types.Object `tfsdk:"request"` } @@ -2467,6 +2368,17 @@ func (o DeleteCommentRequest) Type(ctx context.Context) attr.Type { type DeleteCommentResponse struct { } +func (newState *DeleteCommentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCommentResponse) { +} + +func (newState *DeleteCommentResponse) SyncEffectiveFieldsDuringRead(existingState DeleteCommentResponse) { +} + +func (c DeleteCommentResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -2499,18 +2411,6 @@ type DeleteExperiment struct { ExperimentId types.String `tfsdk:"experiment_id"` } -func (newState *DeleteExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExperiment) { -} - -func (newState *DeleteExperiment) SyncEffectiveFieldsDuringRead(existingState DeleteExperiment) { -} - -func (c DeleteExperiment) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - - return attrs -} - // 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 @@ -2583,6 +2483,50 @@ func (o DeleteExperimentResponse) Type(ctx context.Context) attr.Type { } } +type DeleteFeatureTagRequest struct { + // The name of the feature within the feature table. + FeatureName types.String `tfsdk:"-"` + // The key of the tag to delete. + Key types.String `tfsdk:"-"` + // The name of the feature table. + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFeatureTagRequest. +// Container types (types.Map, types.List, types.Set) and 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 DeleteFeatureTagRequest) 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, DeleteFeatureTagRequest +// only implements ToObjectValue() and Type(). +func (o DeleteFeatureTagRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "key": o.Key, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteFeatureTagRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "key": types.StringType, + "table_name": types.StringType, + }, + } +} + type DeleteLoggedModelRequest struct { // The ID of the logged model to delete. ModelId types.String `tfsdk:"-"` @@ -2780,6 +2724,17 @@ func (o DeleteModelRequest) Type(ctx context.Context) attr.Type { type DeleteModelResponse struct { } +func (newState *DeleteModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelResponse) { +} + +func (newState *DeleteModelResponse) SyncEffectiveFieldsDuringRead(existingState DeleteModelResponse) { +} + +func (c DeleteModelResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -2851,6 +2806,17 @@ func (o DeleteModelTagRequest) Type(ctx context.Context) attr.Type { type DeleteModelTagResponse struct { } +func (newState *DeleteModelTagResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelTagResponse) { +} + +func (newState *DeleteModelTagResponse) SyncEffectiveFieldsDuringRead(existingState DeleteModelTagResponse) { +} + +func (c DeleteModelTagResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -2921,6 +2887,17 @@ func (o DeleteModelVersionRequest) Type(ctx context.Context) attr.Type { type DeleteModelVersionResponse struct { } +func (newState *DeleteModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionResponse) { +} + +func (newState *DeleteModelVersionResponse) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionResponse) { +} + +func (c DeleteModelVersionResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -2996,6 +2973,17 @@ func (o DeleteModelVersionTagRequest) Type(ctx context.Context) attr.Type { type DeleteModelVersionTagResponse struct { } +func (newState *DeleteModelVersionTagResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionTagResponse) { +} + +func (newState *DeleteModelVersionTagResponse) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionTagResponse) { +} + +func (c DeleteModelVersionTagResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -3059,73 +3047,31 @@ func (o DeleteOnlineStoreRequest) Type(ctx context.Context) attr.Type { } } -type DeleteOnlineStoreResponse struct { +type DeleteRun struct { + // ID of the run to delete. + RunId types.String `tfsdk:"run_id"` } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteOnlineStoreResponse. +// 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 // 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 DeleteOnlineStoreResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a DeleteRun) 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, DeleteOnlineStoreResponse +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteRun // only implements ToObjectValue() and Type(). -func (o DeleteOnlineStoreResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o DeleteRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteOnlineStoreResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - -type DeleteRun struct { - // ID of the run to delete. - RunId types.String `tfsdk:"run_id"` -} - -func (newState *DeleteRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRun) { -} - -func (newState *DeleteRun) SyncEffectiveFieldsDuringRead(existingState DeleteRun) { -} - -func (c DeleteRun) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - -// 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 -// 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 DeleteRun) 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, DeleteRun -// only implements ToObjectValue() and Type(). -func (o DeleteRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{ - "run_id": o.RunId, - }) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -3190,20 +3136,6 @@ type DeleteRuns struct { MaxTimestampMillis types.Int64 `tfsdk:"max_timestamp_millis"` } -func (newState *DeleteRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRuns) { -} - -func (newState *DeleteRuns) SyncEffectiveFieldsDuringRead(existingState DeleteRuns) { -} - -func (c DeleteRuns) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["max_runs"] = attrs["max_runs"].SetOptional() - attrs["max_timestamp_millis"] = attrs["max_timestamp_millis"].SetRequired() - - return attrs -} - // 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 @@ -3294,19 +3226,6 @@ type DeleteTag struct { RunId types.String `tfsdk:"run_id"` } -func (newState *DeleteTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTag) { -} - -func (newState *DeleteTag) SyncEffectiveFieldsDuringRead(existingState DeleteTag) { -} - -func (c DeleteTag) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -3444,6 +3363,20 @@ func (o DeleteTransitionRequestRequest) Type(ctx context.Context) attr.Type { } type DeleteTransitionRequestResponse struct { + // New activity generated as a result of this operation. + Activity types.Object `tfsdk:"activity"` +} + +func (newState *DeleteTransitionRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTransitionRequestResponse) { +} + +func (newState *DeleteTransitionRequestResponse) SyncEffectiveFieldsDuringRead(existingState DeleteTransitionRequestResponse) { +} + +func (c DeleteTransitionRequestResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["activity"] = attrs["activity"].SetOptional() + + return attrs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTransitionRequestResponse. @@ -3454,7 +3387,9 @@ type DeleteTransitionRequestResponse struct { // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a DeleteTransitionRequestResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "activity": reflect.TypeOf(Activity{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -3463,14 +3398,46 @@ func (a DeleteTransitionRequestResponse) GetComplexFieldTypes(ctx context.Contex func (o DeleteTransitionRequestResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "activity": o.Activity, + }) } // Type implements basetypes.ObjectValuable. func (o DeleteTransitionRequestResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "activity": Activity{}.Type(ctx), + }, + } +} + +// GetActivity returns the value of the Activity field in DeleteTransitionRequestResponse as +// a Activity value. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteTransitionRequestResponse) GetActivity(ctx context.Context) (Activity, bool) { + var e Activity + if o.Activity.IsNull() || o.Activity.IsUnknown() { + return e, false + } + var v []Activity + d := o.Activity.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 +} + +// SetActivity sets the value of the Activity field in DeleteTransitionRequestResponse. +func (o *DeleteTransitionRequestResponse) SetActivity(ctx context.Context, v Activity) { + vs := v.ToObjectValue(ctx) + o.Activity = vs } type DeleteWebhookRequest struct { @@ -3512,6 +3479,17 @@ func (o DeleteWebhookRequest) Type(ctx context.Context) attr.Type { type DeleteWebhookResponse struct { } +func (newState *DeleteWebhookResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWebhookResponse) { +} + +func (newState *DeleteWebhookResponse) SyncEffectiveFieldsDuringRead(existingState DeleteWebhookResponse) { +} + +func (c DeleteWebhookResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -3652,7 +3630,7 @@ func (o *Experiment) SetTags(ctx context.Context, v []ExperimentTag) { type ExperimentAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -3814,7 +3792,7 @@ type ExperimentPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3986,7 +3964,7 @@ func (o *ExperimentPermissions) SetAccessControlList(ctx context.Context, v []Ex type ExperimentPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4042,19 +4020,6 @@ type ExperimentPermissionsRequest struct { ExperimentId types.String `tfsdk:"-"` } -func (newState *ExperimentPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermissionsRequest) { -} - -func (newState *ExperimentPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissionsRequest) { -} - -func (c ExperimentPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - - return attrs -} - // 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 @@ -4172,176 +4137,653 @@ func (o ExperimentTag) Type(ctx context.Context) attr.Type { } } -// Metadata of a single artifact file or directory. -type FileInfo struct { - // The size in bytes of the file. Unset for directories. - FileSize types.Int64 `tfsdk:"file_size"` - // Whether the path is a directory. - IsDir types.Bool `tfsdk:"is_dir"` - // The path relative to the root artifact directory run. - Path types.String `tfsdk:"path"` +// Feature for model version. +type Feature struct { + // Feature name + FeatureName types.String `tfsdk:"feature_name"` + // Feature table id + FeatureTableId types.String `tfsdk:"feature_table_id"` + // Feature table name + FeatureTableName types.String `tfsdk:"feature_table_name"` } -func (newState *FileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo) { +func (newState *Feature) SyncEffectiveFieldsDuringCreateOrUpdate(plan Feature) { } -func (newState *FileInfo) SyncEffectiveFieldsDuringRead(existingState FileInfo) { +func (newState *Feature) SyncEffectiveFieldsDuringRead(existingState Feature) { } -func (c FileInfo) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["file_size"] = attrs["file_size"].SetOptional() - attrs["is_dir"] = attrs["is_dir"].SetOptional() - attrs["path"] = attrs["path"].SetOptional() +func (c Feature) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["feature_name"] = attrs["feature_name"].SetOptional() + attrs["feature_table_id"] = attrs["feature_table_id"].SetOptional() + attrs["feature_table_name"] = attrs["feature_table_name"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in FileInfo. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Feature. // Container types (types.Map, types.List, types.Set) and 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 FileInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a Feature) 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, FileInfo +// interfere with how the plugin framework retrieves and sets values in state. Thus, Feature // only implements ToObjectValue() and Type(). -func (o FileInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o Feature) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "file_size": o.FileSize, - "is_dir": o.IsDir, - "path": o.Path, + "feature_name": o.FeatureName, + "feature_table_id": o.FeatureTableId, + "feature_table_name": o.FeatureTableName, }) } // Type implements basetypes.ObjectValuable. -func (o FileInfo) Type(ctx context.Context) attr.Type { +func (o Feature) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "file_size": types.Int64Type, - "is_dir": types.BoolType, - "path": types.StringType, + "feature_name": types.StringType, + "feature_table_id": types.StringType, + "feature_table_name": types.StringType, }, } } -type FinalizeLoggedModelRequest struct { - // The ID of the logged model to finalize. - ModelId types.String `tfsdk:"-"` - // Whether or not the model is ready for use. - // ``"LOGGED_MODEL_UPLOAD_FAILED"`` indicates that something went wrong when - // logging the model weights / agent code. - Status types.String `tfsdk:"status"` +type FeatureLineage struct { + // List of feature specs that contain this feature. + FeatureSpecs types.List `tfsdk:"feature_specs"` + // List of Unity Catalog models that were trained on this feature. + Models types.List `tfsdk:"models"` + // List of online features that use this feature as source. + OnlineFeatures types.List `tfsdk:"online_features"` } -func (newState *FinalizeLoggedModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan FinalizeLoggedModelRequest) { +func (newState *FeatureLineage) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureLineage) { } -func (newState *FinalizeLoggedModelRequest) SyncEffectiveFieldsDuringRead(existingState FinalizeLoggedModelRequest) { +func (newState *FeatureLineage) SyncEffectiveFieldsDuringRead(existingState FeatureLineage) { } -func (c FinalizeLoggedModelRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_id"] = attrs["model_id"].SetRequired() - attrs["status"] = attrs["status"].SetRequired() +func (c FeatureLineage) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["feature_specs"] = attrs["feature_specs"].SetOptional() + attrs["models"] = attrs["models"].SetOptional() + attrs["online_features"] = attrs["online_features"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in FinalizeLoggedModelRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureLineage. // Container types (types.Map, types.List, types.Set) and 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 FinalizeLoggedModelRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} +func (a FeatureLineage) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "feature_specs": reflect.TypeOf(FeatureLineageFeatureSpec{}), + "models": reflect.TypeOf(FeatureLineageModel{}), + "online_features": reflect.TypeOf(FeatureLineageOnlineFeature{}), + } } // 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, FinalizeLoggedModelRequest +// interfere with how the plugin framework retrieves and sets values in state. Thus, FeatureLineage // only implements ToObjectValue() and Type(). -func (o FinalizeLoggedModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o FeatureLineage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "model_id": o.ModelId, - "status": o.Status, + "feature_specs": o.FeatureSpecs, + "models": o.Models, + "online_features": o.OnlineFeatures, }) } // Type implements basetypes.ObjectValuable. -func (o FinalizeLoggedModelRequest) Type(ctx context.Context) attr.Type { +func (o FeatureLineage) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "model_id": types.StringType, - "status": types.StringType, + "feature_specs": basetypes.ListType{ + ElemType: FeatureLineageFeatureSpec{}.Type(ctx), + }, + "models": basetypes.ListType{ + ElemType: FeatureLineageModel{}.Type(ctx), + }, + "online_features": basetypes.ListType{ + ElemType: FeatureLineageOnlineFeature{}.Type(ctx), + }, }, } } -type FinalizeLoggedModelResponse struct { - // The updated logged model. - Model types.Object `tfsdk:"model"` +// GetFeatureSpecs returns the value of the FeatureSpecs field in FeatureLineage as +// a slice of FeatureLineageFeatureSpec values. +// If the field is unknown or null, the boolean return value is false. +func (o *FeatureLineage) GetFeatureSpecs(ctx context.Context) ([]FeatureLineageFeatureSpec, bool) { + if o.FeatureSpecs.IsNull() || o.FeatureSpecs.IsUnknown() { + return nil, false + } + var v []FeatureLineageFeatureSpec + d := o.FeatureSpecs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true } -func (newState *FinalizeLoggedModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan FinalizeLoggedModelResponse) { +// SetFeatureSpecs sets the value of the FeatureSpecs field in FeatureLineage. +func (o *FeatureLineage) SetFeatureSpecs(ctx context.Context, v []FeatureLineageFeatureSpec) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["feature_specs"] + t = t.(attr.TypeWithElementType).ElementType() + o.FeatureSpecs = types.ListValueMust(t, vs) } -func (newState *FinalizeLoggedModelResponse) SyncEffectiveFieldsDuringRead(existingState FinalizeLoggedModelResponse) { +// GetModels returns the value of the Models field in FeatureLineage as +// a slice of FeatureLineageModel values. +// If the field is unknown or null, the boolean return value is false. +func (o *FeatureLineage) GetModels(ctx context.Context) ([]FeatureLineageModel, bool) { + if o.Models.IsNull() || o.Models.IsUnknown() { + return nil, false + } + var v []FeatureLineageModel + d := o.Models.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true } -func (c FinalizeLoggedModelResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model"] = attrs["model"].SetOptional() +// SetModels sets the value of the Models field in FeatureLineage. +func (o *FeatureLineage) SetModels(ctx context.Context, v []FeatureLineageModel) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["models"] + t = t.(attr.TypeWithElementType).ElementType() + o.Models = types.ListValueMust(t, vs) +} + +// GetOnlineFeatures returns the value of the OnlineFeatures field in FeatureLineage as +// a slice of FeatureLineageOnlineFeature values. +// If the field is unknown or null, the boolean return value is false. +func (o *FeatureLineage) GetOnlineFeatures(ctx context.Context) ([]FeatureLineageOnlineFeature, bool) { + if o.OnlineFeatures.IsNull() || o.OnlineFeatures.IsUnknown() { + return nil, false + } + var v []FeatureLineageOnlineFeature + d := o.OnlineFeatures.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnlineFeatures sets the value of the OnlineFeatures field in FeatureLineage. +func (o *FeatureLineage) SetOnlineFeatures(ctx context.Context, v []FeatureLineageOnlineFeature) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["online_features"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnlineFeatures = types.ListValueMust(t, vs) +} + +type FeatureLineageFeatureSpec struct { + // The full name of the feature spec in Unity Catalog. + Name types.String `tfsdk:"name"` +} + +func (newState *FeatureLineageFeatureSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureLineageFeatureSpec) { +} + +func (newState *FeatureLineageFeatureSpec) SyncEffectiveFieldsDuringRead(existingState FeatureLineageFeatureSpec) { +} + +func (c FeatureLineageFeatureSpec) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in FinalizeLoggedModelResponse. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureLineageFeatureSpec. // Container types (types.Map, types.List, types.Set) and 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 FinalizeLoggedModelResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "model": reflect.TypeOf(LoggedModel{}), - } +func (a FeatureLineageFeatureSpec) 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, FinalizeLoggedModelResponse +// interfere with how the plugin framework retrieves and sets values in state. Thus, FeatureLineageFeatureSpec // only implements ToObjectValue() and Type(). -func (o FinalizeLoggedModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o FeatureLineageFeatureSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "model": o.Model, + "name": o.Name, }) } // Type implements basetypes.ObjectValuable. -func (o FinalizeLoggedModelResponse) Type(ctx context.Context) attr.Type { +func (o FeatureLineageFeatureSpec) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "model": LoggedModel{}.Type(ctx), + "name": types.StringType, }, } } -// GetModel returns the value of the Model field in FinalizeLoggedModelResponse as -// a LoggedModel value. -// If the field is unknown or null, the boolean return value is false. -func (o *FinalizeLoggedModelResponse) GetModel(ctx context.Context) (LoggedModel, bool) { - var e LoggedModel - if o.Model.IsNull() || o.Model.IsUnknown() { +type FeatureLineageModel struct { + // The full name of the model in Unity Catalog. + Name types.String `tfsdk:"name"` + // The version of the model. + Version types.Int64 `tfsdk:"version"` +} + +func (newState *FeatureLineageModel) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureLineageModel) { +} + +func (newState *FeatureLineageModel) SyncEffectiveFieldsDuringRead(existingState FeatureLineageModel) { +} + +func (c FeatureLineageModel) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["name"] = attrs["name"].SetOptional() + attrs["version"] = attrs["version"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureLineageModel. +// Container types (types.Map, types.List, types.Set) and 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 FeatureLineageModel) 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, FeatureLineageModel +// only implements ToObjectValue() and Type(). +func (o FeatureLineageModel) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FeatureLineageModel) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "version": types.Int64Type, + }, + } +} + +type FeatureLineageOnlineFeature struct { + // The name of the online feature (column name). + FeatureName types.String `tfsdk:"feature_name"` + // The full name of the online table in Unity Catalog. + TableName types.String `tfsdk:"table_name"` +} + +func (newState *FeatureLineageOnlineFeature) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureLineageOnlineFeature) { +} + +func (newState *FeatureLineageOnlineFeature) SyncEffectiveFieldsDuringRead(existingState FeatureLineageOnlineFeature) { +} + +func (c FeatureLineageOnlineFeature) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["feature_name"] = attrs["feature_name"].SetOptional() + attrs["table_name"] = attrs["table_name"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureLineageOnlineFeature. +// Container types (types.Map, types.List, types.Set) and 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 FeatureLineageOnlineFeature) 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, FeatureLineageOnlineFeature +// only implements ToObjectValue() and Type(). +func (o FeatureLineageOnlineFeature) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FeatureLineageOnlineFeature) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "table_name": types.StringType, + }, + } +} + +// Feature list wrap all the features for a model version +type FeatureList struct { + Features types.List `tfsdk:"features"` +} + +func (newState *FeatureList) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureList) { +} + +func (newState *FeatureList) SyncEffectiveFieldsDuringRead(existingState FeatureList) { +} + +func (c FeatureList) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["features"] = attrs["features"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureList. +// Container types (types.Map, types.List, types.Set) and 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 FeatureList) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "features": reflect.TypeOf(Feature{}), + } +} + +// 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, FeatureList +// only implements ToObjectValue() and Type(). +func (o FeatureList) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "features": o.Features, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FeatureList) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "features": basetypes.ListType{ + ElemType: Feature{}.Type(ctx), + }, + }, + } +} + +// GetFeatures returns the value of the Features field in FeatureList as +// a slice of Feature values. +// If the field is unknown or null, the boolean return value is false. +func (o *FeatureList) GetFeatures(ctx context.Context) ([]Feature, bool) { + if o.Features.IsNull() || o.Features.IsUnknown() { + return nil, false + } + var v []Feature + d := o.Features.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFeatures sets the value of the Features field in FeatureList. +func (o *FeatureList) SetFeatures(ctx context.Context, v []Feature) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["features"] + t = t.(attr.TypeWithElementType).ElementType() + o.Features = types.ListValueMust(t, vs) +} + +// Represents a tag on a feature in a feature table. +type FeatureTag struct { + Key types.String `tfsdk:"key"` + + Value types.String `tfsdk:"value"` +} + +func (newState *FeatureTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan FeatureTag) { +} + +func (newState *FeatureTag) SyncEffectiveFieldsDuringRead(existingState FeatureTag) { +} + +func (c FeatureTag) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["key"] = attrs["key"].SetRequired() + attrs["value"] = attrs["value"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FeatureTag. +// Container types (types.Map, types.List, types.Set) and 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 FeatureTag) 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, FeatureTag +// only implements ToObjectValue() and Type(). +func (o FeatureTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FeatureTag) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +// Metadata of a single artifact file or directory. +type FileInfo struct { + // The size in bytes of the file. Unset for directories. + FileSize types.Int64 `tfsdk:"file_size"` + // Whether the path is a directory. + IsDir types.Bool `tfsdk:"is_dir"` + // The path relative to the root artifact directory run. + Path types.String `tfsdk:"path"` +} + +func (newState *FileInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo) { +} + +func (newState *FileInfo) SyncEffectiveFieldsDuringRead(existingState FileInfo) { +} + +func (c FileInfo) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["file_size"] = attrs["file_size"].SetOptional() + attrs["is_dir"] = attrs["is_dir"].SetOptional() + attrs["path"] = attrs["path"].SetOptional() + + return attrs +} + +// 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 +// 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 FileInfo) 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, FileInfo +// only implements ToObjectValue() and Type(). +func (o FileInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_size": o.FileSize, + "is_dir": o.IsDir, + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FileInfo) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_size": types.Int64Type, + "is_dir": types.BoolType, + "path": types.StringType, + }, + } +} + +type FinalizeLoggedModelRequest struct { + // The ID of the logged model to finalize. + ModelId types.String `tfsdk:"-"` + // Whether or not the model is ready for use. + // ``"LOGGED_MODEL_UPLOAD_FAILED"`` indicates that something went wrong when + // logging the model weights / agent code. + Status types.String `tfsdk:"status"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FinalizeLoggedModelRequest. +// Container types (types.Map, types.List, types.Set) and 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 FinalizeLoggedModelRequest) 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, FinalizeLoggedModelRequest +// only implements ToObjectValue() and Type(). +func (o FinalizeLoggedModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_id": o.ModelId, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FinalizeLoggedModelRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_id": types.StringType, + "status": types.StringType, + }, + } +} + +type FinalizeLoggedModelResponse struct { + // The updated logged model. + Model types.Object `tfsdk:"model"` +} + +func (newState *FinalizeLoggedModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan FinalizeLoggedModelResponse) { +} + +func (newState *FinalizeLoggedModelResponse) SyncEffectiveFieldsDuringRead(existingState FinalizeLoggedModelResponse) { +} + +func (c FinalizeLoggedModelResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["model"] = attrs["model"].SetOptional() + + return attrs +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FinalizeLoggedModelResponse. +// Container types (types.Map, types.List, types.Set) and 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 FinalizeLoggedModelResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "model": reflect.TypeOf(LoggedModel{}), + } +} + +// 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, FinalizeLoggedModelResponse +// only implements ToObjectValue() and Type(). +func (o FinalizeLoggedModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model": o.Model, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FinalizeLoggedModelResponse) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model": LoggedModel{}.Type(ctx), + }, + } +} + +// GetModel returns the value of the Model field in FinalizeLoggedModelResponse as +// a LoggedModel value. +// If the field is unknown or null, the boolean return value is false. +func (o *FinalizeLoggedModelResponse) GetModel(ctx context.Context) (LoggedModel, bool) { + var e LoggedModel + if o.Model.IsNull() || o.Model.IsUnknown() { return e, false } var v []LoggedModel @@ -4802,6 +5244,89 @@ func (o *GetExperimentResponse) SetExperiment(ctx context.Context, v Experiment) o.Experiment = vs } +type GetFeatureLineageRequest struct { + // The name of the feature. + FeatureName types.String `tfsdk:"-"` + // The full name of the feature table in Unity Catalog. + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFeatureLineageRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetFeatureLineageRequest) 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, GetFeatureLineageRequest +// only implements ToObjectValue() and Type(). +func (o GetFeatureLineageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetFeatureLineageRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "table_name": types.StringType, + }, + } +} + +type GetFeatureTagRequest struct { + FeatureName types.String `tfsdk:"-"` + + Key types.String `tfsdk:"-"` + + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFeatureTagRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetFeatureTagRequest) 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, GetFeatureTagRequest +// only implements ToObjectValue() and Type(). +func (o GetFeatureTagRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "key": o.Key, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetFeatureTagRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "key": types.StringType, + "table_name": types.StringType, + }, + } +} + type GetForecastingExperimentRequest struct { // The unique ID of a forecasting experiment ExperimentId types.String `tfsdk:"-"` @@ -4900,19 +5425,6 @@ type GetLatestVersionsRequest struct { Stages types.List `tfsdk:"stages"` } -func (newState *GetLatestVersionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionsRequest) { -} - -func (newState *GetLatestVersionsRequest) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionsRequest) { -} - -func (c GetLatestVersionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["stages"] = attrs["stages"].SetOptional() - - return attrs -} - // 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 @@ -6132,9 +6644,9 @@ 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"` - // 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. + // 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"` } @@ -6376,89 +6888,219 @@ 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"` - // Token that can be used to retrieve the next page of experiments. Empty - // token means no more experiment is available for retrieval. +type ListExperimentsResponse struct { + // Paginated Experiments beginning with the first item on the requested + // page. + Experiments types.List `tfsdk:"experiments"` + // 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"` +} + +func (newState *ListExperimentsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsResponse) { +} + +func (newState *ListExperimentsResponse) SyncEffectiveFieldsDuringRead(existingState ListExperimentsResponse) { +} + +func (c ListExperimentsResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["experiments"] = attrs["experiments"].SetOptional() + attrs["next_page_token"] = attrs["next_page_token"].SetOptional() + + return attrs +} + +// 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 +// 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 ListExperimentsResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "experiments": reflect.TypeOf(Experiment{}), + } +} + +// 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, ListExperimentsResponse +// only implements ToObjectValue() and Type(). +func (o ListExperimentsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiments": o.Experiments, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExperimentsResponse) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiments": basetypes.ListType{ + ElemType: Experiment{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetExperiments returns the value of the Experiments field in ListExperimentsResponse as +// a slice of Experiment values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExperimentsResponse) GetExperiments(ctx context.Context) ([]Experiment, bool) { + if o.Experiments.IsNull() || o.Experiments.IsUnknown() { + return nil, false + } + var v []Experiment + d := o.Experiments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExperiments sets the value of the Experiments field in ListExperimentsResponse. +func (o *ListExperimentsResponse) SetExperiments(ctx context.Context, v []Experiment) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["experiments"] + t = t.(attr.TypeWithElementType).ElementType() + o.Experiments = types.ListValueMust(t, vs) +} + +type ListFeatureTagsRequest struct { + FeatureName types.String `tfsdk:"-"` + // The maximum number of results to return. + PageSize types.Int64 `tfsdk:"-"` + // Pagination token to go to the next page based on a previous query. + PageToken types.String `tfsdk:"-"` + + TableName types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFeatureTagsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListFeatureTagsRequest) 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, ListFeatureTagsRequest +// only implements ToObjectValue() and Type(). +func (o ListFeatureTagsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "page_size": o.PageSize, + "page_token": o.PageToken, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListFeatureTagsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + "table_name": types.StringType, + }, + } +} + +// Response message for ListFeatureTag. +type ListFeatureTagsResponse struct { + FeatureTags types.List `tfsdk:"feature_tags"` + // Pagination token to request the next page of results for this query. NextPageToken types.String `tfsdk:"next_page_token"` } -func (newState *ListExperimentsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsResponse) { +func (newState *ListFeatureTagsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFeatureTagsResponse) { } -func (newState *ListExperimentsResponse) SyncEffectiveFieldsDuringRead(existingState ListExperimentsResponse) { +func (newState *ListFeatureTagsResponse) SyncEffectiveFieldsDuringRead(existingState ListFeatureTagsResponse) { } -func (c ListExperimentsResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiments"] = attrs["experiments"].SetOptional() +func (c ListFeatureTagsResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["feature_tags"] = attrs["feature_tags"].SetOptional() attrs["next_page_token"] = attrs["next_page_token"].SetOptional() return attrs } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExperimentsResponse. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFeatureTagsResponse. // Container types (types.Map, types.List, types.Set) and 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 ListExperimentsResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a ListFeatureTagsResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "experiments": reflect.TypeOf(Experiment{}), + "feature_tags": reflect.TypeOf(FeatureTag{}), } } // 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, ListExperimentsResponse +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListFeatureTagsResponse // only implements ToObjectValue() and Type(). -func (o ListExperimentsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { +func (o ListFeatureTagsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "experiments": o.Experiments, + "feature_tags": o.FeatureTags, "next_page_token": o.NextPageToken, }) } // Type implements basetypes.ObjectValuable. -func (o ListExperimentsResponse) Type(ctx context.Context) attr.Type { +func (o ListFeatureTagsResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "experiments": basetypes.ListType{ - ElemType: Experiment{}.Type(ctx), + "feature_tags": basetypes.ListType{ + ElemType: FeatureTag{}.Type(ctx), }, "next_page_token": types.StringType, }, } } -// GetExperiments returns the value of the Experiments field in ListExperimentsResponse as -// a slice of Experiment values. +// GetFeatureTags returns the value of the FeatureTags field in ListFeatureTagsResponse as +// a slice of FeatureTag values. // If the field is unknown or null, the boolean return value is false. -func (o *ListExperimentsResponse) GetExperiments(ctx context.Context) ([]Experiment, bool) { - if o.Experiments.IsNull() || o.Experiments.IsUnknown() { +func (o *ListFeatureTagsResponse) GetFeatureTags(ctx context.Context) ([]FeatureTag, bool) { + if o.FeatureTags.IsNull() || o.FeatureTags.IsUnknown() { return nil, false } - var v []Experiment - d := o.Experiments.ElementsAs(ctx, &v, true) + var v []FeatureTag + d := o.FeatureTags.ElementsAs(ctx, &v, true) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } return v, true } -// SetExperiments sets the value of the Experiments field in ListExperimentsResponse. -func (o *ListExperimentsResponse) SetExperiments(ctx context.Context, v []Experiment) { +// SetFeatureTags sets the value of the FeatureTags field in ListFeatureTagsResponse. +func (o *ListFeatureTagsResponse) SetFeatureTags(ctx context.Context, v []FeatureTag) { vs := make([]attr.Value, 0, len(v)) for _, e := range v { vs = append(vs, e.ToObjectValue(ctx)) } - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["experiments"] + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["feature_tags"] t = t.(attr.TypeWithElementType).ElementType() - o.Experiments = types.ListValueMust(t, vs) + o.FeatureTags = types.ListValueMust(t, vs) } type ListModelsRequest struct { @@ -6792,7 +7434,7 @@ func (o *ListRegistryWebhooks) SetWebhooks(ctx context.Context, v []RegistryWebh } type ListTransitionRequestsRequest struct { - // Name of the model. + // Name of the registered model. Name types.String `tfsdk:"-"` // Version of the model. Version types.String `tfsdk:"-"` @@ -6910,12 +7552,48 @@ func (o *ListTransitionRequestsResponse) SetRequests(ctx context.Context, v []Ac } type ListWebhooksRequest struct { + // Events that trigger the webhook. * `MODEL_VERSION_CREATED`: A new model + // version was created for the associated model. + // + // * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was + // changed. + // + // * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s + // stage be transitioned. + // + // * `COMMENT_CREATED`: A user wrote a comment on a registered model. + // + // * `REGISTERED_MODEL_CREATED`: A new registered model was created. This + // event type can only be specified for a registry-wide webhook, which can + // be created by not specifying a model name in the create request. + // + // * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version. + // + // * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was + // transitioned to staging. + // + // * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was + // transitioned to production. + // + // * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived. + // + // * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model + // version be transitioned to staging. + // + // * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model + // version be transitioned to production. + // + // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model + // version be archived. + // // If `events` is specified, any webhook with one or more of the specified // trigger events is included in the output. If `events` is not specified, // webhooks of all event types are included in the output. Events types.List `tfsdk:"-"` - // If not specified, all webhooks associated with the specified events are - // listed, regardless of their associated model. + + MaxResults types.Int64 `tfsdk:"-"` + // Registered model name If not specified, all webhooks associated with the + // specified events are listed, regardless of their associated model. ModelName types.String `tfsdk:"-"` // Token indicating the page of artifact results to fetch PageToken types.String `tfsdk:"-"` @@ -6941,9 +7619,10 @@ func (o ListWebhooksRequest) ToObjectValue(ctx context.Context) basetypes.Object return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "events": o.Events, - "model_name": o.ModelName, - "page_token": o.PageToken, + "events": o.Events, + "max_results": o.MaxResults, + "model_name": o.ModelName, + "page_token": o.PageToken, }) } @@ -6954,8 +7633,9 @@ func (o ListWebhooksRequest) Type(ctx context.Context) attr.Type { "events": basetypes.ListType{ ElemType: types.StringType, }, - "model_name": types.StringType, - "page_token": types.StringType, + "max_results": types.Int64Type, + "model_name": types.StringType, + "page_token": types.StringType, }, } } @@ -7000,21 +7680,6 @@ type LogBatch struct { Tags types.List `tfsdk:"tags"` } -func (newState *LogBatch) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogBatch) { -} - -func (newState *LogBatch) SyncEffectiveFieldsDuringRead(existingState LogBatch) { -} - -func (c LogBatch) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["metrics"] = attrs["metrics"].SetOptional() - attrs["params"] = attrs["params"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -7190,20 +7855,6 @@ type LogInputs struct { RunId types.String `tfsdk:"run_id"` } -func (newState *LogInputs) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogInputs) { -} - -func (newState *LogInputs) SyncEffectiveFieldsDuringRead(existingState LogInputs) { -} - -func (c LogInputs) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["datasets"] = attrs["datasets"].SetOptional() - attrs["models"] = attrs["models"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -7346,19 +7997,6 @@ type LogLoggedModelParamsRequest struct { Params types.List `tfsdk:"params"` } -func (newState *LogLoggedModelParamsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogLoggedModelParamsRequest) { -} - -func (newState *LogLoggedModelParamsRequest) SyncEffectiveFieldsDuringRead(existingState LogLoggedModelParamsRequest) { -} - -func (c LogLoggedModelParamsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_id"] = attrs["model_id"].SetRequired() - attrs["params"] = attrs["params"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogLoggedModelParamsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7488,26 +8126,6 @@ type LogMetric struct { Value types.Float64 `tfsdk:"value"` } -func (newState *LogMetric) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogMetric) { -} - -func (newState *LogMetric) SyncEffectiveFieldsDuringRead(existingState LogMetric) { -} - -func (c LogMetric) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dataset_digest"] = attrs["dataset_digest"].SetOptional() - attrs["dataset_name"] = attrs["dataset_name"].SetOptional() - attrs["key"] = attrs["key"].SetRequired() - attrs["model_id"] = attrs["model_id"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_uuid"] = attrs["run_uuid"].SetOptional() - attrs["step"] = attrs["step"].SetOptional() - attrs["timestamp"] = attrs["timestamp"].SetRequired() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -7603,19 +8221,6 @@ type LogModel struct { RunId types.String `tfsdk:"run_id"` } -func (newState *LogModel) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogModel) { -} - -func (newState *LogModel) SyncEffectiveFieldsDuringRead(existingState LogModel) { -} - -func (c LogModel) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_json"] = attrs["model_json"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetOptional() - - return attrs -} - // 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 @@ -7697,19 +8302,6 @@ type LogOutputsRequest struct { RunId types.String `tfsdk:"run_id"` } -func (newState *LogOutputsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogOutputsRequest) { -} - -func (newState *LogOutputsRequest) SyncEffectiveFieldsDuringRead(existingState LogOutputsRequest) { -} - -func (c LogOutputsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["models"] = attrs["models"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in LogOutputsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -7826,21 +8418,6 @@ type LogParam struct { Value types.String `tfsdk:"value"` } -func (newState *LogParam) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogParam) { -} - -func (newState *LogParam) SyncEffectiveFieldsDuringRead(existingState LogParam) { -} - -func (c LogParam) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_uuid"] = attrs["run_uuid"].SetOptional() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -8625,14 +9202,13 @@ type ModelDatabricks struct { Description types.String `tfsdk:"description"` // Unique identifier for the object. Id types.String `tfsdk:"id"` - // Time of the object at last update, as a Unix timestamp in milliseconds. + // Last update time of the object, as a Unix timestamp in milliseconds. LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp"` // Array of model versions, each the latest version for its stage. LatestVersions types.List `tfsdk:"latest_versions"` // Name of the model. Name types.String `tfsdk:"name"` - // Permission level of the requesting user on the object. For what is - // allowed at each level, see [MLflow Model permissions](..). + // Permission level granted for the requesting user on this registered model PermissionLevel types.String `tfsdk:"permission_level"` // Array of tags associated with the model. Tags types.List `tfsdk:"tags"` @@ -8869,6 +9445,7 @@ func (o ModelOutput) Type(ctx context.Context) attr.Type { } } +// Tag for a registered model type ModelTag struct { // The tag key. Key types.String `tfsdk:"key"` @@ -9066,24 +9643,25 @@ 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"` - // Stage of the model version. Valid values are: - // - // * `None`: The initial stage of a model version. - // - // * `Staging`: Staging or pre-production stage. - // - // * `Production`: Production stage. - // - // * `Archived`: Archived stage. + CurrentStage types.String `tfsdk:"current_stage"` // User-specified description for the object. Description types.String `tfsdk:"description"` + // Email Subscription Status: This is the subscription status of the user to + // the model version Users get subscribed by interacting with the model + // version. + EmailSubscriptionStatus types.String `tfsdk:"email_subscription_status"` + // Feature lineage of `model_version`. + FeatureList types.Object `tfsdk:"feature_list"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp"` // Name of the model. Name types.String `tfsdk:"name"` - // Permission level of the requesting user on the object. For what is - // allowed at each level, see [MLflow Model permissions](..). + // Open requests for this `model_versions`. Gap in sequence number is + // intentional and is done in order to match field sequence numbers of + // `ModelVersion` proto message + OpenRequests types.List `tfsdk:"open_requests"` + PermissionLevel types.String `tfsdk:"permission_level"` // Unique identifier for the MLflow tracking run associated with the source // model artifacts. @@ -9095,14 +9673,7 @@ type ModelVersionDatabricks struct { // URI that indicates the location of the source model artifacts. This is // used when creating the model version. Source types.String `tfsdk:"source"` - // 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. - // - // * `FAILED_REGISTRATION`: Request to register a new model version has - // failed. - // - // * `READY`: Model version is ready for use. + Status types.String `tfsdk:"status"` // Details on the current status, for example why registration failed. StatusMessage types.String `tfsdk:"status_message"` @@ -9124,8 +9695,11 @@ func (c ModelVersionDatabricks) ApplySchemaCustomizations(attrs map[string]tfsch attrs["creation_timestamp"] = attrs["creation_timestamp"].SetOptional() attrs["current_stage"] = attrs["current_stage"].SetOptional() attrs["description"] = attrs["description"].SetOptional() + attrs["email_subscription_status"] = attrs["email_subscription_status"].SetOptional() + attrs["feature_list"] = attrs["feature_list"].SetOptional() attrs["last_updated_timestamp"] = attrs["last_updated_timestamp"].SetOptional() attrs["name"] = attrs["name"].SetOptional() + attrs["open_requests"] = attrs["open_requests"].SetOptional() attrs["permission_level"] = attrs["permission_level"].SetOptional() attrs["run_id"] = attrs["run_id"].SetOptional() attrs["run_link"] = attrs["run_link"].SetOptional() @@ -9148,7 +9722,9 @@ func (c ModelVersionDatabricks) ApplySchemaCustomizations(attrs map[string]tfsch // SDK values. func (a ModelVersionDatabricks) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "tags": reflect.TypeOf(ModelVersionTag{}), + "feature_list": reflect.TypeOf(FeatureList{}), + "open_requests": reflect.TypeOf(Activity{}), + "tags": reflect.TypeOf(ModelVersionTag{}), } } @@ -9159,20 +9735,23 @@ func (o ModelVersionDatabricks) ToObjectValue(ctx context.Context) basetypes.Obj return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "creation_timestamp": o.CreationTimestamp, - "current_stage": o.CurrentStage, - "description": o.Description, - "last_updated_timestamp": o.LastUpdatedTimestamp, - "name": o.Name, - "permission_level": o.PermissionLevel, - "run_id": o.RunId, - "run_link": o.RunLink, - "source": o.Source, - "status": o.Status, - "status_message": o.StatusMessage, - "tags": o.Tags, - "user_id": o.UserId, - "version": o.Version, + "creation_timestamp": o.CreationTimestamp, + "current_stage": o.CurrentStage, + "description": o.Description, + "email_subscription_status": o.EmailSubscriptionStatus, + "feature_list": o.FeatureList, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "name": o.Name, + "open_requests": o.OpenRequests, + "permission_level": o.PermissionLevel, + "run_id": o.RunId, + "run_link": o.RunLink, + "source": o.Source, + "status": o.Status, + "status_message": o.StatusMessage, + "tags": o.Tags, + "user_id": o.UserId, + "version": o.Version, }) } @@ -9180,17 +9759,22 @@ func (o ModelVersionDatabricks) ToObjectValue(ctx context.Context) basetypes.Obj func (o ModelVersionDatabricks) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "creation_timestamp": types.Int64Type, - "current_stage": types.StringType, - "description": types.StringType, - "last_updated_timestamp": types.Int64Type, - "name": types.StringType, - "permission_level": types.StringType, - "run_id": types.StringType, - "run_link": types.StringType, - "source": types.StringType, - "status": types.StringType, - "status_message": types.StringType, + "creation_timestamp": types.Int64Type, + "current_stage": types.StringType, + "description": types.StringType, + "email_subscription_status": types.StringType, + "feature_list": FeatureList{}.Type(ctx), + "last_updated_timestamp": types.Int64Type, + "name": types.StringType, + "open_requests": basetypes.ListType{ + ElemType: Activity{}.Type(ctx), + }, + "permission_level": types.StringType, + "run_id": types.StringType, + "run_link": types.StringType, + "source": types.StringType, + "status": types.StringType, + "status_message": types.StringType, "tags": basetypes.ListType{ ElemType: ModelVersionTag{}.Type(ctx), }, @@ -9200,6 +9784,60 @@ func (o ModelVersionDatabricks) Type(ctx context.Context) attr.Type { } } +// GetFeatureList returns the value of the FeatureList field in ModelVersionDatabricks as +// a FeatureList value. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelVersionDatabricks) GetFeatureList(ctx context.Context) (FeatureList, bool) { + var e FeatureList + if o.FeatureList.IsNull() || o.FeatureList.IsUnknown() { + return e, false + } + var v []FeatureList + d := o.FeatureList.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 +} + +// SetFeatureList sets the value of the FeatureList field in ModelVersionDatabricks. +func (o *ModelVersionDatabricks) SetFeatureList(ctx context.Context, v FeatureList) { + vs := v.ToObjectValue(ctx) + o.FeatureList = vs +} + +// GetOpenRequests returns the value of the OpenRequests field in ModelVersionDatabricks as +// a slice of Activity values. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelVersionDatabricks) GetOpenRequests(ctx context.Context) ([]Activity, bool) { + if o.OpenRequests.IsNull() || o.OpenRequests.IsUnknown() { + return nil, false + } + var v []Activity + d := o.OpenRequests.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOpenRequests sets the value of the OpenRequests field in ModelVersionDatabricks. +func (o *ModelVersionDatabricks) SetOpenRequests(ctx context.Context, v []Activity) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e.ToObjectValue(ctx)) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["open_requests"] + t = t.(attr.TypeWithElementType).ElementType() + o.OpenRequests = types.ListValueMust(t, vs) +} + // GetTags returns the value of the Tags field in ModelVersionDatabricks as // a slice of ModelVersionTag values. // If the field is unknown or null, the boolean return value is false. @@ -9303,7 +9941,7 @@ func (newState *OnlineStore) SyncEffectiveFieldsDuringRead(existingState OnlineS } func (c OnlineStore) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["capacity"] = attrs["capacity"].SetOptional() + attrs["capacity"] = attrs["capacity"].SetRequired() attrs["creation_time"] = attrs["creation_time"].SetComputed() attrs["creator"] = attrs["creator"].SetComputed() attrs["name"] = attrs["name"].SetRequired() @@ -9409,7 +10047,6 @@ type PublishSpec struct { // The name of the target online store. OnlineStore types.String `tfsdk:"online_store"` // The full three-part (catalog, schema, table) name of the online table. - // Auto-generated if not specified. OnlineTableName types.String `tfsdk:"online_table_name"` // The publish mode of the pipeline that syncs the online table with the // source table. Defaults to TRIGGERED if not specified. All publish modes @@ -9425,7 +10062,7 @@ func (newState *PublishSpec) SyncEffectiveFieldsDuringRead(existingState Publish func (c PublishSpec) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["online_store"] = attrs["online_store"].SetRequired() - attrs["online_table_name"] = attrs["online_table_name"].SetOptional() + attrs["online_table_name"] = attrs["online_table_name"].SetRequired() attrs["publish_mode"] = attrs["publish_mode"].SetOptional() return attrs @@ -9473,19 +10110,6 @@ type PublishTableRequest struct { SourceTableName types.String `tfsdk:"-"` } -func (newState *PublishTableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishTableRequest) { -} - -func (newState *PublishTableRequest) SyncEffectiveFieldsDuringRead(existingState PublishTableRequest) { -} - -func (c PublishTableRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["publish_spec"] = attrs["publish_spec"].SetRequired() - attrs["source_table_name"] = attrs["source_table_name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishTableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -9605,7 +10229,7 @@ func (o PublishTableResponse) Type(ctx context.Context) attr.Type { type RegisteredModelAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -9767,7 +10391,7 @@ type RegisteredModelPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -9939,7 +10563,7 @@ func (o *RegisteredModelPermissions) SetAccessControlList(ctx context.Context, v type RegisteredModelPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -9986,26 +10610,13 @@ func (o RegisteredModelPermissionsDescription) Type(ctx context.Context) attr.Ty "description": types.StringType, "permission_level": types.StringType, }, - } -} - -type RegisteredModelPermissionsRequest struct { - AccessControlList types.List `tfsdk:"access_control_list"` - // The registered model for which to get or manage permissions. - RegisteredModelId types.String `tfsdk:"-"` -} - -func (newState *RegisteredModelPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermissionsRequest) { -} - -func (newState *RegisteredModelPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissionsRequest) { + } } -func (c RegisteredModelPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["registered_model_id"] = attrs["registered_model_id"].SetRequired() - - return attrs +type RegisteredModelPermissionsRequest struct { + AccessControlList types.List `tfsdk:"access_control_list"` + // The registered model for which to get or manage permissions. + RegisteredModelId types.String `tfsdk:"-"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissionsRequest. @@ -10120,14 +10731,7 @@ type RegistryWebhook struct { LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp"` // Name of the model whose events would trigger this webhook. ModelName types.String `tfsdk:"model_name"` - // 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. - // - // * `DISABLED`: Webhook is not triggered. - // - // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is - // not triggered on a real event. + Status types.String `tfsdk:"status"` } @@ -10286,6 +10890,8 @@ func (o *RegistryWebhook) SetJobSpec(ctx context.Context, v JobSpecWithoutSecret o.JobSpec = vs } +// Details required to identify and reject a model version stage transition +// request. type RejectTransitionRequest struct { // User-provided comment on the action. Comment types.String `tfsdk:"comment"` @@ -10305,21 +10911,6 @@ type RejectTransitionRequest struct { Version types.String `tfsdk:"version"` } -func (newState *RejectTransitionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RejectTransitionRequest) { -} - -func (newState *RejectTransitionRequest) SyncEffectiveFieldsDuringRead(existingState RejectTransitionRequest) { -} - -func (c RejectTransitionRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["stage"] = attrs["stage"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -10358,7 +10949,7 @@ func (o RejectTransitionRequest) Type(ctx context.Context) attr.Type { } type RejectTransitionRequestResponse struct { - // Activity recorded for the action. + // New activity generated as a result of this operation. Activity types.Object `tfsdk:"activity"` } @@ -10442,19 +11033,6 @@ type RenameModelRequest struct { NewName types.String `tfsdk:"new_name"` } -func (newState *RenameModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RenameModelRequest) { -} - -func (newState *RenameModelRequest) SyncEffectiveFieldsDuringRead(existingState RenameModelRequest) { -} - -func (c RenameModelRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - - return attrs -} - // 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 @@ -10570,18 +11148,6 @@ type RestoreExperiment struct { ExperimentId types.String `tfsdk:"experiment_id"` } -func (newState *RestoreExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreExperiment) { -} - -func (newState *RestoreExperiment) SyncEffectiveFieldsDuringRead(existingState RestoreExperiment) { -} - -func (c RestoreExperiment) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - - return attrs -} - // 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 @@ -10659,18 +11225,6 @@ type RestoreRun struct { RunId types.String `tfsdk:"run_id"` } -func (newState *RestoreRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRun) { -} - -func (newState *RestoreRun) SyncEffectiveFieldsDuringRead(existingState RestoreRun) { -} - -func (c RestoreRun) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["run_id"] = attrs["run_id"].SetRequired() - - return attrs -} - // 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 @@ -10755,20 +11309,6 @@ type RestoreRuns struct { MinTimestampMillis types.Int64 `tfsdk:"min_timestamp_millis"` } -func (newState *RestoreRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRuns) { -} - -func (newState *RestoreRuns) SyncEffectiveFieldsDuringRead(existingState RestoreRuns) { -} - -func (c RestoreRuns) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["max_runs"] = attrs["max_runs"].SetOptional() - attrs["min_timestamp_millis"] = attrs["min_timestamp_millis"].SetRequired() - - return attrs -} - // 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 @@ -11431,22 +11971,6 @@ type SearchExperiments struct { ViewType types.String `tfsdk:"view_type"` } -func (newState *SearchExperiments) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchExperiments) { -} - -func (newState *SearchExperiments) SyncEffectiveFieldsDuringRead(existingState SearchExperiments) { -} - -func (c SearchExperiments) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["filter"] = attrs["filter"].SetOptional() - attrs["max_results"] = attrs["max_results"].SetOptional() - attrs["order_by"] = attrs["order_by"].SetOptional() - attrs["page_token"] = attrs["page_token"].SetOptional() - attrs["view_type"] = attrs["view_type"].SetOptional() - - return attrs -} - // 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 @@ -11747,23 +12271,6 @@ type SearchLoggedModelsRequest struct { PageToken types.String `tfsdk:"page_token"` } -func (newState *SearchLoggedModelsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchLoggedModelsRequest) { -} - -func (newState *SearchLoggedModelsRequest) SyncEffectiveFieldsDuringRead(existingState SearchLoggedModelsRequest) { -} - -func (c SearchLoggedModelsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["datasets"] = attrs["datasets"].SetOptional() - attrs["experiment_ids"] = attrs["experiment_ids"].SetOptional() - attrs["filter"] = attrs["filter"].SetOptional() - attrs["max_results"] = attrs["max_results"].SetOptional() - attrs["order_by"] = attrs["order_by"].SetOptional() - attrs["page_token"] = attrs["page_token"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchLoggedModelsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12339,23 +12846,6 @@ type SearchRuns struct { RunViewType types.String `tfsdk:"run_view_type"` } -func (newState *SearchRuns) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchRuns) { -} - -func (newState *SearchRuns) SyncEffectiveFieldsDuringRead(existingState SearchRuns) { -} - -func (c SearchRuns) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_ids"] = attrs["experiment_ids"].SetOptional() - attrs["filter"] = attrs["filter"].SetOptional() - attrs["max_results"] = attrs["max_results"].SetOptional() - attrs["order_by"] = attrs["order_by"].SetOptional() - attrs["page_token"] = attrs["page_token"].SetOptional() - attrs["run_view_type"] = attrs["run_view_type"].SetOptional() - - return attrs -} - // 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 @@ -12549,20 +13039,6 @@ type SetExperimentTag struct { Value types.String `tfsdk:"value"` } -func (newState *SetExperimentTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetExperimentTag) { -} - -func (newState *SetExperimentTag) SyncEffectiveFieldsDuringRead(existingState SetExperimentTag) { -} - -func (c SetExperimentTag) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["key"] = attrs["key"].SetRequired() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -12646,19 +13122,6 @@ type SetLoggedModelTagsRequest struct { Tags types.List `tfsdk:"tags"` } -func (newState *SetLoggedModelTagsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetLoggedModelTagsRequest) { -} - -func (newState *SetLoggedModelTagsRequest) SyncEffectiveFieldsDuringRead(existingState SetLoggedModelTagsRequest) { -} - -func (c SetLoggedModelTagsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_id"] = attrs["model_id"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in SetLoggedModelTagsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12777,20 +13240,6 @@ type SetModelTagRequest struct { Value types.String `tfsdk:"value"` } -func (newState *SetModelTagRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetModelTagRequest) { -} - -func (newState *SetModelTagRequest) SyncEffectiveFieldsDuringRead(existingState SetModelTagRequest) { -} - -func (c SetModelTagRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -12883,21 +13332,6 @@ type SetModelVersionTagRequest struct { Version types.String `tfsdk:"version"` } -func (newState *SetModelVersionTagRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetModelVersionTagRequest) { -} - -func (newState *SetModelVersionTagRequest) SyncEffectiveFieldsDuringRead(existingState SetModelVersionTagRequest) { -} - -func (c SetModelVersionTagRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["value"] = attrs["value"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -12989,21 +13423,6 @@ type SetTag struct { Value types.String `tfsdk:"value"` } -func (newState *SetTag) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetTag) { -} - -func (newState *SetTag) SyncEffectiveFieldsDuringRead(existingState SetTag) { -} - -func (c SetTag) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_uuid"] = attrs["run_uuid"].SetOptional() - attrs["value"] = attrs["value"].SetRequired() - - return attrs -} - // 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 @@ -13082,60 +13501,7 @@ 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"` - // Status code returned by the webhook URL - StatusCode types.Int64 `tfsdk:"status_code"` -} - -func (newState *TestRegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhook) { -} - -func (newState *TestRegistryWebhook) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhook) { -} - -func (c TestRegistryWebhook) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["body"] = attrs["body"].SetOptional() - attrs["status_code"] = attrs["status_code"].SetOptional() - - return attrs -} - -// 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 -// 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 TestRegistryWebhook) 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, TestRegistryWebhook -// only implements ToObjectValue() and Type(). -func (o TestRegistryWebhook) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{ - "body": o.Body, - "status_code": o.StatusCode, - }) -} - -// Type implements basetypes.ObjectValuable. -func (o TestRegistryWebhook) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "body": types.StringType, - "status_code": types.Int64Type, - }, - } -} - +// Details required to test a registry webhook. 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 @@ -13145,19 +13511,6 @@ type TestRegistryWebhookRequest struct { Id types.String `tfsdk:"id"` } -func (newState *TestRegistryWebhookRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhookRequest) { -} - -func (newState *TestRegistryWebhookRequest) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhookRequest) { -} - -func (c TestRegistryWebhookRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["event"] = attrs["event"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // 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 @@ -13192,8 +13545,10 @@ func (o TestRegistryWebhookRequest) Type(ctx context.Context) attr.Type { } type TestRegistryWebhookResponse struct { - // Test webhook response object. - Webhook types.Object `tfsdk:"webhook"` + // Body of the response from the webhook URL + Body types.String `tfsdk:"body"` + // Status code returned by the webhook URL + StatusCode types.Int64 `tfsdk:"status_code"` } func (newState *TestRegistryWebhookResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhookResponse) { @@ -13203,7 +13558,8 @@ func (newState *TestRegistryWebhookResponse) SyncEffectiveFieldsDuringRead(exist } func (c TestRegistryWebhookResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["webhook"] = attrs["webhook"].SetOptional() + attrs["body"] = attrs["body"].SetOptional() + attrs["status_code"] = attrs["status_code"].SetOptional() return attrs } @@ -13216,9 +13572,7 @@ func (c TestRegistryWebhookResponse) ApplySchemaCustomizations(attrs map[string] // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a TestRegistryWebhookResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "webhook": reflect.TypeOf(TestRegistryWebhook{}), - } + return map[string]reflect.Type{} } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -13228,7 +13582,8 @@ func (o TestRegistryWebhookResponse) ToObjectValue(ctx context.Context) basetype return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "webhook": o.Webhook, + "body": o.Body, + "status_code": o.StatusCode, }) } @@ -13236,39 +13591,13 @@ func (o TestRegistryWebhookResponse) ToObjectValue(ctx context.Context) basetype func (o TestRegistryWebhookResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "webhook": TestRegistryWebhook{}.Type(ctx), + "body": types.StringType, + "status_code": types.Int64Type, }, } } -// GetWebhook returns the value of the Webhook field in TestRegistryWebhookResponse as -// a TestRegistryWebhook value. -// If the field is unknown or null, the boolean return value is false. -func (o *TestRegistryWebhookResponse) GetWebhook(ctx context.Context) (TestRegistryWebhook, bool) { - var e TestRegistryWebhook - if o.Webhook.IsNull() || o.Webhook.IsUnknown() { - return e, false - } - var v []TestRegistryWebhook - d := o.Webhook.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 -} - -// SetWebhook sets the value of the Webhook field in TestRegistryWebhookResponse. -func (o *TestRegistryWebhookResponse) SetWebhook(ctx context.Context, v TestRegistryWebhook) { - vs := v.ToObjectValue(ctx) - o.Webhook = vs -} - +// Details required to transition a model version's stage. type TransitionModelVersionStageDatabricks struct { // Specifies whether to archive all current model versions in the target // stage. @@ -13291,22 +13620,6 @@ type TransitionModelVersionStageDatabricks struct { Version types.String `tfsdk:"version"` } -func (newState *TransitionModelVersionStageDatabricks) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionModelVersionStageDatabricks) { -} - -func (newState *TransitionModelVersionStageDatabricks) SyncEffectiveFieldsDuringRead(existingState TransitionModelVersionStageDatabricks) { -} - -func (c TransitionModelVersionStageDatabricks) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["archive_existing_versions"] = attrs["archive_existing_versions"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["stage"] = attrs["stage"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -13346,11 +13659,14 @@ func (o TransitionModelVersionStageDatabricks) Type(ctx context.Context) attr.Ty } } -// Transition request details. +// For activities, this contains the activity recorded for the action. For +// comments, this contains the comment details. For transition requests, this +// contains the transition request details. type TransitionRequest struct { // Array of actions on the activity allowed for the current viewer. AvailableActions types.List `tfsdk:"available_actions"` - // User-provided comment associated with the transition request. + // User-provided comment associated with the activity, comment, or + // transition request. Comment types.String `tfsdk:"comment"` // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp types.Int64 `tfsdk:"creation_timestamp"` @@ -13455,7 +13771,8 @@ func (o *TransitionRequest) SetAvailableActions(ctx context.Context, v []types.S } type TransitionStageResponse struct { - ModelVersion types.Object `tfsdk:"model_version"` + // Updated model version + ModelVersionDatabricks types.Object `tfsdk:"model_version_databricks"` } func (newState *TransitionStageResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionStageResponse) { @@ -13465,7 +13782,7 @@ func (newState *TransitionStageResponse) SyncEffectiveFieldsDuringRead(existingS } func (c TransitionStageResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["model_version"] = attrs["model_version"].SetOptional() + attrs["model_version_databricks"] = attrs["model_version_databricks"].SetOptional() return attrs } @@ -13479,7 +13796,7 @@ func (c TransitionStageResponse) ApplySchemaCustomizations(attrs map[string]tfsc // SDK values. func (a TransitionStageResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "model_version": reflect.TypeOf(ModelVersionDatabricks{}), + "model_version_databricks": reflect.TypeOf(ModelVersionDatabricks{}), } } @@ -13490,7 +13807,7 @@ func (o TransitionStageResponse) ToObjectValue(ctx context.Context) basetypes.Ob return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "model_version": o.ModelVersion, + "model_version_databricks": o.ModelVersionDatabricks, }) } @@ -13498,21 +13815,21 @@ func (o TransitionStageResponse) ToObjectValue(ctx context.Context) basetypes.Ob func (o TransitionStageResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "model_version": ModelVersionDatabricks{}.Type(ctx), + "model_version_databricks": ModelVersionDatabricks{}.Type(ctx), }, } } -// GetModelVersion returns the value of the ModelVersion field in TransitionStageResponse as +// GetModelVersionDatabricks returns the value of the ModelVersionDatabricks field in TransitionStageResponse as // a ModelVersionDatabricks value. // If the field is unknown or null, the boolean return value is false. -func (o *TransitionStageResponse) GetModelVersion(ctx context.Context) (ModelVersionDatabricks, bool) { +func (o *TransitionStageResponse) GetModelVersionDatabricks(ctx context.Context) (ModelVersionDatabricks, bool) { var e ModelVersionDatabricks - if o.ModelVersion.IsNull() || o.ModelVersion.IsUnknown() { + if o.ModelVersionDatabricks.IsNull() || o.ModelVersionDatabricks.IsUnknown() { return e, false } var v []ModelVersionDatabricks - d := o.ModelVersion.As(ctx, &v, basetypes.ObjectAsOptions{ + d := o.ModelVersionDatabricks.As(ctx, &v, basetypes.ObjectAsOptions{ UnhandledNullAsEmpty: true, UnhandledUnknownAsEmpty: true, }) @@ -13525,30 +13842,18 @@ func (o *TransitionStageResponse) GetModelVersion(ctx context.Context) (ModelVer return v[0], true } -// SetModelVersion sets the value of the ModelVersion field in TransitionStageResponse. -func (o *TransitionStageResponse) SetModelVersion(ctx context.Context, v ModelVersionDatabricks) { +// SetModelVersionDatabricks sets the value of the ModelVersionDatabricks field in TransitionStageResponse. +func (o *TransitionStageResponse) SetModelVersionDatabricks(ctx context.Context, v ModelVersionDatabricks) { vs := v.ToObjectValue(ctx) - o.ModelVersion = vs -} - -type UpdateComment struct { - // User-provided comment on the action. - Comment types.String `tfsdk:"comment"` - // Unique identifier of an activity - Id types.String `tfsdk:"id"` -} - -func (newState *UpdateComment) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateComment) { + o.ModelVersionDatabricks = vs } -func (newState *UpdateComment) SyncEffectiveFieldsDuringRead(existingState UpdateComment) { -} - -func (c UpdateComment) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetRequired() - attrs["id"] = attrs["id"].SetRequired() - - return attrs +// Details required to edit a comment on a model version. +type UpdateComment struct { + // User-provided comment on the action. + Comment types.String `tfsdk:"comment"` + // Unique identifier of an activity + Id types.String `tfsdk:"id"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateComment. @@ -13585,7 +13890,7 @@ func (o UpdateComment) Type(ctx context.Context) attr.Type { } type UpdateCommentResponse struct { - // Comment details. + // Updated comment object Comment types.Object `tfsdk:"comment"` } @@ -13670,19 +13975,6 @@ type UpdateExperiment struct { NewName types.String `tfsdk:"new_name"` } -func (newState *UpdateExperiment) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExperiment) { -} - -func (newState *UpdateExperiment) SyncEffectiveFieldsDuringRead(existingState UpdateExperiment) { -} - -func (c UpdateExperiment) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["experiment_id"] = attrs["experiment_id"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - - return attrs -} - // 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 @@ -13757,24 +14049,92 @@ 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"` - // Registered model unique name identifier. - Name types.String `tfsdk:"name"` +type UpdateFeatureTagRequest struct { + FeatureName types.String `tfsdk:"-"` + + FeatureTag types.Object `tfsdk:"feature_tag"` + + Key types.String `tfsdk:"-"` + + TableName types.String `tfsdk:"-"` + // The list of fields to update. + UpdateMask types.String `tfsdk:"-"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateFeatureTagRequest. +// Container types (types.Map, types.List, types.Set) and 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 UpdateFeatureTagRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "feature_tag": reflect.TypeOf(FeatureTag{}), + } } -func (newState *UpdateModelRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelRequest) { +// 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, UpdateFeatureTagRequest +// only implements ToObjectValue() and Type(). +func (o UpdateFeatureTagRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "feature_name": o.FeatureName, + "feature_tag": o.FeatureTag, + "key": o.Key, + "table_name": o.TableName, + "update_mask": o.UpdateMask, + }) } -func (newState *UpdateModelRequest) SyncEffectiveFieldsDuringRead(existingState UpdateModelRequest) { +// Type implements basetypes.ObjectValuable. +func (o UpdateFeatureTagRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "feature_name": types.StringType, + "feature_tag": FeatureTag{}.Type(ctx), + "key": types.StringType, + "table_name": types.StringType, + "update_mask": types.StringType, + }, + } } -func (c UpdateModelRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() +// GetFeatureTag returns the value of the FeatureTag field in UpdateFeatureTagRequest as +// a FeatureTag value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateFeatureTagRequest) GetFeatureTag(ctx context.Context) (FeatureTag, bool) { + var e FeatureTag + if o.FeatureTag.IsNull() || o.FeatureTag.IsUnknown() { + return e, false + } + var v []FeatureTag + d := o.FeatureTag.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 +} - return attrs +// SetFeatureTag sets the value of the FeatureTag field in UpdateFeatureTagRequest. +func (o *UpdateFeatureTagRequest) SetFeatureTag(ctx context.Context, v FeatureTag) { + vs := v.ToObjectValue(ctx) + o.FeatureTag = vs +} + +type UpdateModelRequest struct { + // If provided, updates the description for this `registered_model`. + Description types.String `tfsdk:"description"` + // Registered model unique name identifier. + Name types.String `tfsdk:"name"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelRequest. @@ -13811,6 +14171,19 @@ func (o UpdateModelRequest) Type(ctx context.Context) attr.Type { } type UpdateModelResponse struct { + RegisteredModel types.Object `tfsdk:"registered_model"` +} + +func (newState *UpdateModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelResponse) { +} + +func (newState *UpdateModelResponse) SyncEffectiveFieldsDuringRead(existingState UpdateModelResponse) { +} + +func (c UpdateModelResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["registered_model"] = attrs["registered_model"].SetOptional() + + return attrs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelResponse. @@ -13821,7 +14194,9 @@ type UpdateModelResponse struct { // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a UpdateModelResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "registered_model": reflect.TypeOf(Model{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -13830,14 +14205,46 @@ func (a UpdateModelResponse) GetComplexFieldTypes(ctx context.Context) map[strin func (o UpdateModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "registered_model": o.RegisteredModel, + }) } // Type implements basetypes.ObjectValuable. func (o UpdateModelResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "registered_model": Model{}.Type(ctx), + }, + } +} + +// GetRegisteredModel returns the value of the RegisteredModel field in UpdateModelResponse as +// a Model value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateModelResponse) GetRegisteredModel(ctx context.Context) (Model, bool) { + var e Model + if o.RegisteredModel.IsNull() || o.RegisteredModel.IsUnknown() { + return e, false + } + var v []Model + d := o.RegisteredModel.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 +} + +// SetRegisteredModel sets the value of the RegisteredModel field in UpdateModelResponse. +func (o *UpdateModelResponse) SetRegisteredModel(ctx context.Context, v Model) { + vs := v.ToObjectValue(ctx) + o.RegisteredModel = vs } type UpdateModelVersionRequest struct { @@ -13849,20 +14256,6 @@ type UpdateModelVersionRequest struct { Version types.String `tfsdk:"version"` } -func (newState *UpdateModelVersionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionRequest) { -} - -func (newState *UpdateModelVersionRequest) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest) { -} - -func (c UpdateModelVersionRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["version"] = attrs["version"].SetRequired() - - return attrs -} - // 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 @@ -13899,6 +14292,20 @@ func (o UpdateModelVersionRequest) Type(ctx context.Context) attr.Type { } type UpdateModelVersionResponse struct { + // Return new version number generated for this model in registry. + ModelVersion types.Object `tfsdk:"model_version"` +} + +func (newState *UpdateModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionResponse) { +} + +func (newState *UpdateModelVersionResponse) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionResponse) { +} + +func (c UpdateModelVersionResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["model_version"] = attrs["model_version"].SetOptional() + + return attrs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelVersionResponse. @@ -13909,7 +14316,9 @@ type UpdateModelVersionResponse struct { // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a UpdateModelVersionResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "model_version": reflect.TypeOf(ModelVersion{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -13918,22 +14327,53 @@ func (a UpdateModelVersionResponse) GetComplexFieldTypes(ctx context.Context) ma func (o UpdateModelVersionResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "model_version": o.ModelVersion, + }) } // Type implements basetypes.ObjectValuable. func (o UpdateModelVersionResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "model_version": ModelVersion{}.Type(ctx), + }, + } +} + +// GetModelVersion returns the value of the ModelVersion field in UpdateModelVersionResponse as +// a ModelVersion value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateModelVersionResponse) GetModelVersion(ctx context.Context) (ModelVersion, bool) { + var e ModelVersion + if o.ModelVersion.IsNull() || o.ModelVersion.IsUnknown() { + return e, false + } + var v []ModelVersion + d := o.ModelVersion.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 +} + +// SetModelVersion sets the value of the ModelVersion field in UpdateModelVersionResponse. +func (o *UpdateModelVersionResponse) SetModelVersion(ctx context.Context, v ModelVersion) { + vs := v.ToObjectValue(ctx) + o.ModelVersion = vs } type UpdateOnlineStoreRequest struct { // The name of the online store. This is the unique identifier for the // online store. Name types.String `tfsdk:"-"` - // An OnlineStore is a logical database instance that stores and serves - // features online. + // Online store to update. OnlineStore types.Object `tfsdk:"online_store"` // The list of fields to update. UpdateMask types.String `tfsdk:"-"` @@ -14004,6 +14444,9 @@ func (o *UpdateOnlineStoreRequest) SetOnlineStore(ctx context.Context, v OnlineS o.OnlineStore = vs } +// Details required to update a registry webhook. Only the fields that need to +// be updated should be specified, and both `http_url_spec` and `job_spec` +// should not be specified in the same request. type UpdateRegistryWebhook struct { // User-specified description for the webhook. Description types.String `tfsdk:"description"` @@ -14047,32 +14490,8 @@ type UpdateRegistryWebhook struct { Id types.String `tfsdk:"id"` JobSpec types.Object `tfsdk:"job_spec"` - // 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. - // - // * `DISABLED`: Webhook is not triggered. - // - // * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is - // not triggered on a real event. - Status types.String `tfsdk:"status"` -} - -func (newState *UpdateRegistryWebhook) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegistryWebhook) { -} - -func (newState *UpdateRegistryWebhook) SyncEffectiveFieldsDuringRead(existingState UpdateRegistryWebhook) { -} - -func (c UpdateRegistryWebhook) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["events"] = attrs["events"].SetOptional() - attrs["http_url_spec"] = attrs["http_url_spec"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - attrs["job_spec"] = attrs["job_spec"].SetOptional() - attrs["status"] = attrs["status"].SetOptional() - return attrs + Status types.String `tfsdk:"status"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRegistryWebhook. @@ -14218,22 +14637,6 @@ type UpdateRun struct { Status types.String `tfsdk:"status"` } -func (newState *UpdateRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRun) { -} - -func (newState *UpdateRun) SyncEffectiveFieldsDuringRead(existingState UpdateRun) { -} - -func (c UpdateRun) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["end_time"] = attrs["end_time"].SetOptional() - attrs["run_id"] = attrs["run_id"].SetOptional() - attrs["run_name"] = attrs["run_name"].SetOptional() - attrs["run_uuid"] = attrs["run_uuid"].SetOptional() - attrs["status"] = attrs["status"].SetOptional() - - return attrs -} - // 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 @@ -14352,6 +14755,19 @@ func (o *UpdateRunResponse) SetRunInfo(ctx context.Context, v RunInfo) { } type UpdateWebhookResponse struct { + Webhook types.Object `tfsdk:"webhook"` +} + +func (newState *UpdateWebhookResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWebhookResponse) { +} + +func (newState *UpdateWebhookResponse) SyncEffectiveFieldsDuringRead(existingState UpdateWebhookResponse) { +} + +func (c UpdateWebhookResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + attrs["webhook"] = attrs["webhook"].SetOptional() + + return attrs } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWebhookResponse. @@ -14362,7 +14778,9 @@ type UpdateWebhookResponse struct { // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a UpdateWebhookResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "webhook": reflect.TypeOf(RegistryWebhook{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -14371,12 +14789,44 @@ func (a UpdateWebhookResponse) GetComplexFieldTypes(ctx context.Context) map[str func (o UpdateWebhookResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) + map[string]attr.Value{ + "webhook": o.Webhook, + }) } // Type implements basetypes.ObjectValuable. func (o UpdateWebhookResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, + AttrTypes: map[string]attr.Type{ + "webhook": RegistryWebhook{}.Type(ctx), + }, + } +} + +// GetWebhook returns the value of the Webhook field in UpdateWebhookResponse as +// a RegistryWebhook value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateWebhookResponse) GetWebhook(ctx context.Context) (RegistryWebhook, bool) { + var e RegistryWebhook + if o.Webhook.IsNull() || o.Webhook.IsUnknown() { + return e, false } + var v []RegistryWebhook + d := o.Webhook.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 +} + +// SetWebhook sets the value of the Webhook field in UpdateWebhookResponse. +func (o *UpdateWebhookResponse) SetWebhook(ctx context.Context, v RegistryWebhook) { + vs := v.ToObjectValue(ctx) + o.Webhook = vs } diff --git a/internal/service/oauth2_tf/legacy_model.go b/internal/service/oauth2_tf/legacy_model.go index 2e4b0e7a23..ee09151eeb 100755 --- a/internal/service/oauth2_tf/legacy_model.go +++ b/internal/service/oauth2_tf/legacy_model.go @@ -115,24 +115,6 @@ type CreateCustomAppIntegration_SdkV2 struct { UserAuthorizedScopes types.List `tfsdk:"user_authorized_scopes"` } -func (newState *CreateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomAppIntegration_SdkV2) { -} - -func (newState *CreateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCustomAppIntegration_SdkV2) { -} - -func (c CreateCustomAppIntegration_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["confidential"] = attrs["confidential"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["redirect_urls"] = attrs["redirect_urls"].SetOptional() - attrs["scopes"] = attrs["scopes"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["user_authorized_scopes"] = attrs["user_authorized_scopes"].SetOptional() - - return attrs -} - // 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 @@ -358,20 +340,6 @@ type CreatePublishedAppIntegration_SdkV2 struct { TokenAccessPolicy types.List `tfsdk:"token_access_policy"` } -func (newState *CreatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePublishedAppIntegration_SdkV2) { -} - -func (newState *CreatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePublishedAppIntegration_SdkV2) { -} - -func (c CreatePublishedAppIntegration_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["app_id"] = attrs["app_id"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -566,19 +534,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) { -} - -func (c CreateServicePrincipalSecretRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["lifetime"] = attrs["lifetime"].SetOptional() - attrs["service_principal_id"] = attrs["service_principal_id"].SetRequired() - - return attrs -} - // 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 @@ -1002,8 +957,7 @@ type FederationPolicy_SdkV2 struct { // 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"` - // Specifies the policy to use for validating OIDC claims in your federated - // tokens. + OidcPolicy types.List `tfsdk:"oidc_policy"` // The ID of the federation policy. PolicyId types.String `tfsdk:"policy_id"` @@ -2737,23 +2691,6 @@ type UpdateCustomAppIntegration_SdkV2 struct { UserAuthorizedScopes types.List `tfsdk:"user_authorized_scopes"` } -func (newState *UpdateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCustomAppIntegration_SdkV2) { -} - -func (newState *UpdateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCustomAppIntegration_SdkV2) { -} - -func (c UpdateCustomAppIntegration_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["integration_id"] = attrs["integration_id"].SetRequired() - attrs["redirect_urls"] = attrs["redirect_urls"].SetOptional() - attrs["scopes"] = attrs["scopes"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["user_authorized_scopes"] = attrs["user_authorized_scopes"].SetOptional() - - return attrs -} - // 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 @@ -2957,20 +2894,6 @@ type UpdatePublishedAppIntegration_SdkV2 struct { TokenAccessPolicy types.List `tfsdk:"token_access_policy"` } -func (newState *UpdatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePublishedAppIntegration_SdkV2) { -} - -func (newState *UpdatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePublishedAppIntegration_SdkV2) { -} - -func (c UpdatePublishedAppIntegration_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["integration_id"] = attrs["integration_id"].SetRequired() - attrs["token_access_policy"] = attrs["token_access_policy"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 diff --git a/internal/service/oauth2_tf/model.go b/internal/service/oauth2_tf/model.go index 8300fd53b9..a911939ab2 100755 --- a/internal/service/oauth2_tf/model.go +++ b/internal/service/oauth2_tf/model.go @@ -114,23 +114,6 @@ type CreateCustomAppIntegration struct { UserAuthorizedScopes types.List `tfsdk:"user_authorized_scopes"` } -func (newState *CreateCustomAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomAppIntegration) { -} - -func (newState *CreateCustomAppIntegration) SyncEffectiveFieldsDuringRead(existingState CreateCustomAppIntegration) { -} - -func (c CreateCustomAppIntegration) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["confidential"] = attrs["confidential"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["redirect_urls"] = attrs["redirect_urls"].SetOptional() - attrs["scopes"] = attrs["scopes"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].SetOptional() - attrs["user_authorized_scopes"] = attrs["user_authorized_scopes"].SetOptional() - - return attrs -} - // 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 @@ -356,19 +339,6 @@ type CreatePublishedAppIntegration struct { TokenAccessPolicy types.Object `tfsdk:"token_access_policy"` } -func (newState *CreatePublishedAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePublishedAppIntegration) { -} - -func (newState *CreatePublishedAppIntegration) SyncEffectiveFieldsDuringRead(existingState CreatePublishedAppIntegration) { -} - -func (c CreatePublishedAppIntegration) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["app_id"] = attrs["app_id"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].SetOptional() - - return attrs -} - // 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 @@ -563,19 +533,6 @@ type CreateServicePrincipalSecretRequest struct { ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *CreateServicePrincipalSecretRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalSecretRequest) { -} - -func (newState *CreateServicePrincipalSecretRequest) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalSecretRequest) { -} - -func (c CreateServicePrincipalSecretRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["lifetime"] = attrs["lifetime"].SetOptional() - attrs["service_principal_id"] = attrs["service_principal_id"].SetRequired() - - return attrs -} - // 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 @@ -999,8 +956,7 @@ type FederationPolicy struct { // 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"` - // Specifies the policy to use for validating OIDC claims in your federated - // tokens. + OidcPolicy types.Object `tfsdk:"oidc_policy"` // The ID of the federation policy. PolicyId types.String `tfsdk:"policy_id"` @@ -2731,22 +2687,6 @@ type UpdateCustomAppIntegration struct { UserAuthorizedScopes types.List `tfsdk:"user_authorized_scopes"` } -func (newState *UpdateCustomAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCustomAppIntegration) { -} - -func (newState *UpdateCustomAppIntegration) SyncEffectiveFieldsDuringRead(existingState UpdateCustomAppIntegration) { -} - -func (c UpdateCustomAppIntegration) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["integration_id"] = attrs["integration_id"].SetRequired() - attrs["redirect_urls"] = attrs["redirect_urls"].SetOptional() - attrs["scopes"] = attrs["scopes"].SetOptional() - attrs["token_access_policy"] = attrs["token_access_policy"].SetOptional() - attrs["user_authorized_scopes"] = attrs["user_authorized_scopes"].SetOptional() - - return attrs -} - // 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 @@ -2950,19 +2890,6 @@ type UpdatePublishedAppIntegration struct { TokenAccessPolicy types.Object `tfsdk:"token_access_policy"` } -func (newState *UpdatePublishedAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePublishedAppIntegration) { -} - -func (newState *UpdatePublishedAppIntegration) SyncEffectiveFieldsDuringRead(existingState UpdatePublishedAppIntegration) { -} - -func (c UpdatePublishedAppIntegration) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["integration_id"] = attrs["integration_id"].SetRequired() - attrs["token_access_policy"] = attrs["token_access_policy"].SetOptional() - - return attrs -} - // 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 diff --git a/internal/service/pipelines_tf/legacy_model.go b/internal/service/pipelines_tf/legacy_model.go index 94a33b9238..76c881cbc8 100755 --- a/internal/service/pipelines_tf/legacy_model.go +++ b/internal/service/pipelines_tf/legacy_model.go @@ -79,12 +79,7 @@ type CreatePipeline_SdkV2 struct { // editing the pipeline in the Databricks user interface and it is added to // sys.path when executing Python sources during pipeline execution. RootPath types.String `tfsdk:"root_path"` - // 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"` // The default schema (database) where tables are read from or published to. Schema types.String `tfsdk:"schema"` @@ -105,56 +100,6 @@ type CreatePipeline_SdkV2 struct { Trigger types.List `tfsdk:"trigger"` } -func (newState *CreatePipeline_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePipeline_SdkV2) { -} - -func (newState *CreatePipeline_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePipeline_SdkV2) { -} - -func (c CreatePipeline_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_duplicate_names"] = attrs["allow_duplicate_names"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["catalog"] = attrs["catalog"].SetOptional() - attrs["channel"] = attrs["channel"].SetOptional() - attrs["clusters"] = attrs["clusters"].SetOptional() - attrs["configuration"] = attrs["configuration"].SetOptional() - attrs["continuous"] = attrs["continuous"].SetOptional() - attrs["deployment"] = attrs["deployment"].SetOptional() - attrs["deployment"] = attrs["deployment"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["development"] = attrs["development"].SetOptional() - attrs["dry_run"] = attrs["dry_run"].SetOptional() - attrs["edition"] = attrs["edition"].SetOptional() - attrs["environment"] = attrs["environment"].SetOptional() - attrs["environment"] = attrs["environment"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["event_log"] = attrs["event_log"].SetOptional() - attrs["event_log"] = attrs["event_log"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["filters"] = attrs["filters"].SetOptional() - attrs["filters"] = attrs["filters"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["gateway_definition"] = attrs["gateway_definition"].SetOptional() - attrs["gateway_definition"] = attrs["gateway_definition"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["id"] = attrs["id"].SetOptional() - attrs["ingestion_definition"] = attrs["ingestion_definition"].SetOptional() - attrs["ingestion_definition"] = attrs["ingestion_definition"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["libraries"] = attrs["libraries"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["notifications"] = attrs["notifications"].SetOptional() - attrs["photon"] = attrs["photon"].SetOptional() - attrs["restart_window"] = attrs["restart_window"].SetOptional() - attrs["restart_window"] = attrs["restart_window"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["root_path"] = attrs["root_path"].SetOptional() - attrs["run_as"] = attrs["run_as"].SetOptional() - attrs["run_as"] = attrs["run_as"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["schema"] = attrs["schema"].SetOptional() - attrs["serverless"] = attrs["serverless"].SetOptional() - attrs["storage"] = attrs["storage"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["target"] = attrs["target"].SetOptional() - attrs["trigger"] = attrs["trigger"].SetOptional() - attrs["trigger"] = attrs["trigger"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -976,12 +921,7 @@ type EditPipeline_SdkV2 struct { // editing the pipeline in the Databricks user interface and it is added to // sys.path when executing Python sources during pipeline execution. RootPath types.String `tfsdk:"root_path"` - // 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"` // The default schema (database) where tables are read from or published to. Schema types.String `tfsdk:"schema"` @@ -1002,57 +942,6 @@ type EditPipeline_SdkV2 struct { Trigger types.List `tfsdk:"trigger"` } -func (newState *EditPipeline_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPipeline_SdkV2) { -} - -func (newState *EditPipeline_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPipeline_SdkV2) { -} - -func (c EditPipeline_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_duplicate_names"] = attrs["allow_duplicate_names"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["catalog"] = attrs["catalog"].SetOptional() - attrs["channel"] = attrs["channel"].SetOptional() - attrs["clusters"] = attrs["clusters"].SetOptional() - attrs["configuration"] = attrs["configuration"].SetOptional() - attrs["continuous"] = attrs["continuous"].SetOptional() - attrs["deployment"] = attrs["deployment"].SetOptional() - attrs["deployment"] = attrs["deployment"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["development"] = attrs["development"].SetOptional() - attrs["edition"] = attrs["edition"].SetOptional() - attrs["environment"] = attrs["environment"].SetOptional() - attrs["environment"] = attrs["environment"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["event_log"] = attrs["event_log"].SetOptional() - attrs["event_log"] = attrs["event_log"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["expected_last_modified"] = attrs["expected_last_modified"].SetOptional() - attrs["filters"] = attrs["filters"].SetOptional() - attrs["filters"] = attrs["filters"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["gateway_definition"] = attrs["gateway_definition"].SetOptional() - attrs["gateway_definition"] = attrs["gateway_definition"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["id"] = attrs["id"].SetOptional() - attrs["ingestion_definition"] = attrs["ingestion_definition"].SetOptional() - attrs["ingestion_definition"] = attrs["ingestion_definition"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["libraries"] = attrs["libraries"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["notifications"] = attrs["notifications"].SetOptional() - attrs["photon"] = attrs["photon"].SetOptional() - attrs["pipeline_id"] = attrs["pipeline_id"].SetRequired() - attrs["restart_window"] = attrs["restart_window"].SetOptional() - attrs["restart_window"] = attrs["restart_window"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["root_path"] = attrs["root_path"].SetOptional() - attrs["run_as"] = attrs["run_as"].SetOptional() - attrs["run_as"] = attrs["run_as"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["schema"] = attrs["schema"].SetOptional() - attrs["serverless"] = attrs["serverless"].SetOptional() - attrs["storage"] = attrs["storage"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["target"] = attrs["target"].SetOptional() - attrs["trigger"] = attrs["trigger"].SetOptional() - attrs["trigger"] = attrs["trigger"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -2099,6 +1988,11 @@ type GetPipelineResponse_SdkV2 struct { Name types.String `tfsdk:"name"` // The ID of the pipeline. PipelineId types.String `tfsdk:"pipeline_id"` + // The user or service principal that the pipeline runs as, if specified in + // the request. This field indicates the explicit configuration of `run_as` + // for the pipeline. To find the value in all cases, explicit or implicit, + // use `run_as_user_name`. + RunAs types.List `tfsdk:"run_as"` // Username of the user that the pipeline will run on behalf of. RunAsUserName types.String `tfsdk:"run_as_user_name"` // The pipeline specification. This field is not returned when called by @@ -2124,6 +2018,8 @@ func (c GetPipelineResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tf attrs["latest_updates"] = attrs["latest_updates"].SetOptional() attrs["name"] = attrs["name"].SetOptional() attrs["pipeline_id"] = attrs["pipeline_id"].SetOptional() + attrs["run_as"] = attrs["run_as"].SetOptional() + attrs["run_as"] = attrs["run_as"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["run_as_user_name"] = attrs["run_as_user_name"].SetOptional() attrs["spec"] = attrs["spec"].SetOptional() attrs["spec"] = attrs["spec"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) @@ -2142,6 +2038,7 @@ func (c GetPipelineResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tf func (a GetPipelineResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ "latest_updates": reflect.TypeOf(UpdateStateInfo_SdkV2{}), + "run_as": reflect.TypeOf(RunAs_SdkV2{}), "spec": reflect.TypeOf(PipelineSpec_SdkV2{}), } } @@ -2162,6 +2059,7 @@ func (o GetPipelineResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes. "latest_updates": o.LatestUpdates, "name": o.Name, "pipeline_id": o.PipelineId, + "run_as": o.RunAs, "run_as_user_name": o.RunAsUserName, "spec": o.Spec, "state": o.State, @@ -2181,8 +2079,11 @@ func (o GetPipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { "latest_updates": basetypes.ListType{ ElemType: UpdateStateInfo_SdkV2{}.Type(ctx), }, - "name": types.StringType, - "pipeline_id": types.StringType, + "name": types.StringType, + "pipeline_id": types.StringType, + "run_as": basetypes.ListType{ + ElemType: RunAs_SdkV2{}.Type(ctx), + }, "run_as_user_name": types.StringType, "spec": basetypes.ListType{ ElemType: PipelineSpec_SdkV2{}.Type(ctx), @@ -2218,6 +2119,32 @@ func (o *GetPipelineResponse_SdkV2) SetLatestUpdates(ctx context.Context, v []Up o.LatestUpdates = types.ListValueMust(t, vs) } +// GetRunAs returns the value of the RunAs field in GetPipelineResponse_SdkV2 as +// a RunAs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPipelineResponse_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 GetPipelineResponse_SdkV2. +func (o *GetPipelineResponse_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) +} + // GetSpec returns the value of the Spec field in GetPipelineResponse_SdkV2 as // a PipelineSpec_SdkV2 value. // If the field is unknown or null, the boolean return value is false. @@ -3606,7 +3533,7 @@ func (o PathPattern_SdkV2) Type(ctx context.Context) attr.Type { type PipelineAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -4753,7 +4680,7 @@ type PipelinePermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4925,7 +4852,7 @@ func (o *PipelinePermissions_SdkV2) SetAccessControlList(ctx context.Context, v type PipelinePermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4981,19 +4908,6 @@ type PipelinePermissionsRequest_SdkV2 struct { PipelineId types.String `tfsdk:"-"` } -func (newState *PipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermissionsRequest_SdkV2) { -} - -func (newState *PipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelinePermissionsRequest_SdkV2) { -} - -func (c PipelinePermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["pipeline_id"] = attrs["pipeline_id"].SetRequired() - - return attrs -} - // 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 @@ -5650,7 +5564,7 @@ type PipelineStateInfo_SdkV2 struct { // 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"` - // The pipeline state. + State types.String `tfsdk:"state"` } @@ -6544,7 +6458,6 @@ func (o StackFrame_SdkV2) Type(ctx context.Context) attr.Type { } type StartUpdate_SdkV2 struct { - // What triggered this update. Cause types.String `tfsdk:"cause"` // If true, this update will reset all tables before running. FullRefresh types.Bool `tfsdk:"full_refresh"` @@ -6565,23 +6478,6 @@ type StartUpdate_SdkV2 struct { ValidateOnly types.Bool `tfsdk:"validate_only"` } -func (newState *StartUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartUpdate_SdkV2) { -} - -func (newState *StartUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartUpdate_SdkV2) { -} - -func (c StartUpdate_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cause"] = attrs["cause"].SetOptional() - attrs["full_refresh"] = attrs["full_refresh"].SetOptional() - attrs["full_refresh_selection"] = attrs["full_refresh_selection"].SetOptional() - attrs["pipeline_id"] = attrs["pipeline_id"].SetRequired() - attrs["refresh_selection"] = attrs["refresh_selection"].SetOptional() - attrs["validate_only"] = attrs["validate_only"].SetOptional() - - return attrs -} - // 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 @@ -7316,7 +7212,7 @@ func (o *UpdateInfo_SdkV2) SetRefreshSelection(ctx context.Context, v []types.St type UpdateStateInfo_SdkV2 struct { CreationTime types.String `tfsdk:"creation_time"` - // The update state. + State types.String `tfsdk:"state"` UpdateId types.String `tfsdk:"update_id"` diff --git a/internal/service/pipelines_tf/model.go b/internal/service/pipelines_tf/model.go index a719c326c1..8c007d4b2f 100755 --- a/internal/service/pipelines_tf/model.go +++ b/internal/service/pipelines_tf/model.go @@ -78,12 +78,7 @@ type CreatePipeline struct { // editing the pipeline in the Databricks user interface and it is added to // sys.path when executing Python sources during pipeline execution. RootPath types.String `tfsdk:"root_path"` - // 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"` // The default schema (database) where tables are read from or published to. Schema types.String `tfsdk:"schema"` @@ -104,47 +99,6 @@ type CreatePipeline struct { Trigger types.Object `tfsdk:"trigger"` } -func (newState *CreatePipeline) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePipeline) { -} - -func (newState *CreatePipeline) SyncEffectiveFieldsDuringRead(existingState CreatePipeline) { -} - -func (c CreatePipeline) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_duplicate_names"] = attrs["allow_duplicate_names"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["catalog"] = attrs["catalog"].SetOptional() - attrs["channel"] = attrs["channel"].SetOptional() - attrs["clusters"] = attrs["clusters"].SetOptional() - attrs["configuration"] = attrs["configuration"].SetOptional() - attrs["continuous"] = attrs["continuous"].SetOptional() - attrs["deployment"] = attrs["deployment"].SetOptional() - attrs["development"] = attrs["development"].SetOptional() - attrs["dry_run"] = attrs["dry_run"].SetOptional() - attrs["edition"] = attrs["edition"].SetOptional() - attrs["environment"] = attrs["environment"].SetOptional() - attrs["event_log"] = attrs["event_log"].SetOptional() - attrs["filters"] = attrs["filters"].SetOptional() - attrs["gateway_definition"] = attrs["gateway_definition"].SetOptional() - attrs["id"] = attrs["id"].SetOptional() - attrs["ingestion_definition"] = attrs["ingestion_definition"].SetOptional() - attrs["libraries"] = attrs["libraries"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["notifications"] = attrs["notifications"].SetOptional() - attrs["photon"] = attrs["photon"].SetOptional() - attrs["restart_window"] = attrs["restart_window"].SetOptional() - attrs["root_path"] = attrs["root_path"].SetOptional() - attrs["run_as"] = attrs["run_as"].SetOptional() - attrs["schema"] = attrs["schema"].SetOptional() - attrs["serverless"] = attrs["serverless"].SetOptional() - attrs["storage"] = attrs["storage"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["target"] = attrs["target"].SetOptional() - attrs["trigger"] = attrs["trigger"].SetOptional() - - return attrs -} - // 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 @@ -965,12 +919,7 @@ type EditPipeline struct { // editing the pipeline in the Databricks user interface and it is added to // sys.path when executing Python sources during pipeline execution. RootPath types.String `tfsdk:"root_path"` - // 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"` // The default schema (database) where tables are read from or published to. Schema types.String `tfsdk:"schema"` @@ -991,48 +940,6 @@ type EditPipeline struct { Trigger types.Object `tfsdk:"trigger"` } -func (newState *EditPipeline) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPipeline) { -} - -func (newState *EditPipeline) SyncEffectiveFieldsDuringRead(existingState EditPipeline) { -} - -func (c EditPipeline) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_duplicate_names"] = attrs["allow_duplicate_names"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["catalog"] = attrs["catalog"].SetOptional() - attrs["channel"] = attrs["channel"].SetOptional() - attrs["clusters"] = attrs["clusters"].SetOptional() - attrs["configuration"] = attrs["configuration"].SetOptional() - attrs["continuous"] = attrs["continuous"].SetOptional() - attrs["deployment"] = attrs["deployment"].SetOptional() - attrs["development"] = attrs["development"].SetOptional() - attrs["edition"] = attrs["edition"].SetOptional() - attrs["environment"] = attrs["environment"].SetOptional() - attrs["event_log"] = attrs["event_log"].SetOptional() - attrs["expected_last_modified"] = attrs["expected_last_modified"].SetOptional() - attrs["filters"] = attrs["filters"].SetOptional() - attrs["gateway_definition"] = attrs["gateway_definition"].SetOptional() - attrs["id"] = attrs["id"].SetOptional() - attrs["ingestion_definition"] = attrs["ingestion_definition"].SetOptional() - attrs["libraries"] = attrs["libraries"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["notifications"] = attrs["notifications"].SetOptional() - attrs["photon"] = attrs["photon"].SetOptional() - attrs["pipeline_id"] = attrs["pipeline_id"].SetRequired() - attrs["restart_window"] = attrs["restart_window"].SetOptional() - attrs["root_path"] = attrs["root_path"].SetOptional() - attrs["run_as"] = attrs["run_as"].SetOptional() - attrs["schema"] = attrs["schema"].SetOptional() - attrs["serverless"] = attrs["serverless"].SetOptional() - attrs["storage"] = attrs["storage"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["target"] = attrs["target"].SetOptional() - attrs["trigger"] = attrs["trigger"].SetOptional() - - return attrs -} - // 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 @@ -2079,6 +1986,11 @@ type GetPipelineResponse struct { Name types.String `tfsdk:"name"` // The ID of the pipeline. PipelineId types.String `tfsdk:"pipeline_id"` + // The user or service principal that the pipeline runs as, if specified in + // the request. This field indicates the explicit configuration of `run_as` + // for the pipeline. To find the value in all cases, explicit or implicit, + // use `run_as_user_name`. + RunAs types.Object `tfsdk:"run_as"` // Username of the user that the pipeline will run on behalf of. RunAsUserName types.String `tfsdk:"run_as_user_name"` // The pipeline specification. This field is not returned when called by @@ -2104,6 +2016,7 @@ func (c GetPipelineResponse) ApplySchemaCustomizations(attrs map[string]tfschema attrs["latest_updates"] = attrs["latest_updates"].SetOptional() attrs["name"] = attrs["name"].SetOptional() attrs["pipeline_id"] = attrs["pipeline_id"].SetOptional() + attrs["run_as"] = attrs["run_as"].SetOptional() attrs["run_as_user_name"] = attrs["run_as_user_name"].SetOptional() attrs["spec"] = attrs["spec"].SetOptional() attrs["state"] = attrs["state"].SetOptional() @@ -2121,6 +2034,7 @@ func (c GetPipelineResponse) ApplySchemaCustomizations(attrs map[string]tfschema func (a GetPipelineResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ "latest_updates": reflect.TypeOf(UpdateStateInfo{}), + "run_as": reflect.TypeOf(RunAs{}), "spec": reflect.TypeOf(PipelineSpec{}), } } @@ -2141,6 +2055,7 @@ func (o GetPipelineResponse) ToObjectValue(ctx context.Context) basetypes.Object "latest_updates": o.LatestUpdates, "name": o.Name, "pipeline_id": o.PipelineId, + "run_as": o.RunAs, "run_as_user_name": o.RunAsUserName, "spec": o.Spec, "state": o.State, @@ -2162,6 +2077,7 @@ func (o GetPipelineResponse) Type(ctx context.Context) attr.Type { }, "name": types.StringType, "pipeline_id": types.StringType, + "run_as": RunAs{}.Type(ctx), "run_as_user_name": types.StringType, "spec": PipelineSpec{}.Type(ctx), "state": types.StringType, @@ -2195,6 +2111,34 @@ func (o *GetPipelineResponse) SetLatestUpdates(ctx context.Context, v []UpdateSt o.LatestUpdates = types.ListValueMust(t, vs) } +// GetRunAs returns the value of the RunAs field in GetPipelineResponse as +// a RunAs value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPipelineResponse) 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 GetPipelineResponse. +func (o *GetPipelineResponse) SetRunAs(ctx context.Context, v RunAs) { + vs := v.ToObjectValue(ctx) + o.RunAs = vs +} + // GetSpec returns the value of the Spec field in GetPipelineResponse as // a PipelineSpec value. // If the field is unknown or null, the boolean return value is false. @@ -3580,7 +3524,7 @@ func (o PathPattern) Type(ctx context.Context) attr.Type { type PipelineAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -4715,7 +4659,7 @@ type PipelinePermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4887,7 +4831,7 @@ func (o *PipelinePermissions) SetAccessControlList(ctx context.Context, v []Pipe type PipelinePermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4943,19 +4887,6 @@ type PipelinePermissionsRequest struct { PipelineId types.String `tfsdk:"-"` } -func (newState *PipelinePermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermissionsRequest) { -} - -func (newState *PipelinePermissionsRequest) SyncEffectiveFieldsDuringRead(existingState PipelinePermissionsRequest) { -} - -func (c PipelinePermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["pipeline_id"] = attrs["pipeline_id"].SetRequired() - - return attrs -} - // 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 @@ -5604,7 +5535,7 @@ type PipelineStateInfo struct { // 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"` - // The pipeline state. + State types.String `tfsdk:"state"` } @@ -6493,7 +6424,6 @@ func (o StackFrame) Type(ctx context.Context) attr.Type { } type StartUpdate struct { - // What triggered this update. Cause types.String `tfsdk:"cause"` // If true, this update will reset all tables before running. FullRefresh types.Bool `tfsdk:"full_refresh"` @@ -6514,23 +6444,6 @@ type StartUpdate struct { ValidateOnly types.Bool `tfsdk:"validate_only"` } -func (newState *StartUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartUpdate) { -} - -func (newState *StartUpdate) SyncEffectiveFieldsDuringRead(existingState StartUpdate) { -} - -func (c StartUpdate) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["cause"] = attrs["cause"].SetOptional() - attrs["full_refresh"] = attrs["full_refresh"].SetOptional() - attrs["full_refresh_selection"] = attrs["full_refresh_selection"].SetOptional() - attrs["pipeline_id"] = attrs["pipeline_id"].SetRequired() - attrs["refresh_selection"] = attrs["refresh_selection"].SetOptional() - attrs["validate_only"] = attrs["validate_only"].SetOptional() - - return attrs -} - // 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 @@ -7263,7 +7176,7 @@ func (o *UpdateInfo) SetRefreshSelection(ctx context.Context, v []types.String) type UpdateStateInfo struct { CreationTime types.String `tfsdk:"creation_time"` - // The update state. + State types.String `tfsdk:"state"` UpdateId types.String `tfsdk:"update_id"` diff --git a/internal/service/provisioning_tf/legacy_model.go b/internal/service/provisioning_tf/legacy_model.go index c9d60f0516..2bb6a57712 100755 --- a/internal/service/provisioning_tf/legacy_model.go +++ b/internal/service/provisioning_tf/legacy_model.go @@ -222,7 +222,6 @@ 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"` } @@ -446,20 +445,6 @@ type CreateCredentialRequest_SdkV2 struct { CredentialsName types.String `tfsdk:"credentials_name"` } -func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialRequest_SdkV2) { -} - -func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest_SdkV2) { -} - -func (c CreateCredentialRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_credentials"] = attrs["aws_credentials"].SetRequired() - attrs["aws_credentials"] = attrs["aws_credentials"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["credentials_name"] = attrs["credentials_name"].SetRequired() - - return attrs -} - // 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 @@ -579,22 +564,6 @@ type CreateCustomerManagedKeyRequest_SdkV2 struct { UseCases types.List `tfsdk:"use_cases"` } -func (newState *CreateCustomerManagedKeyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomerManagedKeyRequest_SdkV2) { -} - -func (newState *CreateCustomerManagedKeyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCustomerManagedKeyRequest_SdkV2) { -} - -func (c CreateCustomerManagedKeyRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_key_info"] = attrs["aws_key_info"].SetOptional() - attrs["aws_key_info"] = attrs["aws_key_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["gcp_key_info"] = attrs["gcp_key_info"].SetOptional() - attrs["gcp_key_info"] = attrs["gcp_key_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["use_cases"] = attrs["use_cases"].SetRequired() - - return attrs -} - // 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 @@ -767,8 +736,6 @@ 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"` // The human-readable name of the network configuration. NetworkName types.String `tfsdk:"network_name"` @@ -778,35 +745,13 @@ type CreateNetworkRequest_SdkV2 struct { // 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"` - // 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"` // The ID of the VPC associated with this network. VPC IDs can be used in // multiple network configurations. VpcId types.String `tfsdk:"vpc_id"` } -func (newState *CreateNetworkRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNetworkRequest_SdkV2) { -} - -func (newState *CreateNetworkRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateNetworkRequest_SdkV2) { -} - -func (c CreateNetworkRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["gcp_network_info"] = attrs["gcp_network_info"].SetOptional() - attrs["gcp_network_info"] = attrs["gcp_network_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["network_name"] = attrs["network_name"].SetRequired() - attrs["security_group_ids"] = attrs["security_group_ids"].SetOptional() - attrs["subnet_ids"] = attrs["subnet_ids"].SetOptional() - attrs["vpc_endpoints"] = attrs["vpc_endpoints"].SetOptional() - attrs["vpc_endpoints"] = attrs["vpc_endpoints"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["vpc_id"] = attrs["vpc_id"].SetOptional() - - return attrs -} - // 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 @@ -966,26 +911,11 @@ func (o *CreateNetworkRequest_SdkV2) SetVpcEndpoints(ctx context.Context, v Netw } type CreateStorageConfigurationRequest_SdkV2 struct { - // Root S3 bucket information. RootBucketInfo types.List `tfsdk:"root_bucket_info"` // The human-readable name of the storage configuration. StorageConfigurationName types.String `tfsdk:"storage_configuration_name"` } -func (newState *CreateStorageConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateStorageConfigurationRequest_SdkV2) { -} - -func (newState *CreateStorageConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateStorageConfigurationRequest_SdkV2) { -} - -func (c CreateStorageConfigurationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["root_bucket_info"] = attrs["root_bucket_info"].SetRequired() - attrs["root_bucket_info"] = attrs["root_bucket_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["storage_configuration_name"] = attrs["storage_configuration_name"].SetRequired() - - return attrs -} - // 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 @@ -1052,8 +982,7 @@ 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"` - // The Google Cloud specific information for this Private Service Connect - // endpoint. + GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info"` // The AWS region in which this VPC endpoint object exists. Region types.String `tfsdk:"region"` @@ -1061,22 +990,6 @@ type CreateVpcEndpointRequest_SdkV2 struct { VpcEndpointName types.String `tfsdk:"vpc_endpoint_name"` } -func (newState *CreateVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVpcEndpointRequest_SdkV2) { -} - -func (newState *CreateVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVpcEndpointRequest_SdkV2) { -} - -func (c CreateVpcEndpointRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_vpc_endpoint_id"] = attrs["aws_vpc_endpoint_id"].SetOptional() - attrs["gcp_vpc_endpoint_info"] = attrs["gcp_vpc_endpoint_info"].SetOptional() - attrs["gcp_vpc_endpoint_info"] = attrs["gcp_vpc_endpoint_info"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["region"] = attrs["region"].SetOptional() - attrs["vpc_endpoint_name"] = attrs["vpc_endpoint_name"].SetRequired() - - return attrs -} - // 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 @@ -1150,8 +1063,7 @@ type CreateWorkspaceRequest_SdkV2 struct { // The cloud provider which the workspace uses. For Google Cloud workspaces, // always set this field to `gcp`. Cloud types.String `tfsdk:"cloud"` - // The general workspace configurations that are specific to cloud - // providers. + CloudResourceContainer types.List `tfsdk:"cloud_resource_container"` // ID of the workspace's credential configuration object. CredentialsId types.String `tfsdk:"credentials_id"` @@ -1190,31 +1102,9 @@ 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"` - // 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 - // mutually exclusive. An attempt to create a workspace fails if Databricks - // detects an IP range overlap. - // - // Specify custom IP ranges in CIDR format. The IP ranges for these fields - // must not overlap, and all IP addresses must be entirely within the - // following ranges: `10.0.0.0/8`, `100.64.0.0/10`, `172.16.0.0/12`, - // `192.168.0.0/16`, and `240.0.0.0/4`. - // - // The sizes of these IP ranges affect the maximum number of nodes for the - // workspace. - // - // **Important**: Confirm the IP ranges used by your Databricks workspace - // before creating the workspace. You cannot change them after your - // workspace is deployed. If the IP address ranges for your Databricks are - // too small, IP exhaustion can occur, causing your Databricks jobs to fail. - // To determine the address range sizes that you need, Databricks provides a - // calculator as a Microsoft Excel spreadsheet. See [calculate subnet sizes - // 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"` - // The configurations for the GKE cluster of a Databricks workspace. + GkeConfig types.List `tfsdk:"gke_config"` // Whether no public IP is enabled for the workspace. IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled"` @@ -1229,10 +1119,7 @@ type CreateWorkspaceRequest_SdkV2 struct { ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id"` NetworkId types.String `tfsdk:"network_id"` - // 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"` // ID of the workspace's private access settings object. Only used for // PrivateLink. This ID must be specified for customers using [AWS @@ -1257,37 +1144,6 @@ type CreateWorkspaceRequest_SdkV2 struct { WorkspaceName types.String `tfsdk:"workspace_name"` } -func (newState *CreateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWorkspaceRequest_SdkV2) { -} - -func (newState *CreateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWorkspaceRequest_SdkV2) { -} - -func (c CreateWorkspaceRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_region"] = attrs["aws_region"].SetOptional() - attrs["cloud"] = attrs["cloud"].SetOptional() - attrs["cloud_resource_container"] = attrs["cloud_resource_container"].SetOptional() - attrs["cloud_resource_container"] = attrs["cloud_resource_container"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["credentials_id"] = attrs["credentials_id"].SetOptional() - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["deployment_name"] = attrs["deployment_name"].SetOptional() - attrs["gcp_managed_network_config"] = attrs["gcp_managed_network_config"].SetOptional() - attrs["gcp_managed_network_config"] = attrs["gcp_managed_network_config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["gke_config"] = attrs["gke_config"].SetOptional() - attrs["gke_config"] = attrs["gke_config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["is_no_public_ip_enabled"] = attrs["is_no_public_ip_enabled"].SetOptional() - attrs["location"] = attrs["location"].SetOptional() - attrs["managed_services_customer_managed_key_id"] = attrs["managed_services_customer_managed_key_id"].SetOptional() - attrs["network_id"] = attrs["network_id"].SetOptional() - attrs["pricing_tier"] = attrs["pricing_tier"].SetOptional() - attrs["private_access_settings_id"] = attrs["private_access_settings_id"].SetOptional() - attrs["storage_configuration_id"] = attrs["storage_configuration_id"].SetOptional() - attrs["storage_customer_managed_key_id"] = attrs["storage_customer_managed_key_id"].SetOptional() - attrs["workspace_name"] = attrs["workspace_name"].SetRequired() - - return attrs -} - // 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 @@ -2720,6 +2576,216 @@ func (o GkeConfig_SdkV2) Type(ctx context.Context) attr.Type { } } +type ListCredentialsRequest_SdkV2 struct { +} + +// 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 +// 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 ListCredentialsRequest_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, ListCredentialsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCredentialsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListEncryptionKeysRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEncryptionKeysRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListEncryptionKeysRequest_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, ListEncryptionKeysRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListEncryptionKeysRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListEncryptionKeysRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListNetworksRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNetworksRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListNetworksRequest_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, ListNetworksRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListNetworksRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNetworksRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListPrivateAccessRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPrivateAccessRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListPrivateAccessRequest_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, ListPrivateAccessRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPrivateAccessRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPrivateAccessRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListStorageRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStorageRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListStorageRequest_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, ListStorageRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListStorageRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListStorageRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListVpcEndpointsRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVpcEndpointsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListVpcEndpointsRequest_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, ListVpcEndpointsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListVpcEndpointsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListVpcEndpointsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListWorkspacesRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWorkspacesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListWorkspacesRequest_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, ListWorkspacesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListWorkspacesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListWorkspacesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type Network_SdkV2 struct { // The Databricks account ID associated with this network configuration. AccountId types.String `tfsdk:"account_id"` @@ -2727,8 +2793,7 @@ type Network_SdkV2 struct { CreationTime types.Int64 `tfsdk:"creation_time"` // Array of error messages about the network configuration. ErrorMessages types.List `tfsdk:"error_messages"` - // 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"` // The Databricks network configuration ID. NetworkId types.String `tfsdk:"network_id"` @@ -2738,17 +2803,12 @@ type Network_SdkV2 struct { SecurityGroupIds types.List `tfsdk:"security_group_ids"` SubnetIds types.List `tfsdk:"subnet_ids"` - // 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"` // The ID of the VPC associated with this network configuration. VPC IDs can // be used in multiple networks. VpcId types.String `tfsdk:"vpc_id"` - // 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"` // Array of warning messages about the network configuration. WarningMessages types.List `tfsdk:"warning_messages"` @@ -3015,8 +3075,7 @@ func (o *Network_SdkV2) SetWarningMessages(ctx context.Context, v []NetworkWarni type NetworkHealth_SdkV2 struct { // Details of the error. ErrorMessage types.String `tfsdk:"error_message"` - // The AWS resource associated with this error: credentials, VPC, subnet, - // security group, or network ACL. + ErrorType types.String `tfsdk:"error_type"` } @@ -3187,8 +3246,7 @@ 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"` - // The AWS resource associated with this warning: a subnet or a security - // group. + WarningType types.String `tfsdk:"warning_type"` } @@ -3243,12 +3301,7 @@ type PrivateAccessSettings_SdkV2 struct { AccountId types.String `tfsdk:"account_id"` // An array of Databricks VPC endpoint IDs. AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids"` - // 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"` // Databricks private access settings ID. PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id"` @@ -3440,7 +3493,7 @@ type StorageConfiguration_SdkV2 struct { AccountId types.String `tfsdk:"account_id"` // Time in epoch milliseconds when the storage configuration was created. CreationTime types.Int64 `tfsdk:"creation_time"` - // Root S3 bucket information. + RootBucketInfo types.List `tfsdk:"root_bucket_info"` // Databricks storage configuration ID. StorageConfigurationId types.String `tfsdk:"storage_configuration_id"` @@ -3653,27 +3706,6 @@ type UpdateWorkspaceRequest_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *UpdateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceRequest_SdkV2) { -} - -func (newState *UpdateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceRequest_SdkV2) { -} - -func (c UpdateWorkspaceRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_region"] = attrs["aws_region"].SetOptional() - attrs["credentials_id"] = attrs["credentials_id"].SetOptional() - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["managed_services_customer_managed_key_id"] = attrs["managed_services_customer_managed_key_id"].SetOptional() - attrs["network_connectivity_config_id"] = attrs["network_connectivity_config_id"].SetOptional() - attrs["network_id"] = attrs["network_id"].SetOptional() - attrs["private_access_settings_id"] = attrs["private_access_settings_id"].SetOptional() - attrs["storage_configuration_id"] = attrs["storage_configuration_id"].SetOptional() - attrs["storage_customer_managed_key_id"] = attrs["storage_customer_managed_key_id"].SetOptional() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 @@ -3769,12 +3801,7 @@ type UpsertPrivateAccessSettingsRequest_SdkV2 struct { // // [IP access lists]: https://docs.databricks.com/security/network/ip-access-list.html AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids"` - // 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"` // Databricks Account API private access settings ID. PrivateAccessSettingsId types.String `tfsdk:"-"` @@ -3791,23 +3818,6 @@ type UpsertPrivateAccessSettingsRequest_SdkV2 struct { Region types.String `tfsdk:"region"` } -func (newState *UpsertPrivateAccessSettingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertPrivateAccessSettingsRequest_SdkV2) { -} - -func (newState *UpsertPrivateAccessSettingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertPrivateAccessSettingsRequest_SdkV2) { -} - -func (c UpsertPrivateAccessSettingsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allowed_vpc_endpoint_ids"] = attrs["allowed_vpc_endpoint_ids"].SetOptional() - attrs["private_access_level"] = attrs["private_access_level"].SetOptional() - attrs["private_access_settings_id"] = attrs["private_access_settings_id"].SetRequired() - attrs["private_access_settings_name"] = attrs["private_access_settings_name"].SetRequired() - attrs["public_access_enabled"] = attrs["public_access_enabled"].SetOptional() - attrs["region"] = attrs["region"].SetRequired() - - return attrs -} - // 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 @@ -3893,8 +3903,7 @@ type VpcEndpoint_SdkV2 struct { AwsEndpointServiceId types.String `tfsdk:"aws_endpoint_service_id"` // The ID of the VPC endpoint object in AWS. AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id"` - // The Google Cloud specific information for this Private Service Connect - // endpoint. + GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info"` // The AWS region in which this VPC endpoint object exists. Region types.String `tfsdk:"region"` @@ -3904,10 +3913,7 @@ type VpcEndpoint_SdkV2 struct { // // [AWS DescribeVpcEndpoint documentation]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html State types.String `tfsdk:"state"` - // 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"` // 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 @@ -4027,8 +4033,7 @@ type Workspace_SdkV2 struct { AzureWorkspaceInfo types.List `tfsdk:"azure_workspace_info"` // The cloud name. This field always has the value `gcp`. Cloud types.String `tfsdk:"cloud"` - // The general workspace configurations that are specific to cloud - // providers. + CloudResourceContainer types.List `tfsdk:"cloud_resource_container"` // Time in epoch milliseconds when the workspace was created. CreationTime types.Int64 `tfsdk:"creation_time"` @@ -4050,31 +4055,9 @@ type Workspace_SdkV2 struct { // is populated. If this workspace is not for a external customer, then // external_customer_info is empty. ExternalCustomerInfo types.List `tfsdk:"external_customer_info"` - // 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 - // mutually exclusive. An attempt to create a workspace fails if Databricks - // detects an IP range overlap. - // - // Specify custom IP ranges in CIDR format. The IP ranges for these fields - // must not overlap, and all IP addresses must be entirely within the - // following ranges: `10.0.0.0/8`, `100.64.0.0/10`, `172.16.0.0/12`, - // `192.168.0.0/16`, and `240.0.0.0/4`. - // - // The sizes of these IP ranges affect the maximum number of nodes for the - // workspace. - // - // **Important**: Confirm the IP ranges used by your Databricks workspace - // before creating the workspace. You cannot change them after your - // workspace is deployed. If the IP address ranges for your Databricks are - // too small, IP exhaustion can occur, causing your Databricks jobs to fail. - // To determine the address range sizes that you need, Databricks provides a - // calculator as a Microsoft Excel spreadsheet. See [calculate subnet sizes - // 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"` - // The configurations for the GKE cluster of a Databricks workspace. + GkeConfig types.List `tfsdk:"gke_config"` // Whether no public IP is enabled for the workspace. IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled"` @@ -4086,10 +4069,7 @@ type Workspace_SdkV2 struct { // 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"` - // 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"` // ID of the workspace's private access settings object. Only used for // PrivateLink. You must specify this ID if you are using [AWS PrivateLink] @@ -4110,9 +4090,7 @@ type Workspace_SdkV2 struct { WorkspaceId types.Int64 `tfsdk:"workspace_id"` // The human-readable name of the workspace. WorkspaceName types.String `tfsdk:"workspace_name"` - // 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"` // Message describing the current workspace status. WorkspaceStatusMessage types.String `tfsdk:"workspace_status_message"` diff --git a/internal/service/provisioning_tf/model.go b/internal/service/provisioning_tf/model.go index 75087facfa..12b7c08a89 100755 --- a/internal/service/provisioning_tf/model.go +++ b/internal/service/provisioning_tf/model.go @@ -220,7 +220,6 @@ 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"` } @@ -442,19 +441,6 @@ type CreateCredentialRequest struct { CredentialsName types.String `tfsdk:"credentials_name"` } -func (newState *CreateCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialRequest) { -} - -func (newState *CreateCredentialRequest) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest) { -} - -func (c CreateCredentialRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_credentials"] = attrs["aws_credentials"].SetRequired() - attrs["credentials_name"] = attrs["credentials_name"].SetRequired() - - return attrs -} - // 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 @@ -574,20 +560,6 @@ type CreateCustomerManagedKeyRequest struct { UseCases types.List `tfsdk:"use_cases"` } -func (newState *CreateCustomerManagedKeyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomerManagedKeyRequest) { -} - -func (newState *CreateCustomerManagedKeyRequest) SyncEffectiveFieldsDuringRead(existingState CreateCustomerManagedKeyRequest) { -} - -func (c CreateCustomerManagedKeyRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_key_info"] = attrs["aws_key_info"].SetOptional() - attrs["gcp_key_info"] = attrs["gcp_key_info"].SetOptional() - attrs["use_cases"] = attrs["use_cases"].SetRequired() - - return attrs -} - // 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 @@ -760,8 +732,6 @@ 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"` // The human-readable name of the network configuration. NetworkName types.String `tfsdk:"network_name"` @@ -771,33 +741,13 @@ type CreateNetworkRequest struct { // 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"` - // 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"` // The ID of the VPC associated with this network. VPC IDs can be used in // multiple network configurations. VpcId types.String `tfsdk:"vpc_id"` } -func (newState *CreateNetworkRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNetworkRequest) { -} - -func (newState *CreateNetworkRequest) SyncEffectiveFieldsDuringRead(existingState CreateNetworkRequest) { -} - -func (c CreateNetworkRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["gcp_network_info"] = attrs["gcp_network_info"].SetOptional() - attrs["network_name"] = attrs["network_name"].SetRequired() - attrs["security_group_ids"] = attrs["security_group_ids"].SetOptional() - attrs["subnet_ids"] = attrs["subnet_ids"].SetOptional() - attrs["vpc_endpoints"] = attrs["vpc_endpoints"].SetOptional() - attrs["vpc_id"] = attrs["vpc_id"].SetOptional() - - return attrs -} - // 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 @@ -957,25 +907,11 @@ func (o *CreateNetworkRequest) SetVpcEndpoints(ctx context.Context, v NetworkVpc } type CreateStorageConfigurationRequest struct { - // Root S3 bucket information. RootBucketInfo types.Object `tfsdk:"root_bucket_info"` // The human-readable name of the storage configuration. StorageConfigurationName types.String `tfsdk:"storage_configuration_name"` } -func (newState *CreateStorageConfigurationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateStorageConfigurationRequest) { -} - -func (newState *CreateStorageConfigurationRequest) SyncEffectiveFieldsDuringRead(existingState CreateStorageConfigurationRequest) { -} - -func (c CreateStorageConfigurationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["root_bucket_info"] = attrs["root_bucket_info"].SetRequired() - attrs["storage_configuration_name"] = attrs["storage_configuration_name"].SetRequired() - - return attrs -} - // 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 @@ -1042,8 +978,7 @@ 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"` - // The Google Cloud specific information for this Private Service Connect - // endpoint. + GcpVpcEndpointInfo types.Object `tfsdk:"gcp_vpc_endpoint_info"` // The AWS region in which this VPC endpoint object exists. Region types.String `tfsdk:"region"` @@ -1051,21 +986,6 @@ type CreateVpcEndpointRequest struct { VpcEndpointName types.String `tfsdk:"vpc_endpoint_name"` } -func (newState *CreateVpcEndpointRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVpcEndpointRequest) { -} - -func (newState *CreateVpcEndpointRequest) SyncEffectiveFieldsDuringRead(existingState CreateVpcEndpointRequest) { -} - -func (c CreateVpcEndpointRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_vpc_endpoint_id"] = attrs["aws_vpc_endpoint_id"].SetOptional() - attrs["gcp_vpc_endpoint_info"] = attrs["gcp_vpc_endpoint_info"].SetOptional() - attrs["region"] = attrs["region"].SetOptional() - attrs["vpc_endpoint_name"] = attrs["vpc_endpoint_name"].SetRequired() - - return attrs -} - // 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 @@ -1139,8 +1059,7 @@ type CreateWorkspaceRequest struct { // The cloud provider which the workspace uses. For Google Cloud workspaces, // always set this field to `gcp`. Cloud types.String `tfsdk:"cloud"` - // The general workspace configurations that are specific to cloud - // providers. + CloudResourceContainer types.Object `tfsdk:"cloud_resource_container"` // ID of the workspace's credential configuration object. CredentialsId types.String `tfsdk:"credentials_id"` @@ -1179,31 +1098,9 @@ 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"` - // 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 - // mutually exclusive. An attempt to create a workspace fails if Databricks - // detects an IP range overlap. - // - // Specify custom IP ranges in CIDR format. The IP ranges for these fields - // must not overlap, and all IP addresses must be entirely within the - // following ranges: `10.0.0.0/8`, `100.64.0.0/10`, `172.16.0.0/12`, - // `192.168.0.0/16`, and `240.0.0.0/4`. - // - // The sizes of these IP ranges affect the maximum number of nodes for the - // workspace. - // - // **Important**: Confirm the IP ranges used by your Databricks workspace - // before creating the workspace. You cannot change them after your - // workspace is deployed. If the IP address ranges for your Databricks are - // too small, IP exhaustion can occur, causing your Databricks jobs to fail. - // To determine the address range sizes that you need, Databricks provides a - // calculator as a Microsoft Excel spreadsheet. See [calculate subnet sizes - // 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"` - // The configurations for the GKE cluster of a Databricks workspace. + GkeConfig types.Object `tfsdk:"gke_config"` // Whether no public IP is enabled for the workspace. IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled"` @@ -1218,10 +1115,7 @@ type CreateWorkspaceRequest struct { ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id"` NetworkId types.String `tfsdk:"network_id"` - // 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"` // ID of the workspace's private access settings object. Only used for // PrivateLink. This ID must be specified for customers using [AWS @@ -1246,34 +1140,6 @@ type CreateWorkspaceRequest struct { WorkspaceName types.String `tfsdk:"workspace_name"` } -func (newState *CreateWorkspaceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWorkspaceRequest) { -} - -func (newState *CreateWorkspaceRequest) SyncEffectiveFieldsDuringRead(existingState CreateWorkspaceRequest) { -} - -func (c CreateWorkspaceRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_region"] = attrs["aws_region"].SetOptional() - attrs["cloud"] = attrs["cloud"].SetOptional() - attrs["cloud_resource_container"] = attrs["cloud_resource_container"].SetOptional() - attrs["credentials_id"] = attrs["credentials_id"].SetOptional() - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["deployment_name"] = attrs["deployment_name"].SetOptional() - attrs["gcp_managed_network_config"] = attrs["gcp_managed_network_config"].SetOptional() - attrs["gke_config"] = attrs["gke_config"].SetOptional() - attrs["is_no_public_ip_enabled"] = attrs["is_no_public_ip_enabled"].SetOptional() - attrs["location"] = attrs["location"].SetOptional() - attrs["managed_services_customer_managed_key_id"] = attrs["managed_services_customer_managed_key_id"].SetOptional() - attrs["network_id"] = attrs["network_id"].SetOptional() - attrs["pricing_tier"] = attrs["pricing_tier"].SetOptional() - attrs["private_access_settings_id"] = attrs["private_access_settings_id"].SetOptional() - attrs["storage_configuration_id"] = attrs["storage_configuration_id"].SetOptional() - attrs["storage_customer_managed_key_id"] = attrs["storage_customer_managed_key_id"].SetOptional() - attrs["workspace_name"] = attrs["workspace_name"].SetRequired() - - return attrs -} - // 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 @@ -2703,6 +2569,216 @@ func (o GkeConfig) Type(ctx context.Context) attr.Type { } } +type ListCredentialsRequest struct { +} + +// 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 +// 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 ListCredentialsRequest) 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, ListCredentialsRequest +// only implements ToObjectValue() and Type(). +func (o ListCredentialsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCredentialsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListEncryptionKeysRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEncryptionKeysRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListEncryptionKeysRequest) 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, ListEncryptionKeysRequest +// only implements ToObjectValue() and Type(). +func (o ListEncryptionKeysRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListEncryptionKeysRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListNetworksRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNetworksRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListNetworksRequest) 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, ListNetworksRequest +// only implements ToObjectValue() and Type(). +func (o ListNetworksRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNetworksRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListPrivateAccessRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPrivateAccessRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListPrivateAccessRequest) 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, ListPrivateAccessRequest +// only implements ToObjectValue() and Type(). +func (o ListPrivateAccessRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPrivateAccessRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListStorageRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStorageRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListStorageRequest) 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, ListStorageRequest +// only implements ToObjectValue() and Type(). +func (o ListStorageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListStorageRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListVpcEndpointsRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVpcEndpointsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListVpcEndpointsRequest) 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, ListVpcEndpointsRequest +// only implements ToObjectValue() and Type(). +func (o ListVpcEndpointsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListVpcEndpointsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ListWorkspacesRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWorkspacesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListWorkspacesRequest) 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, ListWorkspacesRequest +// only implements ToObjectValue() and Type(). +func (o ListWorkspacesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListWorkspacesRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type Network struct { // The Databricks account ID associated with this network configuration. AccountId types.String `tfsdk:"account_id"` @@ -2710,8 +2786,7 @@ type Network struct { CreationTime types.Int64 `tfsdk:"creation_time"` // Array of error messages about the network configuration. ErrorMessages types.List `tfsdk:"error_messages"` - // 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"` // The Databricks network configuration ID. NetworkId types.String `tfsdk:"network_id"` @@ -2721,17 +2796,12 @@ type Network struct { SecurityGroupIds types.List `tfsdk:"security_group_ids"` SubnetIds types.List `tfsdk:"subnet_ids"` - // 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"` // The ID of the VPC associated with this network configuration. VPC IDs can // be used in multiple networks. VpcId types.String `tfsdk:"vpc_id"` - // 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"` // Array of warning messages about the network configuration. WarningMessages types.List `tfsdk:"warning_messages"` @@ -2996,8 +3066,7 @@ func (o *Network) SetWarningMessages(ctx context.Context, v []NetworkWarning) { type NetworkHealth struct { // Details of the error. ErrorMessage types.String `tfsdk:"error_message"` - // The AWS resource associated with this error: credentials, VPC, subnet, - // security group, or network ACL. + ErrorType types.String `tfsdk:"error_type"` } @@ -3168,8 +3237,7 @@ func (o *NetworkVpcEndpoints) SetRestApi(ctx context.Context, v []types.String) type NetworkWarning struct { // Details of the warning. WarningMessage types.String `tfsdk:"warning_message"` - // The AWS resource associated with this warning: a subnet or a security - // group. + WarningType types.String `tfsdk:"warning_type"` } @@ -3224,12 +3292,7 @@ type PrivateAccessSettings struct { AccountId types.String `tfsdk:"account_id"` // An array of Databricks VPC endpoint IDs. AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids"` - // 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"` // Databricks private access settings ID. PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id"` @@ -3421,7 +3484,7 @@ type StorageConfiguration struct { AccountId types.String `tfsdk:"account_id"` // Time in epoch milliseconds when the storage configuration was created. CreationTime types.Int64 `tfsdk:"creation_time"` - // Root S3 bucket information. + RootBucketInfo types.Object `tfsdk:"root_bucket_info"` // Databricks storage configuration ID. StorageConfigurationId types.String `tfsdk:"storage_configuration_id"` @@ -3633,27 +3696,6 @@ type UpdateWorkspaceRequest struct { WorkspaceId types.Int64 `tfsdk:"-"` } -func (newState *UpdateWorkspaceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceRequest) { -} - -func (newState *UpdateWorkspaceRequest) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceRequest) { -} - -func (c UpdateWorkspaceRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["aws_region"] = attrs["aws_region"].SetOptional() - attrs["credentials_id"] = attrs["credentials_id"].SetOptional() - attrs["custom_tags"] = attrs["custom_tags"].SetOptional() - attrs["managed_services_customer_managed_key_id"] = attrs["managed_services_customer_managed_key_id"].SetOptional() - attrs["network_connectivity_config_id"] = attrs["network_connectivity_config_id"].SetOptional() - attrs["network_id"] = attrs["network_id"].SetOptional() - attrs["private_access_settings_id"] = attrs["private_access_settings_id"].SetOptional() - attrs["storage_configuration_id"] = attrs["storage_configuration_id"].SetOptional() - attrs["storage_customer_managed_key_id"] = attrs["storage_customer_managed_key_id"].SetOptional() - attrs["workspace_id"] = attrs["workspace_id"].SetRequired() - - return attrs -} - // 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 @@ -3749,12 +3791,7 @@ type UpsertPrivateAccessSettingsRequest struct { // // [IP access lists]: https://docs.databricks.com/security/network/ip-access-list.html AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids"` - // 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"` // Databricks Account API private access settings ID. PrivateAccessSettingsId types.String `tfsdk:"-"` @@ -3771,23 +3808,6 @@ type UpsertPrivateAccessSettingsRequest struct { Region types.String `tfsdk:"region"` } -func (newState *UpsertPrivateAccessSettingsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertPrivateAccessSettingsRequest) { -} - -func (newState *UpsertPrivateAccessSettingsRequest) SyncEffectiveFieldsDuringRead(existingState UpsertPrivateAccessSettingsRequest) { -} - -func (c UpsertPrivateAccessSettingsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allowed_vpc_endpoint_ids"] = attrs["allowed_vpc_endpoint_ids"].SetOptional() - attrs["private_access_level"] = attrs["private_access_level"].SetOptional() - attrs["private_access_settings_id"] = attrs["private_access_settings_id"].SetRequired() - attrs["private_access_settings_name"] = attrs["private_access_settings_name"].SetRequired() - attrs["public_access_enabled"] = attrs["public_access_enabled"].SetOptional() - attrs["region"] = attrs["region"].SetRequired() - - return attrs -} - // 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 @@ -3873,8 +3893,7 @@ type VpcEndpoint struct { AwsEndpointServiceId types.String `tfsdk:"aws_endpoint_service_id"` // The ID of the VPC endpoint object in AWS. AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id"` - // The Google Cloud specific information for this Private Service Connect - // endpoint. + GcpVpcEndpointInfo types.Object `tfsdk:"gcp_vpc_endpoint_info"` // The AWS region in which this VPC endpoint object exists. Region types.String `tfsdk:"region"` @@ -3884,10 +3903,7 @@ type VpcEndpoint struct { // // [AWS DescribeVpcEndpoint documentation]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html State types.String `tfsdk:"state"` - // 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"` // 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 @@ -4006,8 +4022,7 @@ type Workspace struct { AzureWorkspaceInfo types.Object `tfsdk:"azure_workspace_info"` // The cloud name. This field always has the value `gcp`. Cloud types.String `tfsdk:"cloud"` - // The general workspace configurations that are specific to cloud - // providers. + CloudResourceContainer types.Object `tfsdk:"cloud_resource_container"` // Time in epoch milliseconds when the workspace was created. CreationTime types.Int64 `tfsdk:"creation_time"` @@ -4029,31 +4044,9 @@ type Workspace struct { // is populated. If this workspace is not for a external customer, then // external_customer_info is empty. ExternalCustomerInfo types.Object `tfsdk:"external_customer_info"` - // 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 - // mutually exclusive. An attempt to create a workspace fails if Databricks - // detects an IP range overlap. - // - // Specify custom IP ranges in CIDR format. The IP ranges for these fields - // must not overlap, and all IP addresses must be entirely within the - // following ranges: `10.0.0.0/8`, `100.64.0.0/10`, `172.16.0.0/12`, - // `192.168.0.0/16`, and `240.0.0.0/4`. - // - // The sizes of these IP ranges affect the maximum number of nodes for the - // workspace. - // - // **Important**: Confirm the IP ranges used by your Databricks workspace - // before creating the workspace. You cannot change them after your - // workspace is deployed. If the IP address ranges for your Databricks are - // too small, IP exhaustion can occur, causing your Databricks jobs to fail. - // To determine the address range sizes that you need, Databricks provides a - // calculator as a Microsoft Excel spreadsheet. See [calculate subnet sizes - // 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"` - // The configurations for the GKE cluster of a Databricks workspace. + GkeConfig types.Object `tfsdk:"gke_config"` // Whether no public IP is enabled for the workspace. IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled"` @@ -4065,10 +4058,7 @@ type Workspace struct { // 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"` - // 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"` // ID of the workspace's private access settings object. Only used for // PrivateLink. You must specify this ID if you are using [AWS PrivateLink] @@ -4089,9 +4079,7 @@ type Workspace struct { WorkspaceId types.Int64 `tfsdk:"workspace_id"` // The human-readable name of the workspace. WorkspaceName types.String `tfsdk:"workspace_name"` - // 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"` // Message describing the current workspace status. WorkspaceStatusMessage types.String `tfsdk:"workspace_status_message"` diff --git a/internal/service/qualitymonitorv2_tf/legacy_model.go b/internal/service/qualitymonitorv2_tf/legacy_model.go index 38194eb243..ea12f465ee 100755 --- a/internal/service/qualitymonitorv2_tf/legacy_model.go +++ b/internal/service/qualitymonitorv2_tf/legacy_model.go @@ -181,36 +181,6 @@ func (o DeleteQualityMonitorRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type DeleteQualityMonitorResponse_SdkV2 struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQualityMonitorResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteQualityMonitorResponse_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, DeleteQualityMonitorResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteQualityMonitorResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteQualityMonitorResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type GetQualityMonitorRequest_SdkV2 struct { // The uuid of the request object. For example, schema id. ObjectId types.String `tfsdk:"-"` diff --git a/internal/service/qualitymonitorv2_tf/model.go b/internal/service/qualitymonitorv2_tf/model.go index b33fb66c47..eb03285edc 100755 --- a/internal/service/qualitymonitorv2_tf/model.go +++ b/internal/service/qualitymonitorv2_tf/model.go @@ -180,36 +180,6 @@ func (o DeleteQualityMonitorRequest) Type(ctx context.Context) attr.Type { } } -type DeleteQualityMonitorResponse struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQualityMonitorResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteQualityMonitorResponse) 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, DeleteQualityMonitorResponse -// only implements ToObjectValue() and Type(). -func (o DeleteQualityMonitorResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteQualityMonitorResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type GetQualityMonitorRequest struct { // The uuid of the request object. For example, schema id. ObjectId types.String `tfsdk:"-"` diff --git a/internal/service/serving_tf/legacy_model.go b/internal/service/serving_tf/legacy_model.go index 34b89826bb..bcda9a7f65 100755 --- a/internal/service/serving_tf/legacy_model.go +++ b/internal/service/serving_tf/legacy_model.go @@ -695,9 +695,14 @@ type AiGatewayRateLimit_SdkV2 struct { // Used to specify how many calls are allowed for a key within the // renewal_period. Calls types.Int64 `tfsdk:"calls"` - // Key field for a rate limit. Currently, only 'user' and 'endpoint' are - // supported, with 'endpoint' being the default if not specified. + // Key field for a rate limit. Currently, 'user', 'user_group, + // 'service_principal', and 'endpoint' are supported, with 'endpoint' being + // the default if not specified. Key types.String `tfsdk:"key"` + // Principal field for a user, user group, or service principal to apply + // rate limiting to. Accepts a user email, group name, or service principal + // application ID. + Principal types.String `tfsdk:"principal"` // Renewal period field for a rate limit. Currently, only 'minute' is // supported. RenewalPeriod types.String `tfsdk:"renewal_period"` @@ -712,6 +717,7 @@ func (newState *AiGatewayRateLimit_SdkV2) SyncEffectiveFieldsDuringRead(existing func (c AiGatewayRateLimit_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["calls"] = attrs["calls"].SetRequired() attrs["key"] = attrs["key"].SetOptional() + attrs["principal"] = attrs["principal"].SetOptional() attrs["renewal_period"] = attrs["renewal_period"].SetRequired() return attrs @@ -737,6 +743,7 @@ func (o AiGatewayRateLimit_SdkV2) ToObjectValue(ctx context.Context) basetypes.O map[string]attr.Value{ "calls": o.Calls, "key": o.Key, + "principal": o.Principal, "renewal_period": o.RenewalPeriod, }) } @@ -747,6 +754,7 @@ func (o AiGatewayRateLimit_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "calls": types.Int64Type, "key": types.StringType, + "principal": types.StringType, "renewal_period": types.StringType, }, } @@ -1545,24 +1553,6 @@ type CreatePtEndpointRequest_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreatePtEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePtEndpointRequest_SdkV2) { -} - -func (newState *CreatePtEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePtEndpointRequest_SdkV2) { -} - -func (c CreatePtEndpointRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["ai_gateway"] = attrs["ai_gateway"].SetOptional() - attrs["ai_gateway"] = attrs["ai_gateway"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["config"] = attrs["config"].SetRequired() - attrs["config"] = attrs["config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["name"] = attrs["name"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePtEndpointRequest. // Container types (types.Map, types.List, types.Set) and 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,6 +1689,8 @@ type CreateServingEndpoint_SdkV2 struct { BudgetPolicyId types.String `tfsdk:"budget_policy_id"` // The core config of the serving endpoint. Config types.List `tfsdk:"config"` + + Description types.String `tfsdk:"description"` // The name of the serving endpoint. This field is required and must be // unique across a Databricks workspace. An endpoint name can consist of // alphanumeric characters, dashes, and underscores. @@ -1713,26 +1705,6 @@ type CreateServingEndpoint_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateServingEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServingEndpoint_SdkV2) { -} - -func (newState *CreateServingEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateServingEndpoint_SdkV2) { -} - -func (c CreateServingEndpoint_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["ai_gateway"] = attrs["ai_gateway"].SetOptional() - attrs["ai_gateway"] = attrs["ai_gateway"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["config"] = attrs["config"].SetOptional() - attrs["config"] = attrs["config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["name"] = attrs["name"].SetRequired() - attrs["rate_limits"] = attrs["rate_limits"].SetOptional() - attrs["route_optimized"] = attrs["route_optimized"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -1759,6 +1731,7 @@ func (o CreateServingEndpoint_SdkV2) ToObjectValue(ctx context.Context) basetype "ai_gateway": o.AiGateway, "budget_policy_id": o.BudgetPolicyId, "config": o.Config, + "description": o.Description, "name": o.Name, "rate_limits": o.RateLimits, "route_optimized": o.RouteOptimized, @@ -1777,7 +1750,8 @@ func (o CreateServingEndpoint_SdkV2) Type(ctx context.Context) attr.Type { "config": basetypes.ListType{ ElemType: EndpointCoreConfigInput_SdkV2{}.Type(ctx), }, - "name": types.StringType, + "description": types.StringType, + "name": types.StringType, "rate_limits": basetypes.ListType{ ElemType: RateLimit_SdkV2{}.Type(ctx), }, @@ -3411,23 +3385,6 @@ type ExternalFunctionRequest_SdkV2 struct { Path types.String `tfsdk:"path"` } -func (newState *ExternalFunctionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalFunctionRequest_SdkV2) { -} - -func (newState *ExternalFunctionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalFunctionRequest_SdkV2) { -} - -func (c ExternalFunctionRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["connection_name"] = attrs["connection_name"].SetRequired() - attrs["headers"] = attrs["headers"].SetOptional() - attrs["json"] = attrs["json"].SetOptional() - attrs["method"] = attrs["method"].SetRequired() - attrs["params"] = attrs["params"].SetOptional() - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalFunctionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4479,6 +4436,36 @@ func (o *ListEndpointsResponse_SdkV2) SetEndpoints(ctx context.Context, v []Serv o.Endpoints = types.ListValueMust(t, vs) } +type ListServingEndpointsRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServingEndpointsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListServingEndpointsRequest_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, ListServingEndpointsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListServingEndpointsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListServingEndpointsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type LogsRequest_SdkV2 struct { // The name of the serving endpoint that the served model belongs to. This // field is required. @@ -4799,20 +4786,6 @@ type PatchServingEndpointTags_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *PatchServingEndpointTags_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchServingEndpointTags_SdkV2) { -} - -func (newState *PatchServingEndpointTags_SdkV2) SyncEffectiveFieldsDuringRead(existingState PatchServingEndpointTags_SdkV2) { -} - -func (c PatchServingEndpointTags_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["add_tags"] = attrs["add_tags"].SetOptional() - attrs["delete_tags"] = attrs["delete_tags"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 @@ -5171,27 +5144,6 @@ type PutAiGatewayRequest_SdkV2 struct { UsageTrackingConfig types.List `tfsdk:"usage_tracking_config"` } -func (newState *PutAiGatewayRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayRequest_SdkV2) { -} - -func (newState *PutAiGatewayRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAiGatewayRequest_SdkV2) { -} - -func (c PutAiGatewayRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["fallback_config"] = attrs["fallback_config"].SetOptional() - attrs["fallback_config"] = attrs["fallback_config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["guardrails"] = attrs["guardrails"].SetOptional() - attrs["guardrails"] = attrs["guardrails"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["inference_table_config"] = attrs["inference_table_config"].SetOptional() - attrs["inference_table_config"] = attrs["inference_table_config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["name"] = attrs["name"].SetRequired() - attrs["rate_limits"] = attrs["rate_limits"].SetOptional() - attrs["usage_tracking_config"] = attrs["usage_tracking_config"].SetOptional() - attrs["usage_tracking_config"] = attrs["usage_tracking_config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAiGatewayRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5612,19 +5564,6 @@ type PutRequest_SdkV2 struct { RateLimits types.List `tfsdk:"rate_limits"` } -func (newState *PutRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutRequest_SdkV2) { -} - -func (newState *PutRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutRequest_SdkV2) { -} - -func (c PutRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["rate_limits"] = attrs["rate_limits"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5818,32 +5757,6 @@ type QueryEndpointInput_SdkV2 struct { Temperature types.Float64 `tfsdk:"temperature"` } -func (newState *QueryEndpointInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEndpointInput_SdkV2) { -} - -func (newState *QueryEndpointInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryEndpointInput_SdkV2) { -} - -func (c QueryEndpointInput_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dataframe_records"] = attrs["dataframe_records"].SetOptional() - attrs["dataframe_split"] = attrs["dataframe_split"].SetOptional() - attrs["dataframe_split"] = attrs["dataframe_split"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["extra_params"] = attrs["extra_params"].SetOptional() - attrs["input"] = attrs["input"].SetOptional() - attrs["inputs"] = attrs["inputs"].SetOptional() - attrs["instances"] = attrs["instances"].SetOptional() - attrs["max_tokens"] = attrs["max_tokens"].SetOptional() - attrs["messages"] = attrs["messages"].SetOptional() - attrs["n"] = attrs["n"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["prompt"] = attrs["prompt"].SetOptional() - attrs["stop"] = attrs["stop"].SetOptional() - attrs["stream"] = attrs["stream"].SetOptional() - attrs["temperature"] = attrs["temperature"].SetOptional() - - return attrs -} - // 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 @@ -6355,6 +6268,7 @@ func (o RateLimit_SdkV2) Type(ctx context.Context) attr.Type { } type Route_SdkV2 struct { + ServedEntityName types.String `tfsdk:"served_entity_name"` // The name of the served model this route configures traffic for. ServedModelName types.String `tfsdk:"served_model_name"` // The percentage of endpoint traffic to send to this route. It must be an @@ -6369,7 +6283,8 @@ func (newState *Route_SdkV2) SyncEffectiveFieldsDuringRead(existingState Route_S } func (c Route_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["served_model_name"] = attrs["served_model_name"].SetRequired() + attrs["served_entity_name"] = attrs["served_entity_name"].SetOptional() + attrs["served_model_name"] = attrs["served_model_name"].SetOptional() attrs["traffic_percentage"] = attrs["traffic_percentage"].SetRequired() return attrs @@ -6393,6 +6308,7 @@ func (o Route_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ + "served_entity_name": o.ServedEntityName, "served_model_name": o.ServedModelName, "traffic_percentage": o.TrafficPercentage, }) @@ -6402,6 +6318,7 @@ func (o Route_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Route_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ + "served_entity_name": types.StringType, "served_model_name": types.StringType, "traffic_percentage": types.Int64Type, }, @@ -6648,8 +6565,7 @@ type ServedEntityOutput_SdkV2 struct { // 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"` - // All fields are not sensitive as they are hard-coded in the system and - // made available to customers. + FoundationModel types.List `tfsdk:"foundation_model"` // ARN of the instance profile that the served entity uses to access AWS // resources. @@ -6918,8 +6834,7 @@ type ServedEntitySpec_SdkV2 struct { EntityVersion types.String `tfsdk:"entity_version"` ExternalModel types.List `tfsdk:"external_model"` - // All fields are not sensitive as they are hard-coded in the system and - // made available to customers. + FoundationModel types.List `tfsdk:"foundation_model"` Name types.String `tfsdk:"name"` @@ -7795,7 +7710,7 @@ 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"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -8269,7 +8184,7 @@ type ServingEndpointPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -8441,7 +8356,7 @@ func (o *ServingEndpointPermissions_SdkV2) SetAccessControlList(ctx context.Cont type ServingEndpointPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -8497,19 +8412,6 @@ type ServingEndpointPermissionsRequest_SdkV2 struct { ServingEndpointId types.String `tfsdk:"-"` } -func (newState *ServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermissionsRequest_SdkV2) { -} - -func (newState *ServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissionsRequest_SdkV2) { -} - -func (c ServingEndpointPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["serving_endpoint_id"] = attrs["serving_endpoint_id"].SetRequired() - - return attrs -} - // 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 @@ -8657,20 +8559,6 @@ type UpdateProvisionedThroughputEndpointConfigRequest_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *UpdateProvisionedThroughputEndpointConfigRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProvisionedThroughputEndpointConfigRequest_SdkV2) { -} - -func (newState *UpdateProvisionedThroughputEndpointConfigRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProvisionedThroughputEndpointConfigRequest_SdkV2) { -} - -func (c UpdateProvisionedThroughputEndpointConfigRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["config"] = attrs["config"].SetRequired() - attrs["config"] = attrs["config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProvisionedThroughputEndpointConfigRequest. // Container types (types.Map, types.List, types.Set) and 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 f4da1c8664..94fe77d9f0 100755 --- a/internal/service/serving_tf/model.go +++ b/internal/service/serving_tf/model.go @@ -687,9 +687,14 @@ type AiGatewayRateLimit struct { // Used to specify how many calls are allowed for a key within the // renewal_period. Calls types.Int64 `tfsdk:"calls"` - // Key field for a rate limit. Currently, only 'user' and 'endpoint' are - // supported, with 'endpoint' being the default if not specified. + // Key field for a rate limit. Currently, 'user', 'user_group, + // 'service_principal', and 'endpoint' are supported, with 'endpoint' being + // the default if not specified. Key types.String `tfsdk:"key"` + // Principal field for a user, user group, or service principal to apply + // rate limiting to. Accepts a user email, group name, or service principal + // application ID. + Principal types.String `tfsdk:"principal"` // Renewal period field for a rate limit. Currently, only 'minute' is // supported. RenewalPeriod types.String `tfsdk:"renewal_period"` @@ -704,6 +709,7 @@ func (newState *AiGatewayRateLimit) SyncEffectiveFieldsDuringRead(existingState func (c AiGatewayRateLimit) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { attrs["calls"] = attrs["calls"].SetRequired() attrs["key"] = attrs["key"].SetOptional() + attrs["principal"] = attrs["principal"].SetOptional() attrs["renewal_period"] = attrs["renewal_period"].SetRequired() return attrs @@ -729,6 +735,7 @@ func (o AiGatewayRateLimit) ToObjectValue(ctx context.Context) basetypes.ObjectV map[string]attr.Value{ "calls": o.Calls, "key": o.Key, + "principal": o.Principal, "renewal_period": o.RenewalPeriod, }) } @@ -739,6 +746,7 @@ func (o AiGatewayRateLimit) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "calls": types.Int64Type, "key": types.StringType, + "principal": types.StringType, "renewal_period": types.StringType, }, } @@ -1535,22 +1543,6 @@ type CreatePtEndpointRequest struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreatePtEndpointRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePtEndpointRequest) { -} - -func (newState *CreatePtEndpointRequest) SyncEffectiveFieldsDuringRead(existingState CreatePtEndpointRequest) { -} - -func (c CreatePtEndpointRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["ai_gateway"] = attrs["ai_gateway"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["config"] = attrs["config"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePtEndpointRequest. // Container types (types.Map, types.List, types.Set) and 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,6 +1679,8 @@ type CreateServingEndpoint struct { BudgetPolicyId types.String `tfsdk:"budget_policy_id"` // The core config of the serving endpoint. Config types.Object `tfsdk:"config"` + + Description types.String `tfsdk:"description"` // The name of the serving endpoint. This field is required and must be // unique across a Databricks workspace. An endpoint name can consist of // alphanumeric characters, dashes, and underscores. @@ -1701,24 +1695,6 @@ type CreateServingEndpoint struct { Tags types.List `tfsdk:"tags"` } -func (newState *CreateServingEndpoint) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServingEndpoint) { -} - -func (newState *CreateServingEndpoint) SyncEffectiveFieldsDuringRead(existingState CreateServingEndpoint) { -} - -func (c CreateServingEndpoint) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["ai_gateway"] = attrs["ai_gateway"].SetOptional() - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["config"] = attrs["config"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["rate_limits"] = attrs["rate_limits"].SetOptional() - attrs["route_optimized"] = attrs["route_optimized"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -1745,6 +1721,7 @@ func (o CreateServingEndpoint) ToObjectValue(ctx context.Context) basetypes.Obje "ai_gateway": o.AiGateway, "budget_policy_id": o.BudgetPolicyId, "config": o.Config, + "description": o.Description, "name": o.Name, "rate_limits": o.RateLimits, "route_optimized": o.RouteOptimized, @@ -1759,6 +1736,7 @@ func (o CreateServingEndpoint) Type(ctx context.Context) attr.Type { "ai_gateway": AiGatewayConfig{}.Type(ctx), "budget_policy_id": types.StringType, "config": EndpointCoreConfigInput{}.Type(ctx), + "description": types.StringType, "name": types.StringType, "rate_limits": basetypes.ListType{ ElemType: RateLimit{}.Type(ctx), @@ -3389,23 +3367,6 @@ type ExternalFunctionRequest struct { Path types.String `tfsdk:"path"` } -func (newState *ExternalFunctionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalFunctionRequest) { -} - -func (newState *ExternalFunctionRequest) SyncEffectiveFieldsDuringRead(existingState ExternalFunctionRequest) { -} - -func (c ExternalFunctionRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["connection_name"] = attrs["connection_name"].SetRequired() - attrs["headers"] = attrs["headers"].SetOptional() - attrs["json"] = attrs["json"].SetOptional() - attrs["method"] = attrs["method"].SetRequired() - attrs["params"] = attrs["params"].SetOptional() - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalFunctionRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -4448,6 +4409,36 @@ func (o *ListEndpointsResponse) SetEndpoints(ctx context.Context, v []ServingEnd o.Endpoints = types.ListValueMust(t, vs) } +type ListServingEndpointsRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServingEndpointsRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListServingEndpointsRequest) 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, ListServingEndpointsRequest +// only implements ToObjectValue() and Type(). +func (o ListServingEndpointsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListServingEndpointsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type LogsRequest struct { // The name of the serving endpoint that the served model belongs to. This // field is required. @@ -4767,20 +4758,6 @@ type PatchServingEndpointTags struct { Name types.String `tfsdk:"-"` } -func (newState *PatchServingEndpointTags) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchServingEndpointTags) { -} - -func (newState *PatchServingEndpointTags) SyncEffectiveFieldsDuringRead(existingState PatchServingEndpointTags) { -} - -func (c PatchServingEndpointTags) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["add_tags"] = attrs["add_tags"].SetOptional() - attrs["delete_tags"] = attrs["delete_tags"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 @@ -5138,23 +5115,6 @@ type PutAiGatewayRequest struct { UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config"` } -func (newState *PutAiGatewayRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayRequest) { -} - -func (newState *PutAiGatewayRequest) SyncEffectiveFieldsDuringRead(existingState PutAiGatewayRequest) { -} - -func (c PutAiGatewayRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["fallback_config"] = attrs["fallback_config"].SetOptional() - attrs["guardrails"] = attrs["guardrails"].SetOptional() - attrs["inference_table_config"] = attrs["inference_table_config"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["rate_limits"] = attrs["rate_limits"].SetOptional() - attrs["usage_tracking_config"] = attrs["usage_tracking_config"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAiGatewayRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5571,19 +5531,6 @@ type PutRequest struct { RateLimits types.List `tfsdk:"rate_limits"` } -func (newState *PutRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutRequest) { -} - -func (newState *PutRequest) SyncEffectiveFieldsDuringRead(existingState PutRequest) { -} - -func (c PutRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["rate_limits"] = attrs["rate_limits"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PutRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5777,31 +5724,6 @@ type QueryEndpointInput struct { Temperature types.Float64 `tfsdk:"temperature"` } -func (newState *QueryEndpointInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEndpointInput) { -} - -func (newState *QueryEndpointInput) SyncEffectiveFieldsDuringRead(existingState QueryEndpointInput) { -} - -func (c QueryEndpointInput) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dataframe_records"] = attrs["dataframe_records"].SetOptional() - attrs["dataframe_split"] = attrs["dataframe_split"].SetOptional() - attrs["extra_params"] = attrs["extra_params"].SetOptional() - attrs["input"] = attrs["input"].SetOptional() - attrs["inputs"] = attrs["inputs"].SetOptional() - attrs["instances"] = attrs["instances"].SetOptional() - attrs["max_tokens"] = attrs["max_tokens"].SetOptional() - attrs["messages"] = attrs["messages"].SetOptional() - attrs["n"] = attrs["n"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["prompt"] = attrs["prompt"].SetOptional() - attrs["stop"] = attrs["stop"].SetOptional() - attrs["stream"] = attrs["stream"].SetOptional() - attrs["temperature"] = attrs["temperature"].SetOptional() - - return attrs -} - // 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 @@ -6312,6 +6234,7 @@ func (o RateLimit) Type(ctx context.Context) attr.Type { } type Route struct { + ServedEntityName types.String `tfsdk:"served_entity_name"` // The name of the served model this route configures traffic for. ServedModelName types.String `tfsdk:"served_model_name"` // The percentage of endpoint traffic to send to this route. It must be an @@ -6326,7 +6249,8 @@ func (newState *Route) SyncEffectiveFieldsDuringRead(existingState Route) { } func (c Route) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["served_model_name"] = attrs["served_model_name"].SetRequired() + attrs["served_entity_name"] = attrs["served_entity_name"].SetOptional() + attrs["served_model_name"] = attrs["served_model_name"].SetOptional() attrs["traffic_percentage"] = attrs["traffic_percentage"].SetRequired() return attrs @@ -6350,6 +6274,7 @@ func (o Route) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ + "served_entity_name": o.ServedEntityName, "served_model_name": o.ServedModelName, "traffic_percentage": o.TrafficPercentage, }) @@ -6359,6 +6284,7 @@ func (o Route) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Route) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ + "served_entity_name": types.StringType, "served_model_name": types.StringType, "traffic_percentage": types.Int64Type, }, @@ -6604,8 +6530,7 @@ type ServedEntityOutput struct { // 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"` - // All fields are not sensitive as they are hard-coded in the system and - // made available to customers. + FoundationModel types.Object `tfsdk:"foundation_model"` // ARN of the instance profile that the served entity uses to access AWS // resources. @@ -6871,8 +6796,7 @@ type ServedEntitySpec struct { EntityVersion types.String `tfsdk:"entity_version"` ExternalModel types.Object `tfsdk:"external_model"` - // All fields are not sensitive as they are hard-coded in the system and - // made available to customers. + FoundationModel types.Object `tfsdk:"foundation_model"` Name types.String `tfsdk:"name"` @@ -7742,7 +7666,7 @@ func (o *ServingEndpoint) SetTags(ctx context.Context, v []EndpointTag) { type ServingEndpointAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -8211,7 +8135,7 @@ type ServingEndpointPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -8383,7 +8307,7 @@ func (o *ServingEndpointPermissions) SetAccessControlList(ctx context.Context, v type ServingEndpointPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -8439,19 +8363,6 @@ type ServingEndpointPermissionsRequest struct { ServingEndpointId types.String `tfsdk:"-"` } -func (newState *ServingEndpointPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermissionsRequest) { -} - -func (newState *ServingEndpointPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissionsRequest) { -} - -func (c ServingEndpointPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["serving_endpoint_id"] = attrs["serving_endpoint_id"].SetRequired() - - return attrs -} - // 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 @@ -8599,19 +8510,6 @@ type UpdateProvisionedThroughputEndpointConfigRequest struct { Name types.String `tfsdk:"-"` } -func (newState *UpdateProvisionedThroughputEndpointConfigRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProvisionedThroughputEndpointConfigRequest) { -} - -func (newState *UpdateProvisionedThroughputEndpointConfigRequest) SyncEffectiveFieldsDuringRead(existingState UpdateProvisionedThroughputEndpointConfigRequest) { -} - -func (c UpdateProvisionedThroughputEndpointConfigRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["config"] = attrs["config"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProvisionedThroughputEndpointConfigRequest. // Container types (types.Map, types.List, types.Set) and 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 cd6dc32c69..c9ff424b1e 100755 --- a/internal/service/settings_tf/legacy_model.go +++ b/internal/service/settings_tf/legacy_model.go @@ -679,12 +679,7 @@ type ClusterAutoRestartMessage_SdkV2 struct { CanToggle types.Bool `tfsdk:"can_toggle"` Enabled types.Bool `tfsdk:"enabled"` - // 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"` MaintenanceWindow types.List `tfsdk:"maintenance_window"` @@ -1176,7 +1171,6 @@ func (o *ComplianceSecurityProfile_SdkV2) SetComplianceStandards(ctx context.Con } type ComplianceSecurityProfileSetting_SdkV2 struct { - // SHIELD feature: CSP ComplianceSecurityProfileWorkspace types.List `tfsdk:"compliance_security_profile_workspace"` // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -1497,27 +1491,8 @@ type CreateIpAccessList_SdkV2 struct { IpAddresses types.List `tfsdk:"ip_addresses"` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label"` - // 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"` -} - -func (newState *CreateIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateIpAccessList_SdkV2) { -} - -func (newState *CreateIpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateIpAccessList_SdkV2) { -} -func (c CreateIpAccessList_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["ip_addresses"] = attrs["ip_addresses"].SetOptional() - attrs["label"] = attrs["label"].SetRequired() - attrs["list_type"] = attrs["list_type"].SetRequired() - - return attrs + ListType types.String `tfsdk:"list_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateIpAccessList. @@ -1587,7 +1562,6 @@ 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"` } @@ -1666,7 +1640,6 @@ func (o *CreateIpAccessListResponse_SdkV2) SetIpAccessList(ctx context.Context, } type CreateNetworkConnectivityConfigRequest_SdkV2 struct { - // Properties of the new network connectivity configuration. NetworkConnectivityConfig types.List `tfsdk:"network_connectivity_config"` } @@ -1791,6 +1764,7 @@ func (o CreateNetworkConnectivityConfiguration_SdkV2) Type(ctx context.Context) } type CreateNetworkPolicyRequest_SdkV2 struct { + // Network policy configuration details. NetworkPolicy types.List `tfsdk:"network_policy"` } @@ -1863,20 +1837,6 @@ type CreateNotificationDestinationRequest_SdkV2 struct { DisplayName types.String `tfsdk:"display_name"` } -func (newState *CreateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNotificationDestinationRequest_SdkV2) { -} - -func (newState *CreateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateNotificationDestinationRequest_SdkV2) { -} - -func (c CreateNotificationDestinationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["config"] = attrs["config"].SetOptional() - attrs["config"] = attrs["config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["display_name"] = attrs["display_name"].SetOptional() - - return attrs -} - // 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 @@ -1950,20 +1910,6 @@ type CreateOboTokenRequest_SdkV2 struct { LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds"` } -func (newState *CreateOboTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOboTokenRequest_SdkV2) { -} - -func (newState *CreateOboTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateOboTokenRequest_SdkV2) { -} - -func (c CreateOboTokenRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["application_id"] = attrs["application_id"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["lifetime_seconds"] = attrs["lifetime_seconds"].SetOptional() - - return attrs -} - // 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 @@ -2229,8 +2175,7 @@ func (o *CreatePrivateEndpointRule_SdkV2) SetResourceNames(ctx context.Context, type CreatePrivateEndpointRuleRequest_SdkV2 struct { // Your Network Connectivity Configuration ID. NetworkConnectivityConfigId types.String `tfsdk:"-"` - // Properties of the new private endpoint rule. Note that you must approve - // the endpoint in Azure portal after initialization. + PrivateEndpointRule types.List `tfsdk:"private_endpoint_rule"` } @@ -2306,19 +2251,6 @@ type CreateTokenRequest_SdkV2 struct { LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds"` } -func (newState *CreateTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTokenRequest_SdkV2) { -} - -func (newState *CreateTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTokenRequest_SdkV2) { -} - -func (c CreateTokenRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["lifetime_seconds"] = attrs["lifetime_seconds"].SetOptional() - - return attrs -} - // 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 @@ -2522,7 +2454,6 @@ func (o *CspEnablementAccount_SdkV2) SetComplianceStandards(ctx context.Context, } type CspEnablementAccountSetting_SdkV2 struct { - // Account level policy for CSP CspEnablementAccount types.List `tfsdk:"csp_enablement_account"` // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -4004,36 +3935,6 @@ func (o DeleteNetworkConnectivityConfigurationRequest_SdkV2) Type(ctx context.Co } } -type DeleteNetworkConnectivityConfigurationResponse_SdkV2 struct { -} - -// 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 -// 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 DeleteNetworkConnectivityConfigurationResponse_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, DeleteNetworkConnectivityConfigurationResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteNetworkConnectivityConfigurationResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteNetworkPolicyRequest_SdkV2 struct { // The unique identifier of the network policy to delete. NetworkPolicyId types.String `tfsdk:"-"` @@ -4070,36 +3971,6 @@ func (o DeleteNetworkPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { } } -type DeleteNetworkPolicyRpcResponse_SdkV2 struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkPolicyRpcResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteNetworkPolicyRpcResponse_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, DeleteNetworkPolicyRpcResponse_SdkV2 -// only implements ToObjectValue() and Type(). -func (o DeleteNetworkPolicyRpcResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteNetworkPolicyRpcResponse_SdkV2) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteNotificationDestinationRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } @@ -4916,12 +4787,7 @@ type EgressNetworkPolicyInternetAccessPolicy_SdkV2 struct { // Optional. If not specified, assume the policy is enforced for all // workloads. LogOnlyMode types.List `tfsdk:"log_only_mode"` - // 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"` } @@ -5071,11 +4937,7 @@ func (o *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SetLogOnlyMode(ctx conte // being, though going forwards we want to support host names and IP addresses. type EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2 struct { Destination types.String `tfsdk:"destination"` - // 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"` Type_ types.String `tfsdk:"type"` @@ -6123,7 +5985,6 @@ func (o EnhancedSecurityMonitoring_SdkV2) Type(ctx context.Context) attr.Type { } type EnhancedSecurityMonitoringSetting_SdkV2 struct { - // SHIELD feature: ESM EnhancedSecurityMonitoringWorkspace types.List `tfsdk:"enhanced_security_monitoring_workspace"` // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -6270,7 +6131,6 @@ func (o EsmEnablementAccount_SdkV2) Type(ctx context.Context) attr.Type { } type EsmEnablementAccountSetting_SdkV2 struct { - // Account level policy for ESM EsmEnablementAccount types.List `tfsdk:"esm_enablement_account"` // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -6478,21 +6338,6 @@ type ExchangeTokenRequest_SdkV2 struct { TokenType types.List `tfsdk:"tokenType"` } -func (newState *ExchangeTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeTokenRequest_SdkV2) { -} - -func (newState *ExchangeTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeTokenRequest_SdkV2) { -} - -func (c ExchangeTokenRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["partitionId"] = attrs["partitionId"].SetRequired() - attrs["partitionId"] = attrs["partitionId"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["scopes"] = attrs["scopes"].SetRequired() - attrs["tokenType"] = attrs["tokenType"].SetRequired() - - return attrs -} - // 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 @@ -6696,7 +6541,6 @@ 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"` } @@ -7345,6 +7189,96 @@ func (o GetDisableLegacyFeaturesRequest_SdkV2) Type(ctx context.Context) attr.Ty } } +type GetEnableExportNotebookRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEnableExportNotebookRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetEnableExportNotebookRequest_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, GetEnableExportNotebookRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEnableExportNotebookRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEnableExportNotebookRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type GetEnableNotebookTableClipboardRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEnableNotebookTableClipboardRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetEnableNotebookTableClipboardRequest_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, GetEnableNotebookTableClipboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEnableNotebookTableClipboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEnableNotebookTableClipboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type GetEnableResultsDownloadingRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEnableResultsDownloadingRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetEnableResultsDownloadingRequest_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, GetEnableResultsDownloadingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEnableResultsDownloadingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEnableResultsDownloadingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetEnhancedSecurityMonitoringSettingRequest_SdkV2 struct { // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -7466,7 +7400,6 @@ 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"` } @@ -8092,6 +8025,36 @@ func (o GetTokenManagementRequest_SdkV2) Type(ctx context.Context) attr.Type { } } +type GetTokenPermissionLevelsRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetTokenPermissionLevelsRequest_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, GetTokenPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetTokenPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetTokenPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetTokenPermissionLevelsResponse_SdkV2 struct { // Specific permission levels PermissionLevels types.List `tfsdk:"permission_levels"` @@ -8170,6 +8133,36 @@ func (o *GetTokenPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context o.PermissionLevels = types.ListValueMust(t, vs) } +type GetTokenPermissionsRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetTokenPermissionsRequest_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, GetTokenPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetTokenPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetTokenPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + // Token with specified Token ID was successfully returned. type GetTokenResponse_SdkV2 struct { TokenInfo types.List `tfsdk:"token_info"` @@ -8301,12 +8294,7 @@ type IpAccessListInfo_SdkV2 struct { Label types.String `tfsdk:"label"` // Universally unique identifier (UUID) of the IP access list. ListId types.String `tfsdk:"list_id"` - // 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"` // Update timestamp in milliseconds. UpdatedAt types.Int64 `tfsdk:"updated_at"` @@ -8492,6 +8480,36 @@ func (o *ListIpAccessListResponse_SdkV2) SetIpAccessLists(ctx context.Context, v o.IpAccessLists = types.ListValueMust(t, vs) } +type ListIpAccessLists_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListIpAccessLists. +// Container types (types.Map, types.List, types.Set) and 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 ListIpAccessLists_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, ListIpAccessLists_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListIpAccessLists_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListIpAccessLists_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListNetworkConnectivityConfigurationsRequest_SdkV2 struct { // Pagination token to go to next page based on previous query. PageToken types.String `tfsdk:"-"` @@ -9155,6 +9173,36 @@ func (o ListTokenManagementRequest_SdkV2) Type(ctx context.Context) attr.Type { } } +type ListTokens_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTokens. +// Container types (types.Map, types.List, types.Set) and 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 ListTokens_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, ListTokens_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListTokens_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListTokens_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + // Tokens were successfully returned. type ListTokensResponse_SdkV2 struct { // Token metadata of each user-created token in the workspace @@ -10051,13 +10099,8 @@ func (o *NccEgressConfig_SdkV2) SetTargetRules(ctx context.Context, v NccEgressT // Default rules don't have specific targets. 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"` - // 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"` } @@ -10900,13 +10943,6 @@ func (o PartitionId_SdkV2) Type(ctx context.Context) attr.Type { } type PersonalComputeMessage_SdkV2 struct { - // ON: Grants all users in all workspaces access to the Personal Compute - // default policy, allowing all users to create single-machine compute - // resources. DELEGATE: Moves access control for the Personal Compute - // default policy to individual workspaces and requires a workspace’s - // users or groups to be added to the ACLs of that workspace’s Personal - // Compute default policy before they will be able to create compute - // resources through that policy. Value types.String `tfsdk:"value"` } @@ -11126,29 +11162,8 @@ type ReplaceIpAccessList_SdkV2 struct { IpAddresses types.List `tfsdk:"ip_addresses"` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label"` - // 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"` -} - -func (newState *ReplaceIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReplaceIpAccessList_SdkV2) { -} - -func (newState *ReplaceIpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReplaceIpAccessList_SdkV2) { -} - -func (c ReplaceIpAccessList_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["enabled"] = attrs["enabled"].SetRequired() - attrs["ip_access_list_id"] = attrs["ip_access_list_id"].SetRequired() - attrs["ip_addresses"] = attrs["ip_addresses"].SetOptional() - attrs["label"] = attrs["label"].SetRequired() - attrs["list_type"] = attrs["list_type"].SetRequired() - return attrs + ListType types.String `tfsdk:"list_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceIpAccessList. @@ -11401,18 +11416,6 @@ type RevokeTokenRequest_SdkV2 struct { TokenId types.String `tfsdk:"token_id"` } -func (newState *RevokeTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RevokeTokenRequest_SdkV2) { -} - -func (newState *RevokeTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RevokeTokenRequest_SdkV2) { -} - -func (c RevokeTokenRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["token_id"] = attrs["token_id"].SetRequired() - - return attrs -} - // 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 @@ -11717,7 +11720,7 @@ func (o StringMessage_SdkV2) Type(ctx context.Context) attr.Type { type TokenAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -11969,7 +11972,7 @@ type TokenPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -12141,7 +12144,7 @@ func (o *TokenPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []T type TokenPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -12195,18 +12198,6 @@ type TokenPermissionsRequest_SdkV2 struct { AccessControlList types.List `tfsdk:"access_control_list"` } -func (newState *TokenPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissionsRequest_SdkV2) { -} - -func (newState *TokenPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenPermissionsRequest_SdkV2) { -} - -func (c TokenPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - - return attrs -} - // 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 @@ -12289,21 +12280,6 @@ type UpdateAccountIpAccessEnableRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateAccountIpAccessEnableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAccountIpAccessEnableRequest_SdkV2) { -} - -func (newState *UpdateAccountIpAccessEnableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAccountIpAccessEnableRequest_SdkV2) { -} - -func (c UpdateAccountIpAccessEnableRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAccountIpAccessEnableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12390,21 +12366,6 @@ type UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { -} - -func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { -} - -func (c UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -12491,21 +12452,6 @@ type UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { -} - -func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { -} - -func (c UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -12592,21 +12538,6 @@ type UpdateAutomaticClusterUpdateSettingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAutomaticClusterUpdateSettingRequest_SdkV2) { -} - -func (newState *UpdateAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAutomaticClusterUpdateSettingRequest_SdkV2) { -} - -func (c UpdateAutomaticClusterUpdateSettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -12693,21 +12624,6 @@ type UpdateComplianceSecurityProfileSettingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateComplianceSecurityProfileSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateComplianceSecurityProfileSettingRequest_SdkV2) { -} - -func (newState *UpdateComplianceSecurityProfileSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateComplianceSecurityProfileSettingRequest_SdkV2) { -} - -func (c UpdateComplianceSecurityProfileSettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -12794,21 +12710,6 @@ type UpdateCspEnablementAccountSettingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCspEnablementAccountSettingRequest_SdkV2) { -} - -func (newState *UpdateCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCspEnablementAccountSettingRequest_SdkV2) { -} - -func (c UpdateCspEnablementAccountSettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -12895,21 +12796,6 @@ type UpdateDashboardEmailSubscriptionsRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateDashboardEmailSubscriptionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDashboardEmailSubscriptionsRequest_SdkV2) { -} - -func (newState *UpdateDashboardEmailSubscriptionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDashboardEmailSubscriptionsRequest_SdkV2) { -} - -func (c UpdateDashboardEmailSubscriptionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDashboardEmailSubscriptionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12992,31 +12878,8 @@ type UpdateDefaultNamespaceSettingRequest_SdkV2 struct { // wildcards, as it can lead to unintended results if the API changes in the // future. FieldMask types.String `tfsdk:"field_mask"` - // This represents the setting configuration for the default namespace in - // the Databricks workspace. Setting the default catalog for the workspace - // determines the catalog that is used when queries do not reference a fully - // qualified 3 level name. For example, if the default catalog is set to - // 'retail_prod' then a query 'SELECT * FROM myTable' would reference the - // object 'retail_prod.default.myTable' (the schema 'default' is always - // assumed). This setting requires a restart of clusters and SQL warehouses - // to take effect. Additionally, the default namespace only applies when - // using Unity Catalog-enabled compute. - Setting types.List `tfsdk:"setting"` -} - -func (newState *UpdateDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDefaultNamespaceSettingRequest_SdkV2) { -} - -func (newState *UpdateDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDefaultNamespaceSettingRequest_SdkV2) { -} - -func (c UpdateDefaultNamespaceSettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - return attrs + Setting types.List `tfsdk:"setting"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDefaultNamespaceSettingRequest. @@ -13105,21 +12968,6 @@ type UpdateDisableLegacyAccessRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyAccessRequest_SdkV2) { -} - -func (newState *UpdateDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyAccessRequest_SdkV2) { -} - -func (c UpdateDisableLegacyAccessRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -13206,21 +13054,6 @@ type UpdateDisableLegacyDbfsRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyDbfsRequest_SdkV2) { -} - -func (newState *UpdateDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyDbfsRequest_SdkV2) { -} - -func (c UpdateDisableLegacyDbfsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -13307,21 +13140,6 @@ type UpdateDisableLegacyFeaturesRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyFeaturesRequest_SdkV2) { -} - -func (newState *UpdateDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyFeaturesRequest_SdkV2) { -} - -func (c UpdateDisableLegacyFeaturesRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -13408,21 +13226,6 @@ type UpdateEnableExportNotebookRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateEnableExportNotebookRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnableExportNotebookRequest_SdkV2) { -} - -func (newState *UpdateEnableExportNotebookRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEnableExportNotebookRequest_SdkV2) { -} - -func (c UpdateEnableExportNotebookRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEnableExportNotebookRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13509,21 +13312,6 @@ type UpdateEnableNotebookTableClipboardRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateEnableNotebookTableClipboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnableNotebookTableClipboardRequest_SdkV2) { -} - -func (newState *UpdateEnableNotebookTableClipboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEnableNotebookTableClipboardRequest_SdkV2) { -} - -func (c UpdateEnableNotebookTableClipboardRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEnableNotebookTableClipboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13610,21 +13398,6 @@ type UpdateEnableResultsDownloadingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateEnableResultsDownloadingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnableResultsDownloadingRequest_SdkV2) { -} - -func (newState *UpdateEnableResultsDownloadingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEnableResultsDownloadingRequest_SdkV2) { -} - -func (c UpdateEnableResultsDownloadingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEnableResultsDownloadingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13711,21 +13484,6 @@ type UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) { -} - -func (newState *UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) { -} - -func (c UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -13812,21 +13570,6 @@ type UpdateEsmEnablementAccountSettingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEsmEnablementAccountSettingRequest_SdkV2) { -} - -func (newState *UpdateEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEsmEnablementAccountSettingRequest_SdkV2) { -} - -func (c UpdateEsmEnablementAccountSettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -13902,29 +13645,8 @@ type UpdateIpAccessList_SdkV2 struct { IpAddresses types.List `tfsdk:"ip_addresses"` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label"` - // 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"` -} - -func (newState *UpdateIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateIpAccessList_SdkV2) { -} - -func (newState *UpdateIpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateIpAccessList_SdkV2) { -} - -func (c UpdateIpAccessList_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["enabled"] = attrs["enabled"].SetOptional() - attrs["ip_access_list_id"] = attrs["ip_access_list_id"].SetRequired() - attrs["ip_addresses"] = attrs["ip_addresses"].SetOptional() - attrs["label"] = attrs["label"].SetOptional() - attrs["list_type"] = attrs["list_type"].SetOptional() - return attrs + ListType types.String `tfsdk:"list_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateIpAccessList. @@ -14017,21 +13739,6 @@ type UpdateLlmProxyPartnerPoweredAccountRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateLlmProxyPartnerPoweredAccountRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateLlmProxyPartnerPoweredAccountRequest_SdkV2) { -} - -func (newState *UpdateLlmProxyPartnerPoweredAccountRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateLlmProxyPartnerPoweredAccountRequest_SdkV2) { -} - -func (c UpdateLlmProxyPartnerPoweredAccountRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateLlmProxyPartnerPoweredAccountRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14118,21 +13825,6 @@ type UpdateLlmProxyPartnerPoweredEnforceRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateLlmProxyPartnerPoweredEnforceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateLlmProxyPartnerPoweredEnforceRequest_SdkV2) { -} - -func (newState *UpdateLlmProxyPartnerPoweredEnforceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateLlmProxyPartnerPoweredEnforceRequest_SdkV2) { -} - -func (c UpdateLlmProxyPartnerPoweredEnforceRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateLlmProxyPartnerPoweredEnforceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14219,21 +13911,6 @@ type UpdateLlmProxyPartnerPoweredWorkspaceRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateLlmProxyPartnerPoweredWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateLlmProxyPartnerPoweredWorkspaceRequest_SdkV2) { -} - -func (newState *UpdateLlmProxyPartnerPoweredWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateLlmProxyPartnerPoweredWorkspaceRequest_SdkV2) { -} - -func (c UpdateLlmProxyPartnerPoweredWorkspaceRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateLlmProxyPartnerPoweredWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14303,8 +13980,7 @@ type UpdateNccPrivateEndpointRuleRequest_SdkV2 struct { // The ID of a network connectivity configuration, which is the parent // resource of this private endpoint rule object. NetworkConnectivityConfigId types.String `tfsdk:"-"` - // Properties of the new private endpoint rule. Note that you must approve - // the endpoint in Azure portal after initialization. + PrivateEndpointRule types.List `tfsdk:"private_endpoint_rule"` // Your private endpoint rule ID. PrivateEndpointRuleId types.String `tfsdk:"-"` @@ -14385,6 +14061,7 @@ func (o *UpdateNccPrivateEndpointRuleRequest_SdkV2) SetPrivateEndpointRule(ctx c } type UpdateNetworkPolicyRequest_SdkV2 struct { + // Updated network policy configuration details. NetworkPolicy types.List `tfsdk:"network_policy"` // The unique identifier for the network policy. NetworkPolicyId types.String `tfsdk:"-"` @@ -14463,21 +14140,6 @@ type UpdateNotificationDestinationRequest_SdkV2 struct { Id types.String `tfsdk:"-"` } -func (newState *UpdateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateNotificationDestinationRequest_SdkV2) { -} - -func (newState *UpdateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateNotificationDestinationRequest_SdkV2) { -} - -func (c UpdateNotificationDestinationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["config"] = attrs["config"].SetOptional() - attrs["config"] = attrs["config"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["display_name"] = attrs["display_name"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // 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 @@ -14564,21 +14226,6 @@ type UpdatePersonalComputeSettingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdatePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalComputeSettingRequest_SdkV2) { -} - -func (newState *UpdatePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalComputeSettingRequest_SdkV2) { -} - -func (c UpdatePersonalComputeSettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -14826,21 +14473,6 @@ type UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) { -} - -func (newState *UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) { -} - -func (c UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -14927,21 +14559,6 @@ type UpdateSqlResultsDownloadRequest_SdkV2 struct { Setting types.List `tfsdk:"setting"` } -func (newState *UpdateSqlResultsDownloadRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSqlResultsDownloadRequest_SdkV2) { -} - -func (newState *UpdateSqlResultsDownloadRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateSqlResultsDownloadRequest_SdkV2) { -} - -func (c UpdateSqlResultsDownloadRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - attrs["setting"] = attrs["setting"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateSqlResultsDownloadRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -15010,7 +14627,7 @@ func (o *UpdateSqlResultsDownloadRequest_SdkV2) SetSetting(ctx context.Context, type UpdateWorkspaceNetworkOptionRequest_SdkV2 struct { // The workspace ID. WorkspaceId types.Int64 `tfsdk:"-"` - + // The network option details for the workspace. WorkspaceNetworkOption types.List `tfsdk:"workspace_network_option"` } diff --git a/internal/service/settings_tf/model.go b/internal/service/settings_tf/model.go index 253975f223..d30f248de8 100755 --- a/internal/service/settings_tf/model.go +++ b/internal/service/settings_tf/model.go @@ -673,12 +673,7 @@ type ClusterAutoRestartMessage struct { CanToggle types.Bool `tfsdk:"can_toggle"` Enabled types.Bool `tfsdk:"enabled"` - // 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"` MaintenanceWindow types.Object `tfsdk:"maintenance_window"` @@ -1166,7 +1161,6 @@ func (o *ComplianceSecurityProfile) SetComplianceStandards(ctx context.Context, } type ComplianceSecurityProfileSetting struct { - // SHIELD feature: CSP ComplianceSecurityProfileWorkspace types.Object `tfsdk:"compliance_security_profile_workspace"` // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -1481,27 +1475,8 @@ type CreateIpAccessList struct { IpAddresses types.List `tfsdk:"ip_addresses"` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label"` - // 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"` -} - -func (newState *CreateIpAccessList) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateIpAccessList) { -} - -func (newState *CreateIpAccessList) SyncEffectiveFieldsDuringRead(existingState CreateIpAccessList) { -} -func (c CreateIpAccessList) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["ip_addresses"] = attrs["ip_addresses"].SetOptional() - attrs["label"] = attrs["label"].SetRequired() - attrs["list_type"] = attrs["list_type"].SetRequired() - - return attrs + ListType types.String `tfsdk:"list_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateIpAccessList. @@ -1571,7 +1546,6 @@ 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"` } @@ -1649,7 +1623,6 @@ func (o *CreateIpAccessListResponse) SetIpAccessList(ctx context.Context, v IpAc } type CreateNetworkConnectivityConfigRequest struct { - // Properties of the new network connectivity configuration. NetworkConnectivityConfig types.Object `tfsdk:"network_connectivity_config"` } @@ -1774,6 +1747,7 @@ func (o CreateNetworkConnectivityConfiguration) Type(ctx context.Context) attr.T } type CreateNetworkPolicyRequest struct { + // Network policy configuration details. NetworkPolicy types.Object `tfsdk:"network_policy"` } @@ -1846,19 +1820,6 @@ type CreateNotificationDestinationRequest struct { DisplayName types.String `tfsdk:"display_name"` } -func (newState *CreateNotificationDestinationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNotificationDestinationRequest) { -} - -func (newState *CreateNotificationDestinationRequest) SyncEffectiveFieldsDuringRead(existingState CreateNotificationDestinationRequest) { -} - -func (c CreateNotificationDestinationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["config"] = attrs["config"].SetOptional() - attrs["display_name"] = attrs["display_name"].SetOptional() - - return attrs -} - // 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 @@ -1932,20 +1893,6 @@ type CreateOboTokenRequest struct { LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds"` } -func (newState *CreateOboTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOboTokenRequest) { -} - -func (newState *CreateOboTokenRequest) SyncEffectiveFieldsDuringRead(existingState CreateOboTokenRequest) { -} - -func (c CreateOboTokenRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["application_id"] = attrs["application_id"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["lifetime_seconds"] = attrs["lifetime_seconds"].SetOptional() - - return attrs -} - // 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 @@ -2210,8 +2157,7 @@ func (o *CreatePrivateEndpointRule) SetResourceNames(ctx context.Context, v []ty type CreatePrivateEndpointRuleRequest struct { // Your Network Connectivity Configuration ID. NetworkConnectivityConfigId types.String `tfsdk:"-"` - // Properties of the new private endpoint rule. Note that you must approve - // the endpoint in Azure portal after initialization. + PrivateEndpointRule types.Object `tfsdk:"private_endpoint_rule"` } @@ -2287,19 +2233,6 @@ type CreateTokenRequest struct { LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds"` } -func (newState *CreateTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTokenRequest) { -} - -func (newState *CreateTokenRequest) SyncEffectiveFieldsDuringRead(existingState CreateTokenRequest) { -} - -func (c CreateTokenRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["lifetime_seconds"] = attrs["lifetime_seconds"].SetOptional() - - return attrs -} - // 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 @@ -2502,7 +2435,6 @@ func (o *CspEnablementAccount) SetComplianceStandards(ctx context.Context, v []t } type CspEnablementAccountSetting struct { - // Account level policy for CSP CspEnablementAccount types.Object `tfsdk:"csp_enablement_account"` // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -3981,36 +3913,6 @@ func (o DeleteNetworkConnectivityConfigurationRequest) Type(ctx context.Context) } } -type DeleteNetworkConnectivityConfigurationResponse struct { -} - -// 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 -// 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 DeleteNetworkConnectivityConfigurationResponse) 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, DeleteNetworkConnectivityConfigurationResponse -// only implements ToObjectValue() and Type(). -func (o DeleteNetworkConnectivityConfigurationResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteNetworkPolicyRequest struct { // The unique identifier of the network policy to delete. NetworkPolicyId types.String `tfsdk:"-"` @@ -4047,36 +3949,6 @@ func (o DeleteNetworkPolicyRequest) Type(ctx context.Context) attr.Type { } } -type DeleteNetworkPolicyRpcResponse struct { -} - -// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkPolicyRpcResponse. -// Container types (types.Map, types.List, types.Set) and 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 DeleteNetworkPolicyRpcResponse) 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, DeleteNetworkPolicyRpcResponse -// only implements ToObjectValue() and Type(). -func (o DeleteNetworkPolicyRpcResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { - return types.ObjectValueMust( - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - map[string]attr.Value{}) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteNetworkPolicyRpcResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } -} - type DeleteNotificationDestinationRequest struct { Id types.String `tfsdk:"-"` } @@ -4889,12 +4761,7 @@ type EgressNetworkPolicyInternetAccessPolicy struct { // Optional. If not specified, assume the policy is enforced for all // workloads. LogOnlyMode types.Object `tfsdk:"log_only_mode"` - // 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"` } @@ -5043,11 +4910,7 @@ func (o *EgressNetworkPolicyInternetAccessPolicy) SetLogOnlyMode(ctx context.Con // being, though going forwards we want to support host names and IP addresses. type EgressNetworkPolicyInternetAccessPolicyInternetDestination struct { Destination types.String `tfsdk:"destination"` - // 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"` Type_ types.String `tfsdk:"type"` @@ -6091,7 +5954,6 @@ func (o EnhancedSecurityMonitoring) Type(ctx context.Context) attr.Type { } type EnhancedSecurityMonitoringSetting struct { - // SHIELD feature: ESM EnhancedSecurityMonitoringWorkspace types.Object `tfsdk:"enhanced_security_monitoring_workspace"` // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -6237,7 +6099,6 @@ func (o EsmEnablementAccount) Type(ctx context.Context) attr.Type { } type EsmEnablementAccountSetting struct { - // Account level policy for ESM EsmEnablementAccount types.Object `tfsdk:"esm_enablement_account"` // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -6444,20 +6305,6 @@ type ExchangeTokenRequest struct { TokenType types.List `tfsdk:"tokenType"` } -func (newState *ExchangeTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeTokenRequest) { -} - -func (newState *ExchangeTokenRequest) SyncEffectiveFieldsDuringRead(existingState ExchangeTokenRequest) { -} - -func (c ExchangeTokenRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["partitionId"] = attrs["partitionId"].SetRequired() - attrs["scopes"] = attrs["scopes"].SetRequired() - attrs["tokenType"] = attrs["tokenType"].SetRequired() - - return attrs -} - // 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 @@ -6661,7 +6508,6 @@ 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"` } @@ -7309,6 +7155,96 @@ func (o GetDisableLegacyFeaturesRequest) Type(ctx context.Context) attr.Type { } } +type GetEnableExportNotebookRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEnableExportNotebookRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetEnableExportNotebookRequest) 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, GetEnableExportNotebookRequest +// only implements ToObjectValue() and Type(). +func (o GetEnableExportNotebookRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEnableExportNotebookRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type GetEnableNotebookTableClipboardRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEnableNotebookTableClipboardRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetEnableNotebookTableClipboardRequest) 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, GetEnableNotebookTableClipboardRequest +// only implements ToObjectValue() and Type(). +func (o GetEnableNotebookTableClipboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEnableNotebookTableClipboardRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type GetEnableResultsDownloadingRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEnableResultsDownloadingRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetEnableResultsDownloadingRequest) 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, GetEnableResultsDownloadingRequest +// only implements ToObjectValue() and Type(). +func (o GetEnableResultsDownloadingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEnableResultsDownloadingRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetEnhancedSecurityMonitoringSettingRequest struct { // etag used for versioning. The response is at least as fresh as the eTag // provided. This is used for optimistic concurrency control as a way to @@ -7430,7 +7366,6 @@ 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"` } @@ -8055,6 +7990,36 @@ func (o GetTokenManagementRequest) Type(ctx context.Context) attr.Type { } } +type GetTokenPermissionLevelsRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetTokenPermissionLevelsRequest) 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, GetTokenPermissionLevelsRequest +// only implements ToObjectValue() and Type(). +func (o GetTokenPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetTokenPermissionLevelsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetTokenPermissionLevelsResponse struct { // Specific permission levels PermissionLevels types.List `tfsdk:"permission_levels"` @@ -8133,6 +8098,36 @@ func (o *GetTokenPermissionLevelsResponse) SetPermissionLevels(ctx context.Conte o.PermissionLevels = types.ListValueMust(t, vs) } +type GetTokenPermissionsRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetTokenPermissionsRequest) 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, GetTokenPermissionsRequest +// only implements ToObjectValue() and Type(). +func (o GetTokenPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetTokenPermissionsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + // Token with specified Token ID was successfully returned. type GetTokenResponse struct { TokenInfo types.Object `tfsdk:"token_info"` @@ -8263,12 +8258,7 @@ type IpAccessListInfo struct { Label types.String `tfsdk:"label"` // Universally unique identifier (UUID) of the IP access list. ListId types.String `tfsdk:"list_id"` - // 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"` // Update timestamp in milliseconds. UpdatedAt types.Int64 `tfsdk:"updated_at"` @@ -8454,6 +8444,36 @@ func (o *ListIpAccessListResponse) SetIpAccessLists(ctx context.Context, v []IpA o.IpAccessLists = types.ListValueMust(t, vs) } +type ListIpAccessLists struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListIpAccessLists. +// Container types (types.Map, types.List, types.Set) and 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 ListIpAccessLists) 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, ListIpAccessLists +// only implements ToObjectValue() and Type(). +func (o ListIpAccessLists) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListIpAccessLists) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListNetworkConnectivityConfigurationsRequest struct { // Pagination token to go to next page based on previous query. PageToken types.String `tfsdk:"-"` @@ -9117,6 +9137,36 @@ func (o ListTokenManagementRequest) Type(ctx context.Context) attr.Type { } } +type ListTokens struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTokens. +// Container types (types.Map, types.List, types.Set) and 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 ListTokens) 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, ListTokens +// only implements ToObjectValue() and Type(). +func (o ListTokens) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListTokens) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + // Tokens were successfully returned. type ListTokensResponse struct { // Token metadata of each user-created token in the workspace @@ -10008,13 +10058,8 @@ func (o *NccEgressConfig) SetTargetRules(ctx context.Context, v NccEgressTargetR // Default rules don't have specific targets. 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"` - // 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"` } @@ -10852,13 +10897,6 @@ func (o PartitionId) Type(ctx context.Context) attr.Type { } type PersonalComputeMessage struct { - // ON: Grants all users in all workspaces access to the Personal Compute - // default policy, allowing all users to create single-machine compute - // resources. DELEGATE: Moves access control for the Personal Compute - // default policy to individual workspaces and requires a workspace’s - // users or groups to be added to the ACLs of that workspace’s Personal - // Compute default policy before they will be able to create compute - // resources through that policy. Value types.String `tfsdk:"value"` } @@ -11077,29 +11115,8 @@ type ReplaceIpAccessList struct { IpAddresses types.List `tfsdk:"ip_addresses"` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label"` - // 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"` -} - -func (newState *ReplaceIpAccessList) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReplaceIpAccessList) { -} - -func (newState *ReplaceIpAccessList) SyncEffectiveFieldsDuringRead(existingState ReplaceIpAccessList) { -} - -func (c ReplaceIpAccessList) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["enabled"] = attrs["enabled"].SetRequired() - attrs["ip_access_list_id"] = attrs["ip_access_list_id"].SetRequired() - attrs["ip_addresses"] = attrs["ip_addresses"].SetOptional() - attrs["label"] = attrs["label"].SetRequired() - attrs["list_type"] = attrs["list_type"].SetRequired() - return attrs + ListType types.String `tfsdk:"list_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceIpAccessList. @@ -11351,18 +11368,6 @@ type RevokeTokenRequest struct { TokenId types.String `tfsdk:"token_id"` } -func (newState *RevokeTokenRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RevokeTokenRequest) { -} - -func (newState *RevokeTokenRequest) SyncEffectiveFieldsDuringRead(existingState RevokeTokenRequest) { -} - -func (c RevokeTokenRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["token_id"] = attrs["token_id"].SetRequired() - - return attrs -} - // 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 @@ -11666,7 +11671,7 @@ func (o StringMessage) Type(ctx context.Context) attr.Type { type TokenAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -11918,7 +11923,7 @@ type TokenPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -12090,7 +12095,7 @@ func (o *TokenPermissions) SetAccessControlList(ctx context.Context, v []TokenAc type TokenPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -12144,18 +12149,6 @@ type TokenPermissionsRequest struct { AccessControlList types.List `tfsdk:"access_control_list"` } -func (newState *TokenPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissionsRequest) { -} - -func (newState *TokenPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState TokenPermissionsRequest) { -} - -func (c TokenPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - - return attrs -} - // 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 @@ -12238,20 +12231,6 @@ type UpdateAccountIpAccessEnableRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateAccountIpAccessEnableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAccountIpAccessEnableRequest) { -} - -func (newState *UpdateAccountIpAccessEnableRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAccountIpAccessEnableRequest) { -} - -func (c UpdateAccountIpAccessEnableRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAccountIpAccessEnableRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12338,20 +12317,6 @@ type UpdateAibiDashboardEmbeddingAccessPolicySettingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) { -} - -func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) { -} - -func (c UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -12438,20 +12403,6 @@ type UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) { -} - -func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) { -} - -func (c UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -12538,20 +12489,6 @@ type UpdateAutomaticClusterUpdateSettingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateAutomaticClusterUpdateSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAutomaticClusterUpdateSettingRequest) { -} - -func (newState *UpdateAutomaticClusterUpdateSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAutomaticClusterUpdateSettingRequest) { -} - -func (c UpdateAutomaticClusterUpdateSettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -12638,20 +12575,6 @@ type UpdateComplianceSecurityProfileSettingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateComplianceSecurityProfileSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateComplianceSecurityProfileSettingRequest) { -} - -func (newState *UpdateComplianceSecurityProfileSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateComplianceSecurityProfileSettingRequest) { -} - -func (c UpdateComplianceSecurityProfileSettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -12738,20 +12661,6 @@ type UpdateCspEnablementAccountSettingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateCspEnablementAccountSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCspEnablementAccountSettingRequest) { -} - -func (newState *UpdateCspEnablementAccountSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCspEnablementAccountSettingRequest) { -} - -func (c UpdateCspEnablementAccountSettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -12838,20 +12747,6 @@ type UpdateDashboardEmailSubscriptionsRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateDashboardEmailSubscriptionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDashboardEmailSubscriptionsRequest) { -} - -func (newState *UpdateDashboardEmailSubscriptionsRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDashboardEmailSubscriptionsRequest) { -} - -func (c UpdateDashboardEmailSubscriptionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDashboardEmailSubscriptionsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -12934,30 +12829,8 @@ type UpdateDefaultNamespaceSettingRequest struct { // wildcards, as it can lead to unintended results if the API changes in the // future. FieldMask types.String `tfsdk:"field_mask"` - // This represents the setting configuration for the default namespace in - // the Databricks workspace. Setting the default catalog for the workspace - // determines the catalog that is used when queries do not reference a fully - // qualified 3 level name. For example, if the default catalog is set to - // 'retail_prod' then a query 'SELECT * FROM myTable' would reference the - // object 'retail_prod.default.myTable' (the schema 'default' is always - // assumed). This setting requires a restart of clusters and SQL warehouses - // to take effect. Additionally, the default namespace only applies when - // using Unity Catalog-enabled compute. - Setting types.Object `tfsdk:"setting"` -} - -func (newState *UpdateDefaultNamespaceSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDefaultNamespaceSettingRequest) { -} - -func (newState *UpdateDefaultNamespaceSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDefaultNamespaceSettingRequest) { -} -func (c UpdateDefaultNamespaceSettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs + Setting types.Object `tfsdk:"setting"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDefaultNamespaceSettingRequest. @@ -13046,20 +12919,6 @@ type UpdateDisableLegacyAccessRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateDisableLegacyAccessRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyAccessRequest) { -} - -func (newState *UpdateDisableLegacyAccessRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyAccessRequest) { -} - -func (c UpdateDisableLegacyAccessRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -13146,20 +13005,6 @@ type UpdateDisableLegacyDbfsRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateDisableLegacyDbfsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyDbfsRequest) { -} - -func (newState *UpdateDisableLegacyDbfsRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyDbfsRequest) { -} - -func (c UpdateDisableLegacyDbfsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -13246,20 +13091,6 @@ type UpdateDisableLegacyFeaturesRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateDisableLegacyFeaturesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyFeaturesRequest) { -} - -func (newState *UpdateDisableLegacyFeaturesRequest) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyFeaturesRequest) { -} - -func (c UpdateDisableLegacyFeaturesRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -13346,20 +13177,6 @@ type UpdateEnableExportNotebookRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateEnableExportNotebookRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnableExportNotebookRequest) { -} - -func (newState *UpdateEnableExportNotebookRequest) SyncEffectiveFieldsDuringRead(existingState UpdateEnableExportNotebookRequest) { -} - -func (c UpdateEnableExportNotebookRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEnableExportNotebookRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13446,20 +13263,6 @@ type UpdateEnableNotebookTableClipboardRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateEnableNotebookTableClipboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnableNotebookTableClipboardRequest) { -} - -func (newState *UpdateEnableNotebookTableClipboardRequest) SyncEffectiveFieldsDuringRead(existingState UpdateEnableNotebookTableClipboardRequest) { -} - -func (c UpdateEnableNotebookTableClipboardRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEnableNotebookTableClipboardRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13546,20 +13349,6 @@ type UpdateEnableResultsDownloadingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateEnableResultsDownloadingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnableResultsDownloadingRequest) { -} - -func (newState *UpdateEnableResultsDownloadingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateEnableResultsDownloadingRequest) { -} - -func (c UpdateEnableResultsDownloadingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEnableResultsDownloadingRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -13646,20 +13435,6 @@ type UpdateEnhancedSecurityMonitoringSettingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateEnhancedSecurityMonitoringSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnhancedSecurityMonitoringSettingRequest) { -} - -func (newState *UpdateEnhancedSecurityMonitoringSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateEnhancedSecurityMonitoringSettingRequest) { -} - -func (c UpdateEnhancedSecurityMonitoringSettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -13746,20 +13521,6 @@ type UpdateEsmEnablementAccountSettingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateEsmEnablementAccountSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEsmEnablementAccountSettingRequest) { -} - -func (newState *UpdateEsmEnablementAccountSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateEsmEnablementAccountSettingRequest) { -} - -func (c UpdateEsmEnablementAccountSettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -13835,29 +13596,8 @@ type UpdateIpAccessList struct { IpAddresses types.List `tfsdk:"ip_addresses"` // Label for the IP access list. This **cannot** be empty. Label types.String `tfsdk:"label"` - // 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"` -} - -func (newState *UpdateIpAccessList) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateIpAccessList) { -} - -func (newState *UpdateIpAccessList) SyncEffectiveFieldsDuringRead(existingState UpdateIpAccessList) { -} - -func (c UpdateIpAccessList) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["enabled"] = attrs["enabled"].SetOptional() - attrs["ip_access_list_id"] = attrs["ip_access_list_id"].SetRequired() - attrs["ip_addresses"] = attrs["ip_addresses"].SetOptional() - attrs["label"] = attrs["label"].SetOptional() - attrs["list_type"] = attrs["list_type"].SetOptional() - return attrs + ListType types.String `tfsdk:"list_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateIpAccessList. @@ -13950,20 +13690,6 @@ type UpdateLlmProxyPartnerPoweredAccountRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateLlmProxyPartnerPoweredAccountRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateLlmProxyPartnerPoweredAccountRequest) { -} - -func (newState *UpdateLlmProxyPartnerPoweredAccountRequest) SyncEffectiveFieldsDuringRead(existingState UpdateLlmProxyPartnerPoweredAccountRequest) { -} - -func (c UpdateLlmProxyPartnerPoweredAccountRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateLlmProxyPartnerPoweredAccountRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14050,20 +13776,6 @@ type UpdateLlmProxyPartnerPoweredEnforceRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateLlmProxyPartnerPoweredEnforceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateLlmProxyPartnerPoweredEnforceRequest) { -} - -func (newState *UpdateLlmProxyPartnerPoweredEnforceRequest) SyncEffectiveFieldsDuringRead(existingState UpdateLlmProxyPartnerPoweredEnforceRequest) { -} - -func (c UpdateLlmProxyPartnerPoweredEnforceRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateLlmProxyPartnerPoweredEnforceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14150,20 +13862,6 @@ type UpdateLlmProxyPartnerPoweredWorkspaceRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateLlmProxyPartnerPoweredWorkspaceRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateLlmProxyPartnerPoweredWorkspaceRequest) { -} - -func (newState *UpdateLlmProxyPartnerPoweredWorkspaceRequest) SyncEffectiveFieldsDuringRead(existingState UpdateLlmProxyPartnerPoweredWorkspaceRequest) { -} - -func (c UpdateLlmProxyPartnerPoweredWorkspaceRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateLlmProxyPartnerPoweredWorkspaceRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14233,8 +13931,7 @@ type UpdateNccPrivateEndpointRuleRequest struct { // The ID of a network connectivity configuration, which is the parent // resource of this private endpoint rule object. NetworkConnectivityConfigId types.String `tfsdk:"-"` - // Properties of the new private endpoint rule. Note that you must approve - // the endpoint in Azure portal after initialization. + PrivateEndpointRule types.Object `tfsdk:"private_endpoint_rule"` // Your private endpoint rule ID. PrivateEndpointRuleId types.String `tfsdk:"-"` @@ -14315,6 +14012,7 @@ func (o *UpdateNccPrivateEndpointRuleRequest) SetPrivateEndpointRule(ctx context } type UpdateNetworkPolicyRequest struct { + // Updated network policy configuration details. NetworkPolicy types.Object `tfsdk:"network_policy"` // The unique identifier for the network policy. NetworkPolicyId types.String `tfsdk:"-"` @@ -14393,20 +14091,6 @@ type UpdateNotificationDestinationRequest struct { Id types.String `tfsdk:"-"` } -func (newState *UpdateNotificationDestinationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateNotificationDestinationRequest) { -} - -func (newState *UpdateNotificationDestinationRequest) SyncEffectiveFieldsDuringRead(existingState UpdateNotificationDestinationRequest) { -} - -func (c UpdateNotificationDestinationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["config"] = attrs["config"].SetOptional() - attrs["display_name"] = attrs["display_name"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - - return attrs -} - // 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 @@ -14493,20 +14177,6 @@ type UpdatePersonalComputeSettingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdatePersonalComputeSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalComputeSettingRequest) { -} - -func (newState *UpdatePersonalComputeSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalComputeSettingRequest) { -} - -func (c UpdatePersonalComputeSettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -14754,20 +14424,6 @@ type UpdateRestrictWorkspaceAdminsSettingRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateRestrictWorkspaceAdminsSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRestrictWorkspaceAdminsSettingRequest) { -} - -func (newState *UpdateRestrictWorkspaceAdminsSettingRequest) SyncEffectiveFieldsDuringRead(existingState UpdateRestrictWorkspaceAdminsSettingRequest) { -} - -func (c UpdateRestrictWorkspaceAdminsSettingRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // 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 @@ -14854,20 +14510,6 @@ type UpdateSqlResultsDownloadRequest struct { Setting types.Object `tfsdk:"setting"` } -func (newState *UpdateSqlResultsDownloadRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSqlResultsDownloadRequest) { -} - -func (newState *UpdateSqlResultsDownloadRequest) SyncEffectiveFieldsDuringRead(existingState UpdateSqlResultsDownloadRequest) { -} - -func (c UpdateSqlResultsDownloadRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["allow_missing"] = attrs["allow_missing"].SetRequired() - attrs["field_mask"] = attrs["field_mask"].SetRequired() - attrs["setting"] = attrs["setting"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateSqlResultsDownloadRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -14936,7 +14578,7 @@ func (o *UpdateSqlResultsDownloadRequest) SetSetting(ctx context.Context, v SqlR type UpdateWorkspaceNetworkOptionRequest struct { // The workspace ID. WorkspaceId types.Int64 `tfsdk:"-"` - + // The network option details for the workspace. WorkspaceNetworkOption types.Object `tfsdk:"workspace_network_option"` } diff --git a/internal/service/sharing_tf/legacy_model.go b/internal/service/sharing_tf/legacy_model.go index b58afcf8ad..4145b90a08 100755 --- a/internal/service/sharing_tf/legacy_model.go +++ b/internal/service/sharing_tf/legacy_model.go @@ -26,6 +26,7 @@ import ( ) type CreateFederationPolicyRequest_SdkV2 struct { + // Name of the policy. This is the name of the policy to be created. Policy types.List `tfsdk:"policy"` // Name of the recipient. This is the name of the recipient for which the // policy is being created. @@ -96,7 +97,6 @@ func (o *CreateFederationPolicyRequest_SdkV2) SetPolicy(ctx context.Context, v F } type CreateProvider_SdkV2 struct { - // The delta sharing authentication type. AuthenticationType types.String `tfsdk:"authentication_type"` // Description about the provider. Comment types.String `tfsdk:"comment"` @@ -107,21 +107,6 @@ type CreateProvider_SdkV2 struct { RecipientProfileStr types.String `tfsdk:"recipient_profile_str"` } -func (newState *CreateProvider_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProvider_SdkV2) { -} - -func (newState *CreateProvider_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateProvider_SdkV2) { -} - -func (c CreateProvider_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["authentication_type"] = attrs["authentication_type"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["recipient_profile_str"] = attrs["recipient_profile_str"].SetOptional() - - return attrs -} - // 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 @@ -160,7 +145,6 @@ func (o CreateProvider_SdkV2) Type(ctx context.Context) attr.Type { } type CreateRecipient_SdkV2 struct { - // The delta sharing authentication type. AuthenticationType types.String `tfsdk:"authentication_type"` // Description about the recipient. Comment types.String `tfsdk:"comment"` @@ -187,28 +171,6 @@ type CreateRecipient_SdkV2 struct { SharingCode types.String `tfsdk:"sharing_code"` } -func (newState *CreateRecipient_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRecipient_SdkV2) { -} - -func (newState *CreateRecipient_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRecipient_SdkV2) { -} - -func (c CreateRecipient_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["authentication_type"] = attrs["authentication_type"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["data_recipient_global_metastore_id"] = attrs["data_recipient_global_metastore_id"].SetOptional() - attrs["expiration_time"] = attrs["expiration_time"].SetOptional() - attrs["ip_access_list"] = attrs["ip_access_list"].SetOptional() - attrs["ip_access_list"] = attrs["ip_access_list"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["name"] = attrs["name"].SetRequired() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["properties_kvpairs"] = attrs["properties_kvpairs"].SetOptional() - attrs["properties_kvpairs"] = attrs["properties_kvpairs"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["sharing_code"] = attrs["sharing_code"].SetOptional() - - return attrs -} - // 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 @@ -324,20 +286,6 @@ type CreateShare_SdkV2 struct { StorageRoot types.String `tfsdk:"storage_root"` } -func (newState *CreateShare_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateShare_SdkV2) { -} - -func (newState *CreateShare_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateShare_SdkV2) { -} - -func (c CreateShare_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["storage_root"] = attrs["storage_root"].SetOptional() - - return attrs -} - // 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 @@ -554,9 +502,8 @@ func (o DeleteShareRequest_SdkV2) Type(ctx context.Context) attr.Type { // Represents a UC dependency. type DeltaSharingDependency_SdkV2 struct { - // A Function in UC as a dependency. Function types.List `tfsdk:"function"` - // A Table in UC as a dependency. + Table types.List `tfsdk:"table"` } @@ -3208,7 +3155,8 @@ func (o *PermissionsChange_SdkV2) SetRemove(ctx context.Context, v []types.Strin } type PrivilegeAssignment_SdkV2 struct { - // The principal (user email address or group name). + // The principal (user email address or group name). For deleted principals, + // `principal` is empty while `principal_id` is populated. Principal types.String `tfsdk:"principal"` // The privileges assigned to the principal. Privileges types.List `tfsdk:"privileges"` @@ -3291,7 +3239,6 @@ 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"` // Cloud vendor of the provider's UC metastore. This field is only present // when the __authentication_type__ is **DATABRICKS**. @@ -3496,7 +3443,7 @@ type RecipientInfo_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"` - // The delta sharing authentication type. + AuthenticationType types.String `tfsdk:"authentication_type"` // Cloud vendor of the recipient's Unity Catalog Metastore. This field is // only present when the __authentication_type__ is **DATABRICKS**. @@ -4028,19 +3975,6 @@ type RotateRecipientToken_SdkV2 struct { Name types.String `tfsdk:"-"` } -func (newState *RotateRecipientToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RotateRecipientToken_SdkV2) { -} - -func (newState *RotateRecipientToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState RotateRecipientToken_SdkV2) { -} - -func (c RotateRecipientToken_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["existing_token_expire_in_seconds"] = attrs["existing_token_expire_in_seconds"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 @@ -5028,22 +4962,6 @@ type UpdateProvider_SdkV2 struct { RecipientProfileStr types.String `tfsdk:"recipient_profile_str"` } -func (newState *UpdateProvider_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProvider_SdkV2) { -} - -func (newState *UpdateProvider_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProvider_SdkV2) { -} - -func (c UpdateProvider_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["recipient_profile_str"] = attrs["recipient_profile_str"].SetOptional() - - return attrs -} - // 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 @@ -5103,26 +5021,6 @@ type UpdateRecipient_SdkV2 struct { PropertiesKvpairs types.List `tfsdk:"properties_kvpairs"` } -func (newState *UpdateRecipient_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRecipient_SdkV2) { -} - -func (newState *UpdateRecipient_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRecipient_SdkV2) { -} - -func (c UpdateRecipient_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["expiration_time"] = attrs["expiration_time"].SetOptional() - attrs["ip_access_list"] = attrs["ip_access_list"].SetOptional() - attrs["ip_access_list"] = attrs["ip_access_list"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["properties_kvpairs"] = attrs["properties_kvpairs"].SetOptional() - attrs["properties_kvpairs"] = attrs["properties_kvpairs"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -5241,30 +5139,6 @@ type UpdateShare_SdkV2 struct { Updates types.List `tfsdk:"updates"` } -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) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["effective_owner"] = attrs["effective_owner"].SetComputed() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["storage_root"] = attrs["storage_root"].SetOptional() - attrs["updates"] = attrs["updates"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateShare. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5348,20 +5222,6 @@ type UpdateSharePermissions_SdkV2 struct { OmitPermissionsList types.Bool `tfsdk:"omit_permissions_list"` } -func (newState *UpdateSharePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSharePermissions_SdkV2) { -} - -func (newState *UpdateSharePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateSharePermissions_SdkV2) { -} - -func (c UpdateSharePermissions_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["changes"] = attrs["changes"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["omit_permissions_list"] = attrs["omit_permissions_list"].SetOptional() - - return attrs -} - // 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 c04668048d..faf1ddc190 100755 --- a/internal/service/sharing_tf/model.go +++ b/internal/service/sharing_tf/model.go @@ -25,6 +25,7 @@ import ( ) type CreateFederationPolicyRequest struct { + // Name of the policy. This is the name of the policy to be created. Policy types.Object `tfsdk:"policy"` // Name of the recipient. This is the name of the recipient for which the // policy is being created. @@ -95,7 +96,6 @@ func (o *CreateFederationPolicyRequest) SetPolicy(ctx context.Context, v Federat } type CreateProvider struct { - // The delta sharing authentication type. AuthenticationType types.String `tfsdk:"authentication_type"` // Description about the provider. Comment types.String `tfsdk:"comment"` @@ -106,21 +106,6 @@ type CreateProvider struct { RecipientProfileStr types.String `tfsdk:"recipient_profile_str"` } -func (newState *CreateProvider) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProvider) { -} - -func (newState *CreateProvider) SyncEffectiveFieldsDuringRead(existingState CreateProvider) { -} - -func (c CreateProvider) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["authentication_type"] = attrs["authentication_type"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["recipient_profile_str"] = attrs["recipient_profile_str"].SetOptional() - - return attrs -} - // 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 @@ -159,7 +144,6 @@ func (o CreateProvider) Type(ctx context.Context) attr.Type { } type CreateRecipient struct { - // The delta sharing authentication type. AuthenticationType types.String `tfsdk:"authentication_type"` // Description about the recipient. Comment types.String `tfsdk:"comment"` @@ -186,26 +170,6 @@ type CreateRecipient struct { SharingCode types.String `tfsdk:"sharing_code"` } -func (newState *CreateRecipient) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRecipient) { -} - -func (newState *CreateRecipient) SyncEffectiveFieldsDuringRead(existingState CreateRecipient) { -} - -func (c CreateRecipient) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["authentication_type"] = attrs["authentication_type"].SetRequired() - attrs["comment"] = attrs["comment"].SetOptional() - attrs["data_recipient_global_metastore_id"] = attrs["data_recipient_global_metastore_id"].SetOptional() - attrs["expiration_time"] = attrs["expiration_time"].SetOptional() - attrs["ip_access_list"] = attrs["ip_access_list"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["properties_kvpairs"] = attrs["properties_kvpairs"].SetOptional() - attrs["sharing_code"] = attrs["sharing_code"].SetOptional() - - return attrs -} - // 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 @@ -321,20 +285,6 @@ type CreateShare struct { StorageRoot types.String `tfsdk:"storage_root"` } -func (newState *CreateShare) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateShare) { -} - -func (newState *CreateShare) SyncEffectiveFieldsDuringRead(existingState CreateShare) { -} - -func (c CreateShare) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["storage_root"] = attrs["storage_root"].SetOptional() - - return attrs -} - // 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 @@ -551,9 +501,8 @@ func (o DeleteShareRequest) Type(ctx context.Context) attr.Type { // Represents a UC dependency. type DeltaSharingDependency struct { - // A Function in UC as a dependency. Function types.Object `tfsdk:"function"` - // A Table in UC as a dependency. + Table types.Object `tfsdk:"table"` } @@ -3200,7 +3149,8 @@ func (o *PermissionsChange) SetRemove(ctx context.Context, v []types.String) { } type PrivilegeAssignment struct { - // The principal (user email address or group name). + // The principal (user email address or group name). For deleted principals, + // `principal` is empty while `principal_id` is populated. Principal types.String `tfsdk:"principal"` // The privileges assigned to the principal. Privileges types.List `tfsdk:"privileges"` @@ -3283,7 +3233,6 @@ func (o *PrivilegeAssignment) SetPrivileges(ctx context.Context, v []types.Strin } type ProviderInfo struct { - // The delta sharing authentication type. AuthenticationType types.String `tfsdk:"authentication_type"` // Cloud vendor of the provider's UC metastore. This field is only present // when the __authentication_type__ is **DATABRICKS**. @@ -3487,7 +3436,7 @@ type RecipientInfo 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"` - // The delta sharing authentication type. + AuthenticationType types.String `tfsdk:"authentication_type"` // Cloud vendor of the recipient's Unity Catalog Metastore. This field is // only present when the __authentication_type__ is **DATABRICKS**. @@ -4017,19 +3966,6 @@ type RotateRecipientToken struct { Name types.String `tfsdk:"-"` } -func (newState *RotateRecipientToken) SyncEffectiveFieldsDuringCreateOrUpdate(plan RotateRecipientToken) { -} - -func (newState *RotateRecipientToken) SyncEffectiveFieldsDuringRead(existingState RotateRecipientToken) { -} - -func (c RotateRecipientToken) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["existing_token_expire_in_seconds"] = attrs["existing_token_expire_in_seconds"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 @@ -5015,22 +4951,6 @@ type UpdateProvider struct { RecipientProfileStr types.String `tfsdk:"recipient_profile_str"` } -func (newState *UpdateProvider) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProvider) { -} - -func (newState *UpdateProvider) SyncEffectiveFieldsDuringRead(existingState UpdateProvider) { -} - -func (c UpdateProvider) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["recipient_profile_str"] = attrs["recipient_profile_str"].SetOptional() - - return attrs -} - // 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 @@ -5090,24 +5010,6 @@ type UpdateRecipient struct { PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs"` } -func (newState *UpdateRecipient) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRecipient) { -} - -func (newState *UpdateRecipient) SyncEffectiveFieldsDuringRead(existingState UpdateRecipient) { -} - -func (c UpdateRecipient) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["expiration_time"] = attrs["expiration_time"].SetOptional() - attrs["ip_access_list"] = attrs["ip_access_list"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["properties_kvpairs"] = attrs["properties_kvpairs"].SetOptional() - - return attrs -} - // 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 @@ -5226,30 +5128,6 @@ type UpdateShare struct { Updates types.List `tfsdk:"updates"` } -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) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["comment"] = attrs["comment"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["new_name"] = attrs["new_name"].SetOptional() - attrs["effective_owner"] = attrs["effective_owner"].SetComputed() - attrs["owner"] = attrs["owner"].SetOptional() - attrs["storage_root"] = attrs["storage_root"].SetOptional() - attrs["updates"] = attrs["updates"].SetOptional() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateShare. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -5333,20 +5211,6 @@ type UpdateSharePermissions struct { OmitPermissionsList types.Bool `tfsdk:"omit_permissions_list"` } -func (newState *UpdateSharePermissions) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSharePermissions) { -} - -func (newState *UpdateSharePermissions) SyncEffectiveFieldsDuringRead(existingState UpdateSharePermissions) { -} - -func (c UpdateSharePermissions) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["changes"] = attrs["changes"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["omit_permissions_list"] = attrs["omit_permissions_list"].SetOptional() - - return attrs -} - // 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 7edd03453e..784fe55067 100755 --- a/internal/service/sql_tf/legacy_model.go +++ b/internal/service/sql_tf/legacy_model.go @@ -921,8 +921,11 @@ type AlertV2_SdkV2 struct { ParentPath types.String `tfsdk:"parent_path"` // Text of the query to be run. QueryText types.String `tfsdk:"query_text"` - // The run as username. This field is set to "Unavailable" if the user has - // been deleted. + // The run as username or application ID of service principal. This field is + // set to "Unavailable" if the user has been deleted. On Create and Update, + // this field can be set to application ID of an active service principal. + // Setting this field requires the servicePrincipal/user role. If not + // specified it'll default to be request user. RunAsUserName types.String `tfsdk:"run_as_user_name"` Schedule types.List `tfsdk:"schedule"` @@ -950,7 +953,7 @@ func (c AlertV2_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.Attri attrs["owner_user_name"] = attrs["owner_user_name"].SetComputed() attrs["parent_path"] = attrs["parent_path"].SetOptional() attrs["query_text"] = attrs["query_text"].SetOptional() - attrs["run_as_user_name"] = attrs["run_as_user_name"].SetComputed() + attrs["run_as_user_name"] = attrs["run_as_user_name"].SetOptional() attrs["schedule"] = attrs["schedule"].SetOptional() attrs["schedule"] = attrs["schedule"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) attrs["update_time"] = attrs["update_time"].SetComputed() @@ -2043,23 +2046,6 @@ type CreateAlert_SdkV2 struct { Rearm types.Int64 `tfsdk:"rearm"` } -func (newState *CreateAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlert_SdkV2) { -} - -func (newState *CreateAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAlert_SdkV2) { -} - -func (c CreateAlert_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["options"] = attrs["options"].SetRequired() - attrs["options"] = attrs["options"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["parent"] = attrs["parent"].SetOptional() - attrs["query_id"] = attrs["query_id"].SetRequired() - attrs["rearm"] = attrs["rearm"].SetOptional() - - return attrs -} - // 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 @@ -2137,20 +2123,6 @@ type CreateAlertRequest_SdkV2 struct { AutoResolveDisplayName types.Bool `tfsdk:"auto_resolve_display_name"` } -func (newState *CreateAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlertRequest_SdkV2) { -} - -func (newState *CreateAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAlertRequest_SdkV2) { -} - -func (c CreateAlertRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["alert"] = attrs["alert"].SetOptional() - attrs["alert"] = attrs["alert"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["auto_resolve_display_name"] = attrs["auto_resolve_display_name"].SetOptional() - - return attrs -} - // 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 @@ -2411,20 +2383,6 @@ type CreateQueryRequest_SdkV2 struct { Query types.List `tfsdk:"query"` } -func (newState *CreateQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryRequest_SdkV2) { -} - -func (newState *CreateQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateQueryRequest_SdkV2) { -} - -func (c CreateQueryRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["auto_resolve_display_name"] = attrs["auto_resolve_display_name"].SetOptional() - attrs["query"] = attrs["query"].SetOptional() - attrs["query"] = attrs["query"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -2665,22 +2623,6 @@ type CreateQueryVisualizationsLegacyRequest_SdkV2 struct { Type_ types.String `tfsdk:"type"` } -func (newState *CreateQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryVisualizationsLegacyRequest_SdkV2) { -} - -func (newState *CreateQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateQueryVisualizationsLegacyRequest_SdkV2) { -} - -func (c CreateQueryVisualizationsLegacyRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["options"] = attrs["options"].SetRequired() - attrs["query_id"] = attrs["query_id"].SetRequired() - attrs["type"] = attrs["type"].SetRequired() - - return attrs -} - // 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 @@ -2724,19 +2666,6 @@ type CreateVisualizationRequest_SdkV2 struct { Visualization types.List `tfsdk:"visualization"` } -func (newState *CreateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVisualizationRequest_SdkV2) { -} - -func (newState *CreateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVisualizationRequest_SdkV2) { -} - -func (c CreateVisualizationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["visualization"] = attrs["visualization"].SetOptional() - attrs["visualization"] = attrs["visualization"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -2921,43 +2850,15 @@ type CreateWarehouseRequest_SdkV2 struct { // Supported values: - Must be unique within an org. - Must be less than 100 // characters. Name types.String `tfsdk:"name"` - // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy"` // 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"` - // 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"` -} - -func (newState *CreateWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWarehouseRequest_SdkV2) { -} - -func (newState *CreateWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWarehouseRequest_SdkV2) { -} -func (c CreateWarehouseRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["auto_stop_mins"] = attrs["auto_stop_mins"].SetOptional() - attrs["channel"] = attrs["channel"].SetOptional() - attrs["channel"] = attrs["channel"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["cluster_size"] = attrs["cluster_size"].SetOptional() - attrs["creator_name"] = attrs["creator_name"].SetOptional() - attrs["enable_photon"] = attrs["enable_photon"].SetOptional() - attrs["enable_serverless_compute"] = attrs["enable_serverless_compute"].SetOptional() - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetOptional() - attrs["max_num_clusters"] = attrs["max_num_clusters"].SetOptional() - attrs["min_num_clusters"] = attrs["min_num_clusters"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["spot_instance_policy"] = attrs["spot_instance_policy"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["tags"] = attrs["tags"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["warehouse_type"] = attrs["warehouse_type"].SetOptional() - - return attrs + WarehouseType types.String `tfsdk:"warehouse_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWarehouseRequest. @@ -3125,8 +3026,6 @@ func (o CreateWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { type CreateWidget_SdkV2 struct { // Dashboard ID returned by :method:dashboards/create. DashboardId types.String `tfsdk:"dashboard_id"` - // Widget ID returned by :method:dashboardwidgets/create - Id types.String `tfsdk:"-"` Options types.List `tfsdk:"options"` // If this is a textbox widget, the application displays this text. This @@ -3139,24 +3038,6 @@ type CreateWidget_SdkV2 struct { Width types.Int64 `tfsdk:"width"` } -func (newState *CreateWidget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWidget_SdkV2) { -} - -func (newState *CreateWidget_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWidget_SdkV2) { -} - -func (c CreateWidget_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_id"] = attrs["dashboard_id"].SetRequired() - attrs["id"] = attrs["id"].SetRequired() - attrs["options"] = attrs["options"].SetRequired() - attrs["options"] = attrs["options"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["text"] = attrs["text"].SetOptional() - attrs["visualization_id"] = attrs["visualization_id"].SetOptional() - attrs["width"] = attrs["width"].SetRequired() - - return attrs -} - // 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 @@ -3178,7 +3059,6 @@ func (o CreateWidget_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectV o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ "dashboard_id": o.DashboardId, - "id": o.Id, "options": o.Options, "text": o.Text, "visualization_id": o.VisualizationId, @@ -3191,7 +3071,6 @@ func (o CreateWidget_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dashboard_id": types.StringType, - "id": types.StringType, "options": basetypes.ListType{ ElemType: WidgetOptions_SdkV2{}.Type(ctx), }, @@ -3564,21 +3443,6 @@ type DashboardEditContent_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *DashboardEditContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardEditContent_SdkV2) { -} - -func (newState *DashboardEditContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState DashboardEditContent_SdkV2) { -} - -func (c DashboardEditContent_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_id"] = attrs["dashboard_id"].SetRequired() - attrs["name"] = attrs["name"].SetOptional() - attrs["run_as_role"] = attrs["run_as_role"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -3715,23 +3579,6 @@ type DashboardPostContent_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *DashboardPostContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardPostContent_SdkV2) { -} - -func (newState *DashboardPostContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState DashboardPostContent_SdkV2) { -} - -func (c DashboardPostContent_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_filters_enabled"] = attrs["dashboard_filters_enabled"].SetOptional() - attrs["is_favorite"] = attrs["is_favorite"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["parent"] = attrs["parent"].SetOptional() - attrs["run_as_role"] = attrs["run_as_role"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -4246,7 +4093,7 @@ func (o DeleteQueriesLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { } type DeleteQueryVisualizationsLegacyRequest_SdkV2 struct { - // Widget ID returned by :method:queryvizualisations/create + // Widget ID returned by :method:queryvisualizations/create Id types.String `tfsdk:"-"` } @@ -4284,6 +4131,17 @@ 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) { +} + +func (c DeleteResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -4437,23 +4295,6 @@ type EditAlert_SdkV2 struct { Rearm types.Int64 `tfsdk:"rearm"` } -func (newState *EditAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditAlert_SdkV2) { -} - -func (newState *EditAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditAlert_SdkV2) { -} - -func (c EditAlert_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["alert_id"] = attrs["alert_id"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["options"] = attrs["options"].SetRequired() - attrs["options"] = attrs["options"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["query_id"] = attrs["query_id"].SetRequired() - attrs["rearm"] = attrs["rearm"].SetOptional() - - return attrs -} - // 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 @@ -4574,44 +4415,15 @@ type EditWarehouseRequest_SdkV2 struct { // Supported values: - Must be unique within an org. - Must be less than 100 // characters. Name types.String `tfsdk:"name"` - // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy"` // 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"` - // 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"` -} - -func (newState *EditWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditWarehouseRequest_SdkV2) { -} - -func (newState *EditWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditWarehouseRequest_SdkV2) { -} -func (c EditWarehouseRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["auto_stop_mins"] = attrs["auto_stop_mins"].SetOptional() - attrs["channel"] = attrs["channel"].SetOptional() - attrs["channel"] = attrs["channel"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["cluster_size"] = attrs["cluster_size"].SetOptional() - attrs["creator_name"] = attrs["creator_name"].SetOptional() - attrs["enable_photon"] = attrs["enable_photon"].SetOptional() - attrs["enable_serverless_compute"] = attrs["enable_serverless_compute"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetOptional() - attrs["max_num_clusters"] = attrs["max_num_clusters"].SetOptional() - attrs["min_num_clusters"] = attrs["min_num_clusters"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["spot_instance_policy"] = attrs["spot_instance_policy"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["tags"] = attrs["tags"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["warehouse_type"] = attrs["warehouse_type"].SetOptional() - - return attrs + WarehouseType types.String `tfsdk:"warehouse_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditWarehouseRequest. @@ -4874,7 +4686,7 @@ type EndpointHealth_SdkV2 struct { FailureReason types.List `tfsdk:"failure_reason"` // Deprecated. split into summary and details for security Message types.String `tfsdk:"message"` - // Health status of the warehouse. + Status types.String `tfsdk:"status"` // A short summary of the health status in case of degraded/failed // warehouses. @@ -5029,9 +4841,9 @@ type EndpointInfo_SdkV2 struct { NumClusters types.Int64 `tfsdk:"num_clusters"` // ODBC parameters for the SQL warehouse OdbcParams types.List `tfsdk:"odbc_params"` - // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy"` - // State of the warehouse + State types.String `tfsdk:"state"` // 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. @@ -5638,28 +5450,6 @@ type ExecuteStatementRequest_SdkV2 struct { WarehouseId types.String `tfsdk:"warehouse_id"` } -func (newState *ExecuteStatementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExecuteStatementRequest_SdkV2) { -} - -func (newState *ExecuteStatementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExecuteStatementRequest_SdkV2) { -} - -func (c ExecuteStatementRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["byte_limit"] = attrs["byte_limit"].SetOptional() - attrs["catalog"] = attrs["catalog"].SetOptional() - attrs["disposition"] = attrs["disposition"].SetOptional() - attrs["format"] = attrs["format"].SetOptional() - attrs["on_wait_timeout"] = attrs["on_wait_timeout"].SetOptional() - attrs["parameters"] = attrs["parameters"].SetOptional() - attrs["row_limit"] = attrs["row_limit"].SetOptional() - attrs["schema"] = attrs["schema"].SetOptional() - attrs["statement"] = attrs["statement"].SetRequired() - attrs["wait_timeout"] = attrs["wait_timeout"].SetOptional() - attrs["warehouse_id"] = attrs["warehouse_id"].SetRequired() - - return attrs -} - // 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 @@ -6144,6 +5934,36 @@ func (o GetAlertsLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { } } +type GetConfigRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetConfigRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetConfigRequest_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, GetConfigRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetConfigRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetConfigRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetDashboardRequest_SdkV2 struct { DashboardId types.String `tfsdk:"-"` } @@ -6701,18 +6521,16 @@ type GetWarehouseResponse_SdkV2 struct { NumClusters types.Int64 `tfsdk:"num_clusters"` // ODBC parameters for the SQL warehouse OdbcParams types.List `tfsdk:"odbc_params"` - // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy"` - // State of the warehouse + State types.String `tfsdk:"state"` // 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"` - // 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"` } @@ -6937,6 +6755,36 @@ func (o *GetWarehouseResponse_SdkV2) SetTags(ctx context.Context, v EndpointTags o.Tags = types.ListValueMust(t, vs) } +type GetWorkspaceWarehouseConfigRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceWarehouseConfigRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetWorkspaceWarehouseConfigRequest_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, GetWorkspaceWarehouseConfigRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceWarehouseConfigRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWorkspaceWarehouseConfigRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetWorkspaceWarehouseConfigResponse_SdkV2 struct { // Optional: Channel selection details Channel types.List `tfsdk:"channel"` @@ -8845,6 +8693,36 @@ func (o *ListQueryObjectsResponseQuery_SdkV2) SetTags(ctx context.Context, v []t o.Tags = types.ListValueMust(t, vs) } +type ListRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListRequest_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, ListRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListResponse_SdkV2 struct { // The total number of dashboards. Count types.Int64 `tfsdk:"count"` @@ -9794,25 +9672,6 @@ type QueryEditContent_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *QueryEditContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEditContent_SdkV2) { -} - -func (newState *QueryEditContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryEditContent_SdkV2) { -} - -func (c QueryEditContent_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["data_source_id"] = attrs["data_source_id"].SetOptional() - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["options"] = attrs["options"].SetOptional() - attrs["query"] = attrs["query"].SetOptional() - attrs["query_id"] = attrs["query_id"].SetRequired() - attrs["run_as_role"] = attrs["run_as_role"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -11061,25 +10920,6 @@ type QueryPostContent_SdkV2 struct { Tags types.List `tfsdk:"tags"` } -func (newState *QueryPostContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryPostContent_SdkV2) { -} - -func (newState *QueryPostContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryPostContent_SdkV2) { -} - -func (c QueryPostContent_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["data_source_id"] = attrs["data_source_id"].SetOptional() - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["options"] = attrs["options"].SetOptional() - attrs["parent"] = attrs["parent"].SetOptional() - attrs["query"] = attrs["query"].SetOptional() - attrs["run_as_role"] = attrs["run_as_role"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -11340,6 +11180,17 @@ 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) { +} + +func (c RestoreResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -11525,7 +11376,7 @@ type ResultManifest_SdkV2 struct { Chunks types.List `tfsdk:"chunks"` Format types.String `tfsdk:"format"` - // The schema is an ordered list of column descriptions. + Schema types.List `tfsdk:"schema"` // The total number of bytes in the result set. This field is not available // when using `INLINE` disposition. @@ -11805,20 +11656,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) { -} - -func (c SetRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["objectId"] = attrs["objectId"].SetRequired() - attrs["objectType"] = attrs["objectType"].SetRequired() - - return attrs -} - // 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 @@ -11999,30 +11836,6 @@ type SetWorkspaceWarehouseConfigRequest_SdkV2 struct { SqlConfigurationParameters types.List `tfsdk:"sql_configuration_parameters"` } -func (newState *SetWorkspaceWarehouseConfigRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetWorkspaceWarehouseConfigRequest_SdkV2) { -} - -func (newState *SetWorkspaceWarehouseConfigRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetWorkspaceWarehouseConfigRequest_SdkV2) { -} - -func (c SetWorkspaceWarehouseConfigRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["channel"] = attrs["channel"].SetOptional() - attrs["channel"] = attrs["channel"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["config_param"] = attrs["config_param"].SetOptional() - attrs["config_param"] = attrs["config_param"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["data_access_config"] = attrs["data_access_config"].SetOptional() - attrs["enabled_warehouse_types"] = attrs["enabled_warehouse_types"].SetOptional() - attrs["global_param"] = attrs["global_param"].SetOptional() - attrs["global_param"] = attrs["global_param"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["google_service_account"] = attrs["google_service_account"].SetOptional() - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetOptional() - attrs["security_policy"] = attrs["security_policy"].SetOptional() - attrs["sql_configuration_parameters"] = attrs["sql_configuration_parameters"].SetOptional() - attrs["sql_configuration_parameters"] = attrs["sql_configuration_parameters"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -12429,15 +12242,13 @@ 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"` Result types.List `tfsdk:"result"` // 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"` - // The status response includes execution state and if relevant, error - // information. + Status types.List `tfsdk:"status"` } @@ -12588,13 +12399,7 @@ func (o *StatementResponse_SdkV2) SetStatus(ctx context.Context, v StatementStat // information. type StatementStatus_SdkV2 struct { Error types.List `tfsdk:"error"` - // Statement execution state: - `PENDING`: waiting for warehouse - - // `RUNNING`: running - `SUCCEEDED`: execution was successful, result data - // available for fetch - `FAILED`: execution failed; reason for failure - // described in accomanying error message - `CANCELED`: user canceled; can - // 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"` } @@ -13169,7 +12974,6 @@ 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"` @@ -13179,21 +12983,6 @@ type TransferOwnershipRequest_SdkV2 struct { ObjectType types.String `tfsdk:"-"` } -func (newState *TransferOwnershipRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransferOwnershipRequest_SdkV2) { -} - -func (newState *TransferOwnershipRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransferOwnershipRequest_SdkV2) { -} - -func (c TransferOwnershipRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["new_owner"] = attrs["new_owner"].SetOptional() - attrs["objectId"] = attrs["objectId"].SetRequired() - attrs["objectId"] = attrs["objectId"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["objectType"] = attrs["objectType"].SetRequired() - - return attrs -} - // 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 @@ -13386,22 +13175,6 @@ type UpdateAlertRequest_SdkV2 struct { UpdateMask types.String `tfsdk:"update_mask"` } -func (newState *UpdateAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAlertRequest_SdkV2) { -} - -func (newState *UpdateAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAlertRequest_SdkV2) { -} - -func (c UpdateAlertRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["alert"] = attrs["alert"].SetOptional() - attrs["alert"] = attrs["alert"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["auto_resolve_display_name"] = attrs["auto_resolve_display_name"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - attrs["update_mask"] = attrs["update_mask"].SetRequired() - - return attrs -} - // 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 @@ -13699,22 +13472,6 @@ type UpdateQueryRequest_SdkV2 struct { UpdateMask types.String `tfsdk:"update_mask"` } -func (newState *UpdateQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateQueryRequest_SdkV2) { -} - -func (newState *UpdateQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateQueryRequest_SdkV2) { -} - -func (c UpdateQueryRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["auto_resolve_display_name"] = attrs["auto_resolve_display_name"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - attrs["query"] = attrs["query"].SetOptional() - attrs["query"] = attrs["query"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["update_mask"] = attrs["update_mask"].SetRequired() - - return attrs -} - // 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 @@ -13944,6 +13701,17 @@ 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) { +} + +func (c UpdateResponse_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -13989,21 +13757,6 @@ type UpdateVisualizationRequest_SdkV2 struct { Visualization types.List `tfsdk:"visualization"` } -func (newState *UpdateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVisualizationRequest_SdkV2) { -} - -func (newState *UpdateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateVisualizationRequest_SdkV2) { -} - -func (c UpdateVisualizationRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["update_mask"] = attrs["update_mask"].SetRequired() - attrs["visualization"] = attrs["visualization"].SetOptional() - attrs["visualization"] = attrs["visualization"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - - return attrs -} - // 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 @@ -14136,6 +13889,94 @@ func (o UpdateVisualizationRequestVisualization_SdkV2) Type(ctx context.Context) } } +type UpdateWidgetRequest_SdkV2 struct { + // Dashboard ID returned by :method:dashboards/create. + DashboardId types.String `tfsdk:"dashboard_id"` + // Widget ID returned by :method:dashboardwidgets/create + Id types.String `tfsdk:"-"` + + Options types.List `tfsdk:"options"` + // 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"` + // Query Vizualization ID returned by :method:queryvisualizations/create. + VisualizationId types.String `tfsdk:"visualization_id"` + // Width of a widget + Width types.Int64 `tfsdk:"width"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWidgetRequest. +// Container types (types.Map, types.List, types.Set) and 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 UpdateWidgetRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": reflect.TypeOf(WidgetOptions_SdkV2{}), + } +} + +// 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, UpdateWidgetRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateWidgetRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "id": o.Id, + "options": o.Options, + "text": o.Text, + "visualization_id": o.VisualizationId, + "width": o.Width, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateWidgetRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "id": types.StringType, + "options": basetypes.ListType{ + ElemType: WidgetOptions_SdkV2{}.Type(ctx), + }, + "text": types.StringType, + "visualization_id": types.StringType, + "width": types.Int64Type, + }, + } +} + +// GetOptions returns the value of the Options field in UpdateWidgetRequest_SdkV2 as +// a WidgetOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateWidgetRequest_SdkV2) GetOptions(ctx context.Context) (WidgetOptions_SdkV2, bool) { + var e WidgetOptions_SdkV2 + if o.Options.IsNull() || o.Options.IsUnknown() { + return e, false + } + var v []WidgetOptions_SdkV2 + d := o.Options.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOptions sets the value of the Options field in UpdateWidgetRequest_SdkV2. +func (o *UpdateWidgetRequest_SdkV2) SetOptions(ctx context.Context, v WidgetOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] + o.Options = types.ListValueMust(t, vs) +} + type User_SdkV2 struct { Email types.String `tfsdk:"email"` @@ -14283,7 +14124,7 @@ func (o Visualization_SdkV2) Type(ctx context.Context) attr.Type { type WarehouseAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -14445,7 +14286,7 @@ type WarehousePermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -14617,7 +14458,7 @@ func (o *WarehousePermissions_SdkV2) SetAccessControlList(ctx context.Context, v type WarehousePermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -14673,19 +14514,6 @@ type WarehousePermissionsRequest_SdkV2 struct { WarehouseId types.String `tfsdk:"-"` } -func (newState *WarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermissionsRequest_SdkV2) { -} - -func (newState *WarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehousePermissionsRequest_SdkV2) { -} - -func (c WarehousePermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["warehouse_id"] = attrs["warehouse_id"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/sql_tf/model.go b/internal/service/sql_tf/model.go index c53a24635d..80a92cd2d1 100755 --- a/internal/service/sql_tf/model.go +++ b/internal/service/sql_tf/model.go @@ -914,8 +914,11 @@ type AlertV2 struct { ParentPath types.String `tfsdk:"parent_path"` // Text of the query to be run. QueryText types.String `tfsdk:"query_text"` - // The run as username. This field is set to "Unavailable" if the user has - // been deleted. + // The run as username or application ID of service principal. This field is + // set to "Unavailable" if the user has been deleted. On Create and Update, + // this field can be set to application ID of an active service principal. + // Setting this field requires the servicePrincipal/user role. If not + // specified it'll default to be request user. RunAsUserName types.String `tfsdk:"run_as_user_name"` Schedule types.Object `tfsdk:"schedule"` @@ -942,7 +945,7 @@ func (c AlertV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBu attrs["owner_user_name"] = attrs["owner_user_name"].SetComputed() attrs["parent_path"] = attrs["parent_path"].SetOptional() attrs["query_text"] = attrs["query_text"].SetOptional() - attrs["run_as_user_name"] = attrs["run_as_user_name"].SetComputed() + attrs["run_as_user_name"] = attrs["run_as_user_name"].SetOptional() attrs["schedule"] = attrs["schedule"].SetOptional() attrs["update_time"] = attrs["update_time"].SetComputed() attrs["warehouse_id"] = attrs["warehouse_id"].SetOptional() @@ -2029,22 +2032,6 @@ type CreateAlert struct { Rearm types.Int64 `tfsdk:"rearm"` } -func (newState *CreateAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlert) { -} - -func (newState *CreateAlert) SyncEffectiveFieldsDuringRead(existingState CreateAlert) { -} - -func (c CreateAlert) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["name"] = attrs["name"].SetRequired() - attrs["options"] = attrs["options"].SetRequired() - attrs["parent"] = attrs["parent"].SetOptional() - attrs["query_id"] = attrs["query_id"].SetRequired() - attrs["rearm"] = attrs["rearm"].SetOptional() - - return attrs -} - // 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 @@ -2122,19 +2109,6 @@ type CreateAlertRequest struct { AutoResolveDisplayName types.Bool `tfsdk:"auto_resolve_display_name"` } -func (newState *CreateAlertRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlertRequest) { -} - -func (newState *CreateAlertRequest) SyncEffectiveFieldsDuringRead(existingState CreateAlertRequest) { -} - -func (c CreateAlertRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["alert"] = attrs["alert"].SetOptional() - attrs["auto_resolve_display_name"] = attrs["auto_resolve_display_name"].SetOptional() - - return attrs -} - // 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 @@ -2394,19 +2368,6 @@ type CreateQueryRequest struct { Query types.Object `tfsdk:"query"` } -func (newState *CreateQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryRequest) { -} - -func (newState *CreateQueryRequest) SyncEffectiveFieldsDuringRead(existingState CreateQueryRequest) { -} - -func (c CreateQueryRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["auto_resolve_display_name"] = attrs["auto_resolve_display_name"].SetOptional() - attrs["query"] = attrs["query"].SetOptional() - - return attrs -} - // 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 @@ -2647,22 +2608,6 @@ type CreateQueryVisualizationsLegacyRequest struct { Type_ types.String `tfsdk:"type"` } -func (newState *CreateQueryVisualizationsLegacyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryVisualizationsLegacyRequest) { -} - -func (newState *CreateQueryVisualizationsLegacyRequest) SyncEffectiveFieldsDuringRead(existingState CreateQueryVisualizationsLegacyRequest) { -} - -func (c CreateQueryVisualizationsLegacyRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["options"] = attrs["options"].SetRequired() - attrs["query_id"] = attrs["query_id"].SetRequired() - attrs["type"] = attrs["type"].SetRequired() - - return attrs -} - // 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 @@ -2706,18 +2651,6 @@ type CreateVisualizationRequest struct { Visualization types.Object `tfsdk:"visualization"` } -func (newState *CreateVisualizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVisualizationRequest) { -} - -func (newState *CreateVisualizationRequest) SyncEffectiveFieldsDuringRead(existingState CreateVisualizationRequest) { -} - -func (c CreateVisualizationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["visualization"] = attrs["visualization"].SetOptional() - - return attrs -} - // 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 @@ -2902,41 +2835,15 @@ type CreateWarehouseRequest struct { // Supported values: - Must be unique within an org. - Must be less than 100 // characters. Name types.String `tfsdk:"name"` - // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy"` // 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"` - // 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"` -} -func (newState *CreateWarehouseRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWarehouseRequest) { -} - -func (newState *CreateWarehouseRequest) SyncEffectiveFieldsDuringRead(existingState CreateWarehouseRequest) { -} - -func (c CreateWarehouseRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["auto_stop_mins"] = attrs["auto_stop_mins"].SetOptional() - attrs["channel"] = attrs["channel"].SetOptional() - attrs["cluster_size"] = attrs["cluster_size"].SetOptional() - attrs["creator_name"] = attrs["creator_name"].SetOptional() - attrs["enable_photon"] = attrs["enable_photon"].SetOptional() - attrs["enable_serverless_compute"] = attrs["enable_serverless_compute"].SetOptional() - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetOptional() - attrs["max_num_clusters"] = attrs["max_num_clusters"].SetOptional() - attrs["min_num_clusters"] = attrs["min_num_clusters"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["spot_instance_policy"] = attrs["spot_instance_policy"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["warehouse_type"] = attrs["warehouse_type"].SetOptional() - - return attrs + WarehouseType types.String `tfsdk:"warehouse_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWarehouseRequest. @@ -3104,8 +3011,6 @@ func (o CreateWarehouseResponse) Type(ctx context.Context) attr.Type { type CreateWidget struct { // Dashboard ID returned by :method:dashboards/create. DashboardId types.String `tfsdk:"dashboard_id"` - // Widget ID returned by :method:dashboardwidgets/create - Id types.String `tfsdk:"-"` Options types.Object `tfsdk:"options"` // If this is a textbox widget, the application displays this text. This @@ -3118,23 +3023,6 @@ type CreateWidget struct { Width types.Int64 `tfsdk:"width"` } -func (newState *CreateWidget) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWidget) { -} - -func (newState *CreateWidget) SyncEffectiveFieldsDuringRead(existingState CreateWidget) { -} - -func (c CreateWidget) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_id"] = attrs["dashboard_id"].SetRequired() - attrs["id"] = attrs["id"].SetRequired() - attrs["options"] = attrs["options"].SetRequired() - attrs["text"] = attrs["text"].SetOptional() - attrs["visualization_id"] = attrs["visualization_id"].SetOptional() - attrs["width"] = attrs["width"].SetRequired() - - return attrs -} - // 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 @@ -3156,7 +3044,6 @@ func (o CreateWidget) ToObjectValue(ctx context.Context) basetypes.ObjectValue { o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ "dashboard_id": o.DashboardId, - "id": o.Id, "options": o.Options, "text": o.Text, "visualization_id": o.VisualizationId, @@ -3169,7 +3056,6 @@ func (o CreateWidget) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dashboard_id": types.StringType, - "id": types.StringType, "options": WidgetOptions{}.Type(ctx), "text": types.StringType, "visualization_id": types.StringType, @@ -3540,21 +3426,6 @@ type DashboardEditContent struct { Tags types.List `tfsdk:"tags"` } -func (newState *DashboardEditContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardEditContent) { -} - -func (newState *DashboardEditContent) SyncEffectiveFieldsDuringRead(existingState DashboardEditContent) { -} - -func (c DashboardEditContent) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_id"] = attrs["dashboard_id"].SetRequired() - attrs["name"] = attrs["name"].SetOptional() - attrs["run_as_role"] = attrs["run_as_role"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -3691,23 +3562,6 @@ type DashboardPostContent struct { Tags types.List `tfsdk:"tags"` } -func (newState *DashboardPostContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardPostContent) { -} - -func (newState *DashboardPostContent) SyncEffectiveFieldsDuringRead(existingState DashboardPostContent) { -} - -func (c DashboardPostContent) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["dashboard_filters_enabled"] = attrs["dashboard_filters_enabled"].SetOptional() - attrs["is_favorite"] = attrs["is_favorite"].SetOptional() - attrs["name"] = attrs["name"].SetRequired() - attrs["parent"] = attrs["parent"].SetOptional() - attrs["run_as_role"] = attrs["run_as_role"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -4221,7 +4075,7 @@ func (o DeleteQueriesLegacyRequest) Type(ctx context.Context) attr.Type { } type DeleteQueryVisualizationsLegacyRequest struct { - // Widget ID returned by :method:queryvizualisations/create + // Widget ID returned by :method:queryvisualizations/create Id types.String `tfsdk:"-"` } @@ -4259,6 +4113,17 @@ func (o DeleteQueryVisualizationsLegacyRequest) Type(ctx context.Context) attr.T type DeleteResponse struct { } +func (newState *DeleteResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse) { +} + +func (newState *DeleteResponse) SyncEffectiveFieldsDuringRead(existingState DeleteResponse) { +} + +func (c DeleteResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -4412,22 +4277,6 @@ type EditAlert struct { Rearm types.Int64 `tfsdk:"rearm"` } -func (newState *EditAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditAlert) { -} - -func (newState *EditAlert) SyncEffectiveFieldsDuringRead(existingState EditAlert) { -} - -func (c EditAlert) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["alert_id"] = attrs["alert_id"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["options"] = attrs["options"].SetRequired() - attrs["query_id"] = attrs["query_id"].SetRequired() - attrs["rearm"] = attrs["rearm"].SetOptional() - - return attrs -} - // 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 @@ -4548,42 +4397,15 @@ type EditWarehouseRequest struct { // Supported values: - Must be unique within an org. - Must be less than 100 // characters. Name types.String `tfsdk:"name"` - // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy"` // 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"` - // 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"` -} - -func (newState *EditWarehouseRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditWarehouseRequest) { -} - -func (newState *EditWarehouseRequest) SyncEffectiveFieldsDuringRead(existingState EditWarehouseRequest) { -} - -func (c EditWarehouseRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["auto_stop_mins"] = attrs["auto_stop_mins"].SetOptional() - attrs["channel"] = attrs["channel"].SetOptional() - attrs["cluster_size"] = attrs["cluster_size"].SetOptional() - attrs["creator_name"] = attrs["creator_name"].SetOptional() - attrs["enable_photon"] = attrs["enable_photon"].SetOptional() - attrs["enable_serverless_compute"] = attrs["enable_serverless_compute"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetOptional() - attrs["max_num_clusters"] = attrs["max_num_clusters"].SetOptional() - attrs["min_num_clusters"] = attrs["min_num_clusters"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["spot_instance_policy"] = attrs["spot_instance_policy"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - attrs["warehouse_type"] = attrs["warehouse_type"].SetOptional() - return attrs + WarehouseType types.String `tfsdk:"warehouse_type"` } // GetComplexFieldTypes returns a map of the types of elements in complex fields in EditWarehouseRequest. @@ -4846,7 +4668,7 @@ type EndpointHealth struct { FailureReason types.Object `tfsdk:"failure_reason"` // Deprecated. split into summary and details for security Message types.String `tfsdk:"message"` - // Health status of the warehouse. + Status types.String `tfsdk:"status"` // A short summary of the health status in case of degraded/failed // warehouses. @@ -5000,9 +4822,9 @@ type EndpointInfo struct { NumClusters types.Int64 `tfsdk:"num_clusters"` // ODBC parameters for the SQL warehouse OdbcParams types.Object `tfsdk:"odbc_params"` - // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy"` - // State of the warehouse + State types.String `tfsdk:"state"` // 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. @@ -5604,28 +5426,6 @@ type ExecuteStatementRequest struct { WarehouseId types.String `tfsdk:"warehouse_id"` } -func (newState *ExecuteStatementRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExecuteStatementRequest) { -} - -func (newState *ExecuteStatementRequest) SyncEffectiveFieldsDuringRead(existingState ExecuteStatementRequest) { -} - -func (c ExecuteStatementRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["byte_limit"] = attrs["byte_limit"].SetOptional() - attrs["catalog"] = attrs["catalog"].SetOptional() - attrs["disposition"] = attrs["disposition"].SetOptional() - attrs["format"] = attrs["format"].SetOptional() - attrs["on_wait_timeout"] = attrs["on_wait_timeout"].SetOptional() - attrs["parameters"] = attrs["parameters"].SetOptional() - attrs["row_limit"] = attrs["row_limit"].SetOptional() - attrs["schema"] = attrs["schema"].SetOptional() - attrs["statement"] = attrs["statement"].SetRequired() - attrs["wait_timeout"] = attrs["wait_timeout"].SetOptional() - attrs["warehouse_id"] = attrs["warehouse_id"].SetRequired() - - return attrs -} - // 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 @@ -6109,6 +5909,36 @@ func (o GetAlertsLegacyRequest) Type(ctx context.Context) attr.Type { } } +type GetConfigRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetConfigRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetConfigRequest) 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, GetConfigRequest +// only implements ToObjectValue() and Type(). +func (o GetConfigRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetConfigRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetDashboardRequest struct { DashboardId types.String `tfsdk:"-"` } @@ -6666,18 +6496,16 @@ type GetWarehouseResponse struct { NumClusters types.Int64 `tfsdk:"num_clusters"` // ODBC parameters for the SQL warehouse OdbcParams types.Object `tfsdk:"odbc_params"` - // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy"` - // State of the warehouse + State types.String `tfsdk:"state"` // 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"` - // 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"` } @@ -6898,6 +6726,36 @@ func (o *GetWarehouseResponse) SetTags(ctx context.Context, v EndpointTags) { o.Tags = vs } +type GetWorkspaceWarehouseConfigRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceWarehouseConfigRequest. +// Container types (types.Map, types.List, types.Set) and 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 GetWorkspaceWarehouseConfigRequest) 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, GetWorkspaceWarehouseConfigRequest +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceWarehouseConfigRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWorkspaceWarehouseConfigRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type GetWorkspaceWarehouseConfigResponse struct { // Optional: Channel selection details Channel types.Object `tfsdk:"channel"` @@ -8794,6 +8652,36 @@ func (o *ListQueryObjectsResponseQuery) SetTags(ctx context.Context, v []types.S o.Tags = types.ListValueMust(t, vs) } +type ListRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListRequest) 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, ListRequest +// only implements ToObjectValue() and Type(). +func (o ListRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListResponse struct { // The total number of dashboards. Count types.Int64 `tfsdk:"count"` @@ -9741,25 +9629,6 @@ type QueryEditContent struct { Tags types.List `tfsdk:"tags"` } -func (newState *QueryEditContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEditContent) { -} - -func (newState *QueryEditContent) SyncEffectiveFieldsDuringRead(existingState QueryEditContent) { -} - -func (c QueryEditContent) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["data_source_id"] = attrs["data_source_id"].SetOptional() - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["options"] = attrs["options"].SetOptional() - attrs["query"] = attrs["query"].SetOptional() - attrs["query_id"] = attrs["query_id"].SetRequired() - attrs["run_as_role"] = attrs["run_as_role"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -10997,25 +10866,6 @@ type QueryPostContent struct { Tags types.List `tfsdk:"tags"` } -func (newState *QueryPostContent) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryPostContent) { -} - -func (newState *QueryPostContent) SyncEffectiveFieldsDuringRead(existingState QueryPostContent) { -} - -func (c QueryPostContent) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["data_source_id"] = attrs["data_source_id"].SetOptional() - attrs["description"] = attrs["description"].SetOptional() - attrs["name"] = attrs["name"].SetOptional() - attrs["options"] = attrs["options"].SetOptional() - attrs["parent"] = attrs["parent"].SetOptional() - attrs["query"] = attrs["query"].SetOptional() - attrs["run_as_role"] = attrs["run_as_role"].SetOptional() - attrs["tags"] = attrs["tags"].SetOptional() - - return attrs -} - // 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 @@ -11276,6 +11126,17 @@ func (o RestoreQueriesLegacyRequest) Type(ctx context.Context) attr.Type { type RestoreResponse struct { } +func (newState *RestoreResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreResponse) { +} + +func (newState *RestoreResponse) SyncEffectiveFieldsDuringRead(existingState RestoreResponse) { +} + +func (c RestoreResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -11461,7 +11322,7 @@ type ResultManifest struct { Chunks types.List `tfsdk:"chunks"` Format types.String `tfsdk:"format"` - // The schema is an ordered list of column descriptions. + Schema types.Object `tfsdk:"schema"` // The total number of bytes in the result set. This field is not available // when using `INLINE` disposition. @@ -11740,20 +11601,6 @@ type SetRequest struct { ObjectType types.String `tfsdk:"-"` } -func (newState *SetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetRequest) { -} - -func (newState *SetRequest) SyncEffectiveFieldsDuringRead(existingState SetRequest) { -} - -func (c SetRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["objectId"] = attrs["objectId"].SetRequired() - attrs["objectType"] = attrs["objectType"].SetRequired() - - return attrs -} - // 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 @@ -11934,26 +11781,6 @@ type SetWorkspaceWarehouseConfigRequest struct { SqlConfigurationParameters types.Object `tfsdk:"sql_configuration_parameters"` } -func (newState *SetWorkspaceWarehouseConfigRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetWorkspaceWarehouseConfigRequest) { -} - -func (newState *SetWorkspaceWarehouseConfigRequest) SyncEffectiveFieldsDuringRead(existingState SetWorkspaceWarehouseConfigRequest) { -} - -func (c SetWorkspaceWarehouseConfigRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["channel"] = attrs["channel"].SetOptional() - attrs["config_param"] = attrs["config_param"].SetOptional() - attrs["data_access_config"] = attrs["data_access_config"].SetOptional() - attrs["enabled_warehouse_types"] = attrs["enabled_warehouse_types"].SetOptional() - attrs["global_param"] = attrs["global_param"].SetOptional() - attrs["google_service_account"] = attrs["google_service_account"].SetOptional() - attrs["instance_profile_arn"] = attrs["instance_profile_arn"].SetOptional() - attrs["security_policy"] = attrs["security_policy"].SetOptional() - attrs["sql_configuration_parameters"] = attrs["sql_configuration_parameters"].SetOptional() - - return attrs -} - // 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 @@ -12360,15 +12187,13 @@ 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"` Result types.Object `tfsdk:"result"` // 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"` - // The status response includes execution state and if relevant, error - // information. + Status types.Object `tfsdk:"status"` } @@ -12516,13 +12341,7 @@ func (o *StatementResponse) SetStatus(ctx context.Context, v StatementStatus) { // information. type StatementStatus struct { Error types.Object `tfsdk:"error"` - // Statement execution state: - `PENDING`: waiting for warehouse - - // `RUNNING`: running - `SUCCEEDED`: execution was successful, result data - // available for fetch - `FAILED`: execution failed; reason for failure - // described in accomanying error message - `CANCELED`: user canceled; can - // 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"` } @@ -13096,7 +12915,6 @@ 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"` @@ -13106,20 +12924,6 @@ type TransferOwnershipRequest struct { ObjectType types.String `tfsdk:"-"` } -func (newState *TransferOwnershipRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransferOwnershipRequest) { -} - -func (newState *TransferOwnershipRequest) SyncEffectiveFieldsDuringRead(existingState TransferOwnershipRequest) { -} - -func (c TransferOwnershipRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["new_owner"] = attrs["new_owner"].SetOptional() - attrs["objectId"] = attrs["objectId"].SetRequired() - attrs["objectType"] = attrs["objectType"].SetRequired() - - return attrs -} - // 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 @@ -13312,21 +13116,6 @@ type UpdateAlertRequest struct { UpdateMask types.String `tfsdk:"update_mask"` } -func (newState *UpdateAlertRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAlertRequest) { -} - -func (newState *UpdateAlertRequest) SyncEffectiveFieldsDuringRead(existingState UpdateAlertRequest) { -} - -func (c UpdateAlertRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["alert"] = attrs["alert"].SetOptional() - attrs["auto_resolve_display_name"] = attrs["auto_resolve_display_name"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - attrs["update_mask"] = attrs["update_mask"].SetRequired() - - return attrs -} - // 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 @@ -13623,21 +13412,6 @@ type UpdateQueryRequest struct { UpdateMask types.String `tfsdk:"update_mask"` } -func (newState *UpdateQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateQueryRequest) { -} - -func (newState *UpdateQueryRequest) SyncEffectiveFieldsDuringRead(existingState UpdateQueryRequest) { -} - -func (c UpdateQueryRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["auto_resolve_display_name"] = attrs["auto_resolve_display_name"].SetOptional() - attrs["id"] = attrs["id"].SetRequired() - attrs["query"] = attrs["query"].SetOptional() - attrs["update_mask"] = attrs["update_mask"].SetRequired() - - return attrs -} - // 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 @@ -13867,6 +13641,17 @@ 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) { +} + +func (c UpdateResponse) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { + + return attrs +} + // 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 @@ -13912,20 +13697,6 @@ type UpdateVisualizationRequest struct { Visualization types.Object `tfsdk:"visualization"` } -func (newState *UpdateVisualizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVisualizationRequest) { -} - -func (newState *UpdateVisualizationRequest) SyncEffectiveFieldsDuringRead(existingState UpdateVisualizationRequest) { -} - -func (c UpdateVisualizationRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["id"] = attrs["id"].SetRequired() - attrs["update_mask"] = attrs["update_mask"].SetRequired() - attrs["visualization"] = attrs["visualization"].SetOptional() - - return attrs -} - // 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 @@ -14058,6 +13829,94 @@ func (o UpdateVisualizationRequestVisualization) Type(ctx context.Context) attr. } } +type UpdateWidgetRequest struct { + // Dashboard ID returned by :method:dashboards/create. + DashboardId types.String `tfsdk:"dashboard_id"` + // Widget ID returned by :method:dashboardwidgets/create + Id types.String `tfsdk:"-"` + + Options types.Object `tfsdk:"options"` + // 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"` + // Query Vizualization ID returned by :method:queryvisualizations/create. + VisualizationId types.String `tfsdk:"visualization_id"` + // Width of a widget + Width types.Int64 `tfsdk:"width"` +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWidgetRequest. +// Container types (types.Map, types.List, types.Set) and 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 UpdateWidgetRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": reflect.TypeOf(WidgetOptions{}), + } +} + +// 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, UpdateWidgetRequest +// only implements ToObjectValue() and Type(). +func (o UpdateWidgetRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "id": o.Id, + "options": o.Options, + "text": o.Text, + "visualization_id": o.VisualizationId, + "width": o.Width, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateWidgetRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "id": types.StringType, + "options": WidgetOptions{}.Type(ctx), + "text": types.StringType, + "visualization_id": types.StringType, + "width": types.Int64Type, + }, + } +} + +// GetOptions returns the value of the Options field in UpdateWidgetRequest as +// a WidgetOptions value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateWidgetRequest) GetOptions(ctx context.Context) (WidgetOptions, bool) { + var e WidgetOptions + if o.Options.IsNull() || o.Options.IsUnknown() { + return e, false + } + var v []WidgetOptions + d := o.Options.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 +} + +// SetOptions sets the value of the Options field in UpdateWidgetRequest. +func (o *UpdateWidgetRequest) SetOptions(ctx context.Context, v WidgetOptions) { + vs := v.ToObjectValue(ctx) + o.Options = vs +} + type User struct { Email types.String `tfsdk:"email"` @@ -14205,7 +14064,7 @@ func (o Visualization) Type(ctx context.Context) attr.Type { type WarehouseAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -14367,7 +14226,7 @@ type WarehousePermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -14539,7 +14398,7 @@ func (o *WarehousePermissions) SetAccessControlList(ctx context.Context, v []War type WarehousePermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -14595,19 +14454,6 @@ type WarehousePermissionsRequest struct { WarehouseId types.String `tfsdk:"-"` } -func (newState *WarehousePermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermissionsRequest) { -} - -func (newState *WarehousePermissionsRequest) SyncEffectiveFieldsDuringRead(existingState WarehousePermissionsRequest) { -} - -func (c WarehousePermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["warehouse_id"] = attrs["warehouse_id"].SetRequired() - - return attrs -} - // 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 diff --git a/internal/service/vectorsearch_tf/legacy_model.go b/internal/service/vectorsearch_tf/legacy_model.go index 75e90b2eed..b48ecdb180 100755 --- a/internal/service/vectorsearch_tf/legacy_model.go +++ b/internal/service/vectorsearch_tf/legacy_model.go @@ -80,20 +80,6 @@ type CreateEndpoint_SdkV2 struct { Name types.String `tfsdk:"name"` } -func (newState *CreateEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateEndpoint_SdkV2) { -} - -func (newState *CreateEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateEndpoint_SdkV2) { -} - -func (c CreateEndpoint_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["endpoint_type"] = attrs["endpoint_type"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 @@ -138,12 +124,7 @@ type CreateVectorIndexRequest_SdkV2 struct { DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec"` // Name of the endpoint to be used for serving the index EndpointName types.String `tfsdk:"endpoint_name"` - // There are 2 types of Vector Search indexes: - `DELTA_SYNC`: An index that - // automatically syncs with a source Delta Table, automatically and - // incrementally updating the index as the 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"` // Name of the index Name types.String `tfsdk:"name"` @@ -151,25 +132,6 @@ type CreateVectorIndexRequest_SdkV2 struct { PrimaryKey types.String `tfsdk:"primary_key"` } -func (newState *CreateVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVectorIndexRequest_SdkV2) { -} - -func (newState *CreateVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVectorIndexRequest_SdkV2) { -} - -func (c CreateVectorIndexRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["delta_sync_index_spec"] = attrs["delta_sync_index_spec"].SetOptional() - attrs["delta_sync_index_spec"] = attrs["delta_sync_index_spec"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["direct_access_index_spec"] = attrs["direct_access_index_spec"].SetOptional() - attrs["direct_access_index_spec"] = attrs["direct_access_index_spec"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["endpoint_name"] = attrs["endpoint_name"].SetRequired() - attrs["index_type"] = attrs["index_type"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["primary_key"] = attrs["primary_key"].SetRequired() - - return attrs -} - // 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 @@ -1948,12 +1910,7 @@ type MiniVectorIndex_SdkV2 struct { Creator types.String `tfsdk:"creator"` // Name of the endpoint associated with the index EndpointName types.String `tfsdk:"endpoint_name"` - // There are 2 types of Vector Search indexes: - `DELTA_SYNC`: An index that - // automatically syncs with a source Delta Table, automatically and - // incrementally updating the index as the 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"` // Name of the index Name types.String `tfsdk:"name"` @@ -2023,19 +1980,6 @@ type PatchEndpointBudgetPolicyRequest_SdkV2 struct { EndpointName types.String `tfsdk:"-"` } -func (newState *PatchEndpointBudgetPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchEndpointBudgetPolicyRequest_SdkV2) { -} - -func (newState *PatchEndpointBudgetPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PatchEndpointBudgetPolicyRequest_SdkV2) { -} - -func (c PatchEndpointBudgetPolicyRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetRequired() - attrs["endpoint_name"] = attrs["endpoint_name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchEndpointBudgetPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2128,20 +2072,6 @@ type QueryVectorIndexNextPageRequest_SdkV2 struct { PageToken types.String `tfsdk:"page_token"` } -func (newState *QueryVectorIndexNextPageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexNextPageRequest_SdkV2) { -} - -func (newState *QueryVectorIndexNextPageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexNextPageRequest_SdkV2) { -} - -func (c QueryVectorIndexNextPageRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["endpoint_name"] = attrs["endpoint_name"].SetOptional() - attrs["index_name"] = attrs["index_name"].SetRequired() - attrs["page_token"] = attrs["page_token"].SetOptional() - - return attrs -} - // 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 @@ -2206,26 +2136,6 @@ type QueryVectorIndexRequest_SdkV2 struct { ScoreThreshold types.Float64 `tfsdk:"score_threshold"` } -func (newState *QueryVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexRequest_SdkV2) { -} - -func (newState *QueryVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexRequest_SdkV2) { -} - -func (c QueryVectorIndexRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["columns"] = attrs["columns"].SetRequired() - attrs["columns_to_rerank"] = attrs["columns_to_rerank"].SetOptional() - attrs["filters_json"] = attrs["filters_json"].SetOptional() - attrs["index_name"] = attrs["index_name"].SetRequired() - attrs["num_results"] = attrs["num_results"].SetOptional() - attrs["query_text"] = attrs["query_text"].SetOptional() - attrs["query_type"] = attrs["query_type"].SetOptional() - attrs["query_vector"] = attrs["query_vector"].SetOptional() - attrs["score_threshold"] = attrs["score_threshold"].SetOptional() - - return attrs -} - // 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 @@ -2662,20 +2572,6 @@ type ScanVectorIndexRequest_SdkV2 struct { NumResults types.Int64 `tfsdk:"num_results"` } -func (newState *ScanVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ScanVectorIndexRequest_SdkV2) { -} - -func (newState *ScanVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ScanVectorIndexRequest_SdkV2) { -} - -func (c ScanVectorIndexRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["index_name"] = attrs["index_name"].SetRequired() - attrs["last_primary_key"] = attrs["last_primary_key"].SetOptional() - attrs["num_results"] = attrs["num_results"].SetOptional() - - return attrs -} - // 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 @@ -2957,19 +2853,6 @@ type UpdateEndpointCustomTagsRequest_SdkV2 struct { EndpointName types.String `tfsdk:"-"` } -func (newState *UpdateEndpointCustomTagsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEndpointCustomTagsRequest_SdkV2) { -} - -func (newState *UpdateEndpointCustomTagsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEndpointCustomTagsRequest_SdkV2) { -} - -func (c UpdateEndpointCustomTagsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["custom_tags"] = attrs["custom_tags"].SetRequired() - attrs["endpoint_name"] = attrs["endpoint_name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEndpointCustomTagsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3207,19 +3090,6 @@ type UpsertDataVectorIndexRequest_SdkV2 struct { InputsJson types.String `tfsdk:"inputs_json"` } -func (newState *UpsertDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertDataVectorIndexRequest_SdkV2) { -} - -func (newState *UpsertDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertDataVectorIndexRequest_SdkV2) { -} - -func (c UpsertDataVectorIndexRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["index_name"] = attrs["index_name"].SetRequired() - attrs["inputs_json"] = attrs["inputs_json"].SetRequired() - - return attrs -} - // 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 @@ -3474,12 +3344,7 @@ type VectorIndex_SdkV2 struct { DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec"` // Name of the endpoint associated with the index EndpointName types.String `tfsdk:"endpoint_name"` - // There are 2 types of Vector Search indexes: - `DELTA_SYNC`: An index that - // automatically syncs with a source Delta Table, automatically and - // incrementally updating the index as the 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"` // Name of the index Name types.String `tfsdk:"name"` diff --git a/internal/service/vectorsearch_tf/model.go b/internal/service/vectorsearch_tf/model.go index eeac2025b3..1d124fe1b3 100755 --- a/internal/service/vectorsearch_tf/model.go +++ b/internal/service/vectorsearch_tf/model.go @@ -79,20 +79,6 @@ type CreateEndpoint struct { Name types.String `tfsdk:"name"` } -func (newState *CreateEndpoint) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateEndpoint) { -} - -func (newState *CreateEndpoint) SyncEffectiveFieldsDuringRead(existingState CreateEndpoint) { -} - -func (c CreateEndpoint) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetOptional() - attrs["endpoint_type"] = attrs["endpoint_type"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - - return attrs -} - // 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 @@ -137,12 +123,7 @@ type CreateVectorIndexRequest struct { DirectAccessIndexSpec types.Object `tfsdk:"direct_access_index_spec"` // Name of the endpoint to be used for serving the index EndpointName types.String `tfsdk:"endpoint_name"` - // There are 2 types of Vector Search indexes: - `DELTA_SYNC`: An index that - // automatically syncs with a source Delta Table, automatically and - // incrementally updating the index as the 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"` // Name of the index Name types.String `tfsdk:"name"` @@ -150,23 +131,6 @@ type CreateVectorIndexRequest struct { PrimaryKey types.String `tfsdk:"primary_key"` } -func (newState *CreateVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVectorIndexRequest) { -} - -func (newState *CreateVectorIndexRequest) SyncEffectiveFieldsDuringRead(existingState CreateVectorIndexRequest) { -} - -func (c CreateVectorIndexRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["delta_sync_index_spec"] = attrs["delta_sync_index_spec"].SetOptional() - attrs["direct_access_index_spec"] = attrs["direct_access_index_spec"].SetOptional() - attrs["endpoint_name"] = attrs["endpoint_name"].SetRequired() - attrs["index_type"] = attrs["index_type"].SetRequired() - attrs["name"] = attrs["name"].SetRequired() - attrs["primary_key"] = attrs["primary_key"].SetRequired() - - return attrs -} - // 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 @@ -1942,12 +1906,7 @@ type MiniVectorIndex struct { Creator types.String `tfsdk:"creator"` // Name of the endpoint associated with the index EndpointName types.String `tfsdk:"endpoint_name"` - // There are 2 types of Vector Search indexes: - `DELTA_SYNC`: An index that - // automatically syncs with a source Delta Table, automatically and - // incrementally updating the index as the 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"` // Name of the index Name types.String `tfsdk:"name"` @@ -2017,19 +1976,6 @@ type PatchEndpointBudgetPolicyRequest struct { EndpointName types.String `tfsdk:"-"` } -func (newState *PatchEndpointBudgetPolicyRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchEndpointBudgetPolicyRequest) { -} - -func (newState *PatchEndpointBudgetPolicyRequest) SyncEffectiveFieldsDuringRead(existingState PatchEndpointBudgetPolicyRequest) { -} - -func (c PatchEndpointBudgetPolicyRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["budget_policy_id"] = attrs["budget_policy_id"].SetRequired() - attrs["endpoint_name"] = attrs["endpoint_name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchEndpointBudgetPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -2122,20 +2068,6 @@ type QueryVectorIndexNextPageRequest struct { PageToken types.String `tfsdk:"page_token"` } -func (newState *QueryVectorIndexNextPageRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexNextPageRequest) { -} - -func (newState *QueryVectorIndexNextPageRequest) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexNextPageRequest) { -} - -func (c QueryVectorIndexNextPageRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["endpoint_name"] = attrs["endpoint_name"].SetOptional() - attrs["index_name"] = attrs["index_name"].SetRequired() - attrs["page_token"] = attrs["page_token"].SetOptional() - - return attrs -} - // 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 @@ -2200,26 +2132,6 @@ type QueryVectorIndexRequest struct { ScoreThreshold types.Float64 `tfsdk:"score_threshold"` } -func (newState *QueryVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexRequest) { -} - -func (newState *QueryVectorIndexRequest) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexRequest) { -} - -func (c QueryVectorIndexRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["columns"] = attrs["columns"].SetRequired() - attrs["columns_to_rerank"] = attrs["columns_to_rerank"].SetOptional() - attrs["filters_json"] = attrs["filters_json"].SetOptional() - attrs["index_name"] = attrs["index_name"].SetRequired() - attrs["num_results"] = attrs["num_results"].SetOptional() - attrs["query_text"] = attrs["query_text"].SetOptional() - attrs["query_type"] = attrs["query_type"].SetOptional() - attrs["query_vector"] = attrs["query_vector"].SetOptional() - attrs["score_threshold"] = attrs["score_threshold"].SetOptional() - - return attrs -} - // 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 @@ -2654,20 +2566,6 @@ type ScanVectorIndexRequest struct { NumResults types.Int64 `tfsdk:"num_results"` } -func (newState *ScanVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ScanVectorIndexRequest) { -} - -func (newState *ScanVectorIndexRequest) SyncEffectiveFieldsDuringRead(existingState ScanVectorIndexRequest) { -} - -func (c ScanVectorIndexRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["index_name"] = attrs["index_name"].SetRequired() - attrs["last_primary_key"] = attrs["last_primary_key"].SetOptional() - attrs["num_results"] = attrs["num_results"].SetOptional() - - return attrs -} - // 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 @@ -2949,19 +2847,6 @@ type UpdateEndpointCustomTagsRequest struct { EndpointName types.String `tfsdk:"-"` } -func (newState *UpdateEndpointCustomTagsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEndpointCustomTagsRequest) { -} - -func (newState *UpdateEndpointCustomTagsRequest) SyncEffectiveFieldsDuringRead(existingState UpdateEndpointCustomTagsRequest) { -} - -func (c UpdateEndpointCustomTagsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["custom_tags"] = attrs["custom_tags"].SetRequired() - attrs["endpoint_name"] = attrs["endpoint_name"].SetRequired() - - return attrs -} - // GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateEndpointCustomTagsRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to @@ -3199,19 +3084,6 @@ type UpsertDataVectorIndexRequest struct { InputsJson types.String `tfsdk:"inputs_json"` } -func (newState *UpsertDataVectorIndexRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertDataVectorIndexRequest) { -} - -func (newState *UpsertDataVectorIndexRequest) SyncEffectiveFieldsDuringRead(existingState UpsertDataVectorIndexRequest) { -} - -func (c UpsertDataVectorIndexRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["index_name"] = attrs["index_name"].SetRequired() - attrs["inputs_json"] = attrs["inputs_json"].SetRequired() - - return attrs -} - // 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 @@ -3463,12 +3335,7 @@ type VectorIndex struct { DirectAccessIndexSpec types.Object `tfsdk:"direct_access_index_spec"` // Name of the endpoint associated with the index EndpointName types.String `tfsdk:"endpoint_name"` - // There are 2 types of Vector Search indexes: - `DELTA_SYNC`: An index that - // automatically syncs with a source Delta Table, automatically and - // incrementally updating the index as the 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"` // Name of the index Name types.String `tfsdk:"name"` diff --git a/internal/service/workspace_tf/legacy_model.go b/internal/service/workspace_tf/legacy_model.go index c50dc27dc1..4fe074bcc9 100755 --- a/internal/service/workspace_tf/legacy_model.go +++ b/internal/service/workspace_tf/legacy_model.go @@ -152,20 +152,6 @@ type CreateCredentialsRequest_SdkV2 struct { PersonalAccessToken types.String `tfsdk:"personal_access_token"` } -func (newState *CreateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialsRequest_SdkV2) { -} - -func (newState *CreateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialsRequest_SdkV2) { -} - -func (c CreateCredentialsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["git_provider"] = attrs["git_provider"].SetRequired() - attrs["git_username"] = attrs["git_username"].SetOptional() - attrs["personal_access_token"] = attrs["personal_access_token"].SetOptional() - - return attrs -} - // 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 @@ -277,22 +263,6 @@ type CreateRepoRequest_SdkV2 struct { Url types.String `tfsdk:"url"` } -func (newState *CreateRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRepoRequest_SdkV2) { -} - -func (newState *CreateRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRepoRequest_SdkV2) { -} - -func (c CreateRepoRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetOptional() - attrs["provider"] = attrs["provider"].SetRequired() - attrs["sparse_checkout"] = attrs["sparse_checkout"].SetOptional() - attrs["sparse_checkout"] = attrs["sparse_checkout"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["url"] = attrs["url"].SetRequired() - - return attrs -} - // 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 @@ -483,22 +453,6 @@ type CreateScope_SdkV2 struct { ScopeBackendType types.String `tfsdk:"scope_backend_type"` } -func (newState *CreateScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScope_SdkV2) { -} - -func (newState *CreateScope_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateScope_SdkV2) { -} - -func (c CreateScope_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["backend_azure_keyvault"] = attrs["backend_azure_keyvault"].SetOptional() - attrs["backend_azure_keyvault"] = attrs["backend_azure_keyvault"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["initial_manage_principal"] = attrs["initial_manage_principal"].SetOptional() - attrs["scope"] = attrs["scope"].SetRequired() - attrs["scope_backend_type"] = attrs["scope_backend_type"].SetOptional() - - return attrs -} - // 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 @@ -665,19 +619,6 @@ type Delete_SdkV2 struct { Recursive types.Bool `tfsdk:"recursive"` } -func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete_SdkV2) { -} - -func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringRead(existingState Delete_SdkV2) { -} - -func (c Delete_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetRequired() - attrs["recursive"] = attrs["recursive"].SetOptional() - - return attrs -} - // 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 @@ -718,19 +659,6 @@ type DeleteAcl_SdkV2 struct { Scope types.String `tfsdk:"scope"` } -func (newState *DeleteAcl_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAcl_SdkV2) { -} - -func (newState *DeleteAcl_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAcl_SdkV2) { -} - -func (c DeleteAcl_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["principal"] = attrs["principal"].SetRequired() - attrs["scope"] = attrs["scope"].SetRequired() - - return attrs -} - // 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 @@ -994,18 +922,6 @@ type DeleteScope_SdkV2 struct { Scope types.String `tfsdk:"scope"` } -func (newState *DeleteScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScope_SdkV2) { -} - -func (newState *DeleteScope_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteScope_SdkV2) { -} - -func (c DeleteScope_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["scope"] = attrs["scope"].SetRequired() - - return attrs -} - // 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 @@ -1074,19 +990,6 @@ type DeleteSecret_SdkV2 struct { Scope types.String `tfsdk:"scope"` } -func (newState *DeleteSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSecret_SdkV2) { -} - -func (newState *DeleteSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSecret_SdkV2) { -} - -func (c DeleteSecret_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["scope"] = attrs["scope"].SetRequired() - - return attrs -} - // 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 @@ -2021,22 +1924,6 @@ type Import_SdkV2 struct { Path types.String `tfsdk:"path"` } -func (newState *Import_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Import_SdkV2) { -} - -func (newState *Import_SdkV2) SyncEffectiveFieldsDuringRead(existingState Import_SdkV2) { -} - -func (c Import_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["content"] = attrs["content"].SetOptional() - attrs["format"] = attrs["format"].SetOptional() - attrs["language"] = attrs["language"].SetOptional() - attrs["overwrite"] = attrs["overwrite"].SetOptional() - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 @@ -2231,6 +2118,36 @@ func (o *ListAclsResponse_SdkV2) SetItems(ctx context.Context, v []AclItem_SdkV2 o.Items = types.ListValueMust(t, vs) } +type ListCredentialsRequest_SdkV2 struct { +} + +// 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 +// 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 ListCredentialsRequest_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, ListCredentialsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCredentialsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListCredentialsResponse_SdkV2 struct { // List of credentials. Credentials types.List `tfsdk:"credentials"` @@ -2515,6 +2432,36 @@ func (o *ListResponse_SdkV2) SetObjects(ctx context.Context, v []ObjectInfo_SdkV o.Objects = types.ListValueMust(t, vs) } +type ListScopesRequest_SdkV2 struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListScopesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListScopesRequest_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, ListScopesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListScopesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListScopesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListScopesResponse_SdkV2 struct { // The available secret scopes. Scopes types.List `tfsdk:"scopes"` @@ -2754,18 +2701,6 @@ type Mkdirs_SdkV2 struct { Path types.String `tfsdk:"path"` } -func (newState *Mkdirs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mkdirs_SdkV2) { -} - -func (newState *Mkdirs_SdkV2) SyncEffectiveFieldsDuringRead(existingState Mkdirs_SdkV2) { -} - -func (c Mkdirs_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 @@ -2938,20 +2873,6 @@ type PutAcl_SdkV2 struct { Scope types.String `tfsdk:"scope"` } -func (newState *PutAcl_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAcl_SdkV2) { -} - -func (newState *PutAcl_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAcl_SdkV2) { -} - -func (c PutAcl_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["permission"] = attrs["permission"].SetRequired() - attrs["principal"] = attrs["principal"].SetRequired() - attrs["scope"] = attrs["scope"].SetRequired() - - return attrs -} - // 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 @@ -3028,21 +2949,6 @@ type PutSecret_SdkV2 struct { StringValue types.String `tfsdk:"string_value"` } -func (newState *PutSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutSecret_SdkV2) { -} - -func (newState *PutSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutSecret_SdkV2) { -} - -func (c PutSecret_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["bytes_value"] = attrs["bytes_value"].SetOptional() - attrs["key"] = attrs["key"].SetRequired() - attrs["scope"] = attrs["scope"].SetRequired() - attrs["string_value"] = attrs["string_value"].SetOptional() - - return attrs -} - // 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 @@ -3113,7 +3019,7 @@ func (o PutSecretResponse_SdkV2) Type(ctx context.Context) attr.Type { type RepoAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -3385,7 +3291,7 @@ type RepoPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3557,7 +3463,7 @@ func (o *RepoPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []Re type RepoPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3613,19 +3519,6 @@ type RepoPermissionsRequest_SdkV2 struct { RepoId types.String `tfsdk:"-"` } -func (newState *RepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermissionsRequest_SdkV2) { -} - -func (newState *RepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoPermissionsRequest_SdkV2) { -} - -func (c RepoPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["repo_id"] = attrs["repo_id"].SetRequired() - - return attrs -} - // 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 @@ -4019,21 +3912,6 @@ type UpdateCredentialsRequest_SdkV2 struct { PersonalAccessToken types.String `tfsdk:"personal_access_token"` } -func (newState *UpdateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialsRequest_SdkV2) { -} - -func (newState *UpdateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialsRequest_SdkV2) { -} - -func (c UpdateCredentialsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["credential_id"] = attrs["credential_id"].SetRequired() - attrs["git_provider"] = attrs["git_provider"].SetRequired() - attrs["git_username"] = attrs["git_username"].SetOptional() - attrs["personal_access_token"] = attrs["personal_access_token"].SetOptional() - - return attrs -} - // 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 @@ -4127,22 +4005,6 @@ type UpdateRepoRequest_SdkV2 struct { Tag types.String `tfsdk:"tag"` } -func (newState *UpdateRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRepoRequest_SdkV2) { -} - -func (newState *UpdateRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRepoRequest_SdkV2) { -} - -func (c UpdateRepoRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["branch"] = attrs["branch"].SetOptional() - attrs["repo_id"] = attrs["repo_id"].SetRequired() - attrs["sparse_checkout"] = attrs["sparse_checkout"].SetOptional() - attrs["sparse_checkout"] = attrs["sparse_checkout"].(tfschema.ListNestedAttributeBuilder).AddValidator(listvalidator.SizeAtMost(1)).(tfschema.AttributeBuilder) - attrs["tag"] = attrs["tag"].SetOptional() - - return attrs -} - // 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 @@ -4254,7 +4116,7 @@ func (o UpdateRepoResponse_SdkV2) Type(ctx context.Context) attr.Type { type WorkspaceObjectAccessControlRequest_SdkV2 struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -4416,7 +4278,7 @@ type WorkspaceObjectPermission_SdkV2 struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4588,7 +4450,7 @@ func (o *WorkspaceObjectPermissions_SdkV2) SetAccessControlList(ctx context.Cont type WorkspaceObjectPermissionsDescription_SdkV2 struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4646,20 +4508,6 @@ type WorkspaceObjectPermissionsRequest_SdkV2 struct { WorkspaceObjectType types.String `tfsdk:"-"` } -func (newState *WorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermissionsRequest_SdkV2) { -} - -func (newState *WorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissionsRequest_SdkV2) { -} - -func (c WorkspaceObjectPermissionsRequest_SdkV2) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["workspace_object_id"] = attrs["workspace_object_id"].SetRequired() - attrs["workspace_object_type"] = attrs["workspace_object_type"].SetRequired() - - return attrs -} - // 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 6dd40aff0c..ccdfc0953a 100755 --- a/internal/service/workspace_tf/model.go +++ b/internal/service/workspace_tf/model.go @@ -151,20 +151,6 @@ type CreateCredentialsRequest struct { PersonalAccessToken types.String `tfsdk:"personal_access_token"` } -func (newState *CreateCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialsRequest) { -} - -func (newState *CreateCredentialsRequest) SyncEffectiveFieldsDuringRead(existingState CreateCredentialsRequest) { -} - -func (c CreateCredentialsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["git_provider"] = attrs["git_provider"].SetRequired() - attrs["git_username"] = attrs["git_username"].SetOptional() - attrs["personal_access_token"] = attrs["personal_access_token"].SetOptional() - - return attrs -} - // 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 @@ -276,21 +262,6 @@ type CreateRepoRequest struct { Url types.String `tfsdk:"url"` } -func (newState *CreateRepoRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRepoRequest) { -} - -func (newState *CreateRepoRequest) SyncEffectiveFieldsDuringRead(existingState CreateRepoRequest) { -} - -func (c CreateRepoRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetOptional() - attrs["provider"] = attrs["provider"].SetRequired() - attrs["sparse_checkout"] = attrs["sparse_checkout"].SetOptional() - attrs["url"] = attrs["url"].SetRequired() - - return attrs -} - // 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 @@ -480,21 +451,6 @@ type CreateScope struct { ScopeBackendType types.String `tfsdk:"scope_backend_type"` } -func (newState *CreateScope) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScope) { -} - -func (newState *CreateScope) SyncEffectiveFieldsDuringRead(existingState CreateScope) { -} - -func (c CreateScope) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["backend_azure_keyvault"] = attrs["backend_azure_keyvault"].SetOptional() - attrs["initial_manage_principal"] = attrs["initial_manage_principal"].SetOptional() - attrs["scope"] = attrs["scope"].SetRequired() - attrs["scope_backend_type"] = attrs["scope_backend_type"].SetOptional() - - return attrs -} - // 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 @@ -661,19 +617,6 @@ type Delete struct { Recursive types.Bool `tfsdk:"recursive"` } -func (newState *Delete) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete) { -} - -func (newState *Delete) SyncEffectiveFieldsDuringRead(existingState Delete) { -} - -func (c Delete) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetRequired() - attrs["recursive"] = attrs["recursive"].SetOptional() - - return attrs -} - // 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 @@ -714,19 +657,6 @@ type DeleteAcl struct { Scope types.String `tfsdk:"scope"` } -func (newState *DeleteAcl) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAcl) { -} - -func (newState *DeleteAcl) SyncEffectiveFieldsDuringRead(existingState DeleteAcl) { -} - -func (c DeleteAcl) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["principal"] = attrs["principal"].SetRequired() - attrs["scope"] = attrs["scope"].SetRequired() - - return attrs -} - // 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 @@ -990,18 +920,6 @@ type DeleteScope struct { Scope types.String `tfsdk:"scope"` } -func (newState *DeleteScope) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScope) { -} - -func (newState *DeleteScope) SyncEffectiveFieldsDuringRead(existingState DeleteScope) { -} - -func (c DeleteScope) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["scope"] = attrs["scope"].SetRequired() - - return attrs -} - // 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 @@ -1070,19 +988,6 @@ type DeleteSecret struct { Scope types.String `tfsdk:"scope"` } -func (newState *DeleteSecret) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSecret) { -} - -func (newState *DeleteSecret) SyncEffectiveFieldsDuringRead(existingState DeleteSecret) { -} - -func (c DeleteSecret) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["key"] = attrs["key"].SetRequired() - attrs["scope"] = attrs["scope"].SetRequired() - - return attrs -} - // 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 @@ -2016,22 +1921,6 @@ type Import struct { Path types.String `tfsdk:"path"` } -func (newState *Import) SyncEffectiveFieldsDuringCreateOrUpdate(plan Import) { -} - -func (newState *Import) SyncEffectiveFieldsDuringRead(existingState Import) { -} - -func (c Import) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["content"] = attrs["content"].SetOptional() - attrs["format"] = attrs["format"].SetOptional() - attrs["language"] = attrs["language"].SetOptional() - attrs["overwrite"] = attrs["overwrite"].SetOptional() - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 @@ -2226,6 +2115,36 @@ func (o *ListAclsResponse) SetItems(ctx context.Context, v []AclItem) { o.Items = types.ListValueMust(t, vs) } +type ListCredentialsRequest struct { +} + +// 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 +// 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 ListCredentialsRequest) 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, ListCredentialsRequest +// only implements ToObjectValue() and Type(). +func (o ListCredentialsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCredentialsRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListCredentialsResponse struct { // List of credentials. Credentials types.List `tfsdk:"credentials"` @@ -2510,6 +2429,36 @@ func (o *ListResponse) SetObjects(ctx context.Context, v []ObjectInfo) { o.Objects = types.ListValueMust(t, vs) } +type ListScopesRequest struct { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListScopesRequest. +// Container types (types.Map, types.List, types.Set) and 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 ListScopesRequest) 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, ListScopesRequest +// only implements ToObjectValue() and Type(). +func (o ListScopesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) +} + +// Type implements basetypes.ObjectValuable. +func (o ListScopesRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + type ListScopesResponse struct { // The available secret scopes. Scopes types.List `tfsdk:"scopes"` @@ -2749,18 +2698,6 @@ type Mkdirs struct { Path types.String `tfsdk:"path"` } -func (newState *Mkdirs) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mkdirs) { -} - -func (newState *Mkdirs) SyncEffectiveFieldsDuringRead(existingState Mkdirs) { -} - -func (c Mkdirs) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["path"] = attrs["path"].SetRequired() - - return attrs -} - // 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 @@ -2933,20 +2870,6 @@ type PutAcl struct { Scope types.String `tfsdk:"scope"` } -func (newState *PutAcl) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAcl) { -} - -func (newState *PutAcl) SyncEffectiveFieldsDuringRead(existingState PutAcl) { -} - -func (c PutAcl) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["permission"] = attrs["permission"].SetRequired() - attrs["principal"] = attrs["principal"].SetRequired() - attrs["scope"] = attrs["scope"].SetRequired() - - return attrs -} - // 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 @@ -3023,21 +2946,6 @@ type PutSecret struct { StringValue types.String `tfsdk:"string_value"` } -func (newState *PutSecret) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutSecret) { -} - -func (newState *PutSecret) SyncEffectiveFieldsDuringRead(existingState PutSecret) { -} - -func (c PutSecret) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["bytes_value"] = attrs["bytes_value"].SetOptional() - attrs["key"] = attrs["key"].SetRequired() - attrs["scope"] = attrs["scope"].SetRequired() - attrs["string_value"] = attrs["string_value"].SetOptional() - - return attrs -} - // 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 @@ -3108,7 +3016,7 @@ func (o PutSecretResponse) Type(ctx context.Context) attr.Type { type RepoAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -3379,7 +3287,7 @@ type RepoPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3551,7 +3459,7 @@ func (o *RepoPermissions) SetAccessControlList(ctx context.Context, v []RepoAcce type RepoPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -3607,19 +3515,6 @@ type RepoPermissionsRequest struct { RepoId types.String `tfsdk:"-"` } -func (newState *RepoPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermissionsRequest) { -} - -func (newState *RepoPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState RepoPermissionsRequest) { -} - -func (c RepoPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["repo_id"] = attrs["repo_id"].SetRequired() - - return attrs -} - // 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 @@ -4012,21 +3907,6 @@ type UpdateCredentialsRequest struct { PersonalAccessToken types.String `tfsdk:"personal_access_token"` } -func (newState *UpdateCredentialsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialsRequest) { -} - -func (newState *UpdateCredentialsRequest) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialsRequest) { -} - -func (c UpdateCredentialsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["credential_id"] = attrs["credential_id"].SetRequired() - attrs["git_provider"] = attrs["git_provider"].SetRequired() - attrs["git_username"] = attrs["git_username"].SetOptional() - attrs["personal_access_token"] = attrs["personal_access_token"].SetOptional() - - return attrs -} - // 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 @@ -4120,21 +4000,6 @@ type UpdateRepoRequest struct { Tag types.String `tfsdk:"tag"` } -func (newState *UpdateRepoRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRepoRequest) { -} - -func (newState *UpdateRepoRequest) SyncEffectiveFieldsDuringRead(existingState UpdateRepoRequest) { -} - -func (c UpdateRepoRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["branch"] = attrs["branch"].SetOptional() - attrs["repo_id"] = attrs["repo_id"].SetRequired() - attrs["sparse_checkout"] = attrs["sparse_checkout"].SetOptional() - attrs["tag"] = attrs["tag"].SetOptional() - - return attrs -} - // 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 @@ -4246,7 +4111,7 @@ func (o UpdateRepoResponse) Type(ctx context.Context) attr.Type { type WorkspaceObjectAccessControlRequest struct { // name of the group GroupName types.String `tfsdk:"group_name"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` // application ID of a service principal ServicePrincipalName types.String `tfsdk:"service_principal_name"` @@ -4408,7 +4273,7 @@ type WorkspaceObjectPermission struct { Inherited types.Bool `tfsdk:"inherited"` InheritedFromObject types.List `tfsdk:"inherited_from_object"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4580,7 +4445,7 @@ func (o *WorkspaceObjectPermissions) SetAccessControlList(ctx context.Context, v type WorkspaceObjectPermissionsDescription struct { Description types.String `tfsdk:"description"` - // Permission level + PermissionLevel types.String `tfsdk:"permission_level"` } @@ -4638,20 +4503,6 @@ type WorkspaceObjectPermissionsRequest struct { WorkspaceObjectType types.String `tfsdk:"-"` } -func (newState *WorkspaceObjectPermissionsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermissionsRequest) { -} - -func (newState *WorkspaceObjectPermissionsRequest) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissionsRequest) { -} - -func (c WorkspaceObjectPermissionsRequest) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder { - attrs["access_control_list"] = attrs["access_control_list"].SetOptional() - attrs["workspace_object_id"] = attrs["workspace_object_id"].SetRequired() - attrs["workspace_object_type"] = attrs["workspace_object_type"].SetRequired() - - return attrs -} - // 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/mlflow/resource_mlflow_model.go b/mlflow/resource_mlflow_model.go index 80692cee87..687b42c6e3 100644 --- a/mlflow/resource_mlflow_model.go +++ b/mlflow/resource_mlflow_model.go @@ -61,7 +61,8 @@ func ResourceMlflowModel() common.Resource { } var req ml.UpdateModelRequest common.DataToStructPointer(d, s, &req) - return w.ModelRegistry.UpdateModel(ctx, req) + _, err = w.ModelRegistry.UpdateModel(ctx, req) + return err }, Delete: func(ctx context.Context, d *schema.ResourceData, c *common.DatabricksClient) error { w, err := c.WorkspaceClient() diff --git a/mlflow/resource_mlflow_webhook.go b/mlflow/resource_mlflow_webhook.go index f37c0feffb..e8aa37a20c 100644 --- a/mlflow/resource_mlflow_webhook.go +++ b/mlflow/resource_mlflow_webhook.go @@ -95,7 +95,8 @@ func ResourceMlflowWebhook() common.Resource { var m ml.UpdateRegistryWebhook common.DataToStructPointer(d, s, &m) m.Id = d.Id() - return w.ModelRegistry.UpdateWebhook(ctx, m) + _, err = w.ModelRegistry.UpdateWebhook(ctx, m) + return err }, Delete: func(ctx context.Context, d *schema.ResourceData, c *common.DatabricksClient) error { w, err := c.WorkspaceClient()